cmd安装linux服务器,cmdbuild安装

环境:

CentOS 6.5  openjdk 1.7   tomcat6

IP: 192.168.229.135

jdk是系统自带的,tomcat6解压到指定就可以使用了

1.复制cmdbuild-2.2.0.war到tomcat下的webapps目录,并改名为cmdbuild.war

[root@proxy 6.0]# pwd

/opt/cmdbuild-2.2.0/extras/tomcat-libs/6.0

# cp postgresql-9.1-901.jdbc4.jar/opt/apache-tomcat-6.0.41/lib/

启动tomcat,让cmdbuild.war解压

[root@proxy bin]# pwd

/opt/apache-tomcat-6.0.41/bin

[root@proxy bin]# ./startup.sh

停止tomcat

[root@proxy bin]# ./shutdown.sh

2.数据库(postgresql):

安装:

# yum install postgresql-server postgresql

初始化:

# /etc/init.d/postgresql initdb

修改配置,使其可以连接:

[root@proxy ~]# cd /var/lib/pgsql/data/

[root@proxy data]# vi pg_hba.conf

# "local" is for Unix domainsocket connections only

#local  all         all                               ident

local   all        all                              trust

local   all        all                              md5

# IPv4 local connections:

host   all         all         127.0.0.1/32          ident

# IPv6 local connections:

host   all         all         ::1/128               ident

host    all        all         0.0.0.0/0             md5

[root@proxy data]# vi postgresql.conf

listen_addresses = '*'

[root@proxy data]# /etc/init.d/postgresqlrestart

3.建立数据库:

# su - postgres

-bash-4.1$ psql

postgres=# create database cmdbuild withowner postgres encoding = 'UTF8';

postgres=# ALTER USER postgres WITHPASSWORD 'postgres';

postgres=# \q    退出

-bash-4.1$ psql -d cmdbuild

cmdbuild=# CREATE LANGUAGE plpgsql;

postgres=# \l     查看

postgres=# \q    退出

导入demo相关sql:

路径:/opt/apache-tomcat-6.0.41/webapps/cmdbuild/WEB-INF/sql/base_schema

确保不能报错

-bash-4.1$ psql -d cmdbuild -f/opt/apache-tomcat-6.0.41/webapps/cmdbuild/WEB-INF/sql/sample_schemas/demo_schema.sql

4.配置cmdbuild

[root@proxy conf]# pwd

/opt/apache-tomcat-6.0.41/webapps/cmdbuild/WEB-INF/conf

[root@proxy conf]# vi cmdbuild.conf

language=en

[root@proxy conf]# vi database.conf

db.password=postgres

db.url=jdbc\:postgresql\://192.168.229.135\:5432/cmdbuild

db.username=postgres

5.启动tomcat,安装cmdbuild

[root@proxy bin]# /opt/apache-tomcat-6.0.41/bin/startup.sh

用户名 admin  密码 admin

722af6ef2322aebeb3c426b6ca5dc6c9.png

顺利进入,然后会报错:

Class RequestForChangenon found

这是因为没有安装Workflow

5adecc62cb77f931ca075f4e3201c7c2.png

6.安装Workflow

先停掉tomcat

[root@proxy bin]#/opt/apache-tomcat-6.0.41/bin/shutdown.sh

复制cmdbuild-shark-server-2.2.0.war到tomcat的webapps目录,改名为cmdbuild-shark-server.war

同样先启动再停止tomcat,使cmdbuild-shark-server.war解压

1). 修改context.xml,指定cmdbuild数据库名

[root@proxy META-INF]# pwd

/opt/apache-tomcat-6.0.41/webapps/cmdbuild-shark-server/META-INF

[root@proxy META-INF]# vi context.xml

url="jdbc:postgresql://localhost/${cmdbuild}"

2). 修改Shark.conf

[root@proxy conf]# pwd

/opt/apache-tomcat-6.0.41/webapps/cmdbuild-shark-server/conf

[root@proxy conf]# vi Shark.conf

orgNaNdbuild.ws.url=http://localhost:8080/cmdbuild/

orgNaNdbuild.ws.username=workflow

orgNaNdbuild.ws.password=admin

3). 修改auth.conf

[root@proxy conf]# cd/opt/apache-tomcat-6.0.41/webapps/cmdbuild/WEB-INF/conf/

[root@proxy conf]# vi auth.conf

serviceusers.privileged=workflow

7.数据库部分

[root@logstash_server ~]# su – postgres

创建shark数据库用户,密码设置为shark

-bash-4.1$ createuser -s -P shark -Upostgres

Enter password for new role: shar

Enter it again:

使用shark用户连接cmdbuild数据库

-bash-4.1$ psql -d cmdbuild -U shark

psql (8.4.20)

Type "help" for help.

cmdbuild=# \i/opt/apache-tomcat-6.0.41/webapps/cmdbuild/WEB-INF/sql/shark_schema/01_shark_user.sql

cmdbuild=# \i/opt/apache-tomcat-6.0.41/webapps/cmdbuild/WEB-INF/sql/shark_schema/02_shark_emptydb.sql

cmdbuild=# \dt                  查看表拥有都是不是shark

进入管理模块:

e4b9f2fae14d9ffa2dab727b73c89dfe.png

修改,启用workflow

902c4c20210466e8d747eddf6bc5f4be.png

上传XPDL文件,在安装包cmdbuild-2.2.0\extras\workflow\RFC目录下;

这里可能还会报错,我这里报的是:

Call:services/json/workflow/xpdlversions

------------------------------------------

Error:orgNaNdbuild.workflow.CMWorkflowException:org.enhydra.shark.api.internal.instancepersistence.PersistenceException:SQLException in StandardPoolDataSource:getConnection exception:java.sql.SQLException: SQLException in StandardPoolDataSource:getConnection noconnection available java.sql.SQLException: Cannot get connection for URLjdbc:postgresql://localhost/cmdbuild : FATAL: Ident authentication failed foruser "shark"

修改:

[root@proxy localhost]# pwd

/opt/apache-tomcat-6.0.41/conf/Catalina/localhost

[root@proxy localhost]# vicmdbuild-shark-server.xml

url="jdbc:postgresql://192.168.229.135/cmdbuild"

d1f037effdf0a2021fb3a37b86ec746d.png

上传成功,右下角会提示:XPDL file uploaded,然后再重新登陆就不会报错了。

3532ee4a6c329ca05407fa19934da576.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值