openresty下载地址 https://openresty.org/download
nginx-upload-moudle下载地址: https://github.com/Austinb/nginx-upload-module
把上面两个安装包放在/data下,并解压
安装源码编译所需环境:
yum install -y gcc zlib zlib-devel pcre pcre-devel openssl openssl-devel perl
进入openresty目录下执行:
./configure --prefix=/data/openresty --add-module=/data/nginx_upload_modulexxxxxx
这里和nginx的源码编译一样,也可以编译其他模块,nginx能用的,这里也能用
make && make install
写入配置:
vi nginx.conf:
user root;
worker_processes 20;
error_log logs/error.log notice;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
server {
listen 8082;