sábado, 23 de febrero de 2019

setup Artifactory on Centos 7


Saltar al final de los metadatos

setup Artifactory on Centos 7


wget http://repo.mysql.com//mysql57-community-release-el7-7.noarch.rpm
rpm -ihv mysql57-community-release-el7-7.noarch.rpm
yum install -y mysql-server
#service mysqld start
systemctl start  mysqld.service
tail -n 200 /var/log/mysqld.log | grep pass
# 2016-10-19T10:54:07.860478Z 1 [Note] A temporary password is generated for root@localhost: zTLvkmi5ja+<
mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED BY  "F4ckNySq!";
uninstall plugin validate_password;
ALTER USER 'root'@'localhost' IDENTIFIED BY 'password'
ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;

Download Artifactory
wget https://bintray.com/jfrog/artifactory-rpms/download_file?file_path=jfrog-artifactory-oss-4.13.2.rpm -O jfrog-artifactory-oss-4.13.2.rpm
rpm -ihv jfrog-artifactory-oss-4.13.2.rpm
Download Java
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie"  http://download.oracle.com/otn-pub/java/jdk/8u111-b14/jdk-8u111-linux-x64.tar.gz
tar -xvf jdk-8u111-linux-x64.tar.gz
vi /etc/environment

Configure DB

Automatically

/opt/jfrog/artifactory/bin/configure.mysql.sh
########################################################
# Welcome to the Artifactory MySQL configuration tool! #
########################################################
Please enter the MySQL server admin username [root]:
Please enter the MySQL server admin password:
Please enter the Artifactory database username [artifactory]:
Please enter the Artifactory database password [password]:
Creating the Artifactory MySQL user and database...
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.
Found existing MySQL JDBC connector [mysql-connector-java-5.1.40-bin.jar].
Do you want to change it? [y/N]N
Configuration completed successfully!
You can now start up the Artifactory service to use Artifactory with MySQL.
Press enter to exit...

Start

service artifactory restart

NGINX

/etc/yum.repos.d/nginx.repo
vi /etc/nginx/nginx.conf
/etc/nginx/nginx.conf
worker_processes 2;
http {
..
client_max_body_size 3g;
keepalive_timeout 7200;
..
}
server {
listen 80;
server_name artifactory.example.com;
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://localhost:8081;
}
}


Alternative way of DB configuration

Manually

CREATE DATABASE artdb CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL on artdb.* TO 'artifactory'@'localhost' IDENTIFIED BY 'password';
ALTER USER 'artifactory'@'localhost' PASSWORD EXPIRE NEVER;
FLUSH PRIVILEGES;
vi /opt/jfrog/artifactory/misc/db/mysql.properties
vi /etc/opt/jfrog/artifactory/storage.properties
wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.40.zip
unzip mysql-connector-java-5.1.40.zip
cp mysql-connector-java-5.1.40/mysql-connector-java-5.1.40-bin.jar /opt/jfrog/artifactory/tomcat/lib
/etc/opt/jfrog/artifactory/storage.properties
type=mysql
driver=com.mysql.jdbc.Driver
url=jdbc:mysql://localhost:3306/artdb?characterEncoding=UTF-8&elideSetAutoCommits=true
username=artifactory
password=password

#type=derby
#url=jdbc:derby:{db.home};create=true
#driver=org.apache.derby.jdbc.EmbeddedDriver

Default credentials

user: admin
password: password
Share:

0 comentarios:

Publicar un comentario