av激情亚洲男人的天堂国语,日韩欧美精品一中文字幕,无码av一区二区三区无码,国产又色又爽又刺激的a片,国产又色又爽又刺激的a片

Linux中沒有rc.local文件解決方案

rc.local文件會在用戶登陸之前讀取,這個(gè)文件中寫入了什么命令,在每次系統(tǒng)啟動(dòng)時(shí)都會執(zhí)行一次,但是有時(shí)會遇到Linux中沒有rc.local文件的情況,下面為大家分享一下解決方法。

創(chuàng)新互聯(lián)是一家專注于成都做網(wǎng)站、網(wǎng)站制作、成都外貿(mào)網(wǎng)站建設(shè)與策劃設(shè)計(jì),永仁網(wǎng)站建設(shè)哪家好?創(chuàng)新互聯(lián)做網(wǎng)站,專注于網(wǎng)站建設(shè)十多年,網(wǎng)設(shè)計(jì)領(lǐng)域的專業(yè)建站公司;建站業(yè)務(wù)涵蓋:永仁等地區(qū)。永仁做網(wǎng)站價(jià)格咨詢:028-86922220

解決方法:

1、設(shè)置rc-local.service

sudo vim /etc/systemd/system/rc-local.service
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target

2、激活rc-local.service

sudo systemctl enable rc-local.service

3、添加啟動(dòng)服務(wù)

手工創(chuàng)建或者拷貝已有的/etc/rc.local,并賦予執(zhí)行權(quán)限

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# 下面這條是要開機(jī)啟動(dòng)的命令
/home/selfcs/anaconda3/bin/Python /home/selfcs/t.py > /home/selfcs/auto.log

exit 0

#給予腳本執(zhí)行權(quán)限
sudo chmod +x /etc/rc.local

分享名稱:Linux中沒有rc.local文件解決方案
標(biāo)題路徑:http://uogjgqi.cn/article/dhphcse.html
掃二維碼與項(xiàng)目經(jīng)理溝通

我們在微信上24小時(shí)期待你的聲音

解答本文疑問/技術(shù)咨詢/運(yùn)營咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流