change install nignx doc

This commit is contained in:
yanue
2016-01-14 14:35:38 +08:00
parent 8a003fae22
commit 43758e9c0c

View File

@@ -2,38 +2,45 @@ nginx install
============
0. before ready
---------------
```bash
groupadd www
useradd -g www www -s /bin/false
yum install -y gcc gcc-c++ zlib zlib-devel openssl openssl-devel pcre pcre-devel
yum install -y libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel
```
1. download software
--------------------
/usr/local/src
```bash
cd /usr/local/src
```
### base download
```bash
wget http://nginx.org/download/nginx-1.8.0.tar.gz
wget http://luajit.org/download/LuaJIT-2.0.4.tar.gz ### LuaJIT
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.21.tar.gz ### GraphicsMagick
wget http://zlib.net/zlib-1.2.8.tar.gz
```
### nginx module
```bash
git clone https://github.com/alibaba/nginx-http-concat.git
git clone https://github.com/simpl/ngx_devel_kit.git
git clone https://github.com/openresty/echo-nginx-module.git
git clone https://github.com/openresty/lua-nginx-module.git
git clone https://github.com/happyfish100/fastdfs-nginx-module.git
```
2. unzip and install depends
------------------------------
#### 2.0 unzip
```bash
tar -zxf nginx-1.8.0.tar.gz
tar -zxf LuaJIT-2.0.4.tar.gz
tar -zxf GraphicsMagick-1.3.21.tar.gz
tar -zxf zlib-1.2.8.tar.gz
```
#### 2.1 install LuaJIT
```bash
cd LuaJIT-2.0.4
./configure --with-ld-opt="-Wl,-rpath,$LUAJIT_LIB"
make -j8
@@ -42,15 +49,17 @@ export LUAJIT_LIB=/usr/local/lib
export LUAJIT_INC=/usr/local/include/luajit-2.0
ln -s /usr/local/lib/libluajit-5.1.so.2 /lib64/libluajit-5.1.so.2
cd ..
```
#### 2.2 install GraphicsMagick
```bash
cd GraphicsMagick-1.3.21
./configure --enable-shared --with-jpeg=yes --with-png=yes
make -j8
make install
cd ..
```
#### 2.3 install nginx
```bash
cd nginx-1.8.0
./configure --prefix=/usr/local/nginx \
--user=www \
@@ -81,6 +90,7 @@ cd nginx-1.8.0
make -j8
make install
```