设为首页 收藏本站
查看: 845|回复: 0

[经验分享] centos6.9安装confluence 6.5.0

[复制链接]

尚未签到

发表于 2018-4-20 09:06:09 | 显示全部楼层 |阅读模式
  公司准备实行敏捷开发,经过一番工具选择,最终选定了jira和confluence,jira用作项目管理,confluence用于分享管理。此文介绍confluence 6.5.0(其他版本安装方法一样)安装配置:
备注:建议最低2核CPU、4GB内存。小了负载很高。
  一、环境准备(如果安装jira的时候已经做了,就不需要做;但是要创建confluence的数据库和用户)

  1、关闭或设置防火墙、关闭selinux。

  2、安装jdk8环境(安装oracle的java,默认的openjdk不行)。

  (1)这里下载的是rpm包。

[root@agile soft]# wget
--no-check-certificate --no-cookies --header "Cookie:
oraclelicense=accept-securebackup-cookie"
http://download.oracle.com/otn-pub/java/jdk/8u151-b12/e758a0de34e24606bca991d704f6dcbf/jdk-8u151-linux-x64.rpm

[root@agile soft]# rpm -ivh jdk-8u151-linux-x64.rpm
Preparing...                ########################################### [100%]
   1:jdk1.8.0_151           ########################################### [100%]
Unpacking JAR files...
    tools.jar...
    plugin.jar...
    javaws.jar...
    deploy.jar...
    rt.jar...
    jsse.jar...
    charsets.jar...
    localedata.jar...

  (2)设置环境变量。
[root@agile soft]# vim /etc/profile
  JAVA_HOME=/usr/java/jdk1.8.0_151
JAVA_BIN=/usr/java/jdk1.8.0_151/bin
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/sbin/
CLASSPATH=.:/lib/dt.jar:/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH

(3)使环境变量生效。
[root@agile soft]# source /etc/profile

  (4)查看java版本。

[root@agile soft]# java -version
java version "1.8.0_151"
Java(TM) SE Runtime Environment (build 1.8.0_151-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.151-b12, mixed mode)

  3、安装mysql 5.6

  (1)安装mysql的yum源,这个源包括5.5、5.6、5.7版本:
  备注:如果要专门下载某个版本,可以到http://dev.mysql.com/downloads/repo/yum下载。
[root@agile ~]# rpm -ivh http://repo.mysql.com/mysql-community-release-el6.rpm
Retrieving http://repo.mysql.com/mysql-community-release-el6.rpm
warning: /var/tmp/rpm-tmp.C87LHo: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY
Preparing...                ########################################### [100%]
   1:mysql-community-release########################################### [100%]  
(2)打开mysql的yum源文件,如果要安装mysql哪个版本,选择后把里面的enable设置为1。
  备注:或者用yum-config-manager命令方式开启或关闭。
  yum-config-manager --disable mysql55-community
yum-config-manager --enable mysql56-community
yum-config-manager --disable mysql57-community
[root@agile ~]#vim /etc/yum.repos.d/mysql-community.repo
# Enable to use MySQL 5.5
[mysql55-community]
name=MySQL 5.5 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.5-community/el/6/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
# Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql  
(3)yum安装mysql组件。

[root@agile ~]#yum install mysql-community-client mysql-community-devel mysql-community-server php-mysql
正在安装:
mysql-community-client                    x86_64               5.6.38-2.el6                 mysql56-community                18 M
mysql-community-devel                     x86_64               5.6.38-2.el6                 mysql56-community               3.3 M
mysql-community-libs                      x86_64               5.6.38-2.el6                 mysql56-community               1.9 M
     replacing  mysql-libs.x86_64 5.1.73-8.el6_8
mysql-community-libs-compat               x86_64               5.6.38-2.el6                 mysql56-community               1.6 M
     replacing  mysql-libs.x86_64 5.1.73-8.el6_8
mysql-community-server                    x86_64               5.6.38-2.el6                 mysql56-community                55 M
php-mysql                                 x86_64               5.3.3-49.el6                 base                             86 k
为依赖而安装:
mysql-community-common                    x86_64               5.6.38-2.el6                 mysql56-community               308 k
numactl                                   x86_64               2.0.9-2.el6                  base                             74 k
php-common                                x86_64               5.3.3-49.el6                 base                            530 k
php-pdo                                   x86_64               5.3.3-49.el6                 base                             80 k  (4)启动mysql命令,并设置开机自启动。

[root@agile ~]#service mysqld start
[root@agile ~]#chkconfig mysqld on  
(5)mysql设置root密码。

[root@agile ~]#mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist
... Failed!  Not critical, keep moving...
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
Cleaning up...  (6)mysql设置。
  在[mysqld]下面加入这几行:
[root@agile ~]# vi /etc/my.cnf
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake  在这2个文件里面分别加入如下内容:

[root@agile ~]# vi /etc/my.cnf.d/client.cnf
[client]
default-character-set=utf8
[root@agile my.cnf.d]# vi /etc/my.cnf.d/mysql-clients.cnf
[mysql]
default-character-set=utf8  重启mysql,并查看字符集。

[root@agile my.cnf.d]# service mysqld restart
停止 mysqld:                                              [确定]
正在启动 mysqld:                                          [确定]
[root@agile my.cnf.d]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.38 MySQL Community Server (GPL)
Copyright (c) 2000, 2017, 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> show variables like "%character%";show variables like "%collation%";
+--------------------------+----------------------------+
| Variable_name            | Value                      |
+--------------------------+----------------------------+
| character_set_client     | utf8                       |
| character_set_connection | utf8                       |
| character_set_database   | utf8                       |
| character_set_filesystem | binary                     |
| character_set_results    | utf8                       |
| character_set_server     | utf8                       |
| character_set_system     | utf8                       |
| character_sets_dir       | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.08 sec)
+----------------------+-----------------+
| Variable_name        | Value           |
+----------------------+-----------------+
| collation_connection | utf8_unicode_ci |
| collation_database   | utf8_unicode_ci |
| collation_server     | utf8_unicode_ci |
+----------------------+-----------------+
3 rows in set (0.02 sec)
mysql>  4、mysql中创建confluence数据库和用户,并验证。
mysql> create database confluence default character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.11 sec)
mysql> grant all on confluence.* to 'confluence'@'%' identified by 'confluencepasswd';
Query OK, 0 rows affected (0.09 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
|  confluence         |
| jira               |
| mysql              |
| performance_schema |
+--------------------+
4 rows in set (0.07 sec)
[root@agile ~]# mysql -u confluence -h localhost -pconfluencepasswd
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.38 MySQL Community Server (GPL)
Copyright (c) 2000, 2017, 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>  二、安装Confluence 6.5.0(在my.cnf的[mysqld]下面加一行transaction_isolation = READ-COMMITTED设置事务隔离策略,confluence需要这种事务隔离策略,否则数据库连接的时候会报错)
  1、下载并解压confluence到/tmp目录

wget -c -P /tmp https://downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-6.5.0.tar.gz
cd /tmp
tar zxvf atlassian-confluence-6.5.0.tar.gz
cp -rv atlassian-confluence-6.5.0/ /opt/  
2、创建软链接,注意confluence目录后不要带“/”,/opt/confluence就作为confluence的安装目录

ln -sv /opt/atlassian-confluence-6.5.0 /opt/confluence
- 创建confluence用户并设置密码为”123456“
/usr/sbin/useradd --create-home --comment "Account for running confluence" --shell /bin/bash confluence
echo "123456" | passwd --stdin confluence  
3、设置confluence目录只允许jira用户访问

chown -R confluence.confluence /opt/confluence/
chmod -R 700 /opt/confluence/  
4、创建confluence家目录,用于log、搜索索引等文件的存储,并限制只允许confluence用户访问

mkdir /home/confluence/confluence-home
chown -R confluence.confluence /home/confluence/confluence-home
chmod -R 700 /home/confluence/confluence-home  
5、设置/opt/confluence/confluence/WEB-INF/classes/confluence-init.properties文件,在末尾去除注释并修改为上面设置的confluence家目录路径

confluence.home=/home/confluence/confluence-home  
6、检查端口是否被占用,confluence默认运行的端口有8000和8090, Change the Server port (8000) and the Connector port (8090),如果被占用,可打开/opt/confluence/conf/server.xml文件修改端口,如果防火墙打开,则放行修改后的端口,下面的例子是修改成Server port to 5000 and the Connector port to 5050.

Server port="5000" shutdown="SHUTDOWN" debug="0">
<Service name=&quot;Tomcat-Standalone&quot;>
<Connector port=&quot;5050&quot; connectionTimeout=&quot;20000&quot; redirectPort=&quot;8443&quot;
maxThreads=&quot;48&quot; minSpareThreads=&quot;10&quot;
enableLookups=&quot;false&quot; acceptCount=&quot;10&quot; debug=&quot;0&quot; URIEncoding=&quot;UTF-8&quot;
protocol=&quot;org.apache.coyote.http11.Http11NioProtocol&quot; />  
7、下载mysql数据库连接confluence包并拷贝到jira的lib目录下

wget -c -P /tmp wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.45.tar.gz
cd /tmp
tar zxvf mysql-connector-java-5.1.45.tar.gz
cd mysql-connector-java-5.1.45
\cp mysql-connector-java-5.1.45-bin.jar /opt/confluence/confluence/WEB-INF/lib/  
8、可以切换到confluence用户并启动jira工程,检查8090端口。并将启动命令加入到/etc/rc.local文件中。
[confluence@localhost bin]$ /bin/sh /opt/confluence/bin/start-confluence.sh
To run Confluence in the foreground, start the server with start-confluence.sh -fg
executing as current user
If you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide
Server startup logs are located in /opt/confluence/logs/catalina.out
---------------------------------------------------------------------------
Using Java: /usr/java/jdk1.8.0_151/bin/java
2017-12-25 12:24:25,301 INFO [main] [atlassian.confluence.bootstrap.SynchronyProxyWatchdog] A Context element for ${confluence.context.path}/synchrony-proxy is found in /opt/confluence/conf/server.xml. No further action is required
---------------------------------------------------------------------------
Using CATALINA_BASE:   /opt/confluence
Using CATALINA_HOME:   /opt/confluence
Using CATALINA_TMPDIR: /opt/confluence/temp
Using JRE_HOME:        /usr/java/jdk1.8.0_151
Using CLASSPATH:       /opt/confluence/bin/bootstrap.jar:/opt/confluence/bin/tomcat-juli.jar
Using CATALINA_PID:    /opt/conflu
[confluence@localhost bin]$ lsof -i:8090
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    1504 root   36u  IPv6   8877      0t0  TCP *:8090 (LISTEN)  9、输入http://192.168.0.182:8090/访问

DSC0000.jpg

DSC0001.jpg

DSC0002.jpg

  注册一个帐号,需要FQ。
  按照提示设置,会提示连接jira。注册官网帐号生成试用版序列号。

DSC0003.jpg

DSC0004.jpg

DSC0005.jpg

DSC0006.jpg

DSC0007.jpg

DSC0008.jpg

DSC0009.jpg

DSC00010.jpg

DSC00011.jpg

DSC00012.jpg

DSC00013.jpg

  三、confluence连接jira设置
  

DSC00014.jpg

DSC00015.jpg DSC00016.jpg


DSC00017.jpg

DSC00018.jpg

DSC00019.jpg

DSC00020.jpg

DSC00021.jpg


  四、新建用户和组、设置邮箱、新建空间、设置空间权限,访问空间、新建页面,选择哪个页面然后新建,就是这个页面的子页面。

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-449427-1-1.html 上篇帖子: CentOS 7.3 搭建DNS服务器 下篇帖子: centos6.5 恢复被删除的数据
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表