Apache2

Download & unpack

cd ~/install
wget http://www.apache.org/dist/httpd/httpd-2.0.51.tar.gz
tar -xzvf httpd-2.0.51.tar.gz -C /tm

Compile

cd /tmp/httpd-2.0.51/
./configure --enable-so --enable-ssl --enable-rewrite --sysconfdir=/etc/apache2
make
make install

Binary links for simplier access from commandline

cd /usr/local/sbin/
ln -s ../apache2/bin/apachectl apachectl
ln -s ../apache2/bin/htdigest htdigest
ln -s ../apache2/bin/htpasswd htpasswd
ln -s ../apache2/bin/httpd httpd
ln -s ../apache2/bin/apr-config apr-config
ln -s ../apache2/bin/dbmmanage dbmmanage
ln -s ../apache2/bin/htdbm htdbm

Configuration to /etc

mv -R /usr/local/apache2/conf/* /etc/apache2
rm /usr/local/apache2/conf
ln -s /etc/apache2 /usr/local/apache2/conf

Link to logs

cd /var/log
ln -s ../../usr/local/apache2/logs/ apache2

Final configuration

vim /etc/apache2/httpd.conf

PHP

Download & unpack

cd ~/install
wget http://sk.php.net/get/php-4.3.9.tar.bz2/from/this/mirror
tar -xjvf php-4.3.9.tar.bz2 -C /tmp/newphp

Compilation

cd /tmp/newphp
./configure \
'--with-apxs2=/usr/local/apache2/bin/apxs' \
'--with-config-file-path=/etc/apache2' \
'--enable-safe-mode' \
'--with-openssl' \
'--enable-discard-path' \
'--enable-bcmath' \
'--with-bz2' \
'--with-pic' \
'--enable-calendar' \
'--enable-ctype' \
'--with-gdbm' \
'--with-db3' \
'--with-imap-ssl' \
'--enable-dbase=shared' \
'--enable-dba=shared' \
'--enable-ftp' \
'--with-gd' \
'--enable-gd-native-ttf' \
'--with-jpeg-dir=/usr' \
'--with-png-dir=/usr' \
'--with-gmp=shared' \
'--with-mysql' \
'--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-pspell=shared,/usr' \
'--with-gettext=shared,/usr' \
'--enable-inline-optimization' \
'--disable-static' \
'--with-curl=shared' \
'--enable-force-cgi-redirect' \
'--enable-fastcgi' \
'--enable-cli'
# tieto naposledy nefungovali:
# '--with-imap' '--with-mcrypt' '--with-mhash'

make
make install

Configuration for PHP 4

echo "LoadModule php4_module modules/libphp4.so" >> /etc/apache2/httpd.conf

for PHP 5

echo "LoadModule php5_module modules/libphp5.so" >> /etc/apache2/httpd.conf

To /etc/apache2/httpd.conf add:

# PHP
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

Final configuration

vim /etc/apache2/php.ini

# Ak by boli problemy s GD (hlavne jeho podporou pre jpeg) treba stiahnut a skompilovat cele gd. # nainstaluje sa do /usr/local/… a pri kompilacii php-cka treba pouzit –with-gd=/usr/local # formaty, ktore podporuje gd zistime cez phpinfo() alebo funkciou:

<pre><? var_dump(gd_info()); ?></pre>
 
apache2_php_ssl_compile.txt · Last modified: 31.03.2010 17:51 (external edit)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki