废话不多说,以下记录了Centos7针对Jira6的安装,汉化,破解的操作过程,作为运维笔记留存.
0) 基础环境
192.168.10.212Centos7.4mysql 5.6jdk 1.8jira6.3.6.tar.gzmysql-connector-java-5.1.26.bin.jar mysql驱动包JIRA-6.3.3-language-pack-zh_CN.jar 汉化包atlassian-extras-2.2.2.jar jira系统破解包atlassian-universal-plugin-manager-plugin-2.17.13.jar 插件管理破解包 [root@jira6-onde ~]# hostnamejira6-onde[root@jira6-onde ~]# cat /etc/redhat-releaseCentOS Linux release 7.4.1708 (Core) 关闭selinux[root@jira6-onde ~]# setenforce 0setenforce: SELinux is disabled[root@jira6-onde ~]# getenforceDisabled[root@jira6-onde ~]# cat /etc/sysconfig/selinux |grep disabledSELINUX=disabled 关闭防火墙[root@jira6-onde ~]# systemctl stop firewalld[root@jira6-onde ~]# firewall-cmd --statenot running本案例所需要的jira6相关包下载地址: https://pan.baidu.com/s/1ki43TBsray3BQoRudU8CkA提取密码:j6nn下载后存放到本机的/usr/loca/src目录下.
1) 安装jdk8环境
将jdk-8u131-linux-x64.rpm下载到/opt目录下下载地址:https://pan.baidu.com/s/1pLaAjPp提取密码:x27s[root@jira6-onde ~]# java -version-bash: java: command not found如果自带了java环境,就卸载掉yum list installed |grep java yum -y remove java-1.7.0-openjdk* yum -y remove tzdata-java.noarch[root@jira6-onde ~]# cd /usr/local/src/[root@jira6-onde src]# ll jdk-8u131-linux-x64_.rpm -rw-r--r-- 1 root root 169983496 Nov 19 2017 jdk-8u131-linux-x64_.rpm[root@jira6-onde src]# rpm -ivh jdk-8u131-linux-x64_.rpm --force[root@jira6-onde src]# vim /etc/profile......JAVA_HOME=/usr/java/jdk1.8.0_131JAVA_BIN=/usr/java/jdk1.8.0_131/binPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/sbin/CLASSPATH=.:/lib/dt.jar:/lib/tools.jarexport JAVA_HOME JAVA_BIN PATH CLASSPATH[root@jira6-onde src]# source /etc/profile[root@jira6-onde src]# java -versionjava 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)
2) 安装mysql环境
mysql一键安装脚本[root@jira6-onde ~]# vim /usr/local/src/mysql_install.sh#!/bin/bash#卸载系统自带的Mysql/bin/rpm -e $(/bin/rpm -qa | grep mysql|xargs) --nodeps/bin/rm -f /etc/my.cnf #安装编译代码需要的包/usr/bin/yum -y install make gcc-c++ cmake bison-devel ncurses-devel #编译安装mysql5.6/usr/sbin/groupadd mysql/usr/sbin/useradd -g mysql mysql -M -s /sbin/nologin cd /usr/local/srcwget -c http://ftp.ntu.edu.tw/MySQL/Downloads/MySQL-5.6/mysql-5.6.39.tar.gz/bin/tar -zxvf mysql-5.6.39.tar.gzcd mysql-5.6.39//usr/bin/cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/data/mysql/data -DSYSCONFDIR=/etc -DWITH_MYISAM_STORAGE_ENGINE=1 -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_MEMORY_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock -DMYSQL_TCP_PORT=3306 -DENABLED_LOCAL_INFILE=1 -DWITH_PARTITION_STORAGE_ENGINE=1 -DEXTRA_CHARSETS=all -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_cimake && make install #修改/usr/local/mysql权限mkdir -p /data/mysql/data/bin/chown -R mysql:mysql /usr/local/mysql/bin/chown -R mysql:mysql /data/mysql/data #执行初始化配置脚本,创建系统自带的数据库和表/usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/data/mysql/data --user=mysql #配置my.cnfcat > /usr/local/mysql/my.cnf << EOF[client]port = 3306socket = /usr/local/mysql/var/mysql.sock [mysqld]port = 3306socket = /usr/local/mysql/var/mysql.sock basedir = /usr/local/mysql/datadir = /data/mysql/datapid-file = /data/mysql/data/mysql.piduser = mysqlbind-address = 0.0.0.0server-id = 1sync_binlog=1log_bin = mysql-bin skip-name-resolve#skip-networkingback_log = 600 max_connections = 3000max_connect_errors = 3000##open_files_limit = 65535table_open_cache = 512max_allowed_packet = 16Mbinlog_cache_size = 16Mmax_heap_table_size = 16Mtmp_table_size = 256M read_buffer_size = 1024Mread_rnd_buffer_size = 1024Msort_buffer_size = 1024Mjoin_buffer_size = 1024Mkey_buffer_size = 8192M thread_cache_size = 8 query_cache_size = 512Mquery_cache_limit = 1024M ft_min_word_len = 4 binlog_format = mixedexpire_logs_days = 30 log_error = /data/mysql/data/mysql-error.logslow_query_log = 1long_query_time = 1slow_query_log_file = /data/mysql/data/mysql-slow.log performance_schema = 0explicit_defaults_for_timestamp ##lower_case_table_names = 1 skip-external-locking default_storage_engine = InnoDB##default-storage-engine = MyISAMinnodb_file_per_table = 1innodb_open_files = 500innodb_buffer_pool_size = 2048Minnodb_write_io_threads = 1000innodb_read_io_threads = 1000innodb_thread_concurrency = 8innodb_purge_threads = 1innodb_flush_log_at_trx_commit = 2innodb_log_buffer_size = 4Minnodb_log_file_size = 32Minnodb_log_files_in_group = 3innodb_max_dirty_pages_pct = 90innodb_lock_wait_timeout = 120 bulk_insert_buffer_size = 8Mmyisam_sort_buffer_size = 8Mmyisam_max_sort_file_size = 2Gmyisam_repair_threads = 1 interactive_timeout = 28800wait_timeout = 28800 [mysqldump]quickmax_allowed_packet = 16M [myisamchk]key_buffer_size = 8Msort_buffer_size = 8Mread_buffer = 4Mwrite_buffer = 4M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLESport = 3306EOF #启动mysql服务cd /usr/local/mysql/bin/mkdir var/bin/chown -R mysql.mysql varcp support-files/mysql.server /etc/init.d/mysql/sbin/chkconfig mysql onservice mysql start #设置环境变量echo "export PATH=$PATH:/usr/local/mysql/bin" >> /etc/profilesource /etc/profile #设置mysql登陆密码,初始密码为123456/bin/mkdir -p /var/lib/mysqlln -s /usr/local/mysql/var/mysql.sock /var/lib/mysql/mysql.sockmysql -e "SET PASSWORD = PASSWORD('123456');"mysql -p123456 -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;"mysql -p123456 -e "FLUSH PRIVILEGES;"赋予脚本执行权限,并进行脚本安装[root@jira6-onde ~]# chmod 755 /usr/local/src/mysql_install.sh[root@jira6-onde ~]# /bin/bash -x /usr/local/src/mysql_install.sh[root@jira6-onde ~]# cat /etc/profile|grep mysqlexport PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/sbin/:/usr/local/mysql/bin[root@jira6-onde ~]# source /etc/profile[root@jira6-onde ~]# ps -ef|grep mysqlroot 17699 1 0 16:28 pts/1 00:00:00 /bin/sh /usr/local/mysql//bin/mysqld_safe --datadir=/data/mysql/data --pid-file=/data/mysql/data/mysql.pidmysql 18475 17699 0 16:28 pts/1 00:00:04 /usr/local/mysql/bin/mysqld --basedir=/usr/local/mysql/ --datadir=/data/mysql/data --plugin-dir=/usr/local/mysql//lib/plugin --user=mysql --log-error=/data/mysql/data/mysql-error.log --pid-file=/data/mysql/data/mysql.pid --socket=/usr/local/mysql/var/mysql.sock --port=3306root 18731 1294 0 18:12 pts/1 00:00:00 grep --color=auto mysql[root@jira6-onde ~]# lsof -i:3306COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEmysqld 18475 mysql 14u IPv4 371287 0t0 TCP *:mysql (LISTEN)确保mysql编码是utf8[root@jira6-onde ~]# mysql -p123456Warning: 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 4Server version: 5.6.39-log Source distributionCopyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.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/local/mysql/share/charsets/ |+--------------------------+----------------------------------+8 rows in set (0.00 sec)+----------------------+-----------------+| Variable_name | Value |+----------------------+-----------------+| collation_connection | utf8_general_ci || collation_database | utf8_general_ci || collation_server | utf8_general_ci |+----------------------+-----------------+3 rows in set (0.01 sec)mysql> 创建jira数据库及jira用户mysql> CREATE DATABASE jira CHARACTER SET utf8 COLLATE utf8_bin;Query OK, 1 row affected (0.09 sec)mysql> grant all on jira.* to 'jira'@'%' identified by 'jirapasswd';Query OK, 0 rows affected (0.05 sec)mysql> flush privileges;Query OK, 0 rows affected (0.12 sec)mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || jira || mysql || performance_schema || test |+--------------------+5 rows in set (0.00 sec)mysql> 手动测试下jira连接mysql[root@jira6-onde ~]# mysql -u jira -h 192.168.10.212 -pjirapasswdWarning: 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 6Server version: 5.6.39-log Source distributionCopyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> show databases;+--------------------+| Database |+--------------------+| information_schema || jira || test |+--------------------+3 rows in set (0.00 sec)mysql>
3) 安装jira
这里直接使用的是standalone包,里面集成了tomcat环境;可以直接解压即完成安装,记得copy到你准备安装的目录.[root@jira6-onde ~]# ll /usr/local/src/atlassian-jira-6.3.6.tar.gz-rw-r--r-- 1 root root 244240844 Jan 26 2017 /usr/local/src/atlassian-jira-6.3.6.tar.gz[root@jira6-onde ~]# mkdir -p /opt/jira/ [root@jira6-onde ~]# cd /usr/local/src/[root@jira6-onde src]# tar -zvxf atlassian-jira-6.3.6.tar.gz -C /opt/jira/[root@jira6-onde src]# cd /opt/jira/[root@jira6-onde jira]# lsatlassian-jira-6.3.6-standalone修改端口(默认是8080端口)[root@jira6-onde jira]# vim atlassian-jira-6.3.6-standalone/conf/server.xml.......
接着访问http://192.168.10.212:8080,进行jira的安装(最好先点击"Test Connection"测试下连接数据库是否成功).这个过程比较长,需要等待一会儿~
如下,登录atlassian,申请licesen(这个之前在安装confluence文章里已经提到过了),申请过程这里省略......
接着进行破解操作
[root@jira6-onde src]# \cp -f atlassian-extras-2.2.2.jar /opt/jira/atlassian-jira-6.3.6-standalone/atlassian-jira/WEB-INF/lib/[root@jira6-onde src]# \cp -rf atlassian-universal-plugin-manager-plugin-2.17.13.jar /opt/jira/atlassian-jira-6.3.6-standalone/atlassian-jira/WEB-INF/atlassian-bundled-plugins/[root@jira6-onde src]# ll /opt/jira/atlassian-jira-6.3.6-standalone/atlassian-jira/WEB-INF/lib/atlassian-extras-2.2.2.jar -rw-r--r-- 1 500 mysql 146477 Sep 2 21:31 /opt/jira/atlassian-jira-6.3.6-standalone/atlassian-jira/WEB-INF/lib/atlassian-extras-2.2.2.jar[root@jira6-onde src]# ll /opt/jira/atlassian-jira-6.3.6-standalone/atlassian-jira/WEB-INF/atlassian-bundled-plugins/atlassian-universal-plugin-manager-plugin-2.17.13.jar -rw-r--r-- 1 500 mysql 5322949 Sep 2 21:31 /opt/jira/atlassian-jira-6.3.6-standalone/atlassian-jira/WEB-INF/atlassian-bundled-plugins/atlassian-universal-plugin-manager-plugin-2.17.13.jar重启jira,使之生效![root@jira6-onde src]# lsof -i:8080COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEjava 21885 root 54u IPv6 476775 0t0 TCP *:webcache (LISTEN)[root@jira6-onde src]# kill -9 21885[root@jira6-onde src]# /opt/jira/atlassian-jira-6.3.6-standalone/bin/startup.sh [root@jira6-onde src]# lsof -i:8080 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEjava 22247 root 54u IPv6 478313 0t0 TCP *:webcache (LISTEN)
Jira汉化
JIRA安装部署完成之后,重新启动系统之后,管理员登录,找到插件"Add-ons"->"Manage add-ons"->"Upload",选择JIRA-6.3.3-language-pack-zh_CN.jar,观察日志是否有报错,如果报错,重启JIRA之后,重新上传汉化文件汉化插件安装成功之后,找到JIRA系统配置,选择中文配置!如果汉化包上传成功后,则到/opt/jirahome/plugins/installed-plugins目录下可以看到安装的汉化包
汉化成功后,则到/opt/jirahome/plugins/installed-plugins目录下可以看到安装的汉化包.[root@jira6-onde src]# cd /opt/jirahome/plugins/installed-plugins[root@jira6-onde installed-plugins]# lltotal 292-rw-r--r-- 1 root root 298526 Sep 2 21:37 plugin_8426103832592886830_JIRA-6.3.3-language-pack-zh_CN.jar重启jira服务[root@jira6-onde ~]# lsof -i:8080COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEjava 22247 root 54u IPv6 478313 0t0 TCP *:webcache (LISTEN)java 22247 root 703u IPv6 478446 0t0 TCP ceph-node2:webcache->192.168.10.39:32958 (ESTABLISHED)java 22247 root 708u IPv6 478444 0t0 TCP ceph-node2:webcache->192.168.10.39:32954 (ESTABLISHED)java 22247 root 710u IPv6 478445 0t0 TCP ceph-node2:webcache->192.168.10.39:32956 (ESTABLISHED)[root@jira6-onde ~]# kill -9 22247[root@jira6-onde ~]# lsof -i:8080 [root@jira6-onde ~]# /opt/jira/atlassian-jira-6.3.6-standalone/bin/startup.sh [root@jira6-onde ~]# lsof -i:8080COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAMEjava 22487 root 54u IPv6 478484 0t0 TCP *:webcache (LISTEN)然后登录jira,点击右上角的"System"->"Edit Setting",将language全部改为中文即可!
汉化若是不成功,排查如下:
记住是两个文件,一定要覆盖:atlassian-universal-plugin-manager-plugin-2.17.13.jar路径:/opt/jira/atlassian-jira-6.3.6-standalone/atlassian-jira/WEB-INF/atlassian-bundled-plugins/atlassian-universal-plugin-manager-plugin-2.17.13.jar atlassian-extras-2.2.2.jar路径:/opt/jira/atlassian-jira-6.3.6-standalone/atlassian-jira/WEB-INF/lib/atlassian-extras-2.2.2.jar重启jira
Jira破解授权
如上,已经提前将下载下来的atlassian-extras-2.2.2.jar拷贝到/opt/jira/atlassian-jira-6.3.6-standalone/atlassian-jira/WEB-INF/lib/目录下了),接着点击右上角的"系统"->"授权",在授权框里输入(特别注意在上面安装过程中申请的ServerID和LicenseID要记住,这里会用到)如下信息,然后点击"增加"Description=JIRA: Commercial,CreationDate=你的安装日期,格式(yyyy-mm-dd),jira.LicenseEdition=ENTERPRISE,Evaluation=false,jira.LicenseTypeName=COMMERCIAL,jira.active=true,licenseVersion=2,MaintenanceExpiryDate=你想设置的失效日期如:2099-12-31,Organisation=joiandjoin,SEN=你申请到的SEN注意没有前缀LID,(这个在Atlassian里申请的Licenses记录里可以查看到)ServerID=你申请到的ServerID,jira.NumberOfUsers=-1,LicenseID=LID你申请到的SEN,注意LID前缀不要丢掉,LicenseExpiryDate=你想设置的失效日期如:2099-12-31,PurchaseDate=你的安装日期,格式(yyyy-mm-dd)
本次安装授权码实例为:
Description=JIRA: Commercial,CreationDate=2018-09-02,jira.LicenseEdition=ENTERPRISE,Evaluation=false,jira.LicenseTypeName=COMMERCIAL,jira.active=true,licenseVersion=2,MaintenanceExpiryDate=2099-12-31,Organisation=kevingrace,SEN=SEN-L12257170,ServerID=BM60-ZTT5-OI6Y-W1O5,jira.NumberOfUsers=-1,LicenseID=AAABlA0ODAoPeNp9kk9Pg0AQxe98ik286AECxLbahESFPWBaaAA1Gi9bOqWrdCGzC9VvL/9M1dYed3fevN+82bO4EiSGkpg2Ma+m9nh6OSKulxDbtK60DAHEpihLQGPGUxAS6IorXgiHBgmNFpEfUy2otkvAcP0gAaWjW5pbCMVSFbAtODsmMrnhyyIvahD8JtsynhtpsdXeODLjQLuoMN0wCR5T4LQQunmtm7Y22CefJXR93XA+p5Hr386+n+hHyfFzr7PMVjew0HljewImBqwBfc+5m49N/SVJRnroj5/1Jysc9aQlFqsqVUZ70GWxVjuGYDSteQ2OwgpOlTVUzAWhAPvSuFrKFHnZRbkX/5/xkU0ci6KZsjERTKT/xHGC8WAVg08Tysz3YhroM8u2RxNrYvZtDoaigXOk7LhbrBi2yjXLJWghZkxwybqx36HmIkOWguYidHd/f0Peoz02pK3C/pVPh1Qil8NePNhnfe9HtyQeIMh5OwLpZ7h4nRJas7zqDHv0g+2eiP4nwU/dvmd//gIrZzIEMC0CFQCGovzbyMehzEEPfqRQEeG7UhoINwIUTVukRjIpNshAf4YMNQUI+jNYDRg=X02jj,LicenseExpiryDate=2099-12-31,PurchaseDate=2018-09-02
上面授权信息增加后,就可以看到授权信息更新了,这样就表示破解成功,会看到如下成功信息, 如下图,则破解后的Jira可以使用到2099年12月30号!!!
注意:
1) jira服务启动日志是/opt/jira/atlassian-jira-6.3.6-standalone/logs/catalina.out2) jira服务操作日志是/opt/jirahome/log/atlassian-jira.log===============Jira6 Agile插件破解================
1) 首先登录Jira后,点击页面上方的Agile选项,进行安装,这个安装只是试用Jira Agile,安装后,接着就可以进行Agile插件的破解操作了!2) 如上已经将将jira agile破解包atlassian-universal-plugin-manager-plugin-2.17.13.jar拷贝替换在JIRA的安装目录/opt/jira/atlassian-jira-6.3.6-standalone/atlassian-jira/WEB-INF/atlassian-bundled-plugins/中了,然后重启jira服务. 接着登录jira,点击右上角的"插件"->"插件管理" -》 找到jira agile ->更新授权码,破解内容如下:Description=JIRA Agile (formerly GreenHopper) for JIRA\: Commercial, NumberOfUsers=-1, CreationDate=2018-09-02, Evaluation=false, greenhopper.LicenseEdition=ENTERPRISE, licenseVersion=2, MaintenanceExpiryDate=2099-01-01, Organisation=saper, greenhopper.active=true, SEN=SEN-L4390388, ServerID=BQJE-RNSR-9NMG-JDWN, LicenseExpiryDate=2099-01-01, LicenseTypeName=COMMERCIAL, PurchaseDate=2018-09-02
破解成功后,查看页面显示的授权信息,可以看到设置的到期时间了.