lane-centos7-installing lamp as a Web service

Source: Internet
Author: User

1.

# Yum Install PHP

(Relying on the package httpd also down the way)


# Systemctl Start Httpd.service

# Firewall-cmd--add-service=http

(Firewall unblock HTTP service)

# Firewall-cmd--permanent--add-service=http

(Firewall to unblock HTTP Service write config file)

(Can view/etc/firewalld/zones/public.xml and/usr/lib/firewalld/services/http.xml)

(PHP and HTTPD are now installed)

2.

# yum List MySQL

(No package ...) Awkward

(Go to http://dev.mysql.com/downloads/repo/yum/for a look)

# yum Install wget

# wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

# RPM-IVH mysql-community-release-el7-5.noarch.rpm

# yum Install MySQL Mysql-server

# Systemctl Start Mysqld.service

# mysql_secure_installation

(according to the prompt to set the password, the remaining options are lost Y, the special circumstances of their own judgment)

# mysql-u Root-p

(Password test succeeded)

Mysql> Grant all privileges on * * to ' lane ' @ '% ' identified by ' 123456 ' with GRANT option;

(User name Lane password 123456 allows all IP logins to give * *, all permissions, this is very dangerous, I am here to do the virtual machine test does not matter, the actual production environment, do not execute such a command)

mysql> flush Privileges;

Mysql> quit;

# Firewall-cmd--add-service=mysql

# Firewall-cmd--permanent--add-service=mysql

# yum Install Php-mysql

(Installation complete)

# systemctl Restart Httpd.service

# systemctl Restart Mysqld.service

lane-centos7-installing lamp as a Web service

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.