Home > Operation and Maintenance > Linux Operation and Maintenance > What are the steps to install php environment with yum?

What are the steps to install php environment with yum?

王林
Release: 2020-11-02 11:25:16
Original
2682 people have browsed it

yum Steps to install the php environment: 1. Install nginx; 2. Install php; 3. Edit the www.conf configuration file; 4. Start php-fpm and nginx; 5. Edit the php.ini configuration file. Enable the file upload function; 6. Configure the database.

What are the steps to install php environment with yum?

The specific steps are as follows:

(Recommended video tutorial: linux video tutorial)

Step one:

sudo rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install php php-fpm php-mysql nginx mariadb-server -y
yum install php-gd* -y
Copy after login

Step two:

vi /etc/php-fpm.d/www.conf
Copy after login

Modify

What are the steps to install php environment with yum?

## Step three:

systemctl start php-fpm
systemctl start nginx
Copy after login

If necessary To enable the file upload function, please modify php.ini

vi /etc/php.ini
upload_max_filesize = 100M
Copy after login

Simple configuration database

systemctl start mariadb
Copy after login
mysql_secure_installation
Enter current password for root (enter for none): #初次运行直接回车
Set root password? [Y/n] #是否设置root用户密码,输入y并回车或直接回车
New password: #设置root用户的密码
Re-enter new password: # 再输入一次你设置的密码
Remove anonymous users? [Y/n] # 是否删除匿名用户,回车
Disallow root login remotely? [Y/n] #是否禁止root远程登录,回车,
Remove test database and access to it? [Y/n] # 是否删除test数据库,回车
Reload privilege tables now? [Y/n] # 是否重新加载权限表,回车
Copy after login

root user supports remote access

grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
flush privileges;
Copy after login
Related recommendations:

php training

The above is the detailed content of What are the steps to install php environment with yum?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template