Follow the steps to install PHP and PHP-PEAR and Symfony in CentOS using source.
#prerequisites
$ yum install httpd-devel libxml2-devel zlib zlib-devel mysql-devel openssl-devel
$ yum install libjpeg libjpeg-devel
$ yum install libpng libpng-devel
#php installation
$ ./configure --with-apxs--with-pear=../PEAR-1.9.--with-pgsql=/var/lib/pgsql/postgresql903/bin --with-gd --with-xmlrpc --with-jpeg-dir --with-png-dir
$ make
$ make install
$ cp php.ini-development /usr/local/lib/php.ini
$ cd /etc/httpd/conf
$ vim httpd.conf
and paste the 'Load_module line from INSTALL file'. Let it be if it is already done by installer.
$ ls -al /usr/lib64/httpd/modules/libphp5.so
$ /etc/init.d/httpd restart
$ cd /etc/httpd/conf.d/
$ vim php.conf
#prerequisites
$ yum install httpd-devel libxml2-devel zlib zlib-devel mysql-devel openssl-devel
$ yum install libjpeg libjpeg-devel
$ yum install libpng libpng-devel
#php installation
$ ./configure --with-apxs--with-pear=../PEAR-1.9.--with-pgsql=/var/lib/pgsql/postgresql903/bin --with-gd --with-xmlrpc --with-jpeg-dir --with-png-dir
$ make
$ make install
$ cp php.ini-development /usr/local/lib/php.ini
$ cd /etc/httpd/conf
$ vim httpd.conf
and paste the 'Load_module line from INSTALL file'. Let it be if it is already done by installer.
$ ls -al /usr/lib64/httpd/modules/libphp5.so
$ /etc/init.d/httpd restart
$ cd /etc/httpd/conf.d/
$ vim php.conf
Add these lines,
AddHandler php5-script .php AddType text/html .php
$ /etc/init.d/httpd restart
#PHP PEAR installation
$ mkdir /home/phppear
$ cd phppear/
$ wget http://pear.php.net/go-pear.phar
$ php -q go-pear.phar
$ /etc/init.d/httpd restart
#PHP PEAR installation
$ mkdir /home/phppear
$ cd phppear/
$ wget http://pear.php.net/go-pear.phar
$ php -q go-pear.phar
Older version of PHP PEAR also available in http://pear.php.net/go-pear. But it is suitable for PHP version 5.3.x.
#symfony installation
$ pear channel-discover pear.symfony-project.com
$ pear install symfony/symfony-1.4.13
$ symfony --version
Note: This procedure has been tested under centOS 5.x
No comments:
Post a Comment