Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
server-administration:install-apache-php-on-centos [2010-01-10 22:24:14] shaun.reitan |
server-administration:install-apache-php-on-centos [2010-05-03 23:42:33] shaun.reitan |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== How to Install Apache 2.2.x and PHP 5.2.x on CentOS 5 ====== | ====== How to Install Apache 2.2.x and PHP 5.2.x on CentOS 5 ====== | ||
- | This guide assumes you have a minimal CentOS installation and are not planning on running a control panel such as cPanel, which install the webserver | + | This guide assumes you have a minimal CentOS installation and are not planning on running a control panel such as cPanel, which install the web server |
- | + | ||
- | <code console># yum install bison flex gcc db4 db4-devel libxml2-devel libpng-devel mysql-devel make | + | Install required packages using YUM |
- | # wget http:// | + | <code console> |
- | # wget http:// | + | |
- | # tar zxvf httpd-2.2.14.tar.gz | + | |
- | # tar zxvf php-5.2.11.tar.gz | + | Download Apache source ( You should check http:// |
- | # cd httpd-2.2.14 | + | <code console>wget http:// |
- | # ./configure --enable-so --enable-rewrite=shared | + | |
- | # make | + | |
- | # make install | + | Download PHP Source ( You should check http:// |
- | # cd ../ | + | <code console>wget http:// |
- | # ./configure --with-apxs2=/ | + | |
- | # make | + | |
- | # make install | + | Building Apache |
- | # cp php.ini-dist / | + | <code console> |
+ | tar zxvf httpd-2.2.15.tar.gz | ||
+ | cd httpd-2.2.14 | ||
+ | ./configure --enable-so --enable-rewrite=shared | ||
+ | make | ||
+ | make install | ||
+ | cd .. | ||
+ | </ | ||
+ | |||
+ | Building PHP | ||
+ | <code console> | ||
+ | tar zxvf php-5.2.11.tar.gz | ||
+ | cd ../ | ||
+ | ./configure --with-apxs2=/ | ||
+ | make | ||
+ | make install | ||
+ | cp php.ini-dist / | ||
+ | cd .. | ||
+ | </ | ||
You can change the values passed to the configure lines of Apache and PHP to add/remove software from the build. Apache in this guide is built with DSO support and mod_rewrite as a shared module. PHP is built as an Apache DSO with MySQL, FTP, BCMath, magic quotes, PEAR, sockets, Zlib, and GD with TTF. | You can change the values passed to the configure lines of Apache and PHP to add/remove software from the build. Apache in this guide is built with DSO support and mod_rewrite as a shared module. PHP is built as an Apache DSO with MySQL, FTP, BCMath, magic quotes, PEAR, sockets, Zlib, and GD with TTF. |