[Original] on the Centos7.2 source installation php, Nginx, Zentao Zen Road

Source: Internet
Author: User
Tags fpm install php openssl upload php

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
  1. Installing PHP Dependencies

    yum install gcc libxml2-devel openssl-devel curl-devel -y
  2. 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
  3. 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  
  4. 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  
  5. Start PHP-FPM

    service php-fpm start
Installing Nginx
  1. Installation dependencies

    yum install -y gcc gcc-c++  pcre pcre-devel  zlib zlib-devel openssl openssl-devel
  2. 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
  3. 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
  4. 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;}
  5. 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
    1. Create test.php

      mkdir -p /opt/zentao/wwwcd /opt/zentao/wwwvi test.php

      Test.php's Content

      <?phpphpinfo()?>
    2. Visit http://192.168.1.111/test.php

Installation of Zen Road
    1. Upload Zen Channel source code

      cd /usr/local/src/rzunzip ZenTaoPMS.9.7.stable.zipcp -R zentaopms/* /opt/zentao/
    2. Visit http://192.168.1.111/index.php for Zen path to installation.
    3. 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

    4. 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
    5. The final step, the success of the flower ~ ~ ~
    6. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.