waterloo3122 / open-source-docs

Apache License 2.0
0 stars 0 forks source link

confluence related #110

Open waterloo3122 opened 4 years ago

waterloo3122 commented 4 years ago

1 install on Cenos 7

update system

hostnamectl set-hostname wiki0
yum update -y
reboot

2 download confluence

I am using this version atlassian-confluence-7.0.3-x64.bin upload this file to server

3 download and upload mysql-connector-java-5.1.48.jar to server

https://confluence.atlassian.com/doc/database-jdbc-drivers-171742.html

4 configure mysql server

4.1 install Percona server 5.6

I am using Percona Server 5.6 Here is my my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
character-set-server=utf8
collation-server=utf8_bin
default-storage-engine=INNODB
max_allowed_packet=256M
innodb_log_file_size=2GB
binlog_format=row
transaction-isolation=READ-COMMITTED
symbolic-links=0
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

4.2 enable mysqld

systemctl enable mysqld
systemctl start mysql

4.3 create database and user for confluence

mysql -uroot -p -e "create database wiki"
mysql -uroot -p -e "grant all privileges on wiki.* to wiki@'%' identified by 'YOUR OWN PASSWORK'"

5 install confluence on Server using root

5.1 basic install

chmod a+x atlassian-confluence-7.0.3-x64.bin
./atlassian-confluence-7.0.3-x64.bin

1 Press Enter

2 Enter 2

3 press ENTER

4 Press Enter

5 Press Enter

6 Enter y

7 Enter y

5.2 further configuration

sh /opt/atlassian/confluence/bin/stop-confluence.sh

cd /opt/atlassian/confluence/confluence/WEB-INF/lib
mv atlassian-extras-decoder-v2-3.4.1.jar atlassian-extras-decoder-v2-3.4.1.jar.bak
mv /root/src/atlassian-extras-2.4.jar atlassian-extras-decoder-v2-3.4.1.jar
mv /root/src/mysql-connector-java-5.1.48.jar .

sh /opt/atlassian/confluence/bin/start-confluence.sh

5.3 open your browser

open https:://YOUR-SERVER-IP:8090 11

12

13

14

15

16 Choose Empty Site

17 Choose Manage users and groups within Confluence

18 Set a proper password

waterloo3122 commented 4 years ago

设置默认为中文

系统设置

19

单个用户的设置

20

waterloo3122 commented 4 years ago

前端使用nginx反向代理时的配置

cat /opt/atlassian/confluence/conf/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="wiki.xx.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="" docBase="../confluence" debug="0" reloadable="false" useHttpOnly="true">
                    <!-- 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>
    </Service>
</Server>

其中wiki.xx.com为通过nginx访问的域名 重启confluence 管理员登录-》服务器主页URL设置为https://wiki.xx.com