初学耗时:0.5h
注:CSDN手机端暂不支持章节内链跳转,但外链可用,更好体验还请上电脑端。
一、系统环境部署
1.1 服务器中安装依赖。
1.2 上传 LuaJIT-2.0.4.tar.gz 并安装 LuaJIT。
1.3 设置 LuaJIT 环境变量。
1.4 创建 modules 文件夹,保存 nginx 依赖的模块。
1.5 上传 nginx 依赖的模块。
1.6 将依赖的模块直接解压到 modules 目录。
1.7 安装 openresty。
1.8 安装 nginx。
1.9 编译 nginx 并支持其他模块。
记忆词:
Openresty、Lua、Nginx
一、系统环境部署
1.1 ~ 服务器中安装依赖。
yum -y install gcc perl pcre-devel openssl openssl-devel
1.2 ~ 上传 LuaJIT-2.0.4.tar.gz 并安装 LuaJIT。
tar -zxvf LuaJIT-2.0.4.tar.gz -C /usr/local/src/
cd /usr/local/src/LuaJIT-2.0.4/
make && make install PREFIX=/usr/local/luajit
1.3 ~ 设置 LuaJIT 环境变量。
vim /etc/profile
export LUAJIT_LIB=/usr/local/luajit/lib
export LUAJIT_INC=/usr/local/luajit/include/luajit-2.0
source /etc/profile
1.4 ~ 创建 modules 文件夹,保存 nginx 依赖的模块。
mkdir -p /usr/local/nginx/modules
1.5 ~ 上传 nginx 依赖的模块。
set-misc-nginx-module-0.29.tar.gz
lua-nginx-module-0.10.0.tar.gz
ngx_devel_kit-0.2.19.tar.gz
echo-nginx-module-0.58.tar.gz
1.6 ~ 将依赖的模块直接解压到 modules 目录。
tar -zxvf lua-nginx-module-0.10.0.tar.gz -C /usr/local/nginx/modules/
tar -zxvf set-misc-nginx-module-0.29.tar.gz -C /usr/local/nginx/modules/
tar -zxvf ngx_devel_kit-0.2.19.tar.gz -C /usr/local/nginx/modules/
tar -zxvf echo-nginx-module-0.58.tar.gz -C /usr/local/nginx/modules/
1.7 ~ 安装 openresty。
tar -zxvf openresty-1.9.7.3.tar.gz -C /usr/local/src/
cd /usr/local/src/openresty-1.9.7.3/
./configure --prefix=/usr/local/openresty --with-luajit && make && make install
1.8 ~ 安装 nginx。
tar -zxvf nginx-1.8.1.tar.gz -C /usr/local/src/
1.9 ~ 编译 nginx 并支持其他模块。
cd /usr/local/src/nginx-1.8.1/
./configure --prefix=/usr/local/nginx \
--with-ld-opt="-Wl,-rpath,/usr/local/luajit/lib" \
--add-module=/usr/local/nginx/modules/ngx_devel_kit-0.2.19 \
--add-module=/usr/local/nginx/modules/lua-nginx-module-0.10.0 \
--add-module=/usr/local/nginx/modules/set-misc-nginx-module-0.29 \
--add-module=/usr/local/nginx/modules/echo-nginx-module-0.58
make -j2
make install
- 备注:如果对 linux 相关操作不熟,请严格按照上述步骤搭建环境,切记心细,心细,再心细。
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
^ 至此,系统环境部署完成。
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
※ 世间诱惑何其多,坚定始终不动摇。
在CVS中,将对工作备份的修改反映到资源库中的操作称为:
…
A、输入
B、提交
C、签出
D、更新
…
B
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
注:CSDN手机端暂不支持章节内链跳转,但外链可用,更好体验还请上电脑端。
我知道我的不足,我也知道你的挑剔,但我就是我,不一样的烟火,谢谢你的指指点点,造就了我的点点滴滴:)!