高版本EULOR系统手工安装python2.*进行数据库安装部署并修改ssh端口
1、挂载镜像
mount -o loop BCLinux-for-Euler-22.10-everything-x86_64-230316.iso /mnt/
[root@localhost ~]# ls -l /mnt/
总用量 3275
-r--r--r-- 1 root root 87076 3月 16 2023 comps.xml
dr-xr-xr-x 2 root root 2048 3月 16 2023 docs
dr-xr-xr-x 3 root root 2048 3月 16 2023 EFI
dr-xr-xr-x 3 root root 2048 3月 16 2023 images
dr-xr-xr-x 2 root root 2048 3月 16 2023 isolinux
dr-xr-xr-x 2 root root 2048 3月 16 2023 ks
dr-xr-xr-x 3 root root 3246080 9月 26 12:37 Packages
dr-xr-xr-x 2 root root 4096 9月 26 12:49 repodata
-r--r--r-- 1 root root 2127 3月 16 2023 RPM-GPG-KEY-openEuler
-r--r--r-- 1 root root 2419 9月 26 12:49 TRANS.TBL
2、编辑repo文件
[root@localhost ~]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# ll
总用量 4.0K
-rw-r--r--. 1 root root 1.4K 12月 20 2022 BCLinux.repo
[root@localhost yum.repos.d]#
我这个测试环境直接把原有repo文件mv了
[root@localhost yum.repos.d]# mv BCLinux.repo tbbk
[root@localhost yum.repos.d]# vim my_yum.repo
新建一个内容如下:
[root@localhost yum.repos.d]# cat my_yum.repo
[local]
name=euler22.10
baseurl=file:///mnt
enabled=1
gpgcheck=0
[root@localhost yum.repos.d]# ll /mnt
总用量 3.2M
-r--r--r-- 1 root root 86K 3月 16 2023 comps.xml
dr-xr-xr-x 2 root root 2.0K 3月 16 2023 docs
dr-xr-xr-x 3 root root 2.0K 3月 16 2023 EFI
dr-xr-xr-x 3 root root 2.0K 3月 16 2023 images
dr-xr-xr-x 2 root root 2.0K 3月 16 2023 isolinux
dr-xr-xr-x 2 root root 2.0K 3月 16 2023 ks
dr-xr-xr-x 3 root root 3.1M 9月 26 12:37 Packages
dr-xr-xr-x 2 root root 4.0K 9月 26 12:49 repodata
-r--r--r-- 1 root root 2.1K 3月 16 2023 RPM-GPG-KEY-openEuler
-r--r--r-- 1 root root 2.4K 9月 26 12:49 TRANS.TBL
[root@localhost yum.repos.d]#
执行yum repolist命令
[root@localhost yum.repos.d]# yum repolist
无法连接BC-Linux的YUM源服务器。
repo id repo name
local euler22.10
3,yum安装make gcc gcc-c++
[root@localhost yum.repos.d]# yum -y install make gcc gcc-c++
4、安装python
上传安装包
[root@localhost gbase]# ll
总用量 19G
drwxr-xr-x. 2 gbase gbase 4.0K 2月 29 17:31 公共
drwxr-xr-x. 2 gbase gbase 4.0K 2月 29 17:31 模板
drwxr-xr-x. 2 gbase gbase 4.0K 2月 29 17:31 视频
drwxr-xr-x. 2 gbase gbase 4.0K 2月 29 17:31 图片
drwxr-xr-x. 2 gbase gbase 4.0K 2月 29 17:31 文档
drwxr-xr-x. 2 gbase gbase 4.0K 2月 29 17:31 下载
drwxr-xr-x. 2 gbase gbase 4.0K 2月 29 17:31 音乐
drwxr-xr-x. 2 gbase gbase 4.0K 2月 29 17:31 桌面
-rw-r--r-- 1 gbase gbase 19G 2月 29 18:30 BCLinux-for-Euler-22.10-everything-x86_64-230316.iso
-rw-r--r-- 1 gbase gbase 13M 2月 29 22:29 Python-2.7.18.tar.xz
-rw-r--r-- 1 gbase gbase 17M 2月 29 22:29 Python-3.6.8.tar.xz
解压
[root@localhost gbase]# tar -xf Python-2.7.18.tar.xz
[root@localhost gbase]# ls -l
总用量 19160512
drwxr-xr-x. 2 gbase gbase 4096 2月 29 17:31 公共
drwxr-xr-x. 2 gbase gbase 4096 2月 29 17:31 模板
drwxr-xr-x. 2 gbase gbase 4096 2月 29 17:31 视频
drwxr-xr-x. 2 gbase gbase 4096 2月 29 17:31 图片
drwxr-xr-x. 2 gbase gbase 4096 2月 29 17:31 文档
drwxr-xr-x. 2 gbase gbase 4096 2月 29 17:31 下载
drwxr-xr-x. 2 gbase gbase 4096 2月 29 17:31 音乐
drwxr-xr-x. 2 gbase gbase 4096 2月 29 17:31 桌面
-rw-r--r-- 1 gbase gbase 19590248448 2月 29 18:30 BCLinux-for-Euler-22.10-everything-x86_64-230316.iso
drwxr-xr-x 17 gbase gbase 4096 4月 20 2020 Python-2.7.18
-rw-r--r-- 1 gbase gbase 12854736 2月 29 22:29 Python-2.7.18.tar.xz
-rw-r--r-- 1 gbase gbase 17212420 2月 29 22:29 Python-3.6.8.tar.xz
[root@localhost gbase]#
安装
[root@localhost Python-2.7.18]# ./configure --enable-shared --prefix=/usr/local/python-2.7.18 --enable-unicode=ucs4 && make -j 8 && make install
5,异常解决
[root@localhost Python-2.7.18]# /usr/local/python-2.7.18/bin/python
/usr/local/python-2.7.18/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
[root@localhost Python-2.7.18]# ls /usr/local/python-2.7.18/
bin include lib share
[root@localhost Python-2.7.18]#
[root@localhost Python-2.7.18]# ls /usr/local/python-2.7.18/lib/
libpython2.7.so libpython2.7.so.1.0 pkgconfig python2.7
[root@localhost Python-2.7.18]#
[root@localhost Python-2.7.18]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/python-2.7.18/lib
[root@localhost Python-2.7.18]#
[root@localhost Python-2.7.18]# /sbin/ldconfig -v
/sbin/ldconfig: 多次给出路径“/usr/lib64”
/usr/local/python-2.7.18/lib: (from /etc/ld.so.conf:2)
libpython2.7.so.1.0 -> libpython2.7.so.1.0
/lib: (from <builtin>:0)
[root@localhost Python-2.7.18]# ldconfig
创建python命令连接
[root@localhost Python-2.7.18]# ln -s /usr/local/python-2.7.18/bin/python /usr/bin/python
[root@localhost Python-2.7.18]#
[root@localhost Python-2.7.18]#
[root@localhost Python-2.7.18]# python
Python 2.7.18 (default, Feb 29 2024, 22:33:02)
[GCC 10.3.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>>
python 安装完成
6、数据量安装报错
*********************************************************************************
invalid literal for int() with base 10: '\x1b[?2004l\r0'
Error: gcinstall.py(line 2645) -- check dba password failed on ['192.168.110.222']
[root@localhost gcinstall]#
解决办法:
/etc/inputrc
添加:set enable-bracketed-paste off
修改操作系统ssh端口:
##
[root@localhost ssh]# cat ssh_config | grep 22
Port 2223
[root@localhost ssh]# cat sshd_config | grep 22
Port 2223
[root@localhost ssh]#
[root@localhost ssh]# ^C
[root@localhost ssh]#
修改gcware端口:
[root@localhost ssh]# vim ssh_config
[root@localhost ssh]# vim sshd_config
[root@localhost ssh]#
[root@localhost ssh]# systemctl restart sshd
[gbase@localhost config]$ cat gcware.conf|grep 2223
node_ssh_port: 2223
[gbase@localhost config]$
7、数据库重启报错:
ulimit -n问题,偷懒直接修改gbase用户的环境变量解决问题
[gbase@localhost config]$ gcluster_services all restart
Stopping GCMonit success!
Stopping gcrecover : [ OK ]
Stopping gcluster : [ OK ]
Stopping gcware : [ OK ]
Stopping gbase : [ OK ]
Stopping syncserver : [ OK ]
Starting gcware : /opt/gcluster/server/bin/gcluster_services: 第 399 行:ulimit: open files:无法修改 limit 值: 不允许的操作
[ FAIL ]
[gcware]ulimit is error,smaller than 655360
Starting gcluster : /opt/gcluster/server/bin/gcluster_services: 第 399 行:ulimit: open files:无法修改 limit 值: 不允许的操作
[ FAIL ]
[gcluster]ulimit is error,smaller than 655360
Starting gcrecover : /opt/gcluster/server/bin/gcluster_services: 第 399 行:ulimit: open files:无法修改 limit 值: 不允许的操作
[ FAIL ]
[gcrecover]ulimit is error,smaller than 655360
Starting gbase : /opt/gcluster/server/bin/gcluster_services: 第 399 行:ulimit: open files:无法修改 limit 值: 不允许的操作
[ FAIL ]
[gbase]ulimit is error,smaller than 655360
Starting syncserver : /opt/gcluster/server/bin/gcluster_services: 第 399 行:ulimit: open files:无法修改 limit 值: 不允许的操作
[ FAIL ]
[syncserver]ulimit is error,smaller than 655360
Starting GCMonit success!
[gbase@localhost config]$ ulimit -n
1024
[gbase@localhost config]$ cat /etc/security/limits.conf
[gbase@localhost ~]$ cat .bash_profile
# Source /root/.bashrc if user has one
[ -f ~/.bashrc ] && . ~/.bashrc
if [ -f $HOME/.gbase_profile ]; then
. $HOME/.gbase_profile
fi
ulimit -n 655360
[gbase@localhost ~]$
8、数据库重启成功:
[gbase@localhost ~]$ source .bash_profile
[gbase@localhost ~]$ gcluster_services all start
Starting gcware : [ OK ]
Starting gcluster : [ OK ]
Starting gcrecover : [ OK ]
Starting gbase : [ OK ]
Starting syncserver : [ OK ]
Starting GCMonit success!
[gbase@localhost ~]$ gcadmin
CLUSTER STATE: ACTIVE
VIRTUAL CLUSTER MODE: NORMAL
==================================================================
| GBASE COORDINATOR CLUSTER INFORMATION |
==================================================================
| NodeName | IpAddress | gcware | gcluster | DataState |
------------------------------------------------------------------
| coordinator1 | 192.168.110.222 | OPEN | OPEN | 0 |
------------------------------------------------------------------
=========================================================================================================
| GBASE DATA CLUSTER INFORMATION |
=========================================================================================================
| NodeName | IpAddress | DistributionId | gnode | syncserver | DataState |
---------------------------------------------------------------------------------------------------------
| node1 | 192.168.110.222 | 1 | OPEN | OPEN | 0 |
---------------------------------------------------------------------------------------------------------
热门帖子
- 12025-12-01浏览数:182763
- 22023-05-09浏览数:25057
- 42023-09-25浏览数:18525
- 52020-05-11浏览数:17528