
本文共 11558 字,大约阅读时间需要 38 分钟。
目录
文档用途
详细信息
文档用途
介绍HGDB4.1.1在RHEL6.8系统上的安装和卸载流程。
详细信息
1.安装版本及注意事项
1.1 安装版本
操作系统 | Redhat 6.8 x86_64 |
HGDB | HGDB 4.1.1 |
-
2.状态检查
-
2.1 检查SWAP空间
[root@hgtest ~]# grep MemTotal /proc/meminfo MemTotal: 1020072 kB [root@hgtest ~]# grep SwapTotal /proc/meminfo SwapTotal: 835580 kB [root@hgtest ~]# free -h total used free shared buffers cached Mem: 996M 179M 816M 200K 11M 63M -/+ buffers/cache: 103M 892M Swap: 815M 0B 815M |
2.2 操作系统
[root@hgtest ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.8 (Santiago) [root@hgtest ~]# uname -a Linux hgtest 2.6.32-642.el6.x86_64 #1 SMP Wed Apr 13 00:51:26 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux |
2.3 关闭防火墙
[root@hgtest ~]# service iptables stop iptables: Setting chains to policy ACCEPT: filter [ OK ] iptables: Flushing firewall rules: [ OK ] iptables: Unloading modules: [ OK ] [root@hgtest ~]# chkconfig iptables off |
-
2.4 关闭selinux
[root@hgtest ~]# setenforce 0 [root@hgtest ~]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config [root@hgtest ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing - SELinux security policy is enforced. # permissive - SELinux prints warnings instead of enforcing. # disabled - No SELinux policy is loaded. SELINUX=disabled # SELINUXTYPE= can take one of these two values: # targeted - Targeted processes are protected, # mls - Multi Level Security protection. SELINUXTYPE=targeted |
2.5 主机名和时间检查
[root@hgtest ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 [root@hgtest ~]# cat /etc/sysconfig/clock ZONE="Asia/Shanghai" |
2.6 安装系统软件包
[root@hgtest ~]# vi /etc/yum.repos.d/highgo.repo [Server] name=Red Hat Enterprise Linux $releasever Beta - $basearch - Source baseurl=file:///media/cdrom enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release |
创建/media/cdrom目录:
[root@hgtest ~]# mkdir /media/cdrom |
挂载操作系统镜像:
[root@hgtest ~]# mount /dev/sr0 /media/cdrom |
安装系统软件包:
[root@hgtest ~]# yum install wget readline readline-devel zlib zlib-devel openssl openssl-devel pam-devel libxml2-devel libxslt-devel python-devel tcl-devel gcc gcc-c++ -y |
2.7 创建用户
[root@hgtest ~]# groupadd -g 5866 highgo [root@hgtest ~]# useradd -u 5866 -g highgo highgo; echo XXXXXX(密码) | passwd -f --stdin highgo Changing password for user highgo. passwd: all authentication tokens updated successfully. |
2.8 创建相关目录
[root@hgtest ~]# mkdir -p /data/highgo/4.1.1 [root@hgtest ~]# mkdir -p /data/highgo/hgdbbak/archive [root@hgtest ~]# chown -R highgo:highgo /data |
2.9 修改内核参数
[root@hgtest ~]# vi /etc/sysctl.conf |
添加以下内容:
#for highgo db 4.1.1 kernel.shmmni = 4096 kernel.sem = 4096 2147483647 2147483646 512000 fs.file-max = 7672460 net.ipv4.ip_local_port_range = 9000 65000 net.core.rmem_default = 1048576 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 net.ipv4.tcp_tw_recycle = 1 net.ipv4.tcp_max_syn_backlog = 4096 net.core.netdev_max_backlog = 10000 fs.aio-max-nr = 1048576 net.ipv4.tcp_timestamps = 0 vm.overcommit_memory = 2 vm.overcommit_ratio = 90 vm.min_free_kbytes = 524288 |
root用户运行如下命令是参数立即生效:
[root@hgtest ~]# sysctl -p |
2.10 修改用户限制
[root@hgtest ~]# vi /etc/security/limits.conf |
添加如下内容:
#for highgo db 4.1.1 highgo soft core unlimited highgo hard nproc unlimited highgo soft nproc unlimited highgo hard memlock unlimited highgo hard nofile 1024000 highgo soft memlock unlimited highgo soft nofile 1024000 |
3.HGDB安装
3.1 上传并解压HGDB安装包
[root@hgtest ~]# mkdir /upload [root@hgtest ~]# cd /upload/ [root@hgtest upload]# tar -zxvf hgdb4.1.1_installer_redhat6.x_Standard_64.tar.gz |
更改权限为highgo用户:
[root@hgtest upload]# chown -R highgo:highgo hgdb4.1.1_installer_redhat6.x_Standard_64 |
-
3.2 配置环境变量
[root@hgtest upload]# vi /home/highgo/.bash_profile export LANG=en_US.UTF-8 export PGHOME=/data/highgo/4.1.1 export PGUSER=highgo export PGPORT=5866 export PGDATA=$PGHOME/data export PATH=$PGHOME/bin:$PATH:$HOME/bin export LD_LIBRARY_PATH=$PGHOME/lib:$LD_LIBRARY_PATH [root@hgtest upload]# source /home/highgo/.bash_profile |
3.3 切换到highgo用户
[root@hgtest upload]# su - highgo |
3.4 安装数据库
[highgo@hgtest ~]$ cd /upload/hgdb4.1.1_installer_redhat6.x_Standard_64 [highgo@hgtest hgdb4.1.1_installer_redhat6.x_Standard_64]$ ./runinstall Welcome to the installation of HighGo Database 4.1.1 Standard Edition ! press 1 to continue, 2 to quit, 3 to redisplay 1 ##欢迎提示,选择1,enter HIGHGO DATABASE END-USER SOFTWARE LICENSE AGREEMENT THANKS FOR YOUR SELECTION OF HIGHGO DATABASE. Copyright (c) 2017, HighGo Co., Ltd. All Rights Reserved. IMPORTANT: THIS SOFTWARE END USER LICENSE AGREEMENT("EULA") IS A LEGAL AGREEMENT BETWEEN YOU AND HighGo Co., Ltd. READ IT CAREFULLY BEFORE COMPLETING THE INSTALLATION PROCESS AND USING THE SOFTWARE. IT PROVIDES A LICENSE TO USE THE SOFTWARE AND CONTAINS WARRANTY INFORMATION AND LIABILITY DISCLAIMERS. BY INSTALLING AND USING THE SOFTWARE, YOU ARE CONFIRMING YOUR ACCEPTANCE OF THE SOFTWARE AND AGREEING TO BECOME BOUND BY THE TERMS OF THIS AGREEMENT. IF YOU DO NOT AGREE TO BE BOUND BY THESE TERMS, PLEASE DO NOT INSTALL OR USE THE SOFTWARE. YOU MUST ASSUME THE ENTIRE RISK OF USING THIS PROGRAM. ANY LIABILITY OF HighGo WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT OR REFUND OF PURCHASE PRICE BEFORE FIRST INSTALLATION. Definitions 1. "the Software" means "HighGo DataBase". 2. "HighGo" is responsible for HighGo Co., Ltd. License Grants 1. You may use the Software for free for non-commercial use under the License Restrictions. 2. You may use the Software for commercial use after purchasing the commercial license. Moreover, according to the license you purchased you may get specified term, manner and content of technical support from HighGo. License Restrictions 1. You may not use the Software for commercial use or profit use, unless you have been licensed to. To purchase the license , please visit http://www.highgo.com for more information. 2. You may not rent, lease, sublicense, sell, assign, pledge the Software and its services. 3. You may not modify the Software to create derivative works for redistribution based upon the Software. 4. In the event that you fail to comply with this agreement, your license will be terminated.
LIMITED WARRANTY AND DISCLAIMER 1. THE SOFTWARE AND THE ACCOMPANYING FILES ARE SOLD "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OF MERCHANTABILITY OR ANY OTHER WARRANTIED WHETHER EXPRESSED OR IMPLIED. 2. You must assume the entire risk of using the Software. ANY LIABILITY OF HIGHGO WILL BE LIMITED EXCLUSIVELY TO PRODUCT REPLACEMENT, REFUND OF PURCHASE PRICE BEFORE YOUR FIRST INSTALLATION. press 1 to accept, 2 to reject, 3 to redisplay 1 ##许可协议,选择1,enter Select target path [/data/highgo/4.1.1] ##设置安装路径,enter press 1 to continue, 2 to quit, 3 to redisplay 1 ##选择1,enter
TreePacksPanel
[JDK_JRE] [required] [DataBase Server] [Y/n] ##选择安装组件,enter [User interfaces] [Y/n] ##选择安装组件,enter psql [Y/n] ##选择安装组件,enter hgdbAdmin [Y/n] ##选择安装组件,enter [Development] [Y/n] ##选择安装组件,enter [install database] [required] init and configure database [required] uninstalldata [required] [tempExecutableFiles] [required] ...pack selection done. press 1 to continue, 2 to quit, 3 to redisplay 1 ##选择1,enter To check the dependent packs. press 1 to check, 2 to skip, 3 to exit 1 ##检查依赖包,选择1检查,enter Checks Status Fixable fs.file-max Failed Yes vm.mmap_min_addr Failed Yes net.core.somaxconn Failed Yes net.core.wmem_max Failed Yes net.ipv4.tcp_tw_reuse Failed Yes net.ipv4.ip_local_port_range Failed Yes net.netfilter.nf_conntrack_max Failed Yes net.ipv4.tcp_rmem Failed Yes fs.nr_open Failed Yes net.ipv4.tcp_wmem Failed Yes vm.dirty_writeback_centisecs Failed Yes vm.dirty_ratio Failed Yes kernel.shmmax Failed Yes kernel.shmmni Failed Yes net.ipv4.tcp_timestamps Failed Yes vm.swappiness Failed Yes vm.overcommit_memory Failed Yes net.ipv4.tcp_mem Failed Yes vm.dirty_background_bytes Failed Yes net.nf_conntrack_max Failed Yes net.ipv4.tcp_tw_recycle Failed Yes net.ipv4.tcp_max_tw_buckets Failed Yes Use the root user to execute the following script to modify the system parameters. /tmp/hgdb_2655776018/kernelParameterSets.sh ##使用root用户执行修复脚本进行修复 press 1 to ignore, 2 to reject, 3 to recheck 3 ##脚本执行完毕后,选择3重新检查,enter To check the dependent packs. press 1 to check, 2 to skip, 3 to exit 1 ##选择1,enter Checks Status Fixable Data directory [/data/highgo/4.1.1/data] ##设置data目录,enter
Port number [5866] ##设置端口号,enter
Superuser name [highgo] ##设置数据库超级用户,默认highgo,enter
Password [] ##设置用户密码,enter Password(again) [] ##再次输入用户密码,enter
[x] Whether to start automatically. input 1 to select, 0 to deselect: 1 ##是否设置自动启动,选择1,enter datatype 0 [x] OLTP 1 [ ] OLAP 2 [ ] HTAP 3 [ ] Web 4 [ ] Desktop input selection: ##设置数据库类型,enter
Total Memory (GB) [1] ##设置操作系统总内存大小,enter
connectionNumber [300] ##设置数据库最大连接数,enter
Locale 0 [ ] aa_DJ 1 [ ] aa_DJ.iso88591 2 [ ] aa_DJ.utf8 3 [ ] aa_ER 4 [ ] aa_ER@saaho 5 [ ] aa_ER.utf8 6 [ ] aa_ER.utf8@saaho 7 [ ] aa_ET 8 [ ] aa_ET.utf8 9 [ ] af_ZA 10 [ ] af_ZA.iso88591 ... ... ... 721 [ ] zh_HK 722 [ ] zh_HK.big5hkscs 723 [ ] zh_HK.utf8 724 [ ] zh_SG 725 [ ] zh_SG.gb2312 726 [ ] zh_SG.gbk 727 [ ] zh_SG.utf8 728 [ ] zh_TW 729 [ ] zh_TW.big5 730 [ ] zh_TW.euctw 731 [ ] zh_TW.utf8 732 [ ] zu_ZA 733 [ ] zu_ZA.iso88591 734 [ ] zu_ZA.utf8 input selection: ##设置Locale,enter
Encoding 0 [ ] EUC_JP 1 [ ] EUC_KR 2 [ ] ISO_8859_5 3 [ ] ISO_8859_6 4 [ ] ISO_8859_7 5 [ ] ISO_8859_8 6 [ ] JOHAB 7 [ ] KOI8-R 8 [ ] LATIN1 9 [ ] LATIN2 10 [ ] LATIN3 11 [ ] LATIN4 12 [ ] LATIN5 13 [ ] LATIN9 14 [ ] MULE_INTERNAL 15 [ ] SQL_ASCII 16 [ ] WIN866 17 [ ] WIN874 18 [ ] WIN1250 19 [ ] WIN1251 20 [ ] WIN1252 21 [ ] WIN1256 22 [ ] WIN1258 23 [x] UTF8 input selection: ##设置Encoding,默认UTF8,enter
[ ] Whether encrypted storage. input 1 to select, 0 to deselect: 0 ##是否加密存储,选择0不加密,enter
press 1 to continue, 2 to quit, 3 to redisplay 1 ##选择1,enter Installation path: /data/highgo/4.1.1. ##安装选项概览
Data directory: /data/highgo/4.1.1/data.
Database port: 5866.
Database Locale: zh_CN.utf8.
Server Encoding: UTF8.
Super User: highgo.
Database Type: oltp
Total Memory: 1
Connections: 300 press 1 to continue, 2 to quit, 3 to redisplay 1 ##选择1,enter [ Starting to unpack ] ##安装过程 [ Processing package: Jre (1/8) ] [ Processing package: Database Server (2/8) ] [ Processing package: User interfaces (3/8) ] [ Processing package: psql (4/8) ] [ Processing package: hgdbAdmin (5/8) ] [ Processing package: Development (6/8) ] [ Processing package: Install database (7/8) ] [ Processing package: Initial the database (8/8) ] To finish the database install, please follow the below steps: 1. execute following script with root user to complete the database self-starting configuration /data/highgo/4.1.1/hginstall.sh 2. Press enter to continue, after hginstall.sh execute successfully .
[Press enter to continue!] ##root用户执行hginstall.sh脚本,执行完成后enter [ Unpacking finished ] Begin create shorcut: [x]Create additional shortcuts on the desktop input 1 to select, 0 to deselect: 1 ##桌面创建快捷方式,选择1,enter [x]Create shortcuts in the StartMenu input 1 to select, 0 to deselect: 1 ##桌面开始菜单快捷方式,选择1,enter Select which user the program will create shortcut for: ##哪个用户创建快捷方式 0 [ ] current user ##当前用户 1 [x] all users ##所有用户 input selection: ##enter Name of programgroup [HighgoDB V4.1.1] ##程序组名 press 1 to continue, 2 to quit, 3 to redisplay 1 ##选择1,enter Install was successful application installed on /data/highgo/4.1.1 [ Console installation done ] ##安装完毕
详细的卸载流程请登录【瀚高技术支持平台】查看 |
发表评论
最新留言
关于作者
