安装openresty的脚本
2016-06-03 14:58
531 查看
#!/bin/bash
main_dir=/usr/local
openresty_file=/usr/local/openresty-1.9.7.4.tar.gz
openresty_name=/usr/local/openresty-1.9.7.4
pcre_file=/usr/local/pcre-8.38.zip
pcre_name=/usr/local/pcre-8.38
openssl_file=/usr/local/openssl-1.0.2g.tar.gz
openssl_name=/usr/local/openssl-1.0.2g
zlib_file=/usr/local/zlib-1.2.8.tar.gz
zlib_name=/usr/local/zlib-1.2.8
nginx-http-concat_file=/usr/local/nginx-http-concat-master.zip
nginx-http-concat_name=/usr/local/nginx-http-concat-master
#wget https://openresty.org/download/openresty-1.9.7.4.tar.gz
#wget http://nchc.dl.sourceforge.net/project/pcre/pcre/8.38/pcre-8.38.zip
#wget https://www.openssl.org/source/openssl-1.0.2g.tar.gz
#wget http://jaist.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz
#wget https://launchpadlibrarian.net/105858342/drizzle-7.1.36-stable.tar.gz
#wget https://codeload.github.com/alibaba/nginx-http-concat/zip/master
echo
#unzip openresty
echo openresty tar start-------------
cd ${main_dir}
tar -zxvf ${openresty_file}
echo openresty tar complete.............
echo
#install gcc gcc-c++
echo gcc gcc-c++ intall start-------------
yum install -y gcc gcc-c++
echo gcc gcc-c++ intall complete.............
echo
#install pcre
echo pcre install start-------------
cd ${main_dir}
unzip ${pcre_file}
cd ${pcre_name}
./configure --prefix=/usr/local/pcre --enable-utf8
make & make install
echo pcre intall complete.............
echo
#install openssl
echo openssl install start-------------
cd ${main_dir}
tar -zxvf ${openssl_file}
cd ${openssl_name}
./config --prefix=/usr/local/openssl
./config -t
make & make install
echo openssl intall complete.............
echo
#install zlib
echo zlib install start-------------
cd ${main_dir}
tar -zxvf ${zlib_file}
cd ${zlib_name}
./configure --prefix=/usr/local/zlib
make & make install
echo zlib intall complete.............
echo
#install nginx-http-concat
echo nginx-http-concat install start-------------
cd ${main_dir}
unzip ${nginx-http-concat_file}
mv ${nginx-http-concat_name} ${openresty_name}/bundle/nginx-http-concat
echo nginx-http-concat intall complete.............
echo
#install openresty
echo openresty install start-------------
cd ${openresty_name}
./configure --prefix=/usr/local/openresty --with-pcre=${pcre_name} --with-openssl=${openssl_name} --with-zlib=${zlib_name} --with-luajit --with-http_iconv_module --with-ld-opt="-Wl,-rpath,/usr/local/lib" --with-http_stub_status_module --with-http_ssl_module
--with-http_sub_module --add-module=./bundle/nginx-http-concat/
#./configure --prefix=/usr/local/openresty --with-pcre=/usr/local/pcre-8.38 --with-openssl=/usr/local/openssl-1.0.2g --with-zlib=/usr/local/zlib-1.2.8 --with-luajit --with-http_iconv_module --with-ld-opt="-Wl,-rpath,/usr/local/lib" --with-http_stub_status_module
--with-http_ssl_module --with-http_sub_module --add-module=./bundle/nginx-http-concat/
gmake
gmake install
echo openresty install complete.............
echo
#/usr/local/openresty/nginx/sbin/nginx -c /usr/local/openresty/nginx/conf/nginx.conf
main_dir=/usr/local
openresty_file=/usr/local/openresty-1.9.7.4.tar.gz
openresty_name=/usr/local/openresty-1.9.7.4
pcre_file=/usr/local/pcre-8.38.zip
pcre_name=/usr/local/pcre-8.38
openssl_file=/usr/local/openssl-1.0.2g.tar.gz
openssl_name=/usr/local/openssl-1.0.2g
zlib_file=/usr/local/zlib-1.2.8.tar.gz
zlib_name=/usr/local/zlib-1.2.8
nginx-http-concat_file=/usr/local/nginx-http-concat-master.zip
nginx-http-concat_name=/usr/local/nginx-http-concat-master
#wget https://openresty.org/download/openresty-1.9.7.4.tar.gz
#wget http://nchc.dl.sourceforge.net/project/pcre/pcre/8.38/pcre-8.38.zip
#wget https://www.openssl.org/source/openssl-1.0.2g.tar.gz
#wget http://jaist.dl.sourceforge.net/project/libpng/zlib/1.2.8/zlib-1.2.8.tar.gz
#wget https://launchpadlibrarian.net/105858342/drizzle-7.1.36-stable.tar.gz
#wget https://codeload.github.com/alibaba/nginx-http-concat/zip/master
echo
#unzip openresty
echo openresty tar start-------------
cd ${main_dir}
tar -zxvf ${openresty_file}
echo openresty tar complete.............
echo
#install gcc gcc-c++
echo gcc gcc-c++ intall start-------------
yum install -y gcc gcc-c++
echo gcc gcc-c++ intall complete.............
echo
#install pcre
echo pcre install start-------------
cd ${main_dir}
unzip ${pcre_file}
cd ${pcre_name}
./configure --prefix=/usr/local/pcre --enable-utf8
make & make install
echo pcre intall complete.............
echo
#install openssl
echo openssl install start-------------
cd ${main_dir}
tar -zxvf ${openssl_file}
cd ${openssl_name}
./config --prefix=/usr/local/openssl
./config -t
make & make install
echo openssl intall complete.............
echo
#install zlib
echo zlib install start-------------
cd ${main_dir}
tar -zxvf ${zlib_file}
cd ${zlib_name}
./configure --prefix=/usr/local/zlib
make & make install
echo zlib intall complete.............
echo
#install nginx-http-concat
echo nginx-http-concat install start-------------
cd ${main_dir}
unzip ${nginx-http-concat_file}
mv ${nginx-http-concat_name} ${openresty_name}/bundle/nginx-http-concat
echo nginx-http-concat intall complete.............
echo
#install openresty
echo openresty install start-------------
cd ${openresty_name}
./configure --prefix=/usr/local/openresty --with-pcre=${pcre_name} --with-openssl=${openssl_name} --with-zlib=${zlib_name} --with-luajit --with-http_iconv_module --with-ld-opt="-Wl,-rpath,/usr/local/lib" --with-http_stub_status_module --with-http_ssl_module
--with-http_sub_module --add-module=./bundle/nginx-http-concat/
#./configure --prefix=/usr/local/openresty --with-pcre=/usr/local/pcre-8.38 --with-openssl=/usr/local/openssl-1.0.2g --with-zlib=/usr/local/zlib-1.2.8 --with-luajit --with-http_iconv_module --with-ld-opt="-Wl,-rpath,/usr/local/lib" --with-http_stub_status_module
--with-http_ssl_module --with-http_sub_module --add-module=./bundle/nginx-http-concat/
gmake
gmake install
echo openresty install complete.............
echo
#/usr/local/openresty/nginx/sbin/nginx -c /usr/local/openresty/nginx/conf/nginx.conf
相关文章推荐
- centos7 关闭firewall安装iptables并配置
- shell脚本语言学习笔记-3
- 菜鸟学linux之四Linux文件与目录管理第一节
- Linux服务器搭建之<PHP>(三)
- HDFS源码分析数据块复制监控线程ReplicationMonitor(二)
- VIM 配置ctags/cscope 函数跳转
- 搭建Kafka运行环境
- HDFS源码分析数据块复制监控线程ReplicationMonitor(一)
- centos服务器异常断电mysql启动异常启动Mysql时报错:mysqld_safe mysqld from pid file /usr/local/mysql/Linux.pid end
- Squid安装和反向代理配置简明指南
- Docker Swarm学习教程
- Tomcat中的JSTL配置与使用
- 使用花生棒(内网版)远程监控摄像头
- opencv:L1距离,L2距离,颜色失真(color distortion),汉明距离(hamming distance),LUT
- TOMCAT java.lang.OutOfMemoryError: PermGen space
- fork之后子进程到底复制了父进程什么
- 调用OpenSSL实现数字签名功能例程(二)
- 【Linux设备驱动】TQ2440按键驱动程序设计
- linux 中的vim的配置文件:.vimrc 在哪里?
- openwrt下的samba设置