一岁呀 发表于 2022-9-8 16:21:38

centos7单独安装lnmp1.8的mysql数据库时出错,麻烦军哥帮忙看看

============================check files==================================
mysql-5.7.34.tar.gz
============================check files==================================
Install dependent packages...
Loaded plugins: fastestmirror
No Match for argument: mysql-server
No Match for argument: mysql
No Match for argument: mariadb-server
No Match for argument: mariadb
Resolving Dependencies
--> Running transaction check
---> Package mariadb-libs.x86_64 1:5.5.60-1.el7_5 will be erased
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-7.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: libmapi-7.1.14-3.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-7.el7.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: libmapi-7.1.14-3.el7.x86_64
--> Running transaction check
---> Package libmapi.x86_64 0:7.1.14-3.el7 will be erased
--> Processing Dependency: libmapi.so.0()(64bit) for package: pam_mapi-0.3.4-1.el7.x86_64
--> Processing Dependency: libmapi.so.0()(64bit) for package: zarafa-client-7.1.14-3.el7.x86_64
---> Package postfix.x86_64 2:2.10.1-7.el7 will be erased
--> Running transaction check
---> Package pam_mapi.x86_64 0:0.3.4-1.el7 will be erased
---> Package zarafa-client.x86_64 0:7.1.14-3.el7 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package             Arch         Version               Repository       Size
================================================================================
Removing:
mariadb-libs      x86_64       1:5.5.60-1.el7_5      @anaconda       4.4 M
Removing for dependencies:
libmapi             x86_64       7.1.14-3.el7            @epel         2.4 M
pam_mapi            x86_64       0.3.4-1.el7             @epel            35 k
postfix             x86_64       2:2.10.1-7.el7          @anaconda      12 M
zarafa-client       x86_64       7.1.14-3.el7            @epel         4.4 M

Transaction Summary
================================================================================
Remove1 Package (+4 Dependent packages)

Installed size: 23 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing    : pam_mapi-0.3.4-1.el7.x86_64                                  1/5
Erasing    : libmapi-7.1.14-3.el7.x86_64                                  2/5
Erasing    : zarafa-client-7.1.14-3.el7.x86_64                            3/5
Erasing    : 2:postfix-2.10.1-7.el7.x86_64                              4/5
Erasing    : 1:mariadb-libs-5.5.60-1.el7_5.x86_64                         5/5
Verifying: zarafa-client-7.1.14-3.el7.x86_64                            1/5
Verifying: libmapi-7.1.14-3.el7.x86_64                                  2/5
Verifying: pam_mapi-0.3.4-1.el7.x86_64                                  3/5
Verifying: 2:postfix-2.10.1-7.el7.x86_64                              4/5
Verifying: 1:mariadb-libs-5.5.60-1.el7_5.x86_64                         5/5

Removed:
mariadb-libs.x86_64 1:5.5.60-1.el7_5                                          

Dependency Removed:
libmapi.x86_64 0:7.1.14-3.el7       pam_mapi.x86_64 0:0.3.4-1.el7            
postfix.x86_64 2:2.10.1-7.el7       zarafa-client.x86_64 0:7.1.14-3.el7      

Complete!
error: package mysql is not installed
error: package mysql-libs is not installed
error: package mariadb is not installed
error: package mariadb-libs is not installed
Loaded plugins: fastestmirror
Determining fastest mirrors
http://59.212.148.249/centos7/base/repodata/repomd.xml: Timeout on http://59.212.148.249/centos7/base/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
http://59.212.148.249/centos7/base/repodata/repomd.xml: Timeout on http://59.212.148.249/centos7/base/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
http://59.212.148.249/centos7/base/repodata/repomd.xml: Timeout on http://59.212.148.249/centos7/base/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')




暂时判断是无法与59.212.148.249这个IP地址通信,因为网络内策略做了一些防护,之前防护这边放开了http://soft1.vpser.net这个域名的80和443端口,

想咨询一下以后要用完整版安装包安装lnmp环境的时候直接放开哪个地址和端口会好一些呢,以及这个地址(http://59.212.148.249/centos7/base/repodata/repomd.xml)用windows访问的时候是访问失败的。

licess 发表于 2022-9-8 20:17:11

59.212.148.249 这个是你们的自建源吗?按提示你这个源无法访问,无法访问的话依赖包就安装不上,也就安装不成功

你用http的话就只需要开80,用https的话才会用到443
lnmp默认安装是会开放22、80、443这些的,安装ftp还会开放ftp所需的20、21、20000-30000这些端口

一岁呀 发表于 2022-9-9 15:52:58

licess 发表于 2022-9-8 20:17
59.212.148.249 这个是你们的自建源吗?按提示你这个源无法访问,无法访问的话依赖包就安装不上,也就安装 ...

不好意思哈,源是我们自己的。

我刚换了一个官方镜像做了本地源,但是在单独安装mysql的时候失败了,求助一下大佬看看哈,错误问题我贴在帖子里面

一岁呀 发表于 2022-9-9 15:59:22

独立安装数据库失败日志

一岁呀 发表于 2022-9-9 16:06:48

这是今天换了本地源的配置


# ll /etc/yum.repos.d/
total 4
-rw-r--r-- 1 root root 68 Sep9 15:09 local.repo
#
# cat /etc/yum.repos.d/local.repo


name=loacl

baseurl=file:///mnt/dvd

enabled=1

gpgcheck=0
#
#

licess 发表于 2022-9-9 21:05:17

一岁呀 发表于 2022-9-9 15:59
独立安装数据库失败日志

Linking CXX shared library libmysqlclient.so
../archive_output_directory/libclientlib.a(sha2_password_common.cc.o): In function `sha2_password::SHA256_digest::retrieve_digest(unsigned char*, unsigned int)':
/home/lnmp1.8-full/src/mysql-5.7.34/sql/auth/sha2_password_common.cc:122: undefined reference to `EVP_MD_CTX_reset'
../archive_output_directory/libclientlib.a(sha2_password_common.cc.o): In function `sha2_password::SHA256_digest::init()':
/home/lnmp1.8-full/src/mysql-5.7.34/sql/auth/sha2_password_common.cc:149: undefined reference to `EVP_MD_CTX_new'
/home/lnmp1.8-full/src/mysql-5.7.34/sql/auth/sha2_password_common.cc:160: undefined reference to `EVP_MD_CTX_free'
../archive_output_directory/libclientlib.a(sha2_password_common.cc.o): In function `sha2_password::SHA256_digest::deinit()':
/home/lnmp1.8-full/src/mysql-5.7.34/sql/auth/sha2_password_common.cc:175: undefined reference to `EVP_MD_CTX_free'
../archive_output_directory/libvio.a(viossl.c.o): In function `ssl_do':
/home/lnmp1.8-full/src/mysql-5.7.34/vio/viossl.c:392: undefined reference to `SSL_set_options'
/home/lnmp1.8-full/src/mysql-5.7.34/vio/viossl.c:392: undefined reference to `SSL_set_options'
../archive_output_directory/libvio.a(viosslfactories.c.o): In function `new_VioSSLFd':
/home/lnmp1.8-full/src/mysql-5.7.34/vio/viosslfactories.c:549: undefined reference to `TLS_server_method'
/home/lnmp1.8-full/src/mysql-5.7.34/vio/viosslfactories.c:560: undefined reference to `SSL_CTX_set_options'
/home/lnmp1.8-full/src/mysql-5.7.34/vio/viosslfactories.c:566: undefined reference to `SSL_CTX_set_ciphersuites'
../archive_output_directory/libvio.a(viosslfactories.c.o): In function `get_dh2048':
/home/lnmp1.8-full/src/mysql-5.7.34/vio/viosslfactories.c:131: undefined reference to `DH_set0_pqg'
../archive_output_directory/libvio.a(viosslfactories.c.o): In function `new_VioSSLFd':
/home/lnmp1.8-full/src/mysql-5.7.34/vio/viosslfactories.c:549: undefined reference to `TLS_client_method'
../archive_output_directory/libvio.a(viosslfactories.c.o): In function `mysql_OPENSSL_init':
/home/lnmp1.8-full/src/mysql-5.7.34/include/my_openssl.h:57: undefined reference to `OPENSSL_init_ssl'
../archive_output_directory/libvio.a(viosslfactories.c.o): In function `ssl_start':
/home/lnmp1.8-full/src/mysql-5.7.34/vio/viosslfactories.c:443: undefined reference to `OPENSSL_init_crypto'
/home/lnmp1.8-full/src/mysql-5.7.34/vio/viosslfactories.c:444: undefined reference to `OPENSSL_init_ssl'
collect2: error: ld returned 1 exit status
你系统的openssl自行升级过且是有问题导致的

一岁呀 发表于 2022-9-13 09:52:18

licess 发表于 2022-9-9 21:05
你系统的openssl自行升级过且是有问题导致的

那请教一下军哥,有啥方法可以救一下吗?现在业务主机我管理不到了,只能是作为应用使用者。

licess 发表于 2022-9-13 17:13:32

一岁呀 发表于 2022-9-13 09:52
那请教一下军哥,有啥方法可以救一下吗?现在业务主机我管理不到了,只能是作为应用使用者。 ...

如果是恢复原来系统openssl的话,执行:

yum reinstall openssl openssl-devel

一岁呀 发表于 2022-9-13 21:43:50

# yum reinstall openssl openssl-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed package 1:openssl-1.0.2k-19.el7.x86_64 (from base) not available.
Installed package 1:openssl-devel-1.0.2k-19.el7.x86_64 (from base) not available.
Error: Nothing to do

一岁呀 发表于 2022-9-13 21:46:21

难受 还是报错 这是不给退了是吗

licess 发表于 2022-9-14 10:43:27

一岁呀 发表于 2022-9-13 21:43
# yum reinstall openssl openssl-devel
Loaded plugins: fastestmirror
Loading mirro ...

这个应该是你源有关,有可能不是当前这个源安装的,yum remove openssl openssl-devel 卸载,!!!卸载确认前确定一下依赖包是否牵扯一些其他系统必要的依赖包!!!
再 yum install openssl openssl-devel

一岁呀 发表于 2022-9-14 16:26:23

licess 发表于 2022-9-14 10:43
这个应该是你源有关,有可能不是当前这个源安装的,yum remove openssl openssl-devel 卸载,!!!卸载确认 ...

对的,一开始用的是另外一个源,但是上一次的主机就是因为源的问题,做了换源后就可以正常进行安装lnmp环境,这次也先换源,但是换源后就出现了这个问题。

一岁呀 发表于 2022-9-16 09:51:35

licess 发表于 2022-9-14 10:43
这个应该是你源有关,有可能不是当前这个源安装的,yum remove openssl openssl-devel 卸载,!!!卸载确认 ...
openssl version
OpenSSL 1.1.1l24 Aug 2021

我的openssl版本是1.1.1,军哥这个需要退到1.0吗,我看了一下remove openssl好像会出现ssh无法登录的状态,有点小担心

licess 发表于 2022-9-16 21:17:19

一岁呀 发表于 2022-9-16 09:51
openssl version
OpenSSL 1.1.1l24 Aug 2021



yum remove openssl 并不会导致ssh无法登录,openssh与openssl上包并不关联,除非你openssh也升级了并且也是用的你自己升级的openssl

一岁呀 发表于 2022-9-22 10:29:51

licess 发表于 2022-9-16 21:17
yum remove openssl 并不会导致ssh无法登录,openssh与openssl上包并不关联,除非你openssh也升级了并且 ...

谢谢军哥哈,根据思路并且自己试了一下网上的方法以及处理好了。





当前环境的openssl版本如下:
openssl version


1. 下载需要的openssl版本包,这里选了1.0.1e版本
wget http://www.openssl.org/source/openssl-1.0.1e.tar.gz


2. 解压包,安装到/usr/local/ssl/目录下
tar zxvf openssl-1.0.1e.tar.gz
cd openssl-1.0.1e
./config --prefix=/usr/local/ssl
make && make install


3. 将旧的openssl执行文件及目录重命令
mv -f /usr/bin/openssl /usr/bin/openssl.old
mv -f /usr/include/openssl /usr/include/openssl.old


4. 修改软链,指向新版本的openssl路径
ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/ssl/include/openssl /usr/include/openssl


5. 添加so库的路径,添加完成之后,运行ldconfig ,将新增的so 文件缓存到/etc/ld.so.cache中
echo "/usr/local/ssl/lib">>/etc/ld.so.conf
ldconfig -v


6. 执行查看版本openssl版本
openssl version
页: [1]
查看完整版本: centos7单独安装lnmp1.8的mysql数据库时出错,麻烦军哥帮忙看看