安装centos7.2,发现与之前版本有很大的不同
1 配置163yum源
参考http://mirrors.163.com/.help/CentOS7
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
下载
yum clean all
yum makecache
2 Centos7关闭防火墙
Q:防火墙配置后执行service iptables save 出现”Failed to restart iptables.service: Unit iptables.service failed to load: No such file or directory.”
解决:
在CentOS7或RHEL7中防火墙由firewalld来管理,当然你可以还原传统的管理方式。或则使用新的命令进行管理。
a 假如采用传统请执行一下命令:
systemctl stop firewalld
systemctl mask firewalld
查看防火墙是否打开:
iptables -L
b 使用新的命令进行管理
安装iptables-services:
yum install iptables-services
设置开机启动:
systemctl enable iptables
使用:
systemctl [stop|start|restart] iptables
#or
service iptables [stop|start|restart]
service iptables save
#or
/usr/libexec/iptables/iptables.init save
3 centos7.2启动服务
[root@bogon centosinstall]# systemctl status nfs
● nfs-server.service - NFS server and services
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)
Active: active (exited) since 五 2016-11-18 23:25:01 EST; 41min ago
Main PID: 4734 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/nfs-server.service
11月 18 23:25:01 bogon systemd[1]: Starting NFS server and services...
11月 18 23:25:01 bogon systemd[1]: Started NFS server and services.
[root@bogon centosinstall]#