Confluence 6 新 Confluence 安装配置一个数据源连接
如果在你的 Tomcat 中配置了數(shù)據(jù)源,并且Confluence 設(shè)置指南在安裝的時(shí)候檢測(cè)到這個(gè)配置的時(shí)候,配置數(shù)據(jù)源的選項(xiàng)將會(huì)提供給你進(jìn)行配置。入股你希望使用數(shù)據(jù)源,請(qǐng)參考下面的配置。
1. 停止 Confluence
在 Confluence 的配置指南中,你將會(huì)提示選擇你的數(shù)據(jù)庫(kù),在這個(gè)時(shí)候,你應(yīng)該:
- <installation-directory>/conf/server.xml
- <installation-directory>/confluence/WEB-INF/web.xml
- <home-directory>/confluence.cfg.xml
2. 添加你的數(shù)據(jù)庫(kù)驅(qū)動(dòng)
拷貝你的數(shù)據(jù)庫(kù)驅(qū)動(dòng)到? <installation-directory>/lib 目錄中。
下面的連接是有關(guān)如果找到你的數(shù)據(jù)庫(kù)驅(qū)動(dòng):
- PostgreSQL:捆綁到了 Confluence 中, 在<installation-directory>/confluence/WEB-INF/lib/postgresql-x.x.x.jar?
- Microsoft SQL Server:捆綁到了 Confluence 中, 在?<installation-directory>/confluence/WEB-INF/lib/mssql-jdbc-x.x.x.x.jar?
- MySQL:進(jìn)入 Database JDBC Drivers? 頁(yè)面來(lái)下載驅(qū)動(dòng)
- Oracle:進(jìn)入 Database JDBC Drivers? 頁(yè)面來(lái)下載驅(qū)動(dòng)
3. 在 Tomcat 中配置數(shù)據(jù)源
下一步,將數(shù)據(jù)源配置到 Tomcat 中。
| <Context path="" docBase="../confluence" debug="0" reloadable="true"> <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties --> |
| <Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource" ????username="<database-user>" ????password="<password>" ????driverClassName="org.postgresql.Driver" ????url="jdbc:postgresql://<host>:5432/<database-name>" ????maxTotal="60" ????maxIdle="20" ????validationQuery="select 1"/> ? |
| <Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource" ????username="<database-user>" ????password="<password>" ???driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver" ????url="jdbc:sqlserver://<host>:1433;database=<database-name>" ????maxTotal="60" ????maxIdle="20" ????validationQuery="select 1"/> |
如果你正在使用的 Confluence 6.3 及其早期的版本,針對(duì)?SQL Server 數(shù)據(jù)庫(kù)服務(wù)器,你 制定jTDS 驅(qū)動(dòng)。請(qǐng)參考? Configuring a SQL Server Datasource in Apache Tomcat 中的文檔來(lái)進(jìn)行配置。
| <Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource" ????username="<database-user>" ????password="<password>" ????driverClassName="com.mysql.jdbc.Driver" ????url="jdbc:mysql://<host>:3306/<database-name>?useUnicode=true&characterEncoding=utf8" ????maxTotal="60" ????maxIdle="20" ????defaultTransactionIsolation="READ_COMMITTED" ????validationQuery="Select 1"/> |
| <Resource name="jdbc/confluence" auth="Container" type="javax.sql.DataSource" ????driverClassName="oracle.jdbc.OracleDriver" ????url="jdbc:oracle:thin:@<host>:1521:<SID>" ????username="<database-user>" ????password="<password>" ????connectionProperties="SetBigStringTryClob=true" ????accessToUnderlyingConnectionAllowed="true" ????maxTotal="60" ????maxIdle="20" ????maxWaitMillis="10000"/> |
See?how to find your Oracle URL.
替換 <database-user>, <password>, <host> 或 <database-name> (或針對(duì) Oracle 使用 <SID>? )來(lái)配置你自己的數(shù)據(jù)庫(kù)。你同事還需要修改這個(gè)端口,如果你的數(shù)據(jù)庫(kù)沒(méi)有在默認(rèn)端口中運(yùn)行的話。
- 你需要使用支持的數(shù)據(jù)庫(kù)驅(qū)動(dòng)。如果你使用了不支持的數(shù)據(jù)庫(kù)驅(qū)動(dòng)或者自定義的 JDBC 驅(qū)動(dòng),或者你數(shù)據(jù)源中的? driverClassName,協(xié)作寫(xiě)編輯將會(huì)失敗。請(qǐng)參考?Database JDBC Drivers 頁(yè)面中的內(nèi)容。
- 你數(shù)據(jù)庫(kù)連接池需要允許有足夠的連接數(shù)來(lái)同時(shí)支持? Confluence 和 Synchrony (默認(rèn)的最大連接池?cái)?shù)量為 15)。
- 在你的數(shù)據(jù)庫(kù)中,你使用簡(jiǎn)單用戶名和密碼授權(quán)。
4. 配置 Confluence web 應(yīng)用
配置 Confluence 來(lái)使用這個(gè)數(shù)據(jù)源:
| <resource-ref> ??<description>Connection Pool</description> ??<res-ref-name>jdbc/confluence</res-ref-name> ??<res-type>javax.sql.DataSource</res-type> ??<res-auth>Container</res-auth> </resource-ref> |
5. 重啟 Confluence 然后繼續(xù)設(shè)置進(jìn)程
現(xiàn)在你的數(shù)據(jù)源已經(jīng)成功配置了,你可以繼續(xù)你 Confluence 的安裝進(jìn)程了。
https://www.cwiki.us/display/CONFLUENCEWIKI/Configuring+a+datasource+connection
轉(zhuǎn)載于:https://www.cnblogs.com/huyuchengus/p/9157825.html
總結(jié)
以上是生活随笔為你收集整理的Confluence 6 新 Confluence 安装配置一个数据源连接的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: xsl:param
- 下一篇: 解决echarts中地图重叠问题