linux

创建新用户
[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

Centos创建用户并授权

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值