Apache, PHP e PostgreSQL no Ubuntu
Este post mostra como instalar o Apache, PHP e o PostgreSQL no Ubuntu. Estou usando o Ubuntu 9.10 mas serve para versões anteriores.
PostgreSQL e PGAdmin
$ sudo aptitude install postgresql-8.4 pgadmin3
Apache, PHP e suporte ao PostgreSQL pelo PHP
$ sudo aptitude install apache2 php5 php5-pgsql libpq-dev php-pear php5-xsl php5-gd libapache2-mod-php5 php5-curl php5-sqlite php5-xdebug
Para alterar a senha do PostgreSQL
$ su postgres
$ psql
# alter role postgres password 'nova_senha';
Arquivos de configuração
/etc/php5/apache2
/etc/php5/apache2/php.ini
/etc/postgresql/8.3/main/pg_hba.conf
/etc/postgresql/8.3/main/postgresql.conf
Restartar os Serviços
sudo /etc/init.d/apache2 restart
sudo /etc/init.d/postgresql-8.3 restart