X-osadminの自留地
  • 博客主页 HomePage
  • 技术小絮 Tech
  • 软件专题 Softs
    • proxmox
    • openwrt
    • chromebook
    • Zerotier
    • 虚拟化
  • 友情链接 Following

xosadmin

BGPlayer / Codes learner / Love Linux
Posts
73
Comments
0

友情链接 – Friendly Links

  • Add your site here…
xosadmin
4 years ago

Debian 11启用rc.local方法

rc.local是一个令大家耳熟详的文件,它在Redhat系列操作系统中可以让用户添加自定义开机脚本并运行。但是在Debian 11操作系统中,这个功能不被默认开启。这篇文章将介绍如何开启rc.local。话不多说,开始~

  1. 先通过以下命令对systemd注入rc-local服务:

cat>>/etc/systemd/system/rc-local.service<<EOF
[Unit]
Description=/etc/rc.local
ConditionPathExists=/etc/rc.local

[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99

[Install]
WantedBy=multi-user.target
EOF

2. 执行daemon reload和启动服务开机启动

systemctl daemon-reload && systemctl enable rc-local

3. 创建一个空白的rc.local文件,并写入头尾,如下方

touch /etc/rc.local

cat /etc/rc.local

#!/bin/sh -e

<your command>

exit 0

4. 对rc.local赋予权限以执行

chmod a+x /etc/rc.local

到这里,就全部完成了,在下一次重启中,该文件将会被自动调用并执行。

Enjoy~

  • 技术小絮
等 人表示很赞
2,969
0

📮Comments

No Comment.
xosadmin
xosadmin
7 years ago
推荐 Dell Chromebook 13安装Windows 10教程
据了解,Dell于近年悄然上了一款产品:Chromebook 13。其的价格非常吸引人,各项配置也不逊色,其炫酷的外观和亲民的价格,令许多人为之向往。唯一的不同,即如其的名字,预装了Chrome OS系统及特别的Bios。有许多小伙伴不熟 ...
  • chromebook
  • 技术小絮
17,314 3
xosadmin
xosadmin
6 years ago
推荐 apache提示You don’t have permission to access /* on this server.的解决方法
首先,X-osadmin在这里祝大家520快乐!近日有朋友遇到了这样一个问题:在CentOS 8下安装php-fpm+apache,在浏览器打开时均提示You don’t have permission to access / ...
  • 技术小絮
3,873 0
xosadmin
xosadmin
8 years ago
推荐 CentOS 6下如何安装KVM虚拟化
昨天,小编讲述了在CentOS上安装OpenVZ虚拟框架的方式。应公众号里部分读者的要求,今天再给大家讲讲如何在CentOS上安装KVM虚拟框架。所谓KVM,官网给的定义如下: KVM (for Kernel-based Virtual ...
  • 技术小絮
  • 虚拟化
2,216 1
xosadmin
xosadmin
6 years ago
推荐 OpenWrt设置Zerotier后LAN端不通的一种解决方案
近日在openwrt上设置完zerotier后,出现了一个问题:在LAN的主机上ping网关(OpenWrt路由器)不通,LAN主机互相ping也不通,但是网关可以连接网络。在经过traceroute后,发现部分LAN的请求被自动转发到ze ...
  • 技术小絮
8,328 0
xosadmin
xosadmin
8 months ago
推荐 HPE Microserver系列降低噪音的一种办法
部分HPE Microserver Gen10+和Gen11用户反映,安装了Debian/Proxmox或者更换了硬盘后出现风扇声音很大的问题。经过搜索和研究,发现其中一种解决方法,即在系统中安装HPE的amsd及smad组件。具体方式如下 ...
  • 技术小絮
78 0
  • Proxmox强制删除离线集群节点方法
  • PVE Cluster给node更换corosync IP的方法
  • HPE Microserver系列降低噪音的一种办法
  • Debian 13 Trixie安装Proxmox VE
  • Windows FTP服务器通过PASV模式无法获取目录的解决方法
  • Proxmox日志出现大量lxcfs truncated错误的解决方案

文章聚合

  • Proxmox强制删除离线集群节点方法
  • PVE Cluster给node更换corosync IP的方法
  • Debian 13 Trixie安装Proxmox VE
  • Proxmox日志出现大量lxcfs truncated错误的解决方案
  • Proxmox通过CLI向LXC挂载已有虚拟磁盘的方法
  • Proxmox VE通过全盘方式直通硬盘

Multilangual Translator

Copyright © 2016-2026 X-osadminの自留地. All rights reserved. 萌ICP备20258855号
  • 博客主页 HomePage
  • 技术小絮 Tech
  • 软件专题 Softs
    • proxmox
    • openwrt
    • chromebook
    • Zerotier
    • 虚拟化
  • 友情链接 Following
Welcome
Forgot password?
Welcome
Forgot password?
Social Login
Login with WeChat QR Code
Unregistered WeChat IDs will be automatically used to create an account.
Scan and Reply with Keywords「登录」Get Verification Code
Social Login
Free registration
Social Login
Reset password
Back to Login