1) Install Apache
# yum install httpd httpddevel
start the apache service
# /etc/init.d/httpd start
2) Install MySQL Database Server
# yum install mysql mysqlserver mysqldevel
# /etc/init.d/mysqld start
# mysql
Changing MySQL Root Password
# mysql> USE mysql;
# mysql> UPDATE user SET Password=PASSWORD('newpassword') WHERE user='root';
# mysql> FLUSH PRIVILEGES;
Once done, check by logging in:
# mysql u root p
Enter Password:
To Create A New MySQL User
# mysql > create database demo
# mysql >GRANT ALL PRIVILEGES ON demo.* TO 'guest'@'localhost' IDENTIFIED BY 'guest'
WITH GRANT OPTION;
# mysql> UPDATE user SET Password=PASSWORD('guest') WHERE user='guest';
3) Install PHP5
# yum install php phpmysql phpcommon phpgd phpmbstring phpmcrypt phpdevel phpxml
Test If PHP Is Working Or Not:
Create a file named /var/www/html/test.php with the following phpinfo() function inside php
quotes.
// test.php
phpinfo();
?>
Then point your browser to http://ip.address/test.php.
4) Install phpMyAdmin
phpMyAdmin is a free web based MySQL database Administration Tool
# yum install phpmyadmin
Point your browser to: http://ip.address/phpmyadmin.
5) Install Webmin
wget
rpm i webmin1.4101.noarch.rpm
Point your browser to: http://ip.address:10000
You should see a webmin login. But we don't know the login and password yet! To set up the
webmin password run the script below...
# /usr/libexec/webmin/changepass.pl /etc/webmin admin
Log in with the admin username and new webmin password!
To uninstall webmin, just run:
# /etc/webmin/uninstall.sh
6) Final Steps
We want the Apache and mysql to be loaded at every boot so we switch them on using chkconfig:
# chkconfig httpd on
# chkconfig mysqld on
No comments:
Post a Comment