centos7.0安装OpenResty

查看系统版本
[root@localhost redis-3.2.9]# cat /etc/system-release
CentOS Linux release 7.3.1611 (Core)
 
下载OpenResty,下载地址:https://openresty.org/cn/download.html
或者使用命令安装
mkdir -p /data/setupsoft
cd /data/setupsoft
wget https://openresty.org/download/openresty-1.11.2.3.tar.gz
#解压openresty
tar -zxvf openresty-1.11.2.3.tar.gz
#进入解压后的文件夹
cd openresty-1.11.2.3
 ./configure
make j2
make install

编译出错,依次出错报找不到如下对应的库,安装命令如下

yum install gcc
yum -y install pcre-devel
yum install openssl openssl-devel -y
注意
默认, --prefix=/usr/local/openresty 程序会被安装到/usr/local/openresty目录
您可以指定各种选项,比如
./configure --prefix=/opt/openresty \ --with-luajit \ --without-http_redis2_module \ --with-http_iconv_module \ --with-http_postgres_module
试着使用 ./configure --help 查看更多的选项
配置文件(./configure script)运行出错可以到 build/nginx-VERSION/objs/autoconf.err 找到。 VERSION 的地方必须与OpenResty版本号相对应
 
posted @ 2017-07-05 23:27  简单的竹子  阅读(219)  评论(0编辑  收藏  举报