CentOS7部署bamboo9.4.2-postgresql版
前置环境:
JDK11安装
PostgreSQL 14安装
1.资源下载
https://www.atlassian.com/zh/software/bitbucket/download/data-center
2.上传服务器
scp -r D:\xxx\atlassain\xxx\atlassian-bamboo-9.4.2.tar.gz root@xxx.xxx.xxx.xxx:/usr/local/xx
3.解压
cd /usr/local/xxx
tar -xzvf atlassian-bamboo-9.4.2.tar.gz -C /opt/atlassian
# 然后重命名
mv atlassian-bamboo-9.4.2 bamboo
4.设置 bamboo.home
cd /opt/atlassian/bamboo/atlassian-bamboo/WEB-INF/classes
vim bamboo-init.properties
# 添加下面的语句
bamboo.home=/opt/atlassian/bamboo
5.启动Bamboo
cd /opt/atlassian/bamboo/bin
./start-bamboo.sh
[root@localhost bin]# ./start-bamboo.sh
To run Bamboo in the foreground, start the server with start-bamboo.sh -fg
Server startup logs are located in /opt/atlassian/bamboo/logs/catalina.out
Bamboo Data Center
Version : 9.4.2
If you encounter issues starting or stopping Bamboo Server, please see the Troubleshooting guide at https://confluence.atlassian.com/display/BAMBOO/Installing+and+upgrading+Bamboo
Using CATALINA_BASE: /opt/atlassian/bamboo
Using CATALINA_HOME: /opt/atlassian/bamboo
Using CATALINA_TMPDIR: /opt/atlassian/bamboo/temp
Using JRE_HOME: /opt/java/jdk-11.0.20
Using CLASSPATH: /opt/atlassian/bamboo/bin/bootstrap.jar:/opt/atlassian/bamboo/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Tomcat started.
[root@localhost bin]#
6.访问Bamboo
如果服务器本地可以连接,但是通过远程ip访问不行,则需要检查一下防火墙是否放行8085
端口,也可以暂时先关闭防火墙后重试。
firewall-cmd --zone=public --add-port=8085/tcp --permanent
firewall-cmd --reload #修改后需要重新加载防火墙生效
# 显示success表示成功
# –zone=public表示作用域为公共的
# –add-port=8085/tcp添加tcp协议的端口端口号为8085
# –permanent永久生效,如果没有此参数,则只能维持当前 服 务生命周期内,重新启动后失效;
7.Bamboo安装页面配置
7.1授权
7.1.1授权包
7.1.1.1资源地址
https://github.com/haxqer/confluence/releases/download/v1.3.3/atlassian-agent.jar
7.1.1.2上传到服务器
scp -r D:\Colde\atlassain\github的破解包\atlassian-agent.jar root@xxx.xxx.xxx.xxx:/opt/atlassian
7.1.2停止bamboo服务
cd /opt/atlassian/bamboo/bin # 打开安装的bin文件夹
./stop-bamboo.sh
7.1.3修改setenv.sh
配置文件
cd /opt/atlassian/bamboo/bin # 打开安装的bin文件夹
vim setenv.sh
直接在JAVA_OPTS变量最后面追加-javaagent:/opt/atlassian/atlassian-agent.jar${JAVA_OPTS}
JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} ${JAVA_OPTS} ${JVM_REQUIRED_ARGS} ${JVM_SUPPORT_RECOMMENDED_ARGS} ${JVM_EC_RECOMMENDED_ARGS} --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED ${BAMBOO_HOME_MINUSD} -javaagent:/opt/atlassian/atlassian-agent.jar${JAVA_OPTS}"
7.1.4启动bamboo服务
cd /opt/atlassian/bamboo/bin # 打开安装的bin文件夹
./sart-bamboo.sh
7.1.5验证授权包是否注入成功
ps aux | grep javaagent # 出现-javaagent
[root@localhost soft_resource]# ps aux | grep javaagent
jira 95074 7.5 14.5 5647864 560856 ? Sl 10:02 3:24 /opt/atlassian/jira/jre//bin/java -Djava.util.logging.config.file=/opt/atlassian/jira/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.nio.file=ALL-UNNAMED --add-opens=java.base/javax.crypto=ALL-UNNAMED --add-opens=java.management/javax.management=ALL-UNNAMED --add-opens=java.desktop/sun.font=ALL-UNNAMED --add-opens=java.base/sun.reflect.generics.parser=ALL-UNNAMED --add-opens=java.base/java.time=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED --add-exports=java.base/sun.util.calendar=ALL-UNNAMED --add-exports=java.base/sun.security.action=ALL-UNNAMED --add-exports=java.xml/jdk.xml.internal=ALL-UNNAMED? -Xms384m -Xmx2048m -XX:InitialCodeCacheSize=32m -XX:ReservedCodeCacheSize=512m -Dlog4j2.contextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector -Dlog4j2.disableJmx=true -Dlog4j2.garbagefree.threadContextMap=true -Dlog4j2.isWebapp=false -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Dorg.dom4j.factory=com.atlassian.core.xml.InterningDocumentFactory -XX:-OmitStackTraceInFastThrow -Djava.locale.providers=COMPAT -Datlassian.plugins.startup.options= -javaagent:/opt/atlassian/atlassian-agent.jar -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Xlog:gc*:file=/opt/atlassian/jira/logs/atlassian-jira-gc-%t.log:tags,time,uptime,level:filecount=5,filesize=20M -XX:+ExplicitGCInvokesConcurrent -Dignore.endorsed.dirs= -classpath /opt/atlassian/jira/bin/bootstrap.jar:/opt/atlassian/jira/bin/tomcat-juli.jar -Dcatalina.base=/opt/atlassian/jira -Dcatalina.home=/opt/atlassian/jira -Djava.io.tmpdir=/opt/atlassian/jira/temp org.apache.catalina.startup.Bootstrap start
atlbitb+ 98060 129 19.4 3783240 751088 ? Sl 10:47 0:31 /opt/atlassian/bitbucket/7.21.20/jre/bin/java -javaagent:/opt/atlassian/atlassian-agent.jar -classpath /opt/atlassian/bitbucket/7.21.20/app -Datlassian.standalone=BITBUCKET -Dbitbucket.home=/var/atlassian/application-data/bitbucket -Dbitbucket.install=/opt/atlassian/bitbucket/7.21.20 -Dcom.sun.jndi.ldap.connect.pool.timeout=300000 -Xms512m -Xmx1g -XX:+UseG1GC -Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8 -Djava.io.tmpdir=/var/atlassian/application-data/bitbucket/tmp -Djava.library.path=/opt/atlassian/bitbucket/7.21.20/lib/native;/var/atlassian/application-data/bitbucket/lib/native com.atlassian.bitbucket.internal.launcher.BitbucketServerLauncher start
root 98210 0.0 0.0 112828 988 pts/1 S+ 10:48 0:00 grep --color=auto javaagent
java -jar /opt/atlassian/atlassian-agent.jar # 出现参数提示
[root@localhost /]# java -jar /opt/atlassian/atlassian-agent.jar
====================================================
======= Atlassian Crack Agent v1.3.1 =======
======= https://zhile.io =======
======= QQ Group: 30347511 =======
====================================================
KeyGen usage: java -jar /opt/atlassian/atlassian-agent.jar [-d] [-h] -m <arg> [-n
<arg>] -o <arg> -p <arg> -s <arg>
-d,--datacenter Data center license[default: false]
-h,--help Print help message
-m,--mail <arg> License email
-n,--name <arg> License name[default: <license email>]
-o,--organisation <arg> License organisation
-p,--product <arg> License product, support:
[crowd: Crowd]
[jsm: JIRA Service Management]
[questions: Questions plugin for Confluence]
[crucible: Crucible]
[capture: Capture plugin for JIRA]
[conf: Confluence]
[training: Training plugin for JIRA]
[*: Third party plugin key, looks like:
com.foo.bar]
[bitbucket: Bitbucket]
[tc: Team Calendars plugin for Confluence]
[bamboo: Bamboo]
[fisheye: FishEye]
[portfolio: Portfolio plugin for JIRA]
[jc: JIRA Core]
[jsd: JIRA Service Desk]
[jira: JIRA Software(common jira)]
-s,--serverid <arg> License server ID
================================================================================
# Crack agent usage: append -javaagent arg to system environment: JAVA_OPTS.
# Example(execute this command or append it to setenv.sh/setenv.bat file):
export JAVA_OPTS="-javaagent:/opt/atlassian/atlassian-agent.jar ${JAVA_OPTS}"
# Then start your confluence/jira server.
[root@localhost /]#
7.1.6获取授权码
使用java -jar /opt/atlassian/atlassian-agent.jar
命令可以查看附加参数如何填写;如果安装的Bamboo
是data center
则需要加上 -d true
。
例子:-s
的值,在页面配置Bamboo中获取,为服务器ID
java -jar /opt/atlassian/atlassian-agent.jar -d true -p bamboo -m aaa@bbb.com -n my_name -o https://zhile.io -s XXXX-CCCC-QQQQ-DDDD
7.2连接Jira应用程序到PostgreSQL
参考文档:https://confluence.atlassian.com/bamboo/connect-bamboo-to-a-postgresql-database-289276816.html
7.2.1创建一个Bamboo数据库
sudo -s -H -u postgres
# Create the Bamboo user:
/opt/PostgreSQL/8.3/bin/createuser -S -d -r -P -E bamboouser
# eg: /usr/pgsql-14/bin/createuser -S -d -r -P -E bamboo
# Create the bamboo database:
/opt/PostgreSQL/8.3/bin/createdb -O bamboouser bamboo
# eg: /usr/pgsql-14/bin/createdb -O bamboo bamboodb
exit
# 建议创建一个完全空的Bamboo数据库。避免使用模板创建数据库,因为有些模板可能会插入默认表,从而在设置Bamboo时导致冲突。
[root@localhost opt]# sudo -s -H -u postgres
bash-4.2$ /usr/pgsql-14/bin/createuser -S -d -r -P -E bamboo
为新角色输入的口令: #此处为设置角色密码
再输入一遍:
bash-4.2$ /usr/pgsql-14/bin/createdb -O bamboo bamboodb
bash-4.2$ exit
exit
[root@localhost opt]#
7.2.2数据库连接
创建管理员账号,然后点击下一步。
8.安装远程代理【可选】
8.1安装远程代理
要安装远程代理,请遵循以下说明:
- 确保至少在Agent机器上安装了Java Runtime Environment版本11或17。了解有关受支持的Java版本的更多信息。
- 将远程代理JAR文件下载到代理机器上的一个目录中。
- 下载地址:http://192.168.182.131:8085/agentServer/agentInstaller/atlassian-bamboo-agent-installer-9.4.2.jar
8.2运行远程代理
安装完成后,您可以从包含远程代理jar文件的目录中执行以下命令行来运行远程代理:
java -jar atlassian-bamboo-agent-installer-9.4.2.jar http://192.168.182.131:8085/agentServer/
这将为您的代理启动一个服务包装器,它将在出现故障时自动重新启动。您还可以添加额外的系统属性,如- bamboo.home=…自定义代理的主位置。有关更多信息,请参阅我们的Bamboo远程代理安装指南。
8.3运行没有服务包装器的代理
对于希望在没有服务包装器的情况下运行Bamboo代理的客户,可以在Bamboo -agent-9.4.2.jar处获得直接代理jar。有关直接使用JAR的更多信息,请参阅我们的文档。
9.插件安装
9.1插件下载
https://marketplace.atlassian.com/
9.2获取插件授权码
执行命令和上面的一样,只是把 -p 参数值换成应用密钥,例如
java -jar atlassian-agent.jar -p com.xpandit.plugins.xray -m aaa@bbb.com -n my_name -o https://zhile.io -s xxxx-xxxx-xxxx-xxxx
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!