NFS文件挂载
环境安装
yum install nfs-utils -y
挂载
mount -t nfs4 <挂载点域名>:<文件系统内目录> <当前服务器上待挂载目标目录>
mount -t nfs4 xxxx-shenzhen.nas.aliyuncs.com:/ /www/nfs4
mount -l #查看挂载信息
OSS挂载
# 安装
http://docs-aliyun.cn-hangzhou.oss.aliyun-inc.com/assets/attach/32196/cn_zh/1496671412523/ossfs_1.80.2_centos7.0_x86_64.rpm?spm=5176.doc32196.2.3.BwsEij&file=ossfs_1.80.2_centos7.0_x86_64.rpm
yum localinstall your_ossfs_package
# 设置
echo bucket:ak:sk > /etc/passwd-ossfs
chmod 640 /etc/passwd-ossfs
# 挂载bucket
ossfs bucket /opt/ossfs -ourl=http://oss-cn-shenzhen.aliyuncs.com
# 卸载bucket:
fusermount -u /opt/ossfs
firewalld
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.0.1/32" port protocol="tcp" port="80" accept"
# 查看配置结果,验证配置
firewall-cmd --list-all
# 限定ssh/22服务只能从内网10.169.138.158访问
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="10.169.138.158/24" service name="ssh" accept"
# 允许192.168.142.166访问6379端口
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.0/24" port protocol="tcp" port="6379" accept"
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.0/24" port protocol="tcp" port="3306" accept"
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.0/24" port protocol="tcp" port="27017" accept"
firewall-cmd --reload
# 限定udp/161端口只能从内网10.169.138.158访问
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.0/24" destination address="10.46.128.24/24" port port="161" protocol="udp" accept"
Comments