yum源:https://www.cnblogs.com/guanbin-529/p/11980400.html
163源:http://mirrors.163.com/centos/7/os/x86_64/Packages/
安装mysql:https://blog.csdn.net/qq_36582604/article/details/80526287
centos7-tomcat安装配置:https://blog.csdn.net/l568646976/article/details/92099264
远程文件SCP问题:https://jingyan.baidu.com/article/14bd256e1f20dffb6d2612c0.html
远程桌面:https://blog.csdn.net/u014296316/article/details/88257614
xshell密钥登入:https://blog.csdn.net/yuexiazhufeng/article/details/75349724
查看防火墙的状态的命令为:sudo systemctl status firewalld
打开防火墙的方式有两种,一种是打开后重启会恢复回原来的状态,命令为:
sudo systemctl start firewalld;另一种是打开后重启不会恢复到原来的状态,命令为:
sudo systemctl enable firewalld,这种方式输入命令后要重启系统才会生效。
关闭防火墙的方式也有两种,和打开相对应,命令分别为
sudo systemctl stop firewalld
sudo systemctl disable firewalld
获取公网IP地址:curl http://metadata.tencentyun.com/meta-data/public-ipv4
防火墙问题:https://blog.csdn.net/centose/article/details/96975849
CentOS 7.0默认使用的是firewall作为防火墙,之前版本是使用iptables。
1.设置firewall开机启动
2.禁止firewall开机启动
systemctl disable firewalld
之前在本地的CentOS虚拟机上配置 Samba 服务器没有遇到过这种问题,刚才在我的阿里云服务器上配置Samba上下文时, 报出了这个错误chcon -t samba_share_t /home/suozhiyuan/chcon: can't apply partial context to unlabeled file '/home/suozhiyuan/'找了很久的资料, 发现问题是出在 selinux 放火墙上, 这个防火墙的配置文件为 /etc/selinux/config配置内容:原来是关闭: SELINUX=disabled改成打开: SELINUX=enforcing复制代码# This file controls the state of SELinux on the system.# SELINUX= can take one of these three values:# enforcing - SELinux security policy is enforced.# permissive - SELinux prints warnings instead of enforcing.# disabled - No SELinux policy is loaded.#改成SELINUX=enforcing# SELINUXTYPE= can take one of these three values:# targeted - Targeted processes are protected,# minimum - Modification of targeted policy. Only selected processes are protected.# mls - Multi Level Security protection.SELINUXTYPE=targeted
