在Windows Server 2019上配置NAS的方法
序言
此教程安裝的都是最新版本的。由于是當NAS讓它非常穩(wěn)定的運行,所以能不安裝的軟件盡量不要安裝。
一、準備工作
【更新系統(tǒng)】
沒啥,就他喵想用個最新的。
右鍵點擊開始鍵->設置->更新與安全
二、Smaba
【安裝】
官方網(wǎng)站:https://www.samba.org/
命令流程:
cd /source/ wget https://download.samba.org/pub/samba/samba-latest.tar.gz tar -zxvf samba-latest.tar.gz cd samba-latest
【配置】
此處下載的是我用vs2017生成的asp.net core,僅供演示!
mkdir /web/www cd /web/www wget https://files.cnblogs.com/files/project/webapp.tar.gz tar -zxf webapp.tar.gz
三、Supervisor
【安裝】
官方網(wǎng)站:http://www.supervisord.org/
命令流程:
yum install -y supervisor
【配置】
1、復制文件
mkdir /web/supervisor cp /etc/supervisord.conf /web/supervisor
2、打開supervisord.conf
vim /web/supervisor/supervisord.conf
3、追加如下
[program:webapp] command=dotnet webapp.dll ;要執(zhí)行的命令 directory=/web/www/ ;命令執(zhí)行的目錄 autostart=true ;是否自動啟動 autorestart=true ;是否自動重啟 stderr_logfile=/var/log/webapp.err.log ;標準錯誤日志 stdout_logfile=/var/log/webapp.out.log ;標準輸出日志
【運行】
supervisord -c /web/supervisor/supervisord.conf
四、Nginx
【安裝】
官方網(wǎng)站:http://nginx.org/
命令流程:
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm yum install -y nginx
【配置】
1、復制文件
mkdir /web/nginx cp /etc/nginx/nginx.conf /web/nginx cp /etc/nginx/mime.types /web/nginx
2、打開nginx.conf
vim /web/nginx/nginx.conf
3、修改如下
worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; gzip on; server { listen 80; server_name localhost; location / { proxy_pass http://127.0.0.1:5000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_cache_bypass $http_upgrade; } } }
【運行】
nginx -c /web/nginx/nginx.conf
五、效果預覽
附、常用命令
nginx
# nginx //啟動nginx # nginx -s reload //重啟nginx # nginx -s stop //關(guān)閉nginx
supervisor
supervisord supervisorctl status //查看所有任務狀態(tài) supervisorctl shutdown //關(guān)閉所有任務 supervisorctl start|stop|restart all //控制所有進程 supervisorctl start|stop|restart program_name //控制目標進程
以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。
相關(guān)文章
阿里云主機Windows 2008 32位 64位自助正版激活圖文教程
這篇文章主要介紹了阿里云主機Windows 2008 32位 64位自助正版激活圖文教程,本文講解詳細,圖文說明自助激活Windows正版教程,需要的朋友可以參考下2014-09-09請求添加或刪除指定服務器上的功能失敗.net?Framework?3.5安裝報錯的解決方法
這篇文章主要介紹了Windows?Server?在安裝IIS環(huán)境時報.net?Framework?3.5安裝報錯的解決方法,需要的朋友可以參考下2024-03-03windows server中WSUS服務搭建的實現(xiàn)
WSUS可以自動更新補丁,本文主要介紹了windows server中WSUS服務搭建的實現(xiàn),文中通過圖文介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2024-05-05windows server 2008 r2 DNS服務器配置圖文教程
DNS服務器的作用就是幫助用戶使用簡單好記的域名來訪問網(wǎng)絡上的主機和網(wǎng)絡服務。這篇文章主要介紹了windows server 2008 r2 DNS服務器配置圖文教程,需要的朋友可以參考下2018-04-04win2008 R2 下 IIS7.5+PHP5.2.17+Mysql5.5.16+Zend3.3.3
windows Server 2008 R2 下面IIS7.5已經(jīng)對fastcgi的支持有了很大改進,還在使用PHP-ISAPi模式的朋友可以試一下2013-06-06關(guān)于Window Server2008 服務器上無法播放音頻文件和FLV視頻文件
這篇文章主要介紹了關(guān)于Window Server2008 服務器上無法播放音頻文件和FLV視頻文件的相關(guān)資料,需要的朋友可以參考下2015-09-09windows 服務器安全之磁盤訪問權(quán)限設置[完整篇]
在眾多的服務器安全設置中,對于權(quán)限的設置是比較完整的了2009-06-06System.UnauthorizedAccessException:拒絕訪問的處理辦法.
執(zhí)行當前 Web 請求期間,出現(xiàn)未處理的異常。請檢查堆棧跟蹤信息,以了解有關(guān)該錯誤以及代碼中導致錯誤的出處的詳細信息2012-09-09