@@ -2,38 +2,45 @@ nginx install
22============
330 . before ready
44---------------
5+ ``` bash
56groupadd www
67useradd -g www www -s /bin/false
78
89yum install -y gcc gcc-c++ zlib zlib-devel openssl openssl-devel pcre pcre-devel
910yum install -y libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel
10-
11+ ```
11121 . download software
1213--------------------
13- /usr/local/src
14+ ``` bash
15+ cd /usr/local/src
16+ ```
1417### base download
18+ ``` bash
1519wget http://nginx.org/download/nginx-1.8.0.tar.gz
1620wget http://luajit.org/download/LuaJIT-2.0.4.tar.gz # ## LuaJIT
1721wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.21.tar.gz # ## GraphicsMagick
1822wget http://zlib.net/zlib-1.2.8.tar.gz
19-
23+ ```
2024### nginx module
25+ ``` bash
2126git clone https://github.com/alibaba/nginx-http-concat.git
2227git clone https://github.com/simpl/ngx_devel_kit.git
2328git clone https://github.com/openresty/echo-nginx-module.git
2429git clone https://github.com/openresty/lua-nginx-module.git
2530git clone https://github.com/happyfish100/fastdfs-nginx-module.git
26-
31+ ```
27322 . unzip and install depends
2833------------------------------
2934
3035#### 2.0 unzip
36+ ``` bash
3137tar -zxf nginx-1.8.0.tar.gz
3238tar -zxf LuaJIT-2.0.4.tar.gz
3339tar -zxf GraphicsMagick-1.3.21.tar.gz
3440tar -zxf zlib-1.2.8.tar.gz
35-
41+ ```
3642#### 2.1 install LuaJIT
43+ ``` bash
3744cd LuaJIT-2.0.4
3845./configure --with-ld-opt=" -Wl,-rpath,$LUAJIT_LIB "
3946make -j8
@@ -42,15 +49,17 @@ export LUAJIT_LIB=/usr/local/lib
4249export LUAJIT_INC=/usr/local/include/luajit-2.0
4350ln -s /usr/local/lib/libluajit-5.1.so.2 /lib64/libluajit-5.1.so.2
4451cd ..
45-
52+ ```
4653#### 2.2 install GraphicsMagick
54+ ``` bash
4755cd GraphicsMagick-1.3.21
4856./configure --enable-shared --with-jpeg=yes --with-png=yes
4957make -j8
5058make install
5159cd ..
52-
60+ ```
5361#### 2.3 install nginx
62+ ``` bash
5463cd nginx-1.8.0
5564./configure --prefix=/usr/local/nginx \
5665--user=www \
@@ -81,6 +90,7 @@ cd nginx-1.8.0
8190
8291make -j8
8392make install
93+ ```
8494
8595
8696
0 commit comments