Centos 7 添加开机启动
1、添加启动服务
添加docker开机启动服务
[root@localhost ~]# systemctl enable docker.service
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
2、添加启动脚本
1、编写脚本
[root@localhost ~]# vi ping_route_donot_del.sh
ping 10.47.85.129 &
[root@localhost ~]# chomd +x ping_route_donot_del.sh
2、添加开机启动
[root@localhost ~]# vi /etc/rc.d/rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.touch /var/lock/subsys/local
/root/ping_route_donot_del.sh
3、赋予开机启动权限
[root@localhost ~]#chmod +x /etc/rc.d/rc.local
最新文章
- zookeeper分布式锁原理
- 【修改端口号】linux下修改apache,nginx服务端口号
- 【开源框架】EFW框架中的系统权限与页面子权限详解
- 加载 pcntl 多进程
- MR 的 mapper 数量问题
- java 递归函数
- html5 note
- linux_mac_配置itrem2 rz sz_bug处理
- 【教程】发布NAServer到ArcGIS Server 10.4上[超详细]
- 2种不同方式实现背景图里加入文字的简单CSS样式
- 为什么使用zookeeper?
- 通过TensorFlow训练神经网络模型
- mysql 存储过程 游标嵌套
- 微服务之springCloud-config-bus(十三)
- UNP学习总结(二)
- lr11_Run-time Settings选项介绍:
- spring 3.0系统集成webservice
- JS其他类型值转化为Boolean类型规则
- javascript实用例子
- 21天学通C++学习笔记(二):C++程序的组成部分
热门文章
- (13)Go接口
- Automatic Ship Detection in Optical Remote Sensing Images Based on Anomaly Detection and SPP-PCANet
- Mybatis(上)
- Cesium的Property机制总结[转]
- SpringBoot @Autowired中注入静态方法或者静态变量
- 配置mongo.conf文件
- Extjs与Vue技术优劣势比较
- win10找不到hosts文件(设置显示隐藏文件也找不到)解决方法
- 有些新电脑采用“UEFI”作为固件。由于UEFI不支持DOS,所以在UEFI环境下安装的WIN10等系统也就无法使用基于DOS的一键GHOST
- SQL查询优化思维即SQL子查询