本文档介绍了CentOS 7.1的安装方法以及在CentOS 7.1上安装HGDB 3.1.4的步骤。
安装版本及注意事项
安装版本
操作系统 |
CentOS 7.1 x86_64 |
HGDB |
HGDB 3.1.4 |
注意事项
使用图形化安装HGDB时,必须将系统用户切换至highgo用户执行安装,在root用户中执行su – highgo命令切换用户,安装时不能显示图形界面。
操作系统安装
操作系统安装
测试介质然后安装。
选择安装过程中使用的语言。
安装时的其他选项一览。
设置日期和时间。
选择要安装的环境。
选择安装位置,手动进行磁盘分区。
设置主机名和网络配置。
所有选项设置完毕,点击Begin Installation开始安装。
安装过程中可以配置root账户的密码和进行用户的创建。
安装过程完毕,点击重启(Reboot)即可。
系统配置
主机名
[[email protected] ~]# hostname
hgdb
关闭防火墙
[[email protected] ~]# systemctl stop firewalld.service
[[email protected] ~]# systemctl disable firewalld.service
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
rm '/etc/systemd/system/basic.target.wants/firewalld.service'
关闭NetworkManager
[[email protected] ~]# systemctl stop NetworkManager.service
[[email protected] ~]# systemctl disable NetworkManager.service
rm '/etc/systemd/system/multi-user.target.wants/NetworkManager.service'
rm '/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service'
rm '/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service'
关闭selinux
[[email protected] ~]# 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 three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
YUM系统包
[[email protected] ~]# mkdir /media/cdrom
[[email protected] ~]# mount /dev/cdrom /media/cdrom
[[email protected] ~]# 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-CentOS-7
[[email protected] ~]# yum clean all
[[email protected] ~]# yum list
[[email protected] ~]# yum install lrzsz sysstat e4fsprogs ntp openssl* pam-devel libxml2-devel libxslt-devel python-devel tcl-devel make smartmontools flex bison perl* OpenIPMI-tools systemtap-sdt-devel *readline* *zlib* gcc -y
创建用户
[[email protected] ~]# /usr/sbin/groupadd -g 3000 highgo
[[email protected] ~]# /usr/sbin/useradd -u 3100 -g highgo highgo
[[email protected] ~]# passwd highgo
Changing password for user highgo.
New password:
BAD PASSWORD: it does not contain enough DIFFERENT characters
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
创建目录
[[email protected] ~]# mkdir -p /highgo/database/3.0
[[email protected] ~]# chmod -R 775 /highgo/database/3.0
[[email protected] ~]# chown -R highgo:highgo /highgo/database/3.0
为用户设置环境变量
[[email protected] ~]# cat /home/highgo/.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 HG_HOME=/highgo/database/3.0
export PGDATA=/highgo/database/3.0/data
export LD_LIBRARY_PATH=$HG_HOME/lib
export PATH=$HG_HOME/bin:$PATH
export
umask 022
HGDB安装
解压安装包
[[email protected] opt]# tar -zxvf hgdb3.1.4_installer_centos6.4_64.tar.gz
[[email protected] opt]# chown -R highgo:highgo hgdb3.1.4_installer_centos6.4_64
切换用户到HIGHGO用户安装
选择语言。
选择安装路径。
确认各项设置的安装选项。
选择执行脚本。
[[email protected] ~]# /highgo/database/3.0/finish
Attempting to create directory /home/highgo/perl5
Starting HighGo Database Server:
waiting for server to start.... done
server started
HighGo Database Server started successfully
安装完成。
欢迎登录【瀚高技术支持平台】查看更多资料