QT-DevOps / DevOpsIssues

This Repo will be used to demonstrate the Skills & Questions in DevOps
Apache License 2.0
27 stars 131 forks source link

How do I install Artifactory in Ubuntu 16? #169

Closed rameshm78 closed 6 years ago

rameshm78 commented 6 years ago

Hi, I went through the link given in artifactory configuration pdf. It says "simply unzip the Artifactory download file to a location on your file system". There is no command given nor is there any link given.

In a t2.small machine, which has my Jenkins, I made a folder called artifactory in jenkins home directory and tried: wget https://api.bintray.com/content/jfrog/artifactory/jfrog-artifactory-oss-$latest.zip;bt_package=jfrog-artifactory-oss-zip

But it failed as follows: --2018-09-17 12:58:45-- https://api.bintray.com/content/jfrog/artifactory/jfrog-artifactory-oss-.zip Resolving api.bintray.com (api.bintray.com)... 75.126.208.206 Connecting to api.bintray.com (api.bintray.com)|75.126.208.206|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2018-09-17 12:58:45 ERROR 404: Not Found.

This same link was used to download the zip file in windows successfully. Q1. Please tell me what mistake I committed.

The documentation further says - "This will be your $ARTIFACTORY_HOME location". Q2. What does this mean? Should I download the zip file into a folder whose name is $ARTIFACTORY_HOME? Q3. Is it ok to do it in /var/lib/jenkins folder or should this be done in any other folder? Q4. Also how do I unzip a .zip file in Ubuntu? Should I download some software an set some Environment Values? If yes, how do I do that? Q5. Do I also need to install MySQL 5.6 as database for Artifactory? I found that on a tutorial.

Please help out, I'm unable to proceed with Artifactory. Is there any tutorial where the commands are given? The jfrog link has told what is the end result, without mentioning any commands.

arunkumar127 commented 6 years ago

Hi @rameshm78 I too got confused to install JFrog Artifactory using document provided in QT Blog. Later I found Debian way of Installing Artifactory from below link. https://www.jfrog.com/confluence/display/RTF/Installing+on+Linux+Solaris+or+Mac+OS#InstallingonLinuxSolarisorMacOS-RPMorDebianInstallation 1

I would recommend installing Artifactory OSS from above link (works same as Khaja sir used in class).

As you are using Ubuntu 16 (Xenial), here are the steps you need to follow to install Artifactory $ echo "deb https://jfrog.bintray.com/artifactory-debs xenial main" | sudo tee -a /etc/apt/sources.list $ curl https://bintray.com/user/downloadSubjectPublicKey?username=jfrog | sudo apt-key add - $ sudo apt-get update $ sudo apt-get install jfrog-artifactory-oss

After installation you can check status/ restart/ stop service using below command $ sudo service artifactory status | restart | stop

If service is running, then access it using port no 8081. http://IPAddr:8081

Try this method and let me know whether it is working or not.

Thanks & Regards Arun Kumar D

revathi-muthana123 commented 6 years ago

Hi, $ First install java on ubuntu $ open port 8081 in security group $ download jfrog artifactry from " https://jfrog.com/open-source/" $ go to "Download Zip" , copy url address $ in linux (ubuntu) download zip file by using "sudo wget Url address" $ after downloading, rename the dowloaded file as : mv ' id of downloaded file' 'jfrog artifactory.zip' $ after that make sure u have installed "unzip" in your machine, if not install by using "sudo apt-get install unzip" command $ Then u will get "artifactory-oss-6.3.3" $ open artifactory folder :cd artifactory-oss-6.3.3 $ ls $ cd bin $ u will have "artifactory.sh' file $ execute command "sh artifactory.sh"

Then access : http://public ip:8081

rameshm78 commented 6 years ago

@arunkumar127 Upon executing: curl https://bintray.com/user/downloadSubjectPublicKey?username=jfrog | sudo apt-key add - I got the following error: The repository 'https://jfrog.bintray.com/artifactory-debs {distribution} Release' does not have a Release file.

rameshm78 commented 6 years ago

@revathi-muthana123 When I execute command: wget https://api.bintray.com/content/jfrog/artifactory/jfrog-artifactory-oss-$latest.zip;bt_package=jfrog-artifactory-oss-zip

I get the result: --2018-09-25 14:24:19-- https://api.bintray.com/content/jfrog/artifactory/jfrog-artifactory-oss-.zip Resolving api.bintray.com (api.bintray.com)... 108.168.194.93 Connecting to api.bintray.com (api.bintray.com)|108.168.194.93|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2018-09-25 14:24:19 ERROR 404: Not Found.

So I tried curl -O in place of wget and managed to download the zip and rename it to jfrog_artifactory.zip Also installed Unzip When I do unzip jfrog_artifactory.zip I get: Archive: jfrog_artifactory.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of jfrog_artifactory.zip or jfrog_artifactory.zip.zip, and cannot find jfrog_artifactory.zip.ZIP, period.

@shaikkhajaibrahim - Sir please help out. Unable to download artifactory using wget. When I download using curl -O then the file cannot be unzipped.

shaikkhajaibrahim commented 6 years ago

Refer https://www.jfrog.com/confluence/display/RTF/Installing+on+Linux+Solaris+or+Mac+OS#InstallingonLinuxSolarisorMacOS-RPMorDebianInstallation

echo "deb https://jfrog.bintray.com/artifactory-debs {distribution} {components}" | sudo tee -a /etc/apt/sources.list

Note: If you are unsure, components should be "main." To determine your distribution, run lsb_release -c

Example: echo "deb https://jfrog.bintray.com/artifactory-debs xenial main" | sudo tee -a /etc/apt/sources.list

curl https://bintray.com/user/downloadSubjectPublicKey?username=jfrog | sudo apt-key add -

sudo apt-get update sudo apt-get install jfrog-artifactory-oss