Ubuntu LAPP Stack

This script will build an Ubuntu LAPP Stack (Linux Apache PostgreSQL PHP). This script also includes WebMin to help manage the server.


sudo apt-get update
sudo apt-get -y dist-upgrade
sudo apt-get install -f

sudo apt-get -y install openssh-server openssl
sudo apt-get -y install apache2 php5 libapache2-mod-php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql php5-pgsql php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
sudo apt-get -y install samba samba-common samba-common-bin

sudo a2enmod ssl
sudo a2enmod rewrite
sudo a2enmod suexec
sudo a2enmod include
sudo a2enmod dav_fs
sudo a2enmod dav
sudo service apache2 restart

-- Install WebMin
wget http://sourceforge.net/projects/webadmin/files/webmin/1.550/webmin_1.550_all.deb/download
cp download webmin.deb
sudo dpkg -i webmin.deb
sudo apt-get install -f

-- Postgres 9
sudo apt-get -y install python-software-properties
sudo add-apt-repository ppa:pitti/postgresql
sudo apt-get update
sudo apt-get -y install postgresql-9.1 libpq-dev

echo "Set Postgres Access for remote users"
echo "Add all all 0.0.0.0/0 md5 to pg_hba.conf"
echo "Set listen_addresses='*' in postgresql.conf "
echo
echo "Change the postgres user password"
echo "su postgres"
echo "psql -d template1"
echo "ALTER USER postgres WITH PASSWORD 'your password'";