Nginx to do a positive agent to build Bugfree

Source: Internet
Author: User
Tags configuration php install openssl

nginx:http://download.csdn.net/detail/terrly88/9099117

bugfree:http://download.csdn.net/detail/terrly88/9099133

1. Preparation environment

Yum-y install libmcrypt-devel mhash-devel libxslt-devel \

Libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel \

Zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel \

ncurses Ncurses-devel Curl curl-devel e2fsprogs e2fsprogs-devel \

krb5 krb5-devel libidn libidn-devel OpenSSL openssl-devel

2, Installation PHP-FPM

1) wget http://cn2.php.net/distributions/php-5.5.29.tar.gz (Install wget command: yum-y install wget)

2) Tar zvxf php-5.5.29.tar.gz

3) CD php-5.5.29

4)./configure--prefix=/usr/local/php--enable-fpm--with-mcrypt \

--enable-mbstring--disable-pdo--with-curl--disable-debug--disable-rpath \

--enable-inline-optimization--with-bz2--with-zlib--enable-sockets \

--enable-sysvsem--enable-sysvshm--enable-pcntl--enable-mbregex \

--with-mhash--enable-zip--with-pcre-regex--with-mysql--with-mysqli \

--WITH-GD--with-jpeg-dir

5) Make && make install

6) Add Www-data user

Groupadd Www-data

Useradd-g Www-data Www-data

7) Modify the php-fpm.conf configuration file

A) cd/usr/local/php

b) CP Etc/php-fpm.conf.default etc/php-fpm.conf

c) VI etc/php-fpm.conf

d) Modify user = Www-data Group = Www-data

8) configuration php.ini, directory/etc/php.ini

ENABLE_DL = on whether the DL () is valid.

Cgi.force_redirect = 0

Cgi.fix_pathinfo=1

Fastcgi.impersonate = 1

Cgi.rfc2616_headers = 1

Allow_url_fopen = on whether URLs are allowed as http:. Or take the file as an FTP

Reference: http://blog.csdn.net/motian06/article/details/21172783

3, installation of nginx steps:

1) Download the corresponding version from the http://nginx.org/download/

(or wget http://nginx.org/download/nginx-1.9.4.tar.gz to download directly on Linux)

1) Unzip TAR-ZXVF nginx-1.9.4.tar.gz

2) yum-y Install Pcre-devel

3) yum-y install OpenSSL openssl-devel

4)./configure--prefix=/usr/local/nginx

5) Make && make install

6) Modify the configuration file as follows:

7) Accessing the browser

4. Test whether PHP files can be accessed

1) in/usr/local/nginx/html new index.php file, add the following:

<?php    echo "Hello";? >

2) Start Service PHP-FPM

3) Restart Nginx:./nginx–s reload

4) Browser access/HTTP/Your server ip/index.php

Result: The file cannot be found

5) Check the Nginx configuration file and modify the following again:

6) Refresh the browser

5, Installation Bugfree

1) Upload Bugfree.zip

2) Unzip the tar zxvf bugfree.zip

3) CD bugfree3.0.1

4) Renaming: MV bugfree3.0.1 bugfree

5) Copy to/usr/local/nginx/html

6) Open Browser HTTP://IP: Port/bugfree/install

7) Create new folder and modify permissions for Bugfile and Bugfree

8) Refresh Browser page

9) Click Continue

Note here that the server name writes localhost or the server's IP address

Database name casually

User name: Root

The password is empty, do not fill in

Prefix: Casual

10) Click Install

Reason: Because I am on the local browser access, rather than on the installed virtual machine, so I need to change localhost to the IP of the virtual machine, and fill in the database password

11) Add the database password and click Install again

Installation Successful

6. Open Bugfree and Login

7. Add Nginx as System service

Due to the presence of the service Nginx restart Nginx: Unrecognized services

1) Write a script in the/etc/init.d/directory named Nginx

#!/bin/sh##nginx-this script starts and stops the Nginx daemon##chkconfig:- about#Description:nginx is an HTTP (s) server, HTTP (s) reverse \#Proxy and IMAP/POP3 proxy server#Processname:nginx#Config:/etc/nginx/nginx.conf#Config:/etc/sysconfig/nginx#pidfile:/var/run/nginx.pid#Source function Library.. /etc/rc.d/init.d/functions#Source networking configuration.. /etc/sysconfig/Network#Check that networking are up.["$NETWORKING"="No"] && Exit 0Nginx="/usr/local/nginx/sbin/nginx"Prog=$ (basename$nginx) Nginx_conf_file="/usr/local/nginx/conf/nginx.conf"[ - F/etc/sysconfig/nginx] &&. /etc/sysconfig/Nginxlockfile=/var/lock/subsys/Nginxstart () {[-X$nginx] || Exit 5    [ - F $NGINX _conf_file] || Exit 6Echo-N $"starting $prog:"Daemon$nginx-C$NGINX _conf_fileretval=$?Echo [$retval -eq0] && Touch$lockfile    return $retval}stop () {echo-N $"stopping $prog:"Killproc$prog-QUIT retval=$?Echo [$retval -eq0] && RM- F $lockfile    return $retvalKillall-9Nginx}restart () {configtest||return$?Stop Configtest||return$?Stop Sleep1start}reload () {configtest||return$?Echo-N $"Reloading $prog:"Killproc$nginx-Hupretval=$?echo}force_reload () {restart}configtest () {$nginx-t-c$NGINX _conf_file}rh_status () {Status$prog}rh_status_q () {rh_status>/dev/null 2>&1}case" $" inchstart) Rh_status_q&& Exit 0 $        ;; Stop) Rh_status_q|| Exit 0 $        ;; Restart|configtest) $        ;; Reload) Rh_status_q|| Exit 7 $        ;; Force-reload) force_reload;;    status) Rh_status;; Condrestart|try-restart) rh_status_q|| Exit 0Condrestart|try-restart) rh_status_q|| Exit 0            ;; *) echo$"Usage: $ {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"Exit2Esac

2) Modify permissions and add services

CP nginx/etc/init.d/

chmod 755/etc/init.d/nginx

Chkconfig--add Nginx

3) nginx start, stop, uninterrupted service restart

Service Nginx Start

Service Nginx Stop

Service Nginx Reload

4) Verify that the service nginx Restart command is executed again

Nginx to do a positive agent to build Bugfree

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.