在centos7中,/etc/rc.d/rc.local文件的权限降低,您没有执行权限,因此必须添加可执行权限。
chmod x /etc/rc.d/rc.local
然后,在高兴的冬日里你可以加入开机自我启动的命令。
vi /etc/rc.d/rc.local
#打开共享目录的电源并装载
sudovmhgfs-fuse.host ://mnt/hgfs-onon empty-o allow _ other
#开放3306端口
iptables-I input4- ptcp-mstate-- statenew-mtcp-- dport 3306-j accept
保存服务iptablessave # iptables规则