Hey,
You can follow these simple steps
RHEL / CENTOS 5.5 onwards for LAMP setup.
Code:
1) # yum groupinstall "Web Server" "MySQL Database" --nogpgcheck
2) # yum install php* mysql* httpd* --nogpgcheck
# chkconfig --level=235 httpd on
# chkconfig --level=235 mysqld on
3) # cp -p /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf_orig
# vim /etc/httpd/conf/httpd.conf
{
...
...
...
# At the end
<VirtualHost *:80>
ServerAdmin root@mail.example.com
DocumentRoot /var/www/html
DirectoryIndex index.php index.html
ServerName mail.example.com
ErrorLog logs/mail.example.com-error_log
CustomLog logs/mail.example.com-access_log common
</VirtualHost>
}
4) Check Apache syntax
# httpd -t
Syntax OK
5) Create PHP test file
# vim /var/www/html/index.php
{
<?php
phpinfo();
?>
}
6) # service httpd restart
7) Check if PHP page is opening well.
# elinks http://192.168.1.100
# elinks http://192.168.1.100:80
# elinks http://mail.example.com
# elinks http://mail.example.com:80
Recent comments
2 days 17 hours ago
3 days 2 hours ago
3 days 5 hours ago
3 days 6 hours ago
3 days 8 hours ago
3 days 9 hours ago
3 days 11 hours ago
3 days 12 hours ago
4 days 4 hours ago
4 days 5 hours ago