Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
90 lines (81 sloc) 2.23 KB

nginx-lua-GraphicsMagick install

  1. before ready

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
yum install -y GraphicsMagick GraphicsMagick-devel
  1. download software

cd /usr/local/src

base download

wget ### LuaJIT

nginx module

git clone
git clone
git clone
git clone
git clone
  1. unzip and install depends

2.0 unzip

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

cd LuaJIT-2.0.4
./configure --with-ld-opt="-Wl,-rpath,$LUAJIT_LIB"
make -j8
make install 
export LUAJIT_LIB=/usr/local/lib
export LUAJIT_INC=/usr/local/include/luajit-2.0
ln -s /usr/local/lib/ /lib64/
cd ..

2.2 install nginx

cd nginx-1.8.0
./configure --prefix=/usr/local/nginx \
--user=www \
--group=www \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--pid-path=/var/run/  \
--lock-path=/var/run/nginx.lock \
--error-log-path=/opt/logs/nginx/error.log \
--http-log-path=/opt/logs/nginx/access.log \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_sub_module \
--with-http_flv_module \
--with-http_dav_module \
--with-http_gzip_static_module \
--with-http_stub_status_module \
--with-http_addition_module \
--with-http_spdy_module \
--with-pcre \
--with-zlib=../zlib-1.2.8 \
--add-module=../nginx-http-concat \
--add-module=../lua-nginx-module \
--add-module=../ngx_devel_kit \

如果安装了 fastdfs

make -j8
make install