1024programmer Linux What are the steps for yum to install the php environment-linux operation and maintenance

What are the steps for yum to install the php environment-linux operation and maintenance

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

The specific steps are as follows:

(Video tutorial recommendation: linux video tutorial)

The first step:

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

Step 2:

vi /etc/php-fpm.d/www.conf  

Modify

The third step:

systemctl start php-fpm
 systemctl start nginx

If you need to enable the file upload function, please modify php.ini

vi /etc/php.ini
 upload_max_filesize = 100M

Simple configuration database

systemctl start mariadb
mysql_secure_installation
 Enter current password for root (enter for none): #Enter directly for the first run
 Set root password? [Y/n] #Whether to set the root user password, enter y and press Enter or press Enter directly
 New password: #Set the password of the root user
 Re-enter new password: # Enter the password you set again
 Remove anonymous users? [Y/n] # Whether to delete anonymous users, press Enter
 Disallow root login remotely? [Y/n] #Whether to prohibit root remote login, press Enter,
 Remove test database and access to it? [Y/n] # Whether to delete the test database, press Enter
 Reload privilege tables now? [Y/n] # Whether to reload the privilege table, press Enter

root user supports remote access

grant  all privileges on *.* to & # 39; root & # 39; @ & # 39; % & # 39; identified by & # 39; 123456 & # 39; with grant option;
 flush privileges;

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/what-are-the-steps-for-yum-to-install-the-php-environment-linux-operation-and-maintenance/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索