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

CENTOS7开机自启动脚本

一二三4年前 (2022-01-06)Centos1137
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


扫描二维码至手机访问

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

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

分享给朋友:

相关文章

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、It may not be safe to bootstrap the cluster from this node. It was not the last one一、故障现象查看mysql错误...

centos_7 mariadb 优化参数

最大链接数 输入show variables like 'max_connections';一、修改mariadb.service vim ...

Nginx SSL配置协议

upstream web_backends_80 {   ip_hash; #每个请求按访问ip的hash结果分配可以解决session的问题。...

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

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

Linux双关接入时路由设置

route del defaultroute del defaultroute add default gw 59.48.154.1route add -net 188.188.0.0 netmask...