在多台服务器上部署GoQuorum

在多台服务器上部署GoQuorum

一、解决服务器基础环境

本次实验操作系统为centos7.9。

以下步骤为大致思路和命令,在执行过程中可能会产生不同的依赖问题,需要逐一进行解决。

1.python

升级python2至python3

[root@localhost soft]# yum install gcc gcc-c++ -y
[root@localhost soft]# wget https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tar.xz
[root@localhost soft]# yum install libffi-devel -y
[root@localhost soft]# tar xvf python-3.9.9.tar.xz 
[root@localhost soft]# cd python-3.9.9/
[root@localhost python-3.9.9]# ./configure
[root@localhost python-3.9.9]# make
[root@localhost python-3.9.9]#make install

[root@localhost soft]# python -V     #一个是旧版本,一个是新版本
Python 2.7.5
[root@localhost soft]# python3 -V
python 3.9.9

#设置默认版本
[root@localhost ~]# ls -al /usr/bin | grep python
lrwxrwxrwx.   1 root root           7 May 26  2017 python -> python2
lrwxrwxrwx.   1 root root           9 May 26  2017 python2 -> python2.7
-rwxr-xr-x.   1 root root        7136 Nov  6  2016 python2.7

[root@localhost ~]# rm -f /usr/bin/python2 /usr/bin/python

[root@localhost ~]# ln -s /usr/local/bin/python3 /usr/bin/python3
[root@localhost ~]# ln -s /usr/bin/python3 /usr/bin/python

修改以下常用命令的解释器为原python2.7,否则命令不能正常使用,其他可以在使用到的时候在进行修改。

/usr/bin/yum,/usr/sbin/firewalld,/usr/bin/firewall-cmd,/usr/libexec/urlgrabber-ext-down

2.GCC

#下载最新版GCC
[root@localhost soft]# wget https://mirrors.aliyun.com/gnu/gcc/gcc-12.2.0/gcc-12.2.0.tar.gz
[root@localhost soft]# tar -zxvf gcc-12.2.0.tar.gz
[root@localhost soft]# cd gcc-12.2.0/
#检查并安装依赖
[root@localhost gcc-12.2.0]# yum -y install bzip2
[root@localhost gcc-12.2.0]# ./contrib/download_prerequisites
#注意:download_prerequisites需要连接互联网下载依赖包,没有互联网权限的服务器可以在互联网服务器执行该脚本下载依赖包,并拷贝到无互联网权限的服务器的相应路径下,重新执行该脚本即可。
#准备编译
[root@localhost gcc-12.2.0]# mkdir build
[root@localhost gcc-12.2.0]# cd build/
[root@localhost build]# ../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
#make会很慢
[root@localhost build]# make -j16
[root@localhost build]# make install
[root@localhost build]# gcc -v
使用内建 specs。
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/12.2.0/lto-wrapper
目标:x86_64-pc-linux-gnu
配置为:../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
线程模型:posix
Supported LTO compression algorithms: zlib
gcc 版本 12.2.0 (GCC)

注意:升级完成后,需要对原相关包做软连接

ln -s /usr/local/lib64/libgcc_s.so.1 /lib64/libgcc_s.so.1

ln -s /usr/local/lib64/libstdc++.so.6.0.30 /lib64/libstdc++.so.6.0.30
ln -s /lib64/libstdc++.so.6.0.30 /lib64/libstdc++.so.6

3.MAKE

[root@localhost soft]# wget  https://mirrors.aliyun.com/gnu/make/make-4.3.tar.gz
[root@localhost soft]# tar -xzvf make-4.3.tar.gz
[root@localhost soft]# cd make-4.3
[root@localhost soft]# ./configure
[root@localhost soft]# make && make install
[root@localhost soft]# mv /usr/bin/make /usr/bin/make.bak
[root@localhost soft]# ln -s /usr/local/bin/make /usr/bin/make
[root@localhost soft]# make -v
GNU Make 4.3
为 x86_64-pc-linux-gnu 编译
Copyright (C) 1988-2020 Free Software Foundation, Inc.
许可证:GPLv3+:GNU 通用公共许可证第 3 版或更新版本<http://gnu.org/licenses/gpl.html>。
本软件是自由软件:您可以自由修改和重新发布它。
在法律允许的范围内没有其他保证

4.GLIBC

本次实验基于centos7.9环境,glibc版本从2.36重复验证至2.33。2.34、2.35、2.36均升级失败。

#查看当前版本状况,另外版本需要谨慎选择。有条件的情况下,必须进行实验室验证。否则风险很大。</
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Winter Liu

别说话,打赏就行了!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值