CentOS 6 is the version of Linux.This linux versionis almost same as anyother linux version..
So follow the following steps to install Mysql Database:
To install apache, open your OS terminal and type in this command:
sudo service httpd start
So follow the following steps to install Mysql Database:
To install apache, open your OS terminal and type in this command:
sudo yum install httpd
Once itdone, you can start apache by the following command:
sudo service httpd start
That’s it. To checkthatApache is installed, open your browser and write your server’s IP address (eg. http://12.34.56.789). The page should display the words “It working" something like that.
How to find your Server’s IP address:
You can find your server ip adress by the following command:
ifconfig eth0 | grep inet | awk '{ print $2 }'
Install MySQL:
To install MySQL, open your OS terminal and type in this command:
sudo yum install mysql-server
sudo service mysqld start
During this process, MySQL will ask you for your permission twice. After you say Yes to both, MySQL will install.
Ones its done then you need to set set a root MySQL password by using the following command:
sudo /usr/bin/mysql_secure_installation
After that Mysql will ask you for your current root password.Since you are installing MySQL, you dont need to type anything,leave it blank and pesss enter.
Then the prompt will ask you that you want to set a root password. Press "Y" and go ahead.CentOS auto the process of setting up MySQL,and ask you the Yes/No Questions.
After all then you need to install PHP:
To install PHP on your Computer, open terminal and type the following command:
sudo yum install php php-mysql
type Yes and then PHP will be installed.you can see PHP Modules by using the following command:
yum search php-
And the last step to See PHP on your Server
To set PHP ion your server, first create a new file using the follwing command:
sudo nano /var/www/html/info.php
and then add the following line:
<?phpphpinfo();?>
then save it and exit.
Restart the apache so that all of the setings take effect on your server the using the following command:
sudo service httpd restart
After then open your browser and then type http://12.34.56.789/info.php (change your Server ip with 12.34.56.789)
Post a Comment