- tar zxvf httpd.tar.gz
- cd httpd
- ./configure --prefix=/usr/local/apache --enable-mods-shared=most --enable-deflate
- make
- make install
- echo "/usr/local/apache/lib" >> /etc/ld.so.conf
- ldconfig
- echo "/usr/local/apache/bin/apachectl start" >> /etc/rc.d/rc.local
- tar zxvf php.tar.gz
- cd php
- ./configure --prefix=/usr/local --with-config-file-path=/etc --with-apxs2=/usr/local/apache/bin/apxs --disable-debug --enable-memory-limit --enable-inline-optimization --enable-magic-quotes --enable-mbstring --enable-track-vars --enable-xml --with-dom --with-xml --enable-sockets --with-zlib --with-gettext --with-pear
- make
- make install
- cp php.ini-recommended /etc/php.ini
- change "short_open_tag" to On
- change include_path to ".:/usr/local/lib/php"
- add "LoadModule php5_module modules/libphp5.so"
- add "index.php" to DirectoryIndex
- echo "application/x-httpd-php php" >> /usr/local/apache/conf/mime.types
- sudo /usr/local/apache/bin/apachectl start
Done.
No comments:
Post a Comment