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

最新文章

  1. zookeeper分布式锁原理
  2. 【修改端口号】linux下修改apache,nginx服务端口号
  3. 【开源框架】EFW框架中的系统权限与页面子权限详解
  4. 加载 pcntl 多进程
  5. MR 的 mapper 数量问题
  6. java 递归函数
  7. html5 note
  8. linux_mac_配置itrem2 rz sz_bug处理
  9. 【教程】发布NAServer到ArcGIS Server 10.4上[超详细]
  10. 2种不同方式实现背景图里加入文字的简单CSS样式
  11. 为什么使用zookeeper?
  12. 通过TensorFlow训练神经网络模型
  13. mysql 存储过程 游标嵌套
  14. 微服务之springCloud-config-bus(十三)
  15. UNP学习总结(二)
  16. lr11_Run-time Settings选项介绍:
  17. spring 3.0系统集成webservice
  18. JS其他类型值转化为Boolean类型规则
  19. javascript实用例子
  20. 21天学通C++学习笔记(二):C++程序的组成部分

热门文章

  1. (13)Go接口
  2. Automatic Ship Detection in Optical Remote Sensing Images Based on Anomaly Detection and SPP-PCANet
  3. Mybatis(上)
  4. Cesium的Property机制总结[转]
  5. SpringBoot @Autowired中注入静态方法或者静态变量
  6. 配置mongo.conf文件
  7. Extjs与Vue技术优劣势比较
  8. win10找不到hosts文件(设置显示隐藏文件也找不到)解决方法
  9. 有些新电脑采用“UEFI”作为固件。由于UEFI不支持DOS,所以在UEFI环境下安装的WIN10等系统也就无法使用基于DOS的一键GHOST
  10. SQL查询优化思维即SQL子查询