Source package management (configure their own special needs)

First, the source packet source code

. (1) way to get source packages
official website, you can get the latest package
the Apache: www.apache.org
Nginx: www.nginx.org
Tengine: tengine.taobao.org

(2) Specific examples of display (Tengine)

1. Download the source package, prepare packages

2. Prepare the compiler environment compilers such as gcc, the make
# yum -y install gcc the make-devel zlib-devel PCRE PCRE OpenSSL-devel
(PCRE: supports regular expressions, address rewrite rewrite)

3. Extract (download on the real machine, rz upload, rz in vm virtual machine is not available, xsheel, final shell available)
# useradd the WWW (root user privileges much use if)
# tar xvf Tengine-2.2.0.tar .gz
# cd Tengine-2.2.0

4.配置
./configure \(转意回车)
--user=www \
--group=www \
--prefix=/usr/local/nginx \
--with-http_stub_status_module \
--with-http_sub_module \
--with-http_ssl_module \
--with-pcre  

5. Building
# make

6. Install
# the make install

7 Start Test
# / usr / local / nginx / sbin / nginx // start nginx server
# systemctl stop firewalld
see the page, indicating successful deployment.

Second, the source of installation error code

error1:
./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.
解决方案:
# yum -y install zlib-devel

error2:
./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.
解决方案:
# yum -y install openssl-devel

error3:
checking for C compiler ... not found
./configure: error: C compiler cc is not found
解决方案:
# yum -y install gcc gcc-c++ make

error4:
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.
解决方案:
# yum -y install pcre-devel

 

Guess you like

Origin www.cnblogs.com/zjz20/p/11263142.html