Centos7日常使用点滴


Centos7点滴

1、Centos7修改默认时区为北京时间

同步时间

$>yum install -y ntpdate
$>ntpdate -u cn.pool.ntp.org

设置中国时区

$>timedatectl set-timezone Asia/Shanghai

2、让命令行提示符显式完整路径

$>vi /etc/profile

export PS1='[\u@\h `pwd`]\$'

$>source /etc/profile

3、修改主机名

$>hostnamectl set-hostname gyg

4、关闭防火墙

$>systemctl status firewalld.service  #查看防火墙状态

$>systemctl stop firewalld.service  #临时关闭防火墙

$>systemctl disable firewalld.service  #永久关闭防火墙

5、ssh登录特别慢问题解决

先备份/etc/ssh/sshd_config,备份命令为

cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak

1.su                                    (以root用户登录)

2.vi /etc/ssh/sshd_config      (编辑配置文件)

3.输入 / ,查找GSSAPIAuthentication 赋值为no

4.输入 /,查找UseDNS,赋值为 no(该项默认不启用的,要把前面的#删除掉)

5.最后输入!wq保存文件并退出

6.重启systemctl restart sshd


下载
本地仓库repository,链接:http://pan.baidu.com/s/1kVA9sxD密码:kx9x;点击打开链接

https://www.sxt.cn/Java_jQuery_in_action/seven-javautilarrays.html