PHP, remember to deploy a Linux PHP runtime environment (after project deployment, some pages returned empty pit, detailed in the sixth step)

As the company has a very developed PHP official website earlier project, there need to be migrated from the window server to linux server, not any engaged in PHP, so step on a lot of the pit, now record a brief deployment steps:
Tips: first pay attention to the firewall, port problem

1, install httpd
yum install httpd

2, mounting PHP
yum the install PHP

3,安装组件
yum install php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt php-mysqlnd

4, the parameter modification of the httpd
all files in the first item to copy the source / data / cnostar, and then modify the parameters
CD / etc / httpd / the conf
Vim the httpd.conf

Parameters are as follows:
### the Listen 91/16666
### the DocumentRoot / Data / cnostar
### Directory / Data / cnostar

5,启动httpd
root systemctl start httpd.service

6, apache authorized users and user groups to the project folder
into the / data directory, execute the following command
chown -R apache: apache cnostar /
Notes: Step 6 need to see whether the httpd.conf file User and Group have set
the default installation when there will be the default property user apache, group apache namely apahce is the default users and groups
If so, you need to perform this step

部署的历史记录如下:
6122 2020-03-12 15:11:25 root yum install httpd
6123 2020-03-12 15:12:48 root yum install php
6124 2020-03-12 15:13:32 root yum install php-gd libjpeg* php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-bcmath php-mhash libmcrypt php-mysqlnd
6125 2020-03-12 15:14:43 root cd /etc/httpd/conf
6126 2020-03-12 15:14:47 root vim httpd.conf
6127 2020-03-12 15:18:04 root cd /data
6128 2020-03-12 15:18:05 root ll
6129 2020-03-12 15:19:24 root mkdir cnostar
6130 2020-03-12 15:26:15 root systemctl start httpd.service
6131 2020-03-12 15:28:52 root cd /etc/httpd/conf
6132 2020-03-12 15:28:55 root vim httpd.conf
6133 2020-03-12 15:29:27 root systemctl restart httpd.service
6134 2020-03-12 16:28:30 root cd /data
6134 2020-03-12 16:28:31 root chown -R apache:apache cnostar/

Published 14 original articles · won praise 2 · Views 173

Guess you like

Origin blog.csdn.net/weixin_41402056/article/details/104836921