当前位置:首页 > 服务器系统 > Centos > 正文内容

CENTOS7开机自启动脚本

一二三4年前 (2022-01-06)Centos1233
1、因为在centos7中/etc/rc.d/rc.local的权限被降低了,所以需要赋予其可执行权
chmod +x /etc/rc.d/rc.local
2、赋予脚本可执行权限
假设/usr/local/script/autostart.sh是你的脚本路径,给予执行权限
chmod +x /usr/local/script/autostart.sh
3、打开/etc/rc.d/rc.local文件,在末尾增加如下内容
/usr/local/script/autostart.sh


扫描二维码至手机访问

扫描二维码推送至手机访问。

版权声明:本文由一二三博客发布,如需转载请注明出处。

分享给朋友:

相关文章

nginx常用内置变量

$args #请求中的参数值$query_string #同 $args$arg_NAME #GET请求中NAME的值$is_args #如果请求中有参数,值为"?",否则为空字符...

Centos7 mariadb 10.5数据库的数据目录修改

1、查看MySQL/MariaDB数据库的数据目录MariaDB [(none)]> select @@datadir;+-----------------+| @@datadir ...

CentOS7修改计算机名

hostnamectl        //查看当前计算机名hostnamectl set-hostname  ...

Centos7 mariadb 10.5集群式部署常见故障处理

Centos7 mariadb 10.5集群式部署常见故障处理

1、It may not be safe to bootstrap the cluster from this node. It was not the last one一、故障现象查看mysql错误...

centos7 添加磁盘到/(根目录下),扩展VG卷和lv

1.创建pvfdisk /dev/xvdc输入n增加分区输入p类型设置为:主分区输入1分区编号设置为1回车 为默认大小回车 为默认 大小输入w退出2.把pv加入vg中,相当于扩充vg的大小扩展vg,使...

Centos7 mariadb 10.5集群式部署

Centos7 mariadb 10.5集群式部署

1、环境准备准备三台虚拟机,分别安装CentOS7-7.7。服务器A:10.88.1.14 node1服务器B:10.88.1.15 node2服务器C:10.88.1.16 node3三台虚机上关闭...