Install WordPress (a) Install Apache,mysql in CentOS 6, PHP environment _linux

Source: Internet
Author: User
Tags install php mysql in install wordpress

1. Install 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. To click on the Y to confirm the download installation, very convenient.
Then use the following command to start the service

sudo service httpd start

Now do not hurry down, directly in the browser input digitalocean to your IP address, you should be able to access the Apache Welcome page. Similar to the following:

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 visit!

2. Install MySQL

sudo yum install mysql-server
sudo service mysqld start

Use the above command to download and install MySQL, the second is to start the MySQL service means.
Install MySQL will ask you some simple configuration, first press ENTER, the back of the fact that the English is very simple, according to their own needs to choose.
Disallow root login remotely? There is an option to allow MySQL root user remote access, I chose no, can access, so convenient, but there are security risks. This can also be used to do the software in the back of the VPS database.

3. Install PHP and PHP components

sudo yum install php php-mysql

Use the above command to download and install PHP. What's more troublesome is the PHP component.

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

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

Yum Search php-

4. Boot default to start Apache and MySQL services

sudo chkconfig httpd on
sudo chkconfig mysqld on

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

5. Test whether 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:

<?php
phpinfo ();
? >

Then enter CTRL o to save and click Enter to confirm. And then enter CTRL x to exit.
Then in the browser, enter the IP address plus info.php, you can see the information of PHP! Like the following figure:

Environment configuration complete, first here, follow the article to explain how to install WordPress.

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.