当前位置: 首页 > Linux

Centos7最小安装后的一些操作

时间:2023-04-07 03:24:30 Linux

作者简介程序开发人员,不局限于语言和技术,目前主要从事PHP和前端开发,使用Laravel和VueJs,App端使用Apicloud混合开发.合身、够用才是最完美的追求。个人网站:http://www.linganmin.cn最近写了一个手机在线播放的H5电影站点:http://www.ifilm.ltdcentos7打开rootssh登录sudovim/etc/ssh/sshd_config修改PermitRootLogin值为是的,修改防火墙,安装centos7,选择基本安装。配置好网络后,首先要关闭防火墙:stopfirewallsystemctlstopfirewalld.service禁止防火墙启动startsystemctldisablefirewalld.serviceinstalliptablesfirewallyumwayinstalliptablesyuminstalliptables-serviceseditfirewallconfiguration在文件中加入下面三句vi/etc/sysconfig/iptables下面的默认端口22`-AINPUT-mstate--stateNEW-mtcp-ptcp--dport80-jACCEPT-AINPUT-mstate--stateNEW-mtcp-ptcp--dport3306-jACCEPT-AINPUT-mstate--stateNEW-mudp-pudp--dport161-jACCEPT`最后重启防火墙使配置生效systemctlrestartiptables.servicesetfirewallbootstartsystemctlenableiptables.servicecloseSELINUXeditselinux配置文件vi/etc/selinux/config#注释掉下面两行#SELINUX=enforcing#SELINUXTYPE=targeted#添加一行SELINUX=disabled保存,关闭ESC:wqrestart系统关闭-r现在

最新推荐
猜你喜欢