Wednesday, March 24, 2021

Installing Artifactory on Centos 7

Host OS: Centos 7.3.1611 (Core)

Artifactory Pro Version: 4.15.0


  1. Setup artifactory

        a. download jfrog-artifactory-pro-4.15.0.zip from: https://bintray.com/jfrog/artifactory-pro/download_file?file_path=org%2Fartifactory%2Fpro%2Fjfrog-artifactory-pro%2F4.15.0%2Fjfrog-artifactory-pro-4.15.0.zip

        b. unzip file to your preferred installation directory

unzip jfrog-artifactory-pro-4.15.0.zip -d /opt
        c. setup ARTIFACTORY_HOME
echo ‘export ARTIFACTORY_HOME=/opt/artifactory-pro-4.15.0’ >> ~/.bash_profile
source ~/.bash_profile


  1. Setup Java

        a. download jdk-8u131-linux-x64.rpm from:

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

        b. install

rpm -ivh jdk-8u131-linux-x64.rpm
        c. setup JAVA_HOME as root:
echo ‘export JAVA_HOME=/usr/java/jdk1.8.0_131’ >> ~/.bash_profile
source ~/.bash_profile


  1. Setup MySQL

        a. install package as root

wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum install mysql-community-server
        b. setup service
systemctl start mysqld
systemctl enable mysqld
mysql_secure_installation
        c. create artifactory database
mysql -uroot -p
mysql> CREATE DATABASE artdb CHARACTER SET utf8 COLLATE utf8_bin;
mysql> GRANT ALL on artdb.* TO ‘artifactory’@‘localhost’ IDENTIFIED BY ‘yourpassword’;
mysql> FLUSH PRIVILEGES;
        d. make artifactory use the database
cp $ARTIFACTORY_HOME/misc/db/mysql.properties $ARTIFACTORY_HOME/etc/db.properties
        e. download mysql-connector from: https://dev.mysql.com/downloads/file/?id=470332 f. extract and copy mysql-connector to $ARTIFACTORY_HOMEtomcatlib/
tar xvf mysql-connector-java-5.1.42.tar.gz
cp mysql-connector-java-5.1.42/mysql-connector-java-5.1.42-bin.jar $ARTIFACTORY_HOME/tomcat/lib/


  1. Open firewall port and start artifactory
firewall-cmd —add-port=8081/tcp —permanent
firewall-cmd —reload
$ARTIFACTORY_HOME/bin/artifactoryctl start


  1. Validate installation by accessing the following URL

http::8081

username: admin

default password: password # be sure to change this once you logged in


Source

https://www.jfrog.com/confluence/display/RTF/MySQL

No comments:

Post a Comment