參考資料:http://www.cnblogs.com/jackyyou/p/5534231.htmlphp
http://www.ilanni.com/?p=11989html
公司須要搭建WIKI方便員工將一些資料記錄下來,開始搭建了一遍,感受有些亂,因此我就又找了個乾淨的系統搭了第二次,如今把詳細流程寫下來。
整個安裝過程須要用到的包裹:
jre-8u131-linux-x64.tar.gz #JAVA
atlassian-confluence-5.4.4-x64.bin #confluence
mysql-connector-java-5.1.32-bin.jar #mysql驅動程序
confluence5.1-crack.zip #confluence破解包
Confluence-5.4.4-language-pack-zh_CN.jar #confluence漢化語言包
我把全部包裹打包在一塊兒:ConfluenceInstall.zip
……………………………………………………………………………………………………………java
yum -y update #更新全部已有組件
yum -y lrzsz.x86_64 #安裝上傳下載命令rz、sz
yum -y unzip #安裝unzip解壓命令mysql
將ConfluenceInstall.zip上傳到/tmp下
unzip ConfluenceInstall.zip #解壓包裹獲得全部安裝包,這裏confluence5.1-crack.zip破解包放到本機便可,不用上傳到服務器上。linux
[root@yeebian tmp]# ll ConfluenceInstall
total 317164
-rw-r--r--. 1 root root 246958968 Aug 19 2015 atlassian-confluence-5.4.4-x64.bin
-rw-r--r--. 1 root root 289268 Aug 19 2015 Confluence-5.4.4-language-pack-zh_CN.jar
-rw-r--r--. 1 root root 75920010 Apr 19 17:47 jre-8u131-linux-x64.tar.gz
-rw-r--r--. 1 root root 969020 Aug 19 2015 mysql-connector-java-5.1.32-bin.jar
[root@yeebian ConfluenceInstall]# tar -zxvf jre-8u131-linux-x64.tar.gz
jre1.8.0_131/
jre1.8.0_131/bin/
jre1.8.0_131/bin/rmiregistry
jre1.8.0_131/bin/unpack200
jre1.8.0_131/bin/jcontrol
…… ……
[root@yeebian ConfluenceInstall]# ll
total 317168
-rw-r--r--. 1 root root 246958968 Aug 19 2015 atlassian-confluence-5.4.4-x64.bin
-rw-r--r--. 1 root root 289268 Aug 19 2015 Confluence-5.4.4-language-pack-zh_CN.jar
drwxr-xr-x. 6 uucp 143 4096 Mar 15 16:32 jre1.8.0_131 #java解壓文件
-rw-r--r--. 1 root root 75920010 Apr 19 17:47 jre-8u131-linux-x64.tar.gz
-rw-r--r--. 1 root root 969020 Aug 19 2015 mysql-connector-java-5.1.32-bin.jar
mkdir /usr/java
mv /tmp/ConfluenceInstall/jre1.8.0_131 /usr/java
配置環境變量
vim /etc/profile
在文件最後加上:
export JAVA_HOME=/usr/java/jre1.8.0_131
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
保存退出,重啓服務器生效。sql
[root@yeebian ~]# java -version #查看java版本信息
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
……………………………………………………………………………………………………………數據庫
安裝mysql
yum -y install mysql-server mysql mysql-devel #yum安裝mysql及其餘相關組件
service mysqld start #啓動mysqlvim
[root@yeebian ~]# chkconfig --list | grep mysqld #查看mysql服務是否是開機自動啓動 mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@yeebian ~]# chkconfig mysqld on #設置成開機啓動 [root@yeebian ~]# chkconfig --list | grep mysqld mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off [root@yeebian ~]# mysqladmin -u root password 'MysQl123!@#' #經過該命令給mysql數據庫root帳號設置密碼爲 MysQl123!@# [root@yeebian ~]# mysql -u root -p #登陸mysql數據庫,輸入如下配置 Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.1.73 Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database confluence character set UTF8; Query OK, 1 row affected (0.00 sec) mysql> grant all on confluence.* to confluence@"%" identified by "confluence"; Query OK, 0 rows affected (0.00 sec) mysql> grant all on confluence.* to confluence@"localhost" identified by "confluence"; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> quit #退出 Bye [root@yeebian ~]# service mysqld stop #關閉mysql服務
vim /etc/my.cnf
在[mysqld]下面加上character-set-server =utf8 #解決中文顯示亂碼問題
service mysqld start #啓動mysql服務
……………………………………………………………………………………………………………windows
安裝confluence
cd /tmp/ConfluenceInstall
chmod u+x atlassian-confluence-5.4.4-x64.bin #添加執行權限服務器
[root@yeebian ConfluenceInstall]# ./atlassian-confluence-5.4.4-x64.bin #執行安裝並根據提示輸入,選擇默認安裝。 Unpacking JRE ... Starting Installer ... Apr 20, 2017 6:47:35 PM java.util.prefs.FileSystemPreferences$1 run INFO: Created user preferences directory. Apr 20, 2017 6:47:35 PM java.util.prefs.FileSystemPreferences$2 run INFO: Created system preferences directory in java.home. This will install Confluence 5.4.4 on your computer. OK [o, Enter], Cancel [c] o Choose the appropriate installation or upgrade option. Please choose one of the following: Express Install (uses default settings) [1], Custom Install (recommended for advanced users) [2, Enter], Upgrade an existing Confluence installation [3] 1 See where Confluence will be installed and the settings that will be used. Installation Directory: /opt/atlassian/confluence Home Directory: /var/atlassian/application-data/confluence HTTP Port: 8090 RMI Port: 8000 Install as service: Yes Install [i, Enter], Exit [e] i Extracting files ... Please wait a few moments while Confluence starts up. Launching Confluence ... Installation of Confluence 5.4.4 is complete Your installation of Confluence 5.4.4 is now ready and can be accessed via your browser. Confluence 5.4.4 can be accessed at http://localhost:8090 Finishing installation ...
#打開防火牆8090端口
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 8090 -j ACCEPT
service iptables save #保存防火牆配置
service iptables restart #重啓防火牆,打開防火牆8090端口
#confluence日誌存放路徑
修改/opt/atlassian/confluence/confluence/WEB-INF/classes中的confluence-init.properties配置文件,
將最下面一行改爲confluence.home=/var/confluence/data
service confluence restart #重啓confluence 服務
……………………………………………………………………………………………………………
破解confluence
頁面訪問http://192.168.10.162(localhost IP):8090/setup/setuplicense.action
記下Server ID
將/opt/atlassian/confluence/confluence/WEB-INF/lib全部以atlassian-extras開頭的jar文件刪除,
本機解壓破解包,而後把裏面的Confluence-5.4.4-language-pack-zh_CN.jar、mysql-connector-java-5.1.32-bin.jar
三個jar文件複製到/opt/atlassian/confluence/confluence/WEB-INF/lib目錄下.其中:
Confluence-5.4.4-language-pack-zh_CN.jar是confluence中文語言包,
mysql-connector-java-5.1.32-bin.jar是confluence鏈接mysql數據庫相關的jar包。
atlassian全部產品的中文語言包,咱們均可以經過如下地址下載到:
https://translations.atlassian.com/dashboard/download?lang=zh_CN#/Confluence/5.6.6
mysql-connector-java-5.1.39-bin.jar文件能夠鏈接mysql5.7及其如下的mysql版本,能夠參考以下鏈接:
http://www.w3resource.com/mysql/mysql-java-connection.php
在windows運行該破解jar包的,以下:java -jar confluence_keygen.jar
彈出窗口,輸入name,Server ID,點擊.patch!
選中破解包中的atlassian-extras-2.4.jar文件,打開。
點擊.gen!,這時先前訪問頁面中的License Key就出來了,複製Key關閉窗口。
破解以後的atlassian-extras-2.4jar文件會出現一個atlassian-extras-2.4.bak文件,如圖:
將破解後的atlassian-extras-2.4jar上傳到/opt/atlassian/confluence/confluence/WEB-INF/lib目錄下
service confluence start #啓動confluence
從新打開網頁。將Key輸入進去,這裏我選擇的是默認安裝。
這時頁面可能會出現報錯,以下圖:
從頁面中找到緣由:
LockReleaseFailedException: Cannot forcefully unlock a NativeFSLock which is held by another indexer component: /var/atlassian/application-data/confluence/index/write.lock
刪除/var/atlassian/application-data/confluence/index/write.lock文件
殺掉confluence進程,重啓confluence,刷新頁面。
建立管理員信息:
自此,一個破解版的confluence wiki就搭建完成了,能夠邀請公司的小夥伴一塊兒學習分享了。