CentOS 8安装JFrog Artifactory社区版解决方案
作者:互联网
CentOS 8安装JFrog Artifactory社区版解决方案
基本概念
JFrog Artifactory: jfrog artifactory是一款二进制存储管理工具,用来管理构建工具(如:maven、gradle)等所依赖的二进制仓库,以方便管理第三方库和发布目标版本库,从而提高软件开发效率。它提供大量的插件以利于和不同工具之间的整合,内部使用权限管理更加安全,并支持高并发等等特性。
解决方案
基础环境
jdk1.8及以上
安装Artifactory
通过zip包方式安装
下载Artifactory
下载地址:https://bintray.com/jfrog/artifactory/jfrog-artifactory-oss-zip
使用wget命令进行下载,当然也可以使用其他命令,比如curl命令。
wget "https://bintray.com/jfrog/artifactory/download_file?file_path=jfrog-artifactory-oss-6.23.7.zip"
安装Artifactory
使用如下命令安装Artifactory:
unzip -q jfrog-artifactory-oss-6.23.7.zip -d /usr/local/
ln -s /usr/local/artifactory-oss-6.23.7/ /usr/local/jfrog
ls -al /usr/local/jfrog/
JFrog Artifactory的主要目录在此我们做简单的介绍,如下:
/usr/local/jfrog/bin 相关脚本文件
/usr/local/jfrog/logs/catalina 日志
/usr/local/jfrog/etc 配置文件
/usr/local/jfrog/backup 备份数据
/usr/local/jfrog/data/derby 数据库存储
其中:
/usr/local/jfrog/bin/artifactoryctl 控制Artifactory启动、关闭的脚本
/usr/local/jfrog/bin/artifactoryctl start 开启Artifactory服务
/usr/local/jfrog/bin/artifactoryctl stop 关闭Artifactory服务
/usr/local/jfrog/bin/installService.sh 把Artifactory加入到系统服务,并开机启动
/usr/local/jfrog/bin/uninstallService.sh 把Artifactory服务从系统服务中删除
配置环境变量
# 编辑
sudo vim /etc/profile
# 添加
export ARTIFACTORY_HOME=/usr/local/jfrog
# 生效
sudo source /etc/profile
启动Artifactory
直接启动
/usr/local/jfrog/bin/artifactoryctl start
ps -ef | grep jfrog
netstat -tunlp |grep 8081
关闭Artifactory
/usr/local/jfrog/bin/artifactoryctl stop
服务启动
创建 service
sudo $ARTIFACTORY_HOME/bin/installService.sh
通过 systemctl 启动服务
sudo systemctl start artifactory
关闭Artifactory
sudo systemctl stop artifactory
自定义网络端口
artifactory默认使用8081端口
修改方法:
vim /root/software/jfrog/tomcat/conf/server.xml
<Server port="8015" shutdown="SHUTDOWN">
<Service name="Catalina">
<!--修改下面这个port,改成你想要的-->
<Connector port="25100" sendReasonPhrase="true" relaxedPathChars='[]' relaxedQueryChars='[]' maxThreads="200"/>
<!-- Must be at least the value of artifactory.access.client.max.connections -->
<Connector port="8040" sendReasonPhrase="true" maxThreads="50"/>
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps" startStopThreads="2">
<Valve className="org.apache.catalina.valves.ErrorReportValve" showReport="false" showServerInfo="false"/>
</Host>
</Engine>
</Service>
</Server>
通过yum包方式安装
通过yum方式安装jfrog,比较简单。需要下载jfrog的yum仓库源,然后进行安装即可,如下:
wget -O /etc/yum.repos.d/frog-artifactory.repo https://bintray.com/jfrog/artifactory-rpms/rpm
yum -y install jfrog-artifactory-oss
启动Artifactory
sudo systemctl start artifactory
关闭Artifactory
sudo systemctl stop artifactory
通过rpm包方式安装
rpm下载:https://bintray.com/jfrog/artifactory-rpms/jfrog-artifactory-oss-rpm
wget "https://bintray.com/jfrog/artifactory-rpms/download_file?file_path=jfrog-artifactory-oss-6.23.7.rpm" -O jfrog-artifactory-oss.rpm
yum -y install jfrog-artifactory-oss.rpm
启动Artifactory
sudo systemctl start artifactory
关闭Artifactory
sudo systemctl stop artifactory
访问Artifactory
访问方式为: http://ip:8081.
默认用户名和密码:
参考文章
Maven仓库artifactory使用
CentOS8安装artifactory社区版
Artifactory安装教程(一)
烂泥:jfrog artifactory的安装与使用
标签:JFrog,CentOS,jfrog,安装,Artifactory,usr,local,artifactory 来源: https://blog.csdn.net/weixin_43272781/article/details/118442613