Ubuntu 16.04 LAPP Setup: Difference between revisions
Created page with "Install Apache sudo apt-get install apache2 Install Postgresql sudo apt-get install postgresql Install PHP 7.0 sudo apt-get install php sudo apt-get install php7.0-pgsql" |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''Using Ubuntu 16.04 as a host''' | |||
Install Apache | Install Apache | ||
sudo apt-get install apache2 | sudo apt-get install apache2 | ||
sudo apt install libapache2-mod-php | |||
Install Postgresql | Install Postgresql | ||
sudo apt-get install postgresql postgresql-contrib | |||
The contrib is used with PGadmin III. The install creates a system user account: postgres | |||
Change O/S user to postgres and open a Postgres session | |||
sudo -i -u postgres | |||
psql | |||
In the pg_hba.conf, change the host to 'trust' to get operational | |||
# Database administrative login by Unix domain socket | |||
local all postgres peer | |||
# TYPE DATABASE USER ADDRESS METHOD | |||
# "local" is for Unix domain socket connections only | |||
local all all peer | |||
# IPv4 local connections: | |||
host all all 127.0.0.1/32 trust | |||
In the postgresql.conf, change 'listen_addresses' to get operational | |||
listen_addresses = '*' | |||
After creating tables and accounts, login using: | |||
$ psql -h localhost -U test -d test | |||
Install PHP 7.0 | Install PHP 7.0 | ||
sudo apt-get install php | |||
sudo apt-get install php-pgsql php-cgi | |||
Restart apache2 | |||
sudo | sudo service apache2 restart |
Latest revision as of 13:05, 15 June 2016
Using Ubuntu 16.04 as a host
Install Apache
sudo apt-get install apache2 sudo apt install libapache2-mod-php
Install Postgresql
sudo apt-get install postgresql postgresql-contrib
The contrib is used with PGadmin III. The install creates a system user account: postgres
Change O/S user to postgres and open a Postgres session
sudo -i -u postgres psql
In the pg_hba.conf, change the host to 'trust' to get operational
# Database administrative login by Unix domain socket local all postgres peer # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all peer # IPv4 local connections: host all all 127.0.0.1/32 trust
In the postgresql.conf, change 'listen_addresses' to get operational
listen_addresses = '*'
After creating tables and accounts, login using:
$ psql -h localhost -U test -d test
Install PHP 7.0
sudo apt-get install php sudo apt-get install php-pgsql php-cgi
Restart apache2
sudo service apache2 restart