1 MySQL - rpm -ev mysql-libs-5.1.73-8.el6_8.x86_64
问题:
error: Failed dependencies:
libmysqlclient.so.16()(64bit) is needed by (installed) postfix-2:2.6.6-8.el6.x86_64
libmysqlclient.so.16(libmysqlclient_16)(64bit) is needed by (installed) postfix-2:2.6.6-8.el6.x86_64
mysql-libs is needed by (installed) postfix-2:2.6.6-8.el6.x86_64
原因:依赖性冲突
解决方法:在语句后面添加 --nodeps
rpm -ev mysql-libs-5.1.73-8.el6_8.x86_64 --nodeps
参考文章1链接:https://blog.csdn.net/qq_34872748/article/details/86517639
参考文章2链接:https://www.cnblogs.com/kerrycode/p/4353755.html
2 MySQL - 安装MySQL-client-5.5.47-1.linux2.6.x86_64.rpm
问题:
warning: MySQL-client-5.5.47-1.linux2.6.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
error: Failed dependencies:
/usr/bin/perl is needed by MySQL-client-5.5.47-1.linux2.6.x86_64
原因:yum安装了旧版本的GPG keys
解决方法:在语句后面添加 --force --nodeps
rpm -ivh MySQL-client-5.5.47-1.linux2.6.x86_64.rpm --force --nodeps
参考文章链接:https://blog.csdn.net/sunforraining/article/details/79836998
3 MySQL - 安装MySQL-server-5.5.47-1.linux2.6.x86_64.rpm
问题:
/usr/sbin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory
原因:未安装libaio
解决方案:安装libaio
yum install -y libaio
参考文章链接:https://blog.csdn.net/eagle89/article/details/78411184
4 使用RPM包安装软件
参考文章链接:https://www.cnblogs.com/gmlkl/p/9354254.html
5 MySQL - 虚拟机NAT模式下 Host ‘192.168.x.1’ is not allowed to connect to this MySQL server 问题
问题:
Host ‘192.168.137.1’ is not allowed to connect to this MySQL server
原因:中间多了NAT的网络地址,需要添加相应的权限
解决方案:
(1)在虚拟机相应机器上,登录mysql
[root@hadoop01 ~]# mysql -u root -p
(2)授予相应权限
GRANT ALL PRIVILEGES ON *.* TO 'root'@'192.168.39.1' IDENTIFIED BY '密码' WITH GRANT OPTION
(3)刷新privileges
mysql> flush privileges;
参考文章连接:https://blog.csdn.net/weixin_42350212/article/details/80635634
6 ntpdate -u ntp1.aliyun.com更新时间时失败 & 重启后更新时间失败
问题1:
[hadoop@hadoop105 ~]$ ntpdate -u ntp1.aliyun.com
-bash: ntpdate: command not found
原因:
安装的是minimal版本的Linux,ntp命令需要单独的安装
解决方案:
yum install -y ntp
问题2:
重启机器后发现修改的时间未有效
原因:
更新时修改的是系统时间,而重启后,系统时间会更新为机器硬件时间,因此修改时间时需要将修改的系统时间同步到机器的额硬件时间
解决方法:
root@hadoop02
[root@hadoop02 ~]# ntpdate -u ntp1.aliyun.com
[root@hadoop02 ~]# date
[root@hadoop02 ~]# hwclock --systohc
[root@hadoop02 ~]# hwclock --show
hadoop@hadoop107
[hadoop@hadoop107 ~]$ sudo ntpdate -u ntp1.aliyun.com
[sudo] password for hadoop:
8 Sep 10:15:29 ntpdate[1452]: step time server 120.25.115.20 offset -28747.727054 sec
[hadoop@hadoop107 ~]$ date
Sun Sep 8 10:15:32 CST 2019
[hadoop@hadoop107 ~]$ sudo hwclock --systohc
sudo: timestamp too far in the future: Sep 8 18:14:36 2019
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for hadoop:
[hadoop@hadoop107 ~]$ sudo hwclock --show
Sun 08 Sep 2019 10:15:55 AM CST -0.954515 seconds
[hadoop@hadoop107 ~]$