前置环境:
JDK11安装
PostgreSQL 14安装
https://www.atlassian.com/zh/software/bitbucket/download/data-center
scp -r D:\xxx\atlassain\xxx\atlassian-bamboo-9.4.2.tar.gz root@xxx.xxx.xxx.xxx:/usr/local/xx
cd /usr/local/xxx
tar -xzvf atlassian-bamboo-9.4.2.tar.gz -C /opt/atlassian
# 然后重命名
mv atlassian-bamboo-9.4.2 bamboo
cd /opt/atlassian/bamboo/atlassian-bamboo/WEB-INF/classes
vim bamboo-init.properties
# 添加下面的语句
bamboo.home=/opt/atlassian/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]#
如果服务器本地可以连接,但是通过远程ip访问不行,则需要检查一下防火墙是否放行8085
端口,也可以暂时先关闭防火墙后重试。
firewall-cmd --zone=public --add-port=8085/tcp --permanent
firewall-cmd --reload #修改后需要重新加载防火墙生效
# 显示success表示成功
# –zone=public表示作用域为公共的
# –add-port=8085/tcp添加tcp协议的端口端口号为8085
# –permanent永久生效,如果没有此参数,则只能维持当前 服 务生命周期内,重新启动后失效;
https://github.com/haxqer/confluence/releases/download/v1.3.3/atlassian-agent.jar
scp -r D:\Colde\atlassain\github的破解包\atlassian-agent.jar root@xxx.xxx.xxx.xxx:/opt/atlassian
cd /opt/atlassian/bamboo/bin # 打开安装的bin文件夹
./stop-bamboo.sh
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}"
cd /opt/atlassian/bamboo/bin # 打开安装的bin文件夹
./sart-bamboo.sh
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 /]#
使用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
参考文档:https://confluence.atlassian.com/bamboo/connect-bamboo-to-a-postgresql-database-289276816.html
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]#
创建管理员账号,然后点击下一步。
要安装远程代理,请遵循以下说明:
安装完成后,您可以从包含远程代理jar文件的目录中执行以下命令行来运行远程代理:
java -jar atlassian-bamboo-agent-installer-9.4.2.jar http://192.168.182.131:8085/agentServer/
这将为您的代理启动一个服务包装器,它将在出现故障时自动重新启动。您还可以添加额外的系统属性,如- bamboo.home=…自定义代理的主位置。有关更多信息,请参阅我们的Bamboo远程代理安装指南。
对于希望在没有服务包装器的情况下运行Bamboo代理的客户,可以在Bamboo -agent-9.4.2.jar处获得直接代理jar。有关直接使用JAR的更多信息,请参阅我们的文档。
https://marketplace.atlassian.com/
执行命令和上面的一样,只是把 -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