Skip to content

Commit 43758e9

Browse files
committed
change install nignx doc
1 parent 8a003fa commit 43758e9

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

nginx-install.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,45 @@ nginx install
22
============
33
0. before ready
44
---------------
5+
```bash
56
groupadd www
67
useradd -g www www -s /bin/false
78

89
yum install -y gcc gcc-c++ zlib zlib-devel openssl openssl-devel pcre pcre-devel
910
yum install -y libpng libjpeg libpng-devel libjpeg-devel ghostscript libtiff libtiff-devel freetype freetype-devel
10-
11+
```
1112
1. download software
1213
--------------------
13-
/usr/local/src
14+
```bash
15+
cd /usr/local/src
16+
```
1417
### base download
18+
```bash
1519
wget http://nginx.org/download/nginx-1.8.0.tar.gz
1620
wget http://luajit.org/download/LuaJIT-2.0.4.tar.gz ### LuaJIT
1721
wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.21.tar.gz ### GraphicsMagick
1822
wget http://zlib.net/zlib-1.2.8.tar.gz
19-
23+
```
2024
### nginx module
25+
```bash
2126
git clone https://github.com/alibaba/nginx-http-concat.git
2227
git clone https://github.com/simpl/ngx_devel_kit.git
2328
git clone https://github.com/openresty/echo-nginx-module.git
2429
git clone https://github.com/openresty/lua-nginx-module.git
2530
git clone https://github.com/happyfish100/fastdfs-nginx-module.git
26-
31+
```
2732
2. unzip and install depends
2833
------------------------------
2934

3035
#### 2.0 unzip
36+
```bash
3137
tar -zxf nginx-1.8.0.tar.gz
3238
tar -zxf LuaJIT-2.0.4.tar.gz
3339
tar -zxf GraphicsMagick-1.3.21.tar.gz
3440
tar -zxf zlib-1.2.8.tar.gz
35-
41+
```
3642
#### 2.1 install LuaJIT
43+
```bash
3744
cd LuaJIT-2.0.4
3845
./configure --with-ld-opt="-Wl,-rpath,$LUAJIT_LIB"
3946
make -j8
@@ -42,15 +49,17 @@ export LUAJIT_LIB=/usr/local/lib
4249
export LUAJIT_INC=/usr/local/include/luajit-2.0
4350
ln -s /usr/local/lib/libluajit-5.1.so.2 /lib64/libluajit-5.1.so.2
4451
cd ..
45-
52+
```
4653
#### 2.2 install GraphicsMagick
54+
```bash
4755
cd GraphicsMagick-1.3.21
4856
./configure --enable-shared --with-jpeg=yes --with-png=yes
4957
make -j8
5058
make install
5159
cd ..
52-
60+
```
5361
#### 2.3 install nginx
62+
```bash
5463
cd nginx-1.8.0
5564
./configure --prefix=/usr/local/nginx \
5665
--user=www \
@@ -81,6 +90,7 @@ cd nginx-1.8.0
8190

8291
make -j8
8392
make install
93+
```
8494

8595

8696

0 commit comments

Comments
 (0)