JFrog: build your own binary repositories

本文详细描述了从下载JFrogArtifactoryC++CommunityEdition7.55.10Linux包,解压并安装,启动服务,检查状态,登录以及创建和连接Conan仓库的过程。
摘要由CSDN通过智能技术生成

Installation

Download jfrog-artifactory-cpp-ce-7.55.10-linux.tar.gz from web site https://conan.io/downloads, and then decompress the package:

[root@localhost JFrog]# tar -zxvf jfrog-artifactory-cpp-ce-7.55.10-linux.tar.gz

After the decompression, the installation of JFrog is also done. The following shows the top-2 layers of the directory architecture:

[root@localhost JFrog]# tree -L 2 artifactory-cpp-ce-7.55.10/
artifactory-cpp-ce-7.55.10/
├── app
│   ├── artifactory
│   ├── artifactory.product.version.properties
│   ├── bin
│   ├── doc
│   ├── event
│   ├── frontend
│   ├── integration
│   ├── metadata
│   ├── misc
│   ├── observability
│   ├── router
│   ├── run
│   └── third-party
├── artifactory.backup.20230620.130420
│   ├── data
│   ├── etc
│   └── log
└── var
    ├── backup
    ├── bootstrap
    ├── data
    ├── etc
    ├── log
    └── work

Start Server

The service control program artifactoryctl is in diretory artifactory-cpp-ce-7.55.10/app/bin/. Using command ./artifactoryctl start to launch the service:

[root@localhost JFrog]# cd artifactory-cpp-ce-7.55.10/
[root@localhost artifactory-cpp-ce-7.55.10]# cd app/
[root@localhost app]# cd bin/
[root@localhost bin]# ls
artifactoryCommon.sh  artifactory.sh      migrate.sh                 migrationZipInfo.yaml
artifactoryctl        diagnostics         migrationComposeInfo.yaml  systemYamlHelper.sh
artifactory.default   installerCommon.sh  migrationDockerInfo.yaml   uninstallService.sh
artifactoryManage.sh  installService.sh   migrationRpmInfo.yaml
[root@localhost bin]# ./artifactoryctl start

Once the server is started, one can use command ./artifactoryctl status to check the status of the service:

[root@localhost bin]# ./artifactoryctl status
Using default router's certificate and private key
router is running (PID: 17194)
metadata is running (PID: 17416)
event is running (PID: 17590)
frontend is running (PID: 17771)
observability is running (PID: 17946)
integration is running (PID: 18121)
Artifactory is running, on pid=18263

All the beginnings have the endings waiting for them, and JFrog server is no exception. Command ./artifactoryctl stop is used to shutdown the service:

[root@localhost bin]# ./artifactoryctl stop

Login JFrog Artifactory

Open the website http://hostip:8081 by some browser where the hostip means the JFrog server host ip. Then a welcome webpage is shown, and the initial username is admin and the initial password is password
在这里插入图片描述
在这里插入图片描述

Create a Repository

在这里插入图片描述

在这里插入图片描述

Conan Connect to JFrog Artifactory

conan remote list
list all the repositories(Artifactories) in this client:

E:\workplace\Conan\Repository>conan remote list
conancenter: https://center.conan.io [Verify SSL: True]

conan remote add ${name} http://${JFrogServerIP}:8082/artifactory/api/conan/${repo}
add an Artifactory to Conan remote repositories list:

E:\workplace\Conan\Repository>conan remote add selfHelloWorldRepo http://JFrogServerIP:8082/artifactory/api/conan/HelloWorldRepo
E:\workplace\Conan\Repository>conan remote list
conancenter: https://center.conan.io [Verify SSL: True]
selfHelloWorldRepo: http://JFrogServerIP:8082/artifactory/api/conan/HelloWorldRepo [Verify SSL: True]
`std::ios::binary` 是 C++ 中用于打开文件的打模式之一。 在打开文件时,可以通过指定 `std::ios::binary` 打开模式来确保以二进制模式读取或写入文件。这种模式对于处理二进制文件(例如图像、音频或视频)非常有用,因为它可以确保文件以二进制格式进行读写,而不会对数据进行任何额外的转换或处理。 以下是一些使用 `std::ios::binary` 的示例: ```cpp #include <iostream> #include <fstream> int main() { // 以二进制模式写入数据到文件 std::ofstream outputFile("data.bin", std::ios::binary); if (outputFile) { int data[] = { 1, 2, 3, 4, 5 }; outputFile.write(reinterpret_cast<const char*>(data), sizeof(data)); outputFile.close(); std::cout << "Data written to file." << std::endl; } else { std::cout << "Failed to open file for writing." << std::endl; } // 以二进制模式读取文件中的数据 std::ifstream inputFile("data.bin", std::ios::binary); if (inputFile) { int data[5]; inputFile.read(reinterpret_cast<char*>(data), sizeof(data)); inputFile.close(); std::cout << "Data read from file: "; for (int i = 0; i < 5; i++) { std::cout << data[i] << " "; } std::cout << std::endl; } else { std::cout << "Failed to open file for reading." << std::endl; } return 0; } ``` 在上面的示例中,我们首先以二进制模式将一些整数数据写入到名为 "data.bin" 的文件中,然后再以二进制模式从文件中读取数据并显示在控制台上。 通过指定 `std::ios::binary` 打开模式,我们可以确保数据以二进制形式进行读写,而不会进行任何额外的转换或处理。 希望这能帮助您理解 `std::ios::binary` 在C++中的使用。如有任何疑问,请随时提问。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值