裝完proxmox後預設 rc.local是沒有作用的
如果要使用
要依以下步驟操作
新增 rc-local.service
vi /etc/systemd/system/rc-local.service
[Unit]
Description=/etc/rc.local Compatibility
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
rc-local.service
vi /etc/systemd/system/rc-local.service
[Unit]
Description=/etc/rc.local Compatibility
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
新增rc.local
/etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
#set vmbr1 to hub mode for snort and ntopng
/sbin/ifconfig ens4f0 promisc
/sbin/ifconfig vmbr1 promisc
/sbin/brctl setageing vmbr1 0
exit 0
chmod +x /etc/rc.local
以下三行是為了要把 vmbr1設為 mirror 流量接收使用 可視其他需要更改
/sbin/ifconfig ens4f0 promisc
/sbin/ifconfig vmbr1 promisc
/sbin/brctl setageing vmbr1 0
沒有留言:
張貼留言