cmd安装linux服务器,cmdbuild安装
環(huán)境:
CentOS 6.5? openjdk 1.7?? tomcat6
IP: 192.168.229.135
jdk是系統(tǒng)自帶的,tomcat6解壓到指定就可以使用了
1.復(fù)制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/
啟動(dòng)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.數(shù)據(jù)庫(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.建立數(shù)據(jù)庫:
# 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??? 退出
導(dǎo)入demo相關(guān)sql:
路徑:/opt/apache-tomcat-6.0.41/webapps/cmdbuild/WEB-INF/sql/base_schema
確保不能報(bào)錯(cuò)
-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.啟動(dòng)tomcat,安裝cmdbuild
[root@proxy bin]# /opt/apache-tomcat-6.0.41/bin/startup.sh
用戶名 admin? 密碼 admin
順利進(jìn)入,然后會(huì)報(bào)錯(cuò):
Class RequestForChangenon found
這是因?yàn)闆]有安裝Workflow
6.安裝Workflow
先停掉tomcat
[root@proxy bin]#/opt/apache-tomcat-6.0.41/bin/shutdown.sh
復(fù)制cmdbuild-shark-server-2.2.0.war到tomcat的webapps目錄,改名為cmdbuild-shark-server.war
同樣先啟動(dòng)再停止tomcat,使cmdbuild-shark-server.war解壓
1). 修改context.xml,指定cmdbuild數(shù)據(jù)庫名
[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.數(shù)據(jù)庫部分
[root@logstash_server ~]# su – postgres
創(chuàng)建shark數(shù)據(jù)庫用戶,密碼設(shè)置為shark
-bash-4.1$ createuser -s -P shark -Upostgres
Enter password for new role: shar
Enter it again:
使用shark用戶連接cmdbuild數(shù)據(jù)庫
-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
進(jìn)入管理模塊:
修改,啟用workflow
上傳XPDL文件,在安裝包c(diǎn)mdbuild-2.2.0\extras\workflow\RFC目錄下;
這里可能還會(huì)報(bào)錯(cuò),我這里報(bào)的是:
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"
上傳成功,右下角會(huì)提示:XPDL file uploaded,然后再重新登陸就不會(huì)報(bào)錯(cuò)了。
總結(jié)
以上是生活随笔為你收集整理的cmd安装linux服务器,cmdbuild安装的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux名词解释目录文件,linux的
- 下一篇: linux虚拟机保存指令,vmware虚