生成libssl.so.10和libcrypto.so.10文件
一.强制卸载OpenSSL:
rpm -e --nodeps openssl
二.卸载后重装OpenSSL提示:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
libssl.so.10: cannot open shared object file: No such file or directory
Please install a package which provides this module, or
verify that the module is installed correctly.
It’s possible that the above module doesn’t match the
current version of Python, which is:
2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
三.解决方案
1.下载:https://www.openssl.org/source/old/1.0.1/openssl-1.0.1e.tar.gz 上传到服务器,
tar xvf openssl-1.0.1e.tar.gz cd openssl-1.0.1e ./config shared zlib-dynamic #生成Makefile文件 make #生成libssl.so.1.0.0 和 libcrypto.so.1.0.0 cp libssl.so.1.0.0 /usr/lib64 cp libcrypto.so.1.0.0 /usr/lib64 cd /usr/lib64 ln -s libssl.so.1.0.0 libssl.so.10 ln -s libcrypto.so.1.0.0 libcrypto.so.10
编译安装ntp
./configure --prefix=/usr/local/ntp --bindir=/usr/sbin --sysconfdir=/etc
make && make install
ln -s /usr/sbin/ntpd /etc/init.d/
客户机与服务器时间同步
[root@cdh2 ~]# ntpdate -u 192.168.20.134
-
查看时间是否同步
[root@cdh2 ~]# ntpq -p
remote refid st t when poll reach delay offset jitter==============================================================================
cdh1 LOCAL(0) 6 u 14 64 3 1.092 9.130 3.475
查看时间,东部标准时间 (EST),这样会导致看到的时间不一致,需要修改时区。
# date 2019年 01月 04日 星期五 04:12:05 EST # dpkg-reconfigure tzdata #更改时区 # date #查看当前系统时间 2019年 01月 04日 星期五 17:59:20 CST hwclock #查看当前硬件时间 date -s "2018-01-01 11:20:30" #设置系统时间,字符串形式 hwclock --systohc #将系统时间同步到硬件