CMDbuild-2.4.3搭建

CMDB Server  10.9.12.70/76/78  centos6.8  postgresql
wget  https://sourceforge.net/projects/cmdbuild/files/latest/download
unzip cmdbuild-2.4.3.zip
cd cmdbuild-2.4.3/
cp cmdbuild-2.4.3.war /usr/local/tomcat9/webapps/
cd cmdbuild-2.4.3/extras/tomcat-libs/6.0 or higher
cp postgresql-9.4.1207.jar /usr/local/tomcat9/lib/
cd /cmdbuild-2.4.3/extras
unzip cmdbuild-distribution-shark-overlay-2.4.3.zip
cp -r cmdbuild-shark-overlay-2.4.3/ /usr/local/tomcat9/webapps/shark

数据库的安装与配置
yum install postgresql-server postgresql -y
/etc/init.d/postgresql initdb
cd /var/lib/pgsql/data/
vim postgresql.conf
listen_addresses = '*'
vim pg_hba.conf
CMDbuild-2.4.3搭建_第1张图片
重启数据库:/etc/init.d/postgresql restart
建立数据库:
CMDbuild-2.4.3搭建_第2张图片
出现报错:
CMDbuild-2.4.3搭建_第3张图片
解决:
CMDbuild-2.4.3搭建_第4张图片
CMDbuild-2.4.3搭建_第5张图片
导入demo数据库文件:(注意目录和文件的权限,否则会出现permission denied)
psql -d cmdbuild -f /usr/local/tomcat9/webapps/cmdbuild/WEB-INF/sql/sample_schemas/demo_schema.sql
vim /usr/local/tomcat9/webapps/cmdbuild/WEB-INF/conf/cmdbuild.conf
末尾添加:language=en
配置数据库连接:
vim /usr/local/tomcat8/webapps/cmdbuild/WEB-INF/conf/database.conf
db.url=jdbc\:postgresql\://10.9.12.70\:5432/cmdbuild
db.usrname=postgres
db.password=postgres

vim /usr/local/tomcat8/webapps/shark/conf/Shark.conf
orgNaNdbuid.ws.url=http://10.9.12.70:8080/cmdbuild/
orgNaNdbuild.ws.username=workflow
orgNaNdbuild.ws.password=admin
vim /usr/local/tomcat8/webapps/cmdbuild/WEB-INF/conf/auth.conf
serviceusers.privileged=workflow
创建数据库:
su - postgres
createuser -s -P shark -Upostgres
psql -d cmdbuild -U postgres
\i /usr/local/tomcat7/webapps/cmdbuild/WEB-INF/sql/shark_schema/01_shark_user.sql
\i /usr/local/tomcat7/webapps/cmdbuild/WEB-INF/sql/shark_schema/02_shark_emptydb.sql
\dt
http://10.9.12.70:8080/cmdbuild   进入设置页面
CMDbuild-2.4.3搭建_第6张图片
CMDbuild-2.4.3搭建_第7张图片
链接成功,finish
补丁,直接apply
CMDbuild-2.4.3搭建_第8张图片
CMDbuild-2.4.3搭建_第9张图片
原因:数据库不匹配,centos6.x的yum安装的数据库psql默认为8.0+,不支持cmdbuild2.4.3
需要编译安装postgresql源码包
wget   http://ftp.postgresql.org/pub/source/v9.4.3/postgresql-9.4.3.tar.bz2
tar xjf postgresql-9.4.3.tar.bz2
adduser postgres
passwd postgres
cd postgresql-9.4.3/
./configure --prefix=/usr/local/postgres/pgsql
gmake
gmake install
cd /usr/local/postgres/
vim .bash_profile
    PATH=$PATH:$HOME/bin:/usr/local/postgres/pgsql/bin
mkdir /usr/local/postgres/pgsql/data
chown postgres:postgres /usr/local/postgres/pgsql/data/
cd postgresql-9.4.3/
cp contrib/start-scripts/linux /etc/init.d/postgresql
chmod +x /etc/init.d/postgresql
chkconfig --add postgresql
chkconfig postgresql on
chown postgres:postgres /usr/local/postgres/pgsql/.pgsql_history
ln -s psql /usr/sbin/psql


你可能感兴趣的:(cmdbuild)