openresty在redhat6.7部署有很多依赖,需要先安装这些依赖包,这些包可以在安装iso中找到
rpm -ivh cpp-4.4.7-16.el6.x86_64.rpm
rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
rpm -ivh cpp-4.4.7-16.el6.x86_64.rpm
rpm -ivh gcc-4.4.7-16.el6.x86_64.rpm
rpm -ivh libstdc++-devel-4.4.7-16.el6.x86_64.rpm
rpm -ivh gcc-c++-4.4.7-16.el6.x86_64.rpm
rpm -ivh pkgconfig-0.23-9.1.el6.x86_64.rpm
rpm -ivh pcre-7.8-7.el6.x86_64.rpm
rpm -ivh pcre-devel-7.8-7.el6.x86_64.rpm
rpm -ivh openssl-1.0.1e-42.el6.x86_64.rpm
--openssl-devel 依赖
rpm -ivh zlib-devel-1.2.3-29.el6.x86_64.rpm
rpm -ivh libcom_err-devel-1.41.12-22.el6.x86_64.rpm
rpm -ivh libsepol-devel-2.0.41-4.el6.x86_64.rpm
rpm -ivh libselinux-devel-2.0.94-5.8.el6.x86_64.rpm
rpm -ivh keyutils-libs-devel-1.4-5.el6.x86_64.rpm
rpm -ivh krb5-devel-1.10.3-42.el6.x86_64.rpm
rpm -ivh openssl-devel-1.0.1e-42.el6.x86_64.rpm
tar -xvf openresty-1.11.2.5.tar.gz
cd openresty-1.11.2.5
./configure 如果没报错表示依赖已经正确
make
make install
cd /usr/local/openresty/nginx/sbin
./nginx 启动nginx
./nginx -s reload 重启nginx
放开80端口
iptables -I INPUT -p tcp --dport 80 -jACCEPT
iptables -I INPUT -p udp --dport 80 -jACCEPT
/etc/init.d/iptables save
/etc/init.d/iptables restart
部署redis
tar -xvf redis-4.0.2.tar.gz
cd redis-4.0.2
make
cp redis.conf src
cd src
iptables -I INPUT -p tcp --dport 6379 -jACCEPT
iptables -I INPUT -p udp --dport 6379 -jACCEPT
/etc/init.d/iptables save
/etc/init.d/iptables restart
修改配置 redis.conf
protected-mode no 关掉
bind 是绑定请求IP
./redis-server redis.conf &