centos6.5下搭建IHE

  1. 1.   需要mesa ,mesa-storage,postgresql安装包,添加MESA_TRAGET环境变量,为mesa的安装路径,在本文档中为

export $MESA_TARGET=/opt/mesa

  1. 2.   创建三个目录,/opt/mesa/  /opt/mesa/storage   /opt/postgres

  2. 3.   将三个压缩包分别放入三个文件夹下,然后解压,使用命令

tar xvf选择最适合的解压文件

  1. 4.   创建用户postgres,密码postgres

adduser postgres

passwd postgres,然后输入密码postgres,会报错,提示密码太简单可以不理会

postgresql的安装路径赋权给postgres

chown –R postgres /opt/postgres

  1. 5.   postgres解压出来的文件中找到INSTALL文件,然后用vim或者用打开,可以看到postgresql的安装步骤

在安装过程中可能会报错,一个提示在$PATH中没有‘C’,一个提示没有read-line,还有一个提示没有zlib,根据实际情况下载缺失的包,在本文档中则使用yum安装三个文件包

yum –y install gcc

yum –y install readline-devel

yum –y install zlib-devel

  1. 6.   根据INSTALL里面的设置,配置postgresql

./configure

gmake

su

gmake install

adduser postgres

mkdir /usr/local/pgsql/data

chown postgres/usr/local/pgsql/data

su - postgres

/usr/local/pgsql/bin/initdb -D/usr/local/pgsql/data

touch/usr/local/pgsql/data/logfile

/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -l/usr/local/pgsql/logfile start

/usr/local/pgsql/bin/createdb test

/usr/local/pgsql/bin/psql test

  1. 7.   /etc/profile中添加三个环境变量

export LD_LIBRARY_PAHT=/usr/local/pgsql/lib

export PGLIB=/usr/local/pgsql/lib

   export PGDATA=/usr/local/pgsql/data

  1. 8.   安装openldap

yum –y install openldap

yum –y install openldap-clients

yum –y install openldap-servers

  1. 9.   /opt/mesa中解压mesa的压缩文件

cd /opt/mesa

unzip mesa………zip

  1. 10.             /etc/profile中添加环境变量TOMCAT_PATH

  2. 11.             创建用户mesa,将/opt/mesa赋权给mesa

chown –R mesa /opt/mesa

  1. 12.             设置postgresql为开机启动,在root用户下

cd/opt/postgres/contrib/start-scripts

cp linux /etc/rc.d/init.d/postgres

chmod 755 /etc/init.d/postgres

chkconfig –add postgres

chkconfig postgres on

  1. 13.             查看/opt/mesa/db中的Makefile,CreateDB,DropDB文件,修改CreateDB的最后一行为:

/usr/local/pgsql/bin/created --encoding=UTF-8$1

其中修改了createdb命令的正确路径,路径为pgsql下的bin中的creatdb路径,并且修改encoding后面的字符集为postgresql所用的字符集

可以使用命令psql ,如果提示不识别psql命令,在/etc/profilePATH字段中添加

:/usr/local/pgsql/bin路径即可

psql postgres

postgres用户进入数据库中,\l来查看刚刚建立的数据库

如果使用命令psql报权限错误位u=rw0700)时要注意查看/usr/local/pgsql/data的权限是否为700,不为700的话不能启动,修改命令为

chmod 700 /usr/local/pgsql/data

  1. 14.             然后在mesa账户下使用命令:make database

这段命令运行的时Makefiledatabase:下的那段命令

然后可以看到建库的过程,没有报错的话就是成功建库了

  1. 15.             最后在/opt/mesa/mesa_tests/common/actors/all文件夹下

perl 1/eval_1.pl运行该脚本文件,然后会生成一个文件

mesa_environment.log,查看该日志文件,看是否有报错


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章