Artifactory安装配置
官方网站:
https://www.jfrog.com/open-source/
https://www.jfrog.com/confluence/
环境:
CentOS7.2
docker-1.12.0
artifactory-4.14.0
postgresql-9.2.13
一.docker容器运行
https://www.jfrog.com/confluence/display/RTF/Running+Artifactory+OSS
docker pull docker.bintray.io/jfrog/artifactory-oss
mkdir -p /opt/jfrog/artifactory/{data,logs,etc}
docker run -tid --restart=always \
-p 8081:8081 \
-v /opt/jfrog/artifactory/data:/var/opt/jfrog/artifactory/data \
-v /opt/jfrog/artifactory/logs:/var/opt/jfrog/artifactory/logs \
-v /opt/jfrog/artifactory/etc:/var/opt/jfrog/artifactory/etc \
--name=artifactory \
docker.bintray.io/jfrog/artifactory-oss
最新版的artifactory采用的是tomcat容器
初始用户:
admin/password
二.rpm包安装
一.安装artifactory
https://www.jfrog.com/confluence/display/RTF/Installing+on+Linux+Solaris+or+Mac+OS
rpm -ivh /mnt/tmp/jfrog-artifactory-oss-4.14.0.rpm
env配置文件
/etc/opt/jfrog/artifactory/default
启停服务
/etc/init.d/artifactory start|stop
/opt/jfrog/artifactory/tomcat/bin/catalina.sh start|stop
/opt/jfrog/artifactory/bin/artifactoryctl check|start|stop
注意:
/etc/init.d/artifactory判断tomcat存活状态有bug,比如,同台主机上有端口包含8015时就会判断出错,fdsv
grep 需要加个-w的参数
二.配置postgresql
https://www.jfrog.com/confluence/display/RTF/PostgreSQL
1.安装postgresql
yum -y install postgresql-server
postgresql-setup initdb
systemctl start postgresql.service
2.创建用户和库
su - postgres
CREATE USER artifactory WITH PASSWORD
'password'
;
CREATE DATABASE artifactory WITH OWNER=artifactory ENCODING=
'UTF8'
;
GRANT ALL PRIVILEGES ON DATABASE artifactory TO artifactory;
3.配置artifactory postgresql数据库连接
4.下载对应的JDBC驱动
https://jdbc.postgresql.org/download.html#current
curl https://jdbc.postgresql.org/download/postgresql-9.2-1004.jdbc41.jar -o /opt/jfrog/artifactory/tomcat/lib/postgresql-9.2-1004.jdbc41.jar
chown -R artifactory: /opt/jfrog/artifactory/tomcat/lib/postgresql-9.2-1004.jdbc41.jar
5.重启 artifactory
/etc/init.d/artifactory restart
6.postgresql客户端工具
pgAdmin 4
https://www.postgresql.org/ftp/pgadmin3/
phpPgAdmin
请参看 phpPgAdmin-5.1安装配置
主日志
tail -f /var/opt/jfrog/artifactory/logs/artifactory.log