Instalasi Apache 2.0.47 (DSO+suexec)+PHP 4.3.2 (Quick and Dirty)

Asfihani ([email protected])

31 Juli 2003

Download dan instal apache versi 2.0.47 :

[root@nablus src]# wget http://apache.secsup.org/dist/httpd/httpd-2.0.47.tar.gz
[root@nablus src]# tar -xzvf httpd-2.0.47.tar.gz
[root@nablus src]# cd httpd-2.0.47
[root@nablus httpd-2.0.47]# ./configure --prefix=/usr/local/httpd-2.0.47 \ 
--enable-mods-shared=all \ 
--enable-suexec \ 
--with-suexec-bin=/usr/local/httpd-2.0.47/bin/suexec \ 
--with-suexec-caller=www \ 
--with-suexec-userdir=htdocs \ 
--with-suexec-docroot=/ \ 
--with-suexec-uidmin=99 \ 
--with-suexec-gidmin=99 \ 
--with-suexec-logfile=/usr/local/httpd-2.0.47/logs/suexec_log \ 
--with-suexec-safepath=/usr/local/bin:/usr/bin:/bin
[root@nablus httpd-2.0.47]# make
[root@nablus httpd-2.0.47]# make install

Download dan install imap (disini imap digunakan agar --with-imap di php bisa berjalan) :

[root@nablus src]# wget ftp://ftp.cac.washington.edu/mail/imap.tar.Z 
[root@nablus src]# tar -xzvf imap.tar.Z 
[root@nablus src]# cd imap-2002d 
[root@nablus imap-2002d]# make slx

Jika error, coba dengan perintah dibawah ini :

[root@nablus imap-2002d]# make slx SSLTYPE=none 

Buat simlink :

[root@nablus imap-2002d]# ln -s c-client lib
[root@nablus imap-2002d]# ln -s c-client include

Download dan instal php versi 4.3.2 :

[root@nablus src]# wget http://us2.php.net/distributions/php-4.3.2.tar.bz2
[root@nablus src]# tar -jxvf php-4.3.2.tar.bz2
[root@nablus src]# cd php-4.3.2
[root@nablus php-4.3.2]# ./configure \ 
--with-apxs2=/usr/local/httpd-2.0.47/bin/apxs \ 
--with-config-file-path=/usr/local/httpd-2.0.47/conf \ 
--with-imap=../imap-2002d \ 
--with-jpeg-dir \ 
--with-ttf \ 
--with-ftp \ 
--with-gettext \ 
--with-dbase \ 
--with-filepro \ 
--with-zlib \ 
--with-xml \ 
--with-gdbm \ 
--disable-display-source \ 
--disable-short-tags \ 
--enable-track-vars \ 
--enable-versioning \ 
--enable-memory-limit 
[root@nablus php-4.3.2]# make
[root@nablus php-4.3.2]# make install
[root@nablus php-4.3.2]# cp php.ini-dist /usr/local/httpd-2.0.47/conf/php.ini

Edit file /usr/local/httpd-2.0.47/conf/httpd.conf, jika diperlukan ubah pada ServerName dan ServerAdmin dan serta tambahkan :

AddType application/x-httpd-php .php 
DirectoryIndex index.html index.php

Start apache :

[root@nablus asfik]# /usr/local/httpd-2.0.47/bin/apachectl start

You're done :)