centos6.6 Compile Installation Openresty__openresty

Source: Internet
Author: User

Demand:
Openresty Installation Location:/usr/local/openresty nginx log/data/www/logs code directory/data/www/htdocs

Installation dependencies

Yum install pcre-devel openssl-devel gcc Curl

To the Openresty download installation package 1.13.6.1, placed in the home directory.

Tar zxf openresty-1.13.6.1.tar.gz 
cd openresty-1.13.6.1
./configure--prefix=/usr/local/openresty-- With-debug \
--error-log-path=/data/www/logs/error_nginx.log \
 --http-log-path=/data/www/logs/access_ Nginx.log \
--user=root--with-http_stub_status_module \
-with-http_ssl_module  --with-http_gzip_ Static_module
gmake
gmake Install

steps to install after installation complete

vim/etc/profile.d/openresty.sh
export path=/usr/local/openresty/nginx/sbin: $PATH
./etc/profile.d/ openresty.sh

Setting up boot up and specifying service files
Oh ah, here is a copy of someone else's bar, all content on the path of the place modified to the above installation location.
[Root@bogon bin]# Vim/etc/init.d/nginx

# processname:nginx #
config:      /usr/local/openresty/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 0

nginx= "/usr/local/openresty/nginx/sbin/nginx"
prog=$ (basename $ Nginx)

nginx_conf_file= "/usr/local/openresty/nginx/conf/nginx.conf"

[-f/etc/sysconfig/nginx] & &. /etc/sysconfig/nginx

Fix the path on line 15th above.
And then

Chkconfig--add nginx
chkconfig nginx on
Finish

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.