惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

雷峰网
雷峰网
T
Threatpost
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Tailwind CSS Blog
IT之家
IT之家
H
Hackread – Cybersecurity News, Data Breaches, AI and More
WordPress大学
WordPress大学
博客园 - 司徒正美
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
Google DeepMind News
Google DeepMind News
阮一峰的网络日志
阮一峰的网络日志
博客园 - 三生石上(FineUI控件)
Google Online Security Blog
Google Online Security Blog
The GitHub Blog
The GitHub Blog
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
有赞技术团队
有赞技术团队
S
SegmentFault 最新的问题
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Security Blog
Microsoft Security Blog
Jina AI
Jina AI
G
GRAHAM CLULEY
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cyber Attacks, Cyber Crime and Cyber Security
A
About on SuperTechFans
Vercel News
Vercel News
The Cloudflare Blog
Cisco Talos Blog
Cisco Talos Blog
小众软件
小众软件
MyScale Blog
MyScale Blog
I
InfoQ
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
S
Security Affairs
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
MongoDB | Blog
MongoDB | Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
量子位
酷 壳 – CoolShell
酷 壳 – CoolShell
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
F
Fortinet All Blogs
Latest news
Latest news
Last Week in AI
Last Week in AI
博客园 - 叶小钗
H
Heimdal Security Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
V
Vulnerabilities – Threatpost
Project Zero
Project Zero

博客园 - 白虎

软件架构设计的六大原则 Linux 安装npm 下载ECharts Linux 安装WebStorm Linux挂载第二块硬盘 Linux 安装Nginx Linux个性终端Oh my zsh Linux 第一个脚本程序 Linux 8开启FTP功能服务 Jigloo 下载 安装 GUI Linux应用开发入门(转) NET(C#)连接各类数据库-集锦 C# 编写最小化时隐藏为任务栏图标的Window appllication 管理型交换机IEEE 802.1Q VLAN设置应用实例 Windows Server 2012如何实现双网卡绑定 多网卡的7种bond模式原理 For Linux Eplan中电缆源和目标的确定规则 Eplan 2D安装版布局,部件、端子竖放 EPLAN Electric P8 2.0即将到来,着实令人期待-转caodaping 关于STM32 CAN回环可用,正常不可用情况分析
Linux配置开机自启动执行脚本
白虎 · 2021-02-26 · via 博客园 - 白虎

方法一:修改/etc/rc.local

/etc/rc.local ,该文件为链接文件

# ll /etc/rc.local 
lrwxrwxrwx. 1 root root 13 Feb  5 10:03 /etc/rc.local -> rc.d/rc.local

修改/etc/rc.local文件

# tail -n 1 /etc/rc.local 
/bin/bash /server/scripts/qidong.sh >/dev/null 2>/dev/null

方法二:chkconfig管理

# vim /etc/init.d/test 
#!/bin/bash
# chkconfig: 3 88 88
/bin/bash /server/scripts/qidong.sh >/dev/null 2>/dev/null# chmod +x /etc/init.d/test

添加到chkconfig,开机自启动

# chkconfig --add test
# chkconfig --list test
test               0:off    1:off    2:off    3:on    4:off    5:off    6:off

关闭开机启动

# chkconfig test off
# chkconfig --list test
test               0:off    1:off    2:off    3:off    4:off    5:off    6:off

从chkconfig管理中删除test

# chkconfig --list test
test               0:off    1:off    2:off    3:off    4:off    5:off    6:off

# chkconfig --del test

# chkconfig --list test
service test supports chkconfig, but is not referenced in any runlevel (run 'chkconfig --add test')

白虎

     

Hello! I Am David.DU.

posted @ 2021-02-26 11:01  白虎  阅读(151)  评论()    收藏  举报