confluence安装

作者: CODERLIHAO | 来源:发表于2019-05-14 00:06 被阅读0次

我的环境的是CentOS7
给出下载文件

链接:https://pan.baidu.com/s/1qTLB2qc0crfXCssdgUYcig
提取码:e92f

一 安装java

解压缩

[root@localhost soft]# tar -xvf jdk-8u211-linux-x64.tar.gz

将文件移动到指定目录

[root@localhost soft]# mv jdk1.8.0_211/ /usr/local/jdk1.8.0_211/

配置Java环境

[root@localhost soft]# vi /etc/profile

追加如下内容

export JAVA_HOME=/usr/local/jdk1.8.0_211
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:$PATH
[root@localhost soft]# source /etc/profile

二 安装mysql

解压缩

[root@localhost soft]# tar -xvf mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz

移动文件到指定目录

[root@localhost soft]# mv mysql-5.7.26-linux-glibc2.12-x86_64 /usr/local/mysql

为了安全添加一个mysql用户访问数据库

[root@localhost soft]# groupadd mysql
[root@localhost soft]# useradd -r -g mysql mysql

切换到mysql 目录

 [root@localhost soft]# cd /usr/local/mysql/

改变mysql用户与组

[root@localhost soft]# cd /usr/local/mysql/
[root@localhost mysql]# chown -R mysql:mysql ./
[root@localhost soft]# touch /var/lib/mysql/mysql.sock
[root@localhost soft]# chown -R mysql:mysql /var/lib/mysql
[root@localhost soft]# ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

配置my.cnf

[client]
port = 3306
default-character-set=utf8mb4
    
[mysqld]
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
port = 3306
character-set-server=utf8mb4
default_storage_engine = InnoDB
    sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
socket=/var/lib/mysql/mysql.sock
lower_case_table_names=1
symbolic-links=0

将my.cnf复制到/etc目录下

[root@localhost soft]# cp /root/my.cnf /etc/

初始化mysql

[root@localhost soft]# cd /usr/local/mysql/bin/
[root@localhost soft]# ./mysqld --initialize --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data

添加mysql为系统服务

[root@localhost soft]# cp support-files/mysql.server /etc/init.d/mysql

启动mysql服务

[root@localhost soft]# service mysql start

登录mysql

[root@localhost soft]# cd /usr/local/mysql/bin/
[root@localhost soft]#  ./mysql -uroot -p

创建数据库

mysql> create database confluence character set utf8 collate utf8_bin;
mysql> grant all on confluence.* to 'confluence'@'localhost' identified by 'abceef123456';
mysql> flush privileges;

三 安装Nginx

为了安全一般会采用端口映射,你想直接访问,可以跳过
我的系统是centOS7
安装教程https://nginx.org/en/linux_packages.html#RHEL-CentOS

[root@localhost soft]# yum install yum-utils

创建/etc/yum.repos.d/nginx.repo文件
放入以下内容

[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key

[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
[root@localhost soft]# yum-config-manager --enable nginx-mainline
 [root@localhost soft]# yum install nginx

追加内容

[root@localhost nginx]# cd /etc/nginx/
[root@localhost nginx]# vi nginx.conf
http{
...
server {
    listen 80;
    server_name 192.168.236.128;
    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;
    }
    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";
    }
}
...
}

启动ngnix

[root@localhost nginx]# /usr/sbin/nginx

四 安装confluence

[root@localhost ~]# ./atlassian-confluence-6.15.4-x64.bin 
image.png

关闭confluence

[root@localhost bin]# cd /opt/atlassian/confluence/bin/
[root@localhost bin]# ./shutdown.sh 

到/opt/atlassian/confluence/conf目录中修改server.xml
改成自己的地址


image.png image.png

重启confluence

[root@localhost bin]# cd /opt/atlassian/confluence/bin/
[root@localhost bin]# ./startup.sh

浏览器访问 http://your ip/confluence

image.png image.png image.png image.png
image.png

报错,解决问题
SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;


image.png

成功


image.png

之前已经有一个这样的数据库,覆盖安装,注意我这是无关紧要的数据,公司的数据是要备份的


image.png image.png image.png image.png image.png image.png

相关文章

网友评论

    本文标题:confluence安装

    本文链接:https://www.haomeiwen.com/subject/xyldaqtx.html