PHP Installation From Source Code

May 2, 2008 Linux Services Config | admin @ 7:22 pm

PHP Installation

This guide will help you for installing your php script on your linux server (install with php source code)PHP

1. Downloading and untaring PHP package.
#cd /usr/local/src/webserver
#wget ‘php-version.tar.gz’
#tar zxpf php-version.tar.gz 2. Create your configuration file.
#pico php_install

3. Add the following.
#cd php-version-folder
#./configure –with-apxs2=/usr/local/apache/bin/apxs –disable-debug –enable-ftp –enable-inline-optimization –enable-magic-quotes –enable-mbstring –enable-mm=shared –enable-safe-mode –enable-track-vars –enable-trans-sid –enable-wddx=shared –enable-xml –with-dom –with-gd –with-gettext –with-mysql=/var/lib/mysql –with-mysqli=/var/lib/mysql/bin/mysql_config –with-regex=system –with-xml –with-zlib-dir=/usr/lib –with-jpeg-dir=/usr/lib

4. Change the permissions, configure, make, and install then copy your INI file over.
#chmod 755 php_install
#./php_install
#cd php-version-folder
#make
#make install
#cp php.ini-dist /usr/local/lib/php.ini

5. To finish it off, you will need to add PHP support into Apache by editing the httpd.conf file. Go ahead and add the following to the bottom of the file.
AddType application/x-httpd-php .php .php4
AddType application/x-httpd-php-source .phps

6. Change your DirectoryIndex setting from
DirectoryIndex index.html
to
DirectoryIndex index.php index.html

7. Restart the Apache Webserver.

#apachectl restart

Done for PHP Install.

Next for Webmin Installation

No Comments

No comments yet.

RSS feed for comments on this post. TrackBack URI

Sorry, the comment form is closed at this time.