Nginx + nginx-upload-module 文件服务器搭建

来源:互联网 发布:网络诈骗2000判刑多久 编辑:程序博客网 时间:2024/05/21 09:46

要使用 nginx-upload-module 得以源码编译方式安装 Nginx


试验环境:Ubuntu 16.04


先安装库:

sudo apt install libpcre3-dev  libssl-dev


找个目录 cd 进去,用 wget 下载Nginx源码

wget http://nginx.org/download/nginx-1.12.0.tar.gz

用什么版本进 http://nginx.org/download 自己看


tar 解压源码

tar -zxvf /nginx-1.12.0.tar.gz


cd 源码目录

cd /nginx-1.12.0


git clone 下载 nginx-upload-module 

git clone https://github.com/AlkyoS/nginx-upload-module.git

注意我这里使用的不是原作者的源码,原版最后更新于10年前,已经不能跟当前 Nginx 源码编译,于是找了个 16年的,试了下可以


./configure --prefix=/usr/local/webserver/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --user=www --group=www --with-http_ssl_module --with-http_stub_status_module --add-module=nginx-upload-module


make && make install


安装成功!

------------------------




原创粉丝点击