近期对服务器的系统进行了升级。升级过程中充满波折,在这一过程中网络教程给了极大帮助。特将这一过程中的文档列在下面,供大家参考。
1、CentOS 7 使用经验分享:
http://www.linuxidc.com/Linux/2015-01/111998.htm
重点介绍了三点
记录CentOS 7与以往不同的地方
取消ifconfig,使用ip addr 查看IP地址
使用firewalld 取代 iptables
系统默认编码设置文件,由/etc/sysconfig/i18n 更改为 /etc/locale.conf
2、(总结)RHEL/CentOS 7.x的几点新改变
http://www.ha97.com/5657.html
重点关注:如何启动/关闭、启用/禁用服务?
启动一个服务:systemctl start postfix.service
关闭一个服务:systemctl stop postfix.service
重启一个服务:systemctl restart postfix.service
3、CentOS 7 Firewall防火墙操作手册(firewalld)
http://www.svipc.com/thread-2002-1-1.html
4、设置有限IP的ssh访问
http://purpen.iteye.com/blog/1135342
hosts.deny
sshd:All
hosts.allow
sshd:IP
yum install xinetd
service xinetd restart
5、centos7下安装apache服务器
http://www.21ops.com/ops/30127.html
CentOS7 安装配置并启动httpd的步骤 (包括开启80端口)
http://blog.csdn.net/smstong/article/details/39343543
关键:
打开firewalld防火墙的80端口(很好很实用)
firewall-cmd --add-service=http (即时打开)
firewall-cmd --permanent --add-service=http (写入配置文件)
http://www.21ops.com/ops/30008.html
然而常规方式不能启动MysqL,建议利用Firewalld开启3306端口
Firewall Rules
It is highly recommended that the ProfitBricks firewall and/or local Linux firewall be used to restrict access to the MysqL server. Only hosts requiring connectivity to the MysqL server should be granted network access.
MysqL listens on TCP port 3306 by default.
If the CentOS firewall is enabled,then a rule allowing access to the MysqL server on port 3306/tcp from host192.0.2.10 can be added.
如果出现ERROR 2002 (HY000): Can't connect to local MysqL server through socket '/var/lib/MysqL/MysqL.sock' (2)错误,可以运行一下命令解决:
/usr/bin/MysqL_install_db --user=MysqL --datadir=/var/lib/MysqL
Install MysqL Database Centos 7
http://briansnelson.com/Install_MysqL_Database_Centos_7
7、CentOS 7 下挂载NTFS文件系统并实行开机自动挂载
http://www.linuxidc.com/Linux/2014-11/109226.htm
8、Firewalld快速上手(CentOS 7标配防火墙)
http://www.opsarch.net/?p=11
重点:禁止ping
firewall-cmd --add-icmp-block=echo-reply
firewall-cmd --add-icmp-block=echo-request (此句禁止外网ping主机)
任何设置加上--permanent参数即为永久设置(重新load或重启都有效)
Firewalld官方文档
https://fedoraproject.org/wiki/FirewallD#Dynamic_firewall_with_FirewallD
fedora/centos7防火墙FirewallD详解
http://www.fedora.hk/linux/yumwei/show_15.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。