The lamp environment is short for Linux + Apache + Mysql + Php. Before installing lamp on the Tianyi cloud host, I thought it was as complicated as my own server. After the installation, I found it very simple.
Before buying a Tianyi cloud host, I thought it would be very troublesome to build the lamp environment because I have never played a linux operating system. I have been hesitant to choose a windows operating system, however, considering the stability and security issues, we finally chose linux, and then built the lamp on the Tianyi cloud host. It was not until we realized that this was a very simple task.
1. L (Linux) selection and installation
Linux has many versions of operating systems, including CentOS, Ubuntu, Fedora, Debian, and RedHat? In fact, I cannot clearly tell which one is good. I only learned the most about CentOS users on the internet, and I chose it because there are many online tutorials and resources.
The system does not need to be installed. You only need to select one. If you only need to switch between windows or linux versions, you can perform the following operations on your own, if you want to switch between windows and linux, you need to contact Tianyi cloud host customer service.
2. Use the Remi source to quickly install Apache, Mysql, and PHP.
(Note: The following commands are executed using PuTTY)
Step 1: install and configure the Remi Source
The Remi source is a Linux source that contains the latest Apache, PHP, MySQL, and other packages. It is maintained by Remi and uploaded by some linux technical experts. With this source, it is very convenient to use YUM to install or update Apache, PHP, MySQL, phpMyAdmin, and other server-related programs.
The Code is as follows: |
Copy code |
Rpm-Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm Rpm-Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm |
Step 2: install Apache, MySQL 5.5.30 & PHP 5.4.12
The Code is as follows: |
Copy code |
Yum-enablerepo = remi, remi-test install httpd mysql-server php-common |
Step 3: Install the PHP 5.4.12 Module
The Code is as follows: |
Copy code |
Yum-enablerepo = remi, remi-test install php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml php-pecl-apc php-cli php-pear php-pdo |
Step 4: Start the Apache & MySQL 5.5.30 Service
The Code is as follows: |
Copy code |
Chkconfig-levels 235 httpd on Chkconfig-levels 235 mysqld on /Etc/init. d/httpd start /Etc/init. d/mysqld start |
Step 5: Verify the installation of Apache, MySQL 5.5.30, and PHP 5.4.12
Enter the IP address of your Tianyi cloud host in the address bar of your browser and press enter to view the apache test page. For example: (the record filing is successful)