Install a LAMP server
To get our software up and running you first need to install a LAMP server, the Subversion version control system, and other tools that will help in development. Assuming you are running an Ubuntu environment this can be done via the following.
sudo apt-get update sudo apt-get install lamp-server^ sudo apt-get install php5-cli sudo apt-get install phpmyadmin sudo apt-get install subversion
During installation, you will be asked to select a root user and corresponding password for MySQL. To confirm that the lamp server is up and running, navigate to http://localhost. You should see the following.
Likewise, to check that phpmyadmin is installed correctly, navigate to http://localhost/phpmyadmin. Hopefully it looks like this.
You should be able to login using the root username and password you selected earlier.
The default LAMP installation serves files from the /var/www directory. The Apache configuration file is located here /etc/apache2/sites-available/default. Since we will be altering this file in the next section, and since we will be using subversion extensively, you might want to read about placing your /etc directory under version control.
Installing property management software
Next, lets prepare a place to contain the software in your home directory.
cd ~ mkdir projects cd projects svn co http://www.nerdsofgotham.com/svn/pms/branch/appukp pms
appukp is your exclusive branch of the code and it will be exported into the pms directory.
We will now need to point Apache’s webroot to the checked out web directory. First, we will need to change the Apache user and group to be yours.
cd /etc/apache2/ vi envvars
you need to change the following lines to correspond to your username and group.
export APACHE_RUN_USER=your_username export APACHE_RUN_GROUP=your_group
Depending on your distribution, you may need to update the Apache config file ( /etc/apache2/sites-available/default ) so that it allows Apache to follow symlinks. Make sure that the <Directory “/var/www” > section of the config file looks like below. In particular that you allow the FollowSymLinks option for this directory. Secondly, to see Symfony’s debugging icons, add the section corresponding to the Alias /sf.
<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www <Directory "/var/www" > Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny Allow from all </Directory> Alias /sf /home/your_username/projects/pms/lib/vendor/symfony/data/web/sf <Directory "/home/your_username/projects/pms/lib/vendor/symfony/data/web/sf"> AllowOverride All Allow from All </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost>
To have these changes take affect you will need to restart the Apache server.
sudo apache2ctl restartNext, we will need to set up the database. I have written a small script to get this done. You can find it below.
cd ~/projects/pms/data/sql mysql -u root -p < setup_databases.sql
Now lets build the app.
cd ~/projects/pms bash build
At last, you should be able to navigate to the app http://localhost/pm_dev.php .

