Home  >  Article  >  Backend Development  >  How to install php server

How to install php server

王林
王林Original
2019-10-15 17:55:482338browse

How to install php server

Install apache

yum install httpd

Start apache

systemctl start httpd.service

View running status

systemctl status httpd.service

Edit test page

echo “xingming”>/var/www/html/index.html

Open the browser and enter the public IP address. The result is as follows:

How to install php server

Install MySQL

yum install mariadb-server mariadb
systemctl start mariadb     //运行
systemctl status mariadb    //查看运行状态
# mysql -u root -p      //登录mysql
Enter password: 【输入原来的密码】   //密码默认为空
mysql>usemysql;

Change password

mysql> update user setpassword=passworD("test") where user='root';
mysql> flush privileges;
mysql> exit;

Install php Environment

yum install php php-mysql

Restart apache

systemctl restart httpd.service

Recommended tutorial: PHP video tutorial

The above is the detailed content of How to install php server. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn