Version
- Operating system: CentOS Linux release 7.2.1511 (Core)
- php:5.6.33
- nginx:1.12.2
- mysql:5.6.38 (192.168.1.103 's Windows)
- Zentao Zen Road: 9.7.stable
Installation path
- Source Path:/USR/LOCAL/SRC
- php:/usr/local/php
- Nginx:/usr/local/nginx
- Zentao Zen Road:/opt/zentao
Install PHP
Installing PHP Dependencies
yum install gcc libxml2-devel openssl-devel curl-devel -y
Upload PHP and unzip, then go to php directory/usr/local/src/php-5.6.33
cd /usr/local/srcrztar -xzf php-5.6.33.tar.gzcd php-5.6.33
-
Source code installation three walk
./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc-- ENABLE-FPM--with-fpm-user=nobody--with-fpm-group=nobody--enable-mbstring--with-mysql=mysqlnd--with-mysqli= Mysqlnd--with-pdo-mysql=mysqlnd--with-curl--with-zlib--with-openssl
See prompt "Thank you for using PHP.", Can be compiled and installed.
Compile and install for a long time, you can drink a cup of coffee slowly.
make
make install
Configure PHP
复制配置文件及执行文件 ln -s /usr/local/php/bin/php /usr/bin/php cp /usr/local/src/php-5.6.33/php.ini-production /usr/local/php/etc/php.ini ln -s /usr/local/php/etc/php.ini /etc/php.ini cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf cp /usr/local/src/php-5.6.33/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm 增加可执行权限 chmod +x /etc/init.d/php-fpm 修改配置文件php.ini date.timezone = PRC session.save_path="/var/lib/php/session" 记得要手动创建下这个目录 mkdir -p /var/lib/php/session
Start PHP-FPM
service php-fpm start
Installing Nginx
Installation dependencies
yum install -y gcc gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel
Upload Nginx and unzip, then go to nginx directory/usr/local/src/
cd /usr/local/srcrztar -xzf nginx-1.12.2.tar.gzcd nginx-1.12.2
Source installation three steps away
./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_gzip_static_module --pid-path=/usr/local/nginx/conf/nginx.pid --with-pcre
make && make install
Modify Nginx.conf
cd /usr/local/nginx/conf/vi nginx.conf
The following are the changes to nginx.conf
worker_processes 4;pid conf/nginx.pid;location / {root /opt/zentao/www;index index.php index.html index.htm;}location ~ \.php$ {root /opt/zentao/www; fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include fastcgi_params;}
Start the Nginx and open 80 ports on the fire wall
# 启动nginx/usr/local/nginx/sbin/nginx# 开放80端口firewall-cmd --zone=public --add-port=80/tcp --permanentfirewall-cmd --reload
Check the installation and configuration of PHP and Nginx
Create test.php
mkdir -p /opt/zentao/wwwcd /opt/zentao/wwwvi test.php
Test.php's Content
<?phpphpinfo()?>
Visit http://192.168.1.111/test.php
Installation of Zen Road
Upload Zen Channel source code
cd /usr/local/src/rzunzip ZenTaoPMS.9.7.stable.zipcp -R zentaopms/* /opt/zentao/
- Visit http://192.168.1.111/index.php for Zen path to installation.
According to the Installation Wizard, modify the following three folders to access permissions
chmod o=rwx -R /opt/zentao/tmp/chmod o=rwx -R /opt/zentao/www/datachmod o=rwx -R /var/lib/php/session
If the last step prompts, ERROR: The domain name 192.168.1.111 you visit does not have a corresponding company, you need to modify the owner of the Session.save_path. Execute the following command, then remove my.php and reinstall.
chown -R nobody:nobody /var/lib/phpservice php-fpm restart/usr/local/nginx/sbin/nginx -s reload
- The final step, the success of the flower ~ ~ ~
If the installation is successful, the project can be managed through Zen trails.
[Original] on the Centos7.2 source installation php, Nginx, Zentao Zen Road