Install PHP4 on CentOS 5.5 VPS

1. Install Apache

yum install httpd

2. Install Mysql

yum install mysql mysql-server php-mysql



3. Install dependencies

yum install flex gcc* bison bison-devel httpd-devel make

4. Download PHP4 cource

wget http://lu2.php.net/get/php-4.4.9.tar.gz/from/my2.php.net/mirror



5. Extract PHP4

tar zxvf php-4.4.9.tar.gz



6. Enter folder and configure

cd php-4.4.9
./configure --with-apxs2=/usr/sbin/apxs

7. Install and verify

make
make test

8. Finalise installation

make install

9. Add configuration to php.conf

nano /etc/httpd/conf.d/php.conf

add this to the file and save the file

# /etc/httpd/conf.d/php.conf
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages
#
LoadModule php4_module modules/libphp4.so
#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddHandler php-script .php
AddType text/html .php
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
#
# Uncommenting the following line to allow PHP to pretty-print .phps
# files as PHP source code:
#
#AddType application/x-httpd-php-source .phps

10. Restart Apache

service httpd restart

Reference: http://www.thegeekstuff.com/2008/09/how-to-install-or-upgrade-lamp-apache-mysql-and-php-stack-on-linux-using-yum/

  • 3 Корисниците го најдоа ова како корисно
Дали Ви помогна овој одговор?

Понудени резултати

Can I increase my VPS plan without upgrade my package?

No. The only way you increase your RAM is to upgrade the currect package to a higher package. We...

Where is the datacenter VPS located?

Windows VPS is located at Colo4Dallas Taxes US BlueSquare UK Linux VPS is...

What is the URL to virtuozzo

https://===yourserverIP===:4643

Yum update errors - Invalid boolean

This is the error when doing yum update ---Options Error: Error parsing 'gpgcheck': invalid...

Convert Cpanel Backup to DirectAdmin Backup

This scripts convert Cpanel backup file to DirectAdmin backup file for restore purpose. Login to...

Powered by WHMCompleteSolution