This LAPP is to be built based on Ubuntu (or Debian or any derivative of the Ubuntu)
Install Postgresql
sudo apt-get install postgresql-8.1 php5-pgsql
Install Apache
- The following mod-security, ldap, and odbc libraries are optional:
sudo apt-get install libapache2-mod-security php5-ldap php5-odbc
- Restart Apache
============== below are optional or if you know what to do please skip ==============
Install other software (optional)
sudo apt-get install openssh-server unattended-upgrades sudo apt-get install unzip zip aspell-en aspell-fr aspell-de aspell-es sudo apt-get install curl php5-curl php5-xmlrpc sudo apt-get install clamav-base clamav-freshclam clamav
Configure Postgres (if you know what to do please skip)
- Create the database user 'webuser'.
- Enter in a NewDatabasePassword here, then answer 'N' to the question.
- Create the database 'webdb' for the user 'webuser'. Enter the password that you just created.
- Secure the postgresql database with an admin password.
# ALTER USER postgres WITH PASSWORD 'NewAdminDatabasePassword';
# \q
- Edit the file '/etc/postgresql/8.1/main/pg_hba.conf' and on line 79 change the words ident sameuser to md5.
- Restart the database:
1 Comments:
I spent the last two hours googling and reading to be certain of the exact right way to do this on Ubuntu (unfortunate there's no tasksel for LAPP the way there is for LAMP). This was a very good and helpful post! Thank you!
If I were to suggest anything, you might want to clarify that you only need to edit the pg_hba.conf file to md5 if you're wanting to log into the database remotely.
For many people, leaving it in the default configuration (restricted to local access only--which includes any service running on the same machine, e.g. phppgadmin) is good enough.
Post a Comment