初学,使用虚拟机安装学习测试,遇到的小坑记录
一、准备工作
1.必须关闭防火墙!
关闭防火墙 和 Selinux:
[root@px ~]# service iptables stop
[root@px ~]# chkconfig iptables off
2.作为学习,粗暴点,尽量给你安装的数据库文件夹或创建的用户更多权限。
[root@px ~]# mkdir -p /dm/dmdbms
[root@px ~]# mkdir -p /dm/dmarch
[root@px ~]# mkdir -p /dm/dmbak
[root@px ~]# chown -R dmdba:dinstall /dm/
[root@px ~]# chmod -R 775 /dm/
dm 是安装数据库的文件夹名,dmdba:dinstall 是用户名和组
碰见了创建的新用户无权限调用tool工具的问题,再暴力点,给个777吧。
3.配置环境变量
在之前创建的用户的~/.bash_profile 里添加如下内容:
[dmdba@px ~]$ vim ~/.bash_profile
.bash_profile # Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
dms
User specific environment and startup programs
PATH= P A T H : PATH: PATH:HOME/bin
export PATH
(加以下内容,路径为数据库所在)
export DM_HOME="/dm/dmdbms"
export LD_LIBRARY_PATH="/dm/dmdbms/bin: L D L I B R A R Y P A T H " e x p o r t P A T H = " / d m / d m d b m s / b i n : LD_LIBRARY_PATH" export PATH="/dm/dmdbms/bin: