About Me

My photo
Hi Friends, I am Sandeep CC and some people know me as System Administrator. I have started my professional career from 2008. I have been working as System Administrator on Linux Server and Windows Client. I am here to share my Knowledge in which I have experienced and which I have come across till now, It could be help to you people. In case anything wrong or any improvements in my post steps, Please comment to the post, Feel free to contact me by posting comments on this blog. Thanks and Regards, Sandeep CC

Monday, April 5, 2010

Configuration Of PHP with MySQL on REDHAT LINUX-4




Server: sandeeplinux3 (192.168.1.11 Local Network IP)
Requirement:

php-pear-4.3.9-3.8 (default installed)
php-ldap-4.3.9-3.8 (default installed)
php-mysql-4.3.9-3.8 (Need to install)

Download Required Packages From RHEL4 CD:
(Packages are available on 4th CD)
[root@sandeeplinux3 ~]# cd /media/cdrecorder/
[root@sandeeplinux3 cdrecorder]#
[root@sandeeplinux3 RPMS]# ls -ltr php-mysql*
[root@sandeeplinux3 RPMS]# cp php-mysql-4.3.9-3.8.x86_64.rpm /root/IMP_rpm_packages/

Note: Need to Install php-mysql package.

Installation Of Required Packages:
[root@sandeeplinux3 IMP_rpm_packages]# rpm -i php-mysql-4.3.9-3.8.x86_64.rpm
warning: php-mysql-4.3.9-3.8.x86_64.rpm: V3 DSA signature: NOKEY, key ID db42a60e

[root@sandeeplinux3 RPMS]# rpm -qa |grep php
php-pear-4.3.9-3.8
php-mysql-4.3.9-3.8.x86_64.rpm
php-ldap-4.3.9-3.8
php-4.3.9-3.8

Start Services:

[root@sandeeplinux3 php]# service httpd start/stop/restart
Stopping httpd: [ OK ]
Starting httpd: httpd: Could not determine the server's fully qualified domain name, using 192.168.1.11 for ServerName [ OK ]

Testing With PHP & HTTPD Services:
Create one php directory on /var/www/html

[root@sandeeplinux3 ~]# cd /var/www/html
[root@sandeeplinux3 html]#mkdir php
[root@sandeeplinux3 html]# ls -ltr
drwxr-xr-x 2 root root 4096 Mar 25 12:15 php
Create one example.php file and keep in /var/www/html/php directory
[root@sandeeplinux3 html]# cd php
[root@sandeeplinux3 php]# vi example.php
""
[""]
[hello, world! with PHP]
[]
[]
[]
[]
[]
:wq [Save & Exit]

Click On Browser and enter bellow address from localhost or any client machine
http://localhost/php/example.php OR http://192.168.1.11/php/example.php OR http://sandeeplinux3/php/example.php

Note: If open the html web page by php directory then we can make sure that our php & httpd services are working fine.

No comments:

Post a Comment