• CentOS开机自动运行自己的脚本详解


    一、root权限编辑/etc/rc.d/rc.local

    su 
    cd /etc/rc.d/  
    vi rc.local

    二、在这个文件加上你要执行的脚本,全部内容如下:

    #!/bin/sh  
    #  
    # This script will be executed *after* all the other init scripts.  
    # You can put your own initialization stuff in here if you don't  
    # want to do the full Sys V style init stuff.  
        
    touch /var/lock/subsys/local 
    mount //192.168.0.3/data2-1 /mnt/data2-1 -o username=un,password=123  
    mount //192.168.0.3/data2-2 /mnt/data2-2 -o username=un,password=123  
    mount //192.168.0.3/data2-3 /mnt/data2-3 -o username=un,password=123  
    mount //192.168.0.3/data2-4 /mnt/data2-4 -o username=un,password=123  
    mount //192.168.0.3/data2-5 /mnt/data2-4 -o username=un,password=123
  • 相关阅读:
    Using Spark's "Hadoop Free" Build
    关于Consul
    关于Eureka
    关于Gateway
    关于Ribbon
    关于Hystrix
    关于Feign
    关于SpringBoot
    关于架构
    关于敏捷开发Scrum(一)
  • 原文地址:https://www.cnblogs.com/sos-blue/p/9384059.html
Copyright © 2020-2023  润新知