GreatSQL社区

搜索

[已解决] GreatSQL-8.0.32-24 二进制包安装

1016 5 2023-6-16 17:01
按照文档 3-quick-start/3-2-quick-start-with-tarball.md · 万里数据库/GreatSQL-Manual - Gitee.com ,下载GreatSQL-8.0.32-24-Linux-glibc2.17-x86_64.tar.xz 安装到Centos 7 中,由于习惯使用mysql.server 启动,安装完成后发现support-files 中该文件已经不存在,复制8.0.25 的mysql.server 到bin 中,执行mysql.server start

如下错误
  1. 20230616_16:02:37[manager@server57 mysql]$ cp ../mysql20230616/bin/mysql.server bin/
  2. 20230616_16:03:07[manager@server57 mysql]$ mysql.server start
  3. 20230616_16:03:07/usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
  4. 20230616_16:03:07/usr/local/mysql/bin/mysql.server: line 259: cd: /usr/local/GreatSQL-8.0.25-16-Linux-glibc2.17-x86_64: No such file or directory
  5. 20230616_16:03:07Starting MySQL (Percona Server) ERROR! Couldn't find MySQL server (/usr/local/GreatSQL-8.0.25-16-Linux-glibc2.17-x86_64/bin/mysqld_safe)
复制代码
修改mysql.server
  1. basedir=/usr/local/mysql
  2. datadir=/home/manager/mysql_data
复制代码
继续
  1. [manager@server57 bin]$ mysql.server start
  2. /usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
  3. Starting MySQL (Percona Server)./usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
  4. /usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
  5. . ERROR! The server quit without updating PID file (/home/manager/mysql_data/server57.pid).
复制代码
使用systemd 方式启动
  1. sed -i 's/GreatSQL-8.0.32-24-Linux-glibc2.17-x86_64/mysql/' mysqld_pre_systemd
复制代码

  1. [Unit]
  2. Description=GreatSQL Server
  3. Documentation=man:mysqld(8)
  4. Documentation=http://dev.mysql.com/doc/refman/en/using-systemd.html
  5. After=network.target
  6. After=syslog.target
  7. [Install]
  8. WantedBy=multi-user.target
  9. [Service]

  10. # some limits
  11. # file size
  12. LimitFSIZE=infinity
  13. # cpu time
  14. LimitCPU=infinity
  15. # virtual memory size
  16. LimitAS=infinity
  17. # open files
  18. LimitNOFILE=65535
  19. # processes/threads
  20. LimitNPROC=65535
  21. # locked memory
  22. LimitMEMLOCK=infinity
  23. # total threads (user+kernel)
  24. TasksMax=infinity
  25. TasksAccounting=false

  26. User=manager
  27. Group=manager
  28. #如果是GreatSQL 5.7版本,此处需要改成simple模式,否则可能服务启用异常
  29. #如果是GreatSQL 8.0版本则可以使用notify模式
  30. #Type=simple
  31. Type=notify
  32. TimeoutSec=0
  33. PermissionsStartOnly=true
  34. ExecStartPre=/usr/local/mysql/bin/mysqld_pre_systemd
  35. ExecStart=/usr/local/mysql/bin/mysqld $MYSQLD_OPTS
  36. EnvironmentFile=-/etc/sysconfig/mysql
  37. LimitNOFILE = 10000
  38. Restart=on-failure
  39. RestartPreventExitStatus=1
  40. Environment=MYSQLD_PARENT_PID=1
  41. PrivateTmp=false
复制代码
错误如下
  1. Jun 16 16:33:56 server57 mysqld_pre_systemd[30555]: /usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
  2. Jun 16 16:33:56 server57 polkitd[1925]: Unregistered Authentication Agent for unix-process:30427:2974284038 (system bus name :1.117215, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
  3. Jun 16 16:33:56 server57 mysqld_pre_systemd[30555]: /usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
  4. Jun 16 16:33:56 server57 mysqld_pre_systemd[30555]: /usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
  5. Jun 16 16:33:56 server57 mysqld_pre_systemd[30555]: /usr/local/mysql/bin/my_print_defaults: /usr/local/ssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
  6. Jun 16 16:33:56 server57 mysqld_pre_systemd[30555]: install: invalid user ‘mysql’
  7. Jun 16 16:33:56 server57 systemd[1]: greatsql.service: control process exited, code=exited status=1
  8. Jun 16 16:33:56 server57 systemd[1]: Failed to start GreatSQL Server.
  9. -- Subject: Unit greatsql.service has failed
复制代码
建立软连接后启动成功
  1. [root@server57 lib]# find / -name libcrypto.so.10
  2. /usr/lib64/libcrypto.so.10
  3. /usr/local/mysql/lib/libcrypto.so.10
  4. /usr/local/mysql/lib/private/libcrypto.so.10
  5. [root@server57 lib]# ll
  6. total 22456
  7. drwxr-xr-x 2 root root       39 Jul  8  2022 engines-1.1
  8. -rw-r--r-- 1 root root 11605090 Jul  8  2022 libcrypto.a
  9. lrwxrwxrwx 1 root root       16 Jul  8  2022 libcrypto.so -> libcrypto.so.1.1
  10. lrwxrwxrwx 1 root root       16 Jun 16 17:31 libcrypto.so.10 -> libcrypto.so.1.1
  11. -rwxr-xr-x 1 root root  6213512 Jul  8  2022 libcrypto.so.1.1
  12. -rw-r--r-- 1 root root  3484474 Jul  8  2022 libssl.a
  13. lrwxrwxrwx 1 root root       13 Jul  8  2022 libssl.so -> libssl.so.1.1
  14. -rwxr-xr-x 1 root root  1685408 Jul  8  2022 libssl.so.1.1
  15. drwxr-xr-x 2 root root       61 Jul  8  2022 pkgconfig
  16. [root@server57 lib]# rm -rf libcrypto.so
  17. [root@server57 lib]# ln -s /usr/local/mysql/lib/libcrypto.so.10 libcrypto.so
复制代码
我这环境是在8.0.25 上做原地升级,不知道统一个机器25 和32 为啥表现不一样?32 对openssl 版本有要求?


全部回复(5)
yejr 2023-6-17 21:34:05
几个建议:
1. 建议用systemd来管理GreatSQL服务,详情参考
https://greatsql.cn/docs/8032/us ... l-with-tarball.html

2. GreatSQL 8.0.32的编译参数和8.0.25确实不同,对操作系统的openssl依赖方式也不同
这时候需要手动加软链接,或者把GreatSQL的lib目录加到ldconfig可识别的路径里,例如修改 /etc/ld.so.conf ,加入一行:
/usr/local/GreatSQL-8.0.32-24-Linux-glibc2.17-x86_64/lib
mlovewt 2023-7-28 14:17:37
yejr 发表于 2023-6-17 21:34
几个建议:
1. 建议用systemd来管理GreatSQL服务,详情参考
https://greatsql.cn/docs/8032/user-manual/4- ...

本机升级openssl3 后如果 把greatsql里的lib 放到 /etc/ld.so.conf 中,上面的问题依然会存在,需要再启动greatsql时只加载greatsql二进制包中的lib,或者是能直接兼容。
mlovewt 2023-7-28 14:19:26
mlovewt 发表于 2023-7-28 14:17
本机升级openssl3 后如果 把greatsql里的lib 放到 /etc/ld.so.conf 中,上面的问题依然会存在,需要再启 ...

/etc/ld.so.conf 中内容
  1. include ld.so.conf.d/*.conf
  2. /usr/local/mysql/lib
  3. /usr/local/openssl/lib
复制代码

把 /usr/local/openssl/lib 去掉是可以启动的
mlovewt 2023-7-28 14:27:07
本帖最后由 mlovewt 于 2023-7-28 14:33 编辑
mlovewt 发表于 2023-7-28 14:19
/etc/ld.so.conf 中内容

把 /usr/local/openssl/lib 去掉是可以启动的

解决了
  1. cat >> /etc/sysconfig/mysql << EOF
  2. LD_PRELOAD=/usr/lib64/libjemalloc.so:/usr/local/mysql/lib/libcrypto.so.10:/usr/local/mysql/lib/libssl.so.10:/usr/local/mysql/lib/libcrypto.so
  3. THP_SETTING=never
  4. EOF
复制代码

初始化后启动时libjemalloc.so 后面追加上这三个就可以启动,初始化仍然出错

  1. Jul 28 14:30:57 docker-base mysqld_pre_systemd[12507]: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
  2. Jul 28 14:30:57 docker-base mysqld_pre_systemd[12507]: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `OPENSSL_1.0.1_EC' not found (required by /usr/local/mysql/lib/libssl.so.10)
  3. Jul 28 14:30:57 docker-base mysqld_pre_systemd[12507]: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/lib/libssl.so.10)
  4. Jul 28 14:30:57 docker-base mysqld_pre_systemd[12507]: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
  5. Jul 28 14:30:57 docker-base mysqld_pre_systemd[12507]: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `OPENSSL_1.0.1_EC' not found (required by /usr/local/mysql/lib/libssl.so.10)
  6. Jul 28 14:30:57 docker-base mysqld_pre_systemd[12507]: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/lib/libssl.so.10)
  7. Jul 28 14:30:57 docker-base mysqld_pre_systemd[12507]: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
  8. Jul 28 14:30:57 docker-base mysqld_pre_systemd[12507]: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `OPENSSL_1.0.1_EC' not found (required by /usr/local/mysql/lib/libssl.so.10)
  9. Jul 28 14:30:57 docker-base mysqld_pre_systemd[12507]: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/lib/libssl.so.10)
  10. Jul 28 14:30:57 docker-base mysqld_pre_systemd[12507]: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/bin/my_print_defaults)
  11. Jul 28 14:30:57 docker-base mysqld_pre_systemd[12507]: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `OPENSSL_1.0.1_EC' not found (required by /usr/local/mysql/lib/libssl.so.10)
  12. Jul 28 14:30:57 docker-base mysqld_pre_systemd[12507]: /usr/local/mysql/bin/my_print_defaults: /usr/local/openssl/lib/libcrypto.so: version `libcrypto.so.10' not found (required by /usr/local/mysql/lib/libssl.so.10)
  13. Jul 28 14:30:57 docker-base systemd[1]: greatsql.service: main process exited, code=exited, status=1/FAILURE
  14. Jul 28 14:30:57 docker-base systemd[1]: Failed to start GreatSQL Server.
  15. -- Subject: Unit greatsql.service has failed
复制代码


yejr 2023-7-28 14:32:59
mlovewt 发表于 2023-7-28 14:19
/etc/ld.so.conf 中内容

把 /usr/local/openssl/lib 去掉是可以启动的

那就在ld.so.conf 里把 /usr/local/openssl/lib 去掉呗,为啥一定要加载呢
mlovewt

5

主题

0

博客

25

贡献

新手上路

Rank: 1

积分
41

助人为乐(铜)

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2024-11-22 01:24 , Processed in 0.024146 second(s), 19 queries , Redis On.
快速回复 返回顶部 返回列表