Installing Apache,mysql in CentOS 6, PHP

Source: Internet
Author: User
Tags install wordpress

1. Installing Apache

You can install Apache by entering the following command in the terminal:

sudo yum install httpd

sudo means what to do with the root user. It is very convenient to confirm the download installation by clicking on Y.

Then use the following command to start the service

sudo service httpd start

Now do not worry down, directly in the browser input digitalocean to your IP address, you should be able to access the Apache Welcome page. Looks like this:


Isn't it cool? If your domain name has been successfully resolved to your host's IP address, use your domain name should also be able to access!


2. Install MySQL

sudo yum install Mysql-serversudo service mysqld start

Use the command above to download and install MySQL, the second is to start the MySQL service meaning.

Install MySQL will ask you some simple configuration, first press ENTER, the following in fact, the English is very simple, according to their own needs to choose.

Disallow Root login remotely? There is an option to allow the root user of MySQL remote access, I chose no, can access, so convenient, but there is a security risk. In this way, the software can also use the database in this VPS.


3. Install PHP and PHP components

sudo yum install php php-mysql

with this command, you can download and install PHP. The trouble is the PHP component.

Yum install php-gd php-imap php-ldap php-odbc php-pear php-xml  php-xmlrpc

I have installed 7 simple components here, you can also search all the PHP components, with the following command

Yum Search php-

4. Boot by default Apache and MySQL services

sudo chkconfig httpd onsudo chkconfig mysqld on

You can use the above two commands to select Boot Apache and MySQL.


5. Test if PHP is installed successfully

sudo nano/var/www/html/info.php

You can use the above command to create a new info.php file, the Nano is a simple text editing tool, as well as vim.

Enter a simple test PHP command:

<?phpphpinfo ();? >

then enter Ctrl o to save and click Enter to confirm. Then enter CTRL x to exit.

Then in the browser, enter the IP address plus info.php, you can see the PHP information! Similar to the following figure:


Only install WordPress, good excitement.


Reference
Installing Apache,mysql in CentOS 6, PHP

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.