centos 7安装破解 confluence
前提条件:
关闭 防火墙,SELinux
一、安装
1.下载atlassian-confluence-6.7.1-x64.bin安装包
wget https://downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-6.7.1-x64.bin -P /opt
2.安装
chmod +x atlassian-confluence-6.7.1-x64.bin ./atlassian-confluence-6.7.1-x64.bin
二、数据库配置
1.配置文件my.cnf
[mysqld] datadir=/data/mysql_data socket=/var/lib/mysql/mysql.sock symbolic-links=0 sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES character-set-server=utf8 collation-server=utf8_bin default-storage-engine=INNODB transaction-isolation=READ-COMMITTED server-id=1 log_bin=mysql-bin binlog_format=row max_allowed_packet=256M innodb_log_file_size=2GB [client] default-character-set = utf8 [mysqld_safe] log-error=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
2.数据库操作
update user set password=password("x2014.mc") where user="root"; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'x2014.mc' WITH GRANT OPTION; create database confluence character set utf8 collate utf8_bin; grant all on confluence.* to 'confluenceAdmin'@'192.%' identified by 'x2014.mc';
三、破解
破解工具下载
链接:https://pan.baidu.com/s/1dT6YDesf3Kl4Ow-hf1BXgg 提取码:hlgq
打开confluence页面到授权码那一页,复制ServerId
关闭confluence
sh /opt/atlassian/confluence/bin/stop-confluence.sh
拉取jar包,下载到本地准备破解
mv /opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.3.0.jar /opt/atlassian-extras-2.4.jar
3.本地运行破解器
java -jar confluence_keygen.jar
点击.patch,选择atlassian-extras-2.4.jar文件,点击打开,jar文件破解成功,破解完成后会生成新的atlassian-extras-2.4.jar,旧的会被重命名为atlassian-extras-2.4.kak
输入Server Id ,并点击.gen! 获取授权码
4.上传破解后jar包到/opt/atlassian/confluence/confluence/WEB-INF/lib,并重命 名atlassian-extras-decoder-v2-3.3.0.jar
5.上传mysql驱动/opt/atlassian/confluence/confluence/WEB-INF/lib
6.启动confluence
sh /opt/atlassian/confluence/bin/start-confluence.sh
浏览器访问地址http://ip:8090/
四、confluence 数据库设置
数据库类型: mysql 主机名: 192.168.1.102 端口: 3306 数据库名 confluence 用户名:confluenceAdmin 密码:x2014.mc
连接数据库的配置文件:/var/atlassian/application-data/confluence/confluence.cfg.xml,方便以后操作。
五、配置nginx反向代理
nginx 配置如下
server { listen 443 default ssl; server_name example.com; ssl on; ssl_certificate /usr/local/nginx/ssl/2778604_wiki.ykecf.cn.pem; ssl_certificate_key /usr/local/nginx/ssl/2778604_wiki.ykecf.cn.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on; location /confluence { client_max_body_size 100m; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://localhost:8090/confluence; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; } location /synchrony { proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://localhost:8091/synchrony; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; } }
srever.xml
<Server port="8000" shutdown="SHUTDOWN" debug="0"> <Service name="Tomcat-Standalone"> <Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="48" minSpareThreads="10" enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https" secure="true" proxyName="example.com" proxyPort="443"/> <Engine name="Standalone" defaultHost="localhost" debug="0"> <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4"> <Context path="/confluence" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true"> <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties --> <Manager pathname="" /> <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" /> </Context> <Context path="${confluence.context.path}/synchrony-proxy" docBase="../synchrony-proxy" debug="0" reloadable="false" useHttpOnly="true"> <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" /> </Context> </Host> </Engine> <!-- To run Confluence via HTTPS: * Uncomment the Connector below * Execute: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) with a password value of "changeit" for both the certificate and the keystore itself. * Restart and visit https://localhost:8443/ For more info, see https://confluence.atlassian.com/display/DOC/Running+Confluence+Over+SSL+or+HTTPS --> <!-- <Connector port="8443" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" protocol="org.apache.coyote.http11.Http11NioProtocol" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" clientAuth="false" sslProtocols="TLSv1,TLSv1.1,TLSv1.2" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" SSLEnabled="true" URIEncoding="UTF-8" keystorePass="<MY_CERTIFICATE_PASSWORD>"/> --> </Service> </Server>
六、配置邮箱
参考https://www.cnblogs.com/dingkailinux/p/9195730.html
server.xml
<Server port="8000" shutdown="SHUTDOWN" debug="0"> <Service name="Tomcat-Standalone"> <Connector port="8090" connectionTimeout="20000" redirectPort="8443" maxThreads="48" minSpareThreads="10" enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" protocol="org.apache.coyote.http11.Http11NioProtocol" scheme="https" secure="true" proxyName="example.com" proxyPort="443"/> <Engine name="Standalone" defaultHost="localhost" debug="0"> <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4"> <Context path="/confluence" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true"> <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties --> <Manager pathname="" /> <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" /> <!--QQ企业邮箱配置--> <Resource name="mail/QqSMTPServer" auth="Container" type="javax.mail.Session" mail.smtp.host="smtp.exmail.qq.com" mail.smtp.port="465" mail.smtp.auth="true" mail.smtp.user="xxxxx@qq.com" password="xxxxxxxx" mail.smtp.starttls.enable="true" mail.smtp.socketFactory.class="javax.net.ssl.SSLSocketFactory" /> <!--QQ企业邮箱配置--> </Context> <Context path="${confluence.context.path}/synchrony-proxy" docBase="../synchrony-proxy" debug="0" reloadable="false" useHttpOnly="true"> <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" /> </Context> </Host> </Engine> <!-- To run Confluence via HTTPS: * Uncomment the Connector below * Execute: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) with a password value of "changeit" for both the certificate and the keystore itself. * Restart and visit https://localhost:8443/ For more info, see https://confluence.atlassian.com/display/DOC/Running+Confluence+Over+SSL+or+HTTPS --> <!-- <Connector port="8443" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" protocol="org.apache.coyote.http11.Http11NioProtocol" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" clientAuth="false" sslProtocols="TLSv1,TLSv1.1,TLSv1.2" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" SSLEnabled="true" URIEncoding="UTF-8" keystorePass="<MY_CERTIFICATE_PASSWORD>"/> --> </Service> </Server>
附件乱码问题
解决方法: https://blog.csdn.net/u012599988/article/details/80180811
参考:
https://www.jianshu.com/p/2f2142ce01b7

浙公网安备 33010602011771号