Linux系統(tǒng)(centos7.6)設(shè)置fastcgi-mono-server2開機(jī)啟動
廣告:
如何安裝xsp,請返回見:http://www.jdki.com.cn/news/detail/20635.html 系統(tǒng)Linux(centos7.6)安裝XSP3.8
Linux系統(tǒng)(centos7.6)設(shè)置fastcgi-mono-server2開機(jī)啟動:
vim /etc/systemd/system/fastcgi.service [Unit] Description=FastCgi-mono-server for Application After=syslog.target network.target [Service] Type=simple ExecStart=/usr/local/mono/bin/fastcgi-mono-server2 /socket=tcp:9000 /address=127.0.0.1 /applications=/:/var/www/html /port=9000 /loglevels=Error /logfile=/var/log/nginx/xsp.log & Restart=always [Install] WantedBy=multi-user.target
說明:
network.target代表有網(wǎng)路,network-online.target代表一個連通著的網(wǎng)絡(luò)。
加載服務(wù)器配置文件:
systemctl daemon-reload
systemctl status fastcgi.service 查看服務(wù)狀態(tài)
systemctl stop fastcgi.service 停止服務(wù)
systemctl start fastcgi.service 開啟服務(wù)
systemctl stop fastcgi 停止服務(wù)
systemctl start fastcgi 開啟服務(wù)
設(shè)為開機(jī)自動啟動:
systemctl daemon-reload systemctl start fastcgi.service systemctl enable fastcgi
systemctl status fastcgi.service
Loaded: loaded (/etc/systemd/system/fastcgi.service; disabled; vendor preset: disabled) 禁用狀態(tài)
Loaded: loaded (/etc/systemd/system/fastcgi.service; enabled; vendor preset: disabled) 啟用自啟動狀態(tài)
請開啟xsp調(diào)試:
/loglevels=Error /logfile=/var/log/nginx/xsp.log 這兩個要同時設(shè)置才會顯示詳細(xì)出錯信息 &表示該命令在后臺運(yùn)行
/usr/local/mono/bin/fastcgi-mono-server2 /socket=tcp:9000 /address=127.0.0.1 /applications=/:/var/www/html /port=9000 /loglevels=Error /logfile=/var/log/nginx/xsp.log &
查看服務(wù)器已開啟的端口:
netstat -lntp
廣告: