Ant LAMP quick installation tutorial

Source: Internet
Author: User

Ant LAMP quick installation tutorial

Ps: the LAMP installation on DU Niang is more comprehensive and the explanation is clearer. The following is a personal idea and is for your reference only.

Lamp quick installation steps
1. Allow Remote Login
1.1 open port 22 firewall-cmd -- zone = public -- add-port = 22/tcp -- permanent
1.2 restart the firewall sudo systemctl restart firewalld. service (success indicates that the firewall is successful)

 

2. install apache
2.1 use yum-y install httpd
2.2 self-starting systemctl enable httpd
2.3 enable systemctl start httpd. service
2.4 install apache extension yum-y install httpd-manual mod_ssl mod_perl mod_auth_mysql
2.5 open port 80 firewall-cmd -- zone = public -- add-port = 80/tcp -- permanent
2.6 restart the firewall sudo systemctl restart firewalld. service (success indicates that the firewall is successful)

When you enter the address or ip address in the browser, this interface appears. Congratulations, you have installed apache successfully.

 

 

3. Install mysql
3.1 Use yum-y install mariadb-client mariadb-server mariadb-devel
3.2 enable systemctl enable mariadb
3.3 enable systemctl start mariadb. service

4. install php
4.1 Please refer to https://webtatic.com/packages/php70/
4.2 Use rpm-Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Rpm-Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
4.3 Use yum-y install php70w php70w-opcache php70w-common php70w-fpm php70w-mbstring php70w-mysql
4.4 restart systemctl restart httpd
4.5 Use phpinfo () for testing

When you open the browser and enter the address or ip address to open the phpinfo () file, this interface appears. Congratulations, you have successfully installed php.

5. mysql settings
5.1 open port 3306 firewall-cmd -- zone = public -- add-port = 3306/tcp -- permanent
5.2 restart the firewall sudo systemctl restart firewalld. service (success indicates that the firewall is successful)
5.3 check the port number show global variables like 'Port ';
5.4 modify a data table (you can also use other methods)
5.4.1 log on to the mysql-u root-p Database
5.4.2 enter mysql database use mysql;
5.4.3 SELECT 'host', 'user' FROM User; (omitted)
5.4.4 UPDATE data UPDATE user SET 'host' = '%' WHERE 'user' = 'root' LIMIT 1;
5.4.5 force refresh flush privileges;

When you can use the database management tool to log on, congratulations to the lamp environment for successful installation.

 

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.