Apache 2.0 + PHP + PostgreSQL no Slackware
Neste tutorial ensino como configurar e instalar o Apache 2, PHP e banco de dados PostgreSQL no Slackware.
Parte 4: PHP
Vamos agora a última parte do nosso tutorial, o PHP.
$ cd /usr/local/src/
$ tar -zxvf php-4.3.7.tar.gz
$ cd php-4.3.7
Agora vem a parte trabalhosa, o ./configure! Ei-la:
$ ./configure --prefix=/usr --disable-static \
--with-apxs2=/etc/apache2/bin/apxs \
--sysconfdir=/etc \
--enable-discard-path \
--with-config-file-path=/etc/apache2 \
--enable-safe-mode \
--with-openssl \
--enable-bcmath \
--with-bz2 \
--with-pic \
--enable-calendar \
--enable-ctype \
--with-gdbm \
--with-db3 \
--enable-dbase \
--enable-ftp \
--with-iconv \
--with-gd \
--enable-gd-native-ttf \
--with-jpeg-dir=/usr \
--with-png \
--with-gmp \
--with-mysql=shared,/usr \
--with-xml=shared,/usr \
--with-gettext=shared,/usr \
--with-mm=/usr \
--enable-trans-sid \
--enable-shmop \
--enable-sockets \
--with-regex=php \
--enable-sysvsem \
--enable-sysvshm \
--enable-yp \
--enable-memory-limit \
--with-tsrm-pthreads \
--enable-shared \
--disable-debug \
--with-zlib=/usr \
--with-pgsql=/usr/local/pgsql
$ make
$ su
# make install
# cp /usr/local/src/php-4.3.7/php.ini-dist /etc/apache2/php.ini
Reinicie seu servidor Apache2 e o PHP já deverá estar funcionando! Crie um arquivo teste.php dentro da pasta /var/www/htdocs, contendo:
$ cd /usr/local/src/
$ tar -zxvf php-4.3.7.tar.gz
$ cd php-4.3.7
Agora vem a parte trabalhosa, o ./configure! Ei-la:
$ ./configure --prefix=/usr --disable-static \
--with-apxs2=/etc/apache2/bin/apxs \
--sysconfdir=/etc \
--enable-discard-path \
--with-config-file-path=/etc/apache2 \
--enable-safe-mode \
--with-openssl \
--enable-bcmath \
--with-bz2 \
--with-pic \
--enable-calendar \
--enable-ctype \
--with-gdbm \
--with-db3 \
--enable-dbase \
--enable-ftp \
--with-iconv \
--with-gd \
--enable-gd-native-ttf \
--with-jpeg-dir=/usr \
--with-png \
--with-gmp \
--with-mysql=shared,/usr \
--with-xml=shared,/usr \
--with-gettext=shared,/usr \
--with-mm=/usr \
--enable-trans-sid \
--enable-shmop \
--enable-sockets \
--with-regex=php \
--enable-sysvsem \
--enable-sysvshm \
--enable-yp \
--enable-memory-limit \
--with-tsrm-pthreads \
--enable-shared \
--disable-debug \
--with-zlib=/usr \
--with-pgsql=/usr/local/pgsql
$ make
$ su
# make install
# cp /usr/local/src/php-4.3.7/php.ini-dist /etc/apache2/php.ini
Reinicie seu servidor Apache2 e o PHP já deverá estar funcionando! Crie um arquivo teste.php dentro da pasta /var/www/htdocs, contendo:
<?
phpinfo();
?>
phpinfo();
?>
Salve e acesse de seu navegador:
http://localhost/teste.php
Se aparecerem informações de seu servidor, é porque está tudo funcionando! Senão, de uma revisada neste artigo, ou então me envie um e-mail que terei prazer em ajudar:
felipejunges@hotmail.com
Forte abraço e até a próxima!
Mas isso é o de menos.
[]'s