安装准备
1.安装unzip
[root@localhost usr]# yum -y install unzip.x86_64
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.bupt.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 unzip.x86_64.0.6.0-24.el7_9 将被 安装
--> 解决依赖关系完成
依赖关系解决
============================================================================================================================================================================
Package 架构 版本 源 大小
============================================================================================================================================================================
正在安装:
unzip x86_64 6.0-24.el7_9 updates 172 k
事务概要
============================================================================================================================================================================
安装 1 软件包
总下载量:172 k
安装大小:369 k
Downloading packages:
unzip-6.0-24.el7_9.x86_64.rpm | 172 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : unzip-6.0-24.el7_9.x86_64 1/1
验证中 : unzip-6.0-24.el7_9.x86_64 1/1
已安装:
unzip.x86_64 0:6.0-24.el7_9
完毕!
2.安装jdk
[root@localhost usr]# yum -y install java-1.8.0-openjdk.x86_64
...
tzdata-java.noarch 0:2022a-1.el7 xorg-x11-font-utils.x86_64 1:7.5-21.el7 xorg-x11-fonts-Type1.noarch 0:7.5-9.el7
完毕!
3.创建用户和组
[root@localhost ~]# groupadd gbasedbt
[root@localhost ~]# useradd -g gbasedbt -d /home/gbasedbt -s /bin/bash -m gbasedbt
4.设置用户gbasedbt密码:
[root@localhost ~]# passwd gbasedbt
更改用户 gbasedbt 的密码 。
新的 密码:
无效的密码: 密码包含用户名在某些地方
重新输入新的 密码:
passwd:所有的身份验证令牌已经成功更新。
5.设置环境变量
[root@localhost ~]# su - gbasedbt
[gbasedbt@localhost ~]$ vi .bash_profile
[gbasedbt@localhost ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export GBASEDBTSERVER=gbase01
export GBASEDBTDIR=/opt/gbase
export PATH=$GBASEDBTDIR/bin:/usr/bin:${PATH}:.
export ONCONFIG=onconfig.gbase01
export GBASEDBTSQLHOSTS=$GBASEDBTDIR/etc/sqlhosts.gbase01
export GL_DATE="%iY-%m-%d"
export DATETIME="%iY-%m-%d %H:%M:%S"
export DB_LOCALE=zh_cn.GB18030-2000
export CLIENT_LOCALE=zh_cn.GB18030-2000
export LD_LIBRARY_PATH=${GBASEDBTDIR}/lib:${GBASEDBTDIR}/lib/esql:${GBASEDBTDIR}/lib/cli
export TERM=vt100
export TERMCAP=$GBASEDBTDIR/etc/termcap
export GBASEDBTTERM=termcap
export DBTEMP=$GBASEDBTDIR/tmp
stty erase '^H'
alias etc='cd $GBASEDBTDIR/etc'
alias h='history'




