YukiDrive:一款开源免费的Onedrive & SharePoint文件浏览程序(基于宝塔安装)下

YukiDrive宝塔配置篇!

1.网站>创建站点,按照图示选择;

YukiDrive:一款开源免费的Onedrive & SharePoint文件浏览程序(基于宝塔安装)下

2.申请证书,选择文件验证即可

YukiDrive:一款开源免费的Onedrive & SharePoint文件浏览程序(基于宝塔安装)下

3.下载源码并解压,然后重命名,建议把版本号删除:

YukiDrive:一款开源免费的Onedrive & SharePoint文件浏览程序(基于宝塔安装)下

4.编辑appsettings.json

{
  "Logging": {
    "LogLevel": {
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*",
  "ConnectionString": "Data Source=YukiDrive.db;",
  "ClientId": "你的客户端ID",
  "ClientSecret": "创建的客户端密钥(值)",
  "ListeningUrls": "http://*:1273",
  "Certificate" : {
    "Enable" : false,
    "FilePath" : "",
    "Password" : ""
  },
  "BaseUri":"https://你的网址",
  "Proxy":"",
  "Type":"China",  #China世纪互联,Global 国际版
  "AccountName": "Office账户名",
  "DominName": " Office账户名后缀",
  "AdminName" : "网站登录账号",
  "AdminPassword": "网站登录密码"
}
YukiDrive:一款开源免费的Onedrive & SharePoint文件浏览程序(基于宝塔安装)下

5.设置网站目录:

YukiDrive:一款开源免费的Onedrive & SharePoint文件浏览程序(基于宝塔安装)下

6.站点配置>配置文件,删除如下字段:

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
    {
        expires      30d;
        error_log off;
        access_log /dev/null;
    }
YukiDrive:一款开源免费的Onedrive & SharePoint文件浏览程序(基于宝塔安装)下

7.设置反代:

YukiDrive:一款开源免费的Onedrive & SharePoint文件浏览程序(基于宝塔安装)下

8.输入:./YukiDrive;按照图示执行

YukiDrive:一款开源免费的Onedrive & SharePoint文件浏览程序(基于宝塔安装)下

9.登录后台:

YukiDrive:一款开源免费的Onedrive & SharePoint文件浏览程序(基于宝塔安装)下

10:账户认证:

YukiDrive:一款开源免费的Onedrive & SharePoint文件浏览程序(基于宝塔安装)下

11.点击接受:

YukiDrive:一款开源免费的Onedrive & SharePoint文件浏览程序(基于宝塔安装)下

12.添加站点

YukiDrive:一款开源免费的Onedrive & SharePoint文件浏览程序(基于宝塔安装)下

然后刷新即可使用了,其他方面请自行设置。

13:设置守护进程:

echo "[Unit]
Description=YukiDrive

[Service]
WorkingDirectory=$RUNDIR #网站目录
ExecStart=$RUNDIR/YukiDrive #网站运行目录
Restart=always
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=dotnet-YukiDrive
User=root
Environment=ASPNETCORE_ENVIRONMENT=Production
Environment=DOTNET_PRINT_TELEMETRY_MESSAGE=false

[Install]
WantedBy=multi-user.target" > /etc/systemd/system/YukiDrive.service

14.启动服务

systemctl enable YukiDrive.service

systemctl start YukiDrive.service

15.查看服务状态

systemctl status YukiDrive.service

16.显示以下语句即为正常运行

● YukiDrive.service - YukiDrive
   Loaded: loaded (/etc/systemd/system/YukiDrive.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2020-03-23 23:39:50 EDT; 2h 6min ago
 Main PID: 7206 (YukiDrive)
    Tasks: 14 (limit: 4915)
   CGroup: /system.slice/YukiDrive.service
           └─7206 /www/wwwroot/yukidrive/linux/YukiDrive

Mar 23 23:39:50 ThoroughUnconscious-VM systemd[1]: Started Example .NET Web API App running on Ubuntu.
Mar 23 23:39:50 ThoroughUnconscious-VM dotnet-YukiDrive[7206]: 开始启动程序...
Mar 23 23:39:54 ThoroughUnconscious-VM dotnet-YukiDrive[7206]: Hosting environment: Production
Mar 23 23:39:54 ThoroughUnconscious-VM dotnet-YukiDrive[7206]: Content root path: /www/wwwroot/yukidrive/linux
Mar 23 23:39:54 ThoroughUnconscious-VM dotnet-YukiDrive[7206]: Now listening on: http://localhost:1273
Mar 23 23:39:54 ThoroughUnconscious-VM dotnet-YukiDrive[7206]: Application started. Press Ctrl+C to shut down.

17.退出服务

systemctl stop YukiDrive.service

本片文章为大碗数科丨DWSK博客原创文章,文中的观点,仅代表大碗数科丨DWSK作者公子高个人的独到见解,此外,文章中所涉及到的品牌、软硬件版权归开发者及持有者所有,本站仅作收录和分享,如果本文侵犯了您的利益,请将您的相关权利证明附件扫描并发送至邮箱:support@dawanshuke.com,本站将协同文章作者公子高及时处理。

转转请注明出处:https://www.dawanshuke.com/gongzigao/yukidrive-xia/

发表评论

登录后才能评论