Skip to main content

Install Conan server

First, you can download the JFrog Artifactory Community Edition from here. At this time, I am using Linux for the environment and I simply download the tar.gz file but there are several options like getting the docker container

tar xvf jfrog-artifactory-cpp-ce-7.5.7-linux.tar.gz
cd artifactory-cpp-ce-7.5.7/app/bin
sudo bash installService.sh
sudo systemctl start artifactory.service

The last command will start the server (the service name is artifactory.service). Now you can access the server via a web browser with URL http://localhost:8081. It asks for the username and password to log in for the first time (The username is ‘admin’ and password is ‘password’)9o/

Then, select to create a Conan repository.

Alt text

Export and upload a Conan package​

Now we created a simple hello world Conan package. Next. let’s export the package so that it becomes visible to the consumer. To export, we need to execute

conan export . demo/testing

Up to now, we have not used the Conan server we prepared at the beginning. So, let’s upload the package to the Conan server.

First, we need to add the server to the remote list by running command below,

conan remote add conan-local http://localhost:8081/artifactory/api/conan/conan-local

conan-local is a remote name you can specify. Then you can upload the package by executing,

conan upload hello/0.1@demo/testing — all -r=conan-local

To confirm, If you check the repository, you can see the hello/0.1@demo/testing package uploaded and hosted on the repository.

Alt text