How to install and configure the lamp environment for a Tianyi cloud host

Source: Internet
Author: User

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)

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.