Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
CSC415 Fall 14 - VM Setup Script
# Resynch the package index files from the source and upgrade the installed software
# base from the release image
sudo apt-get -y update
sudo apt-get -y upgrade
# Install the necessary software for the class
sudo apt-get -y install apache2 postgresql postgresql-contrib cakephp phpPgAdmin git
# Copy the phppgadmin config file to the correct location for apache2 (not sure
# why this was not done by the installer) and edit to open up the interface so
# that non-local users (local to the VM) can view the admin page (campus users).
#sudo cp /etc/apache2/conf.d/phppgadmin /etc/apache2/conf-enabled/phppgadmin.conf
sudo sed -i '/^deny from all/d' /etc/apache2/conf.d/phppgadmin
sudo sed -i 's/^# \(allow from all\)/\1/' /etc/apache2/conf.d/phppgadmin
sudo ln -s /etc/apache2/conf.d/phppgadmin /etc/apache2/conf-enabled/phppgadmin.conf
# Enable login access to the 'postgres' user
sudo sed -i "s/\\$conf['extra_login_security'] = true;/\\$conf['extra_login_security'] = false;/" /etc/phppgadmin/
# Sets the password for the "postgres" database to the value of 'password'
sudo -u postgres psql -U postgres -d postgres -c "alter user postgres with password 'password';"
# Restart the apache2 service
sudo service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.