openfire通過設置的方式跳過初始化部分

場景:

假如當前已經存在了openfire的數據庫,並且該數據庫和當前的openfire的版本沒有變化。

如果重新啓動了了一個沒有初始化的openfire以後,不希望再進行數據庫的初始化,方法如下:

我這邊使用的openfire的版本爲4.6.0,我使用的是源碼版,若是安裝版本,直接在安裝目錄下找到openfire.xml即可

1,找到

 

2,打開xml文件,將之前的xml中的內容複製過來,這裏的前提是之前已經安裝過openfire,並且可以找到該安裝好的openfire.xml文件:

 

 

我這裏用的mysql數據庫

  <connectionProvider> 
    <className>org.jivesoftware.database.DefaultConnectionProvider</className> 
  </connectionProvider>  
  <database> 
    <defaultProvider> 
      <driver>com.mysql.cj.jdbc.Driver</driver>  
      <serverURL>jdbc:mysql://localhost:3306/openfire?rewriteBatchedStatements=true&amp;characterEncoding=UTF-8&amp;characterSetResults=UTF-8&amp;serverTimezone=UTC</serverURL>  
      <username encrypted="true">f7cb6a1db5b0a00cdc6a49dae748e49974ee9b4ec62cea27</username>  
      <password encrypted="true">ca8f5784eea2a8b628c2c140aa873c7914baedb5a7cdabc1</password>  
      <testSQL>select 1</testSQL>  
      <testBeforeUse>false</testBeforeUse>  
      <testAfterUse>false</testAfterUse>  
      <testTimeout>500</testTimeout>  
      <timeBetweenEvictionRuns>30000</timeBetweenEvictionRuns>  
      <minIdleTime>900000</minIdleTime>  
      <maxWaitTime>500</maxWaitTime>  
      <minConnections>5</minConnections>  
      <maxConnections>25</maxConnections>  
      <connectionTimeout>1.0</connectionTimeout> 
    </defaultProvider> 
  </database>  
  <setup>true</setup>  
  <fqdn>127.0.0.1</fqdn> 

 

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