- Centos系统时间同步
方法一(在Cent 7上亲测可行,cent6.8上不行。systemctl命令不支持cent 6版本)
yum install ntp //安装ntp服务
systemctl enable ntpd //开机启动服务
systemctl start ntpd //启动服务
timedatectl set-timezone Asia/Shanghai //更改时区
timedatectl set-ntp yes //启用ntp同步
ntpq -p //同步时间
或者用如下更简单的方法(在cent 6.8上亲测可行,在cent 7上应该也行)
yum install ntp //安装ntp服务
sudo ntpdate time.nist.gov
- SSH 免密码登陆失败的一种原因,StrictModes
I copied my public key to authorized_keys but public-key authentication still doesn't work.
Typically this is caused by the file permissions on $HOME, $HOME/.ssh or $HOME/.ssh/authorized_keys being more permissive than sshd allows by default.
In this case, it can be solved by executing the following on the server.
$ chmod go-w $HOME $HOME/.ssh $ chmod 600 $HOME/.ssh/authorized_keys $ chown `whoami` $HOME/.ssh/authorized_keys |
- 修改完bashrc后ls,vim等失效问题:
在shell中输入export PATH=/usr/bin:/usr/sbin:/bin:/sbin,暂时可以使用ls,vim等命令。然后打开bashrc,修改path。一般都是写成了export PATH=PATH:XXX,修改成export PATH=$PATH:XXX
- 建立软连接,将mac固态硬盘上的文件映射到移动硬盘