1. Install Apache
You can install Apache by entering the following command in the terminal:
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
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
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:
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.