创建新用户
[root@VM ~]# adduser it
为这个用户初始化密码,linux会判断密码复杂度,不过可以强行忽略:
[root@VM_~]# passwd it
Changing password for user it.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully
VMware虚拟机中linux CentOS7上网联网,简单粗暴亲测有效
安装了redis,Java无法连接。
确定redis服务正常之后,
首先查看centos端口
netstat -tlunp
发现6379是通的
然后windows CMD telnet 192.168.122.131 6379 不通
检查防火墙
查看防火墙状态
systemctl status firewalld
关闭防火墙
systemctl stop firewalld
关闭 开机自启动
systemctl disable firewalld.service
centos7以下不能用systemctl命令
解决方法一(当场生效,重启虚拟机后失效)
先用ping 192.168.75.128是否能ping通
ping通以后看telnet服务是否能连接ip
如果不能连接则查看虚拟机中的防火墙是否关闭,查看命令为service iptables status
关闭防火墙命令为service iptables stop
开启防火墙命令为 service iptables start
重启防火墙命令为 service iptables restart
解决方法二(重启虚拟机后生效,永久)
1.开启: chkconfig iptables on
2.关闭: chkconfig iptables off