梅林固件路由器搭建私有云盘服务

梅林固件路由器搭建私有云盘服务

1.开放路由器ssh登录

2.ssh登录路由器

3.安装服务

  • 安装entware
vi entware-ngu-setup.sh
# 复制文末脚本内容
chmod +x entware-ngu-setup.sh
  • 更新entware缓存,升级软件
opkg update
opkg upgrade
  • 安装nginx 和 php
opkg install nginx php7-cgi
# 备份nginx配置文件
mv /opt/etc/nginx/nginx.conf /opt/etc/nginx/nginx.conf-orig
# 创建nginx配置文件

cat >> /opt/etc/nginx/nginx.conf << 'EOF'
user nobody;
worker_processes 1;
events {
worker_connections 64;
}
http {
include mime.types;
include /opt/etc/nginx/sites-enabled/*;
default_type application/octet-stream;
server {
listen 82;
server_name localhost;
location / {
root /opt/share/nginx/html;
index index.html index.htm index.php;
}
error_page 500 502 503 504 /50x.html;
location = /opt/share/nginx/50x.html {
root html;
}
location ~ \.php$ {
root /opt/share/ng

你可能感兴趣的:(路由器)