怎樣做原創(chuàng)短視頻網(wǎng)站百度網(wǎng)址大全簡單版
目錄
一、實驗
1.環(huán)境
2.Ubuntu 部署 JFrog 制品庫?
3.Ubuntu 部署?postgresql數(shù)據(jù)庫
4.Ubuntu 部署?Xray
5. 使用JFrog 增刪項目
二、問題
1.Ubuntu 如何通過apt方式部署 JFrog 制品庫
2.Ubuntu 如何通過docker方式部署 JFrog 制品庫
3.安裝jdk報錯
4.安裝JFrog Artifactory報錯
5.JFrog Artifactory 啟動報錯
6.啟動artifactory鏡像報錯
7.HELM 方式如何安裝JFrog
8.安裝JFrog報錯
9.dpkg如何刪除已有項目
10.JFrog有哪些服務(wù)命令
一、實驗
1.環(huán)境
(1)主機
表1 主機
主機 | 架構(gòu) | 版本 | IP | 備注 |
master1 | K8S master節(jié)點 | 1.23.1 | 192.168.204.102 | 需求部署JFrog Artifactory -?對二進制文件、制品和依賴項進行通用管理 |
node1 | K8S node節(jié)點 | 1.23.1 | ?192.168.204.104 | 需求部署XRAY-?進行開源漏洞掃描,包括策略和監(jiān)視 |
(2) Termius連接主機
(3)查看系統(tǒng)版本
cat /etc/os-release
master1
node1
(4) 查看K8S集群
kubectl get node
kubectl get node -o wide
(5)查看docker版本
docker -v
master1
node1
2.Ubuntu 部署 JFrog 制品庫?
(1)查閱
https://jfrog.com/download-legacy/https://jfrog.com/open-source/
最新版為7.84.12
(2)關(guān)閉防火墻或者開放服務(wù)端口
#關(guān)閉防火墻
sudo ufw disable #查看防火墻狀態(tài)
sudo ufw status#開啟防火墻
sudo ufw enable#開放8081、8082端口
sudo ufw allow 8081/tcp
sudo ufw allow 8082/tcp#重啟防火墻
sudo ufw reload
(3)檢查服務(wù)器配置
nproc #檢查處理器 cores
free -m #檢查內(nèi)存大小
df -h # 確認文件系統(tǒng)掛載,數(shù)據(jù)盤默認掛載/var/opt
ulimit -a # 確認 ulimit 是否滿足要求
date # 確認時間同步
hostname # 確認主機名(artifactory 自動獲取為 node name)
hostname -i # 確認主機名對應(yīng) ip(artifactory 自動獲取為 node ip)
(4)下載
選擇一個穩(wěn)定版的Debian安裝
彈出界面
點擊下載
(5)安裝
dpkg -i jfrog-artifactory-pro-7.41.4
(6)修改Artifactory配置文件
vim /opt/jfrog/artifactory/var/etc/system.yaml
……id: "master1"ip: "192.168.204.102"
……
(7)修改systemd文件
vim /etc/systemd/system/artifactory.service
通過Environment=START_TMO=120定義中添加更長的超時時間
修改PIDFile路徑為指定路徑:/run/artifactory.pid
(8) 重新加載配置文件
systemctl daemon-reload
(9) 生成隨機數(shù)并寫入master.key中
cd /opt/jfrog/artifactory/var/etc/security
touch master.key
openssl rand -hex 16 > master.key #以下部署集群時需要
touch join.key
openssl rand -hex 16 > join.key
? (10)授權(quán):
chown -R artifactory:artifactory /opt/jfrog/artifactory/var/log
(11)啟動服務(wù)和查看日志
1)啟動服務(wù)
systemctl start artifactory.service && systemctl enable artifactory.service2)查看日志,如下圖啟動成功
tail -f /var/opt/jfrog/artifactory/log/console.log3)查看服務(wù)狀態(tài)
systemctl status artifactory.service
啟動
查看日志
查看服務(wù)狀態(tài)
查看端口
lsof -i:8081
(12)訪問
http://ip:8081初始用戶名:admin
初始密碼:password
進入系統(tǒng)
http://192.168.204.102:8082/ui/login/
(13)初始化設(shè)置
輸入賬號密碼
開始設(shè)置
重設(shè)密碼
需要輸入授權(quán)文件
申請授權(quán)
https://www.jfrogchina.com/platform/free-trial/
選擇私有部署(登錄賬號需要企業(yè)郵箱)
設(shè)置訪問地址
http://192.168.204.102:8082
跳過代理設(shè)置
選擇類型
根據(jù)自身需求選擇
完成
(14)查看界面
(15)獲取xray相關(guān)驗證信息
在User Management->setting->輸入password->點擊unlock
解鎖
顯示Artifactory的Join Key和JFrog URL
3.Ubuntu部署?postgresql數(shù)據(jù)庫
(1)創(chuàng)建文件存儲庫配置
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
(2)導入存儲庫簽名密鑰
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
(3)更新軟件包列表
sudo apt-get update
(4)安裝
sudo apt-get -y install postgresql-13
(5)啟動并查看服務(wù)
1)配置開機自啟動
systemctl enable postgresql2)啟動postgresql
systemctl start postgresql3)查看postgresql狀態(tài)
systemctl status postgresql
(6)創(chuàng)建用戶與數(shù)據(jù)庫,授予用戶權(quán)限
1)進入數(shù)據(jù)庫:
sudo -u postgres psql2)創(chuàng)建xray用戶
CREATE USER xray WITH PASSWORD 'password';3)創(chuàng)建xraydb庫
CREATE DATABASE xraydb WITH OWNER=xray ENCODING='UTF8'; 4)授權(quán)庫給用戶
GRANT ALL PRIVILEGES ON DATABASE xraydb TO xray;
(7)修改數(shù)據(jù)庫配置與訪問IP,允許遠程訪問
vim /etc/postgresql/13/main/postgresql.conf
vim /etc/postgresql/13/main/pg_hba.conf
(8)重啟postgresql
sudo systemctl restart postgresql
4.Ubuntu 部署?Xray
(1)node節(jié)點修改配置文件
永久修改同一時間打開文件數(shù)上限
1)修改/etc/security/limits.conf文件
vim /etc/security/limits.conf2)在limits.conf文件中插入如下兩行設(shè)置 (CentOS 開頭設(shè)置為*,Ubuntu需要設(shè)置為用戶)
root soft nofile 100000
root hard nofile 100000
root hard nproc 100000
root hard nproc 100000
//* - nofile 100000 也可以用這一行代替上面的兩行3)處理非圖像登錄
在下面的兩文件中加入:DefaultLimitNOFILE=100000vim /etc/systemd/user.conf
vim /etc/systemd/system.conf 4)重啟
reboot5)確認
輸入 ulimit -n ,查看系統(tǒng)級是否修改成功
輸入 su - root -c 'ulimit -aHS' -s '/bin/bash' 查看用戶級是否修改成功
輸入 cat /proc/[PID]/limits 查看進程級是否修改成功
重啟
確認
(2)查閱
https://jfrog.com/download-legacy/?product=xray&installer=rpm
最新版為3.96.1
(3)下載
選擇一個穩(wěn)定版,類型為debian
點擊下載
(4)解壓
tar -xvf jfrog-xray-3.33.3-deb.tar.gz
(5)安裝
cd jfrog-xray-3.33.3-deb
./install.sh
默認安裝路徑
輸入Artifactory的JFrog URL
輸入Artifactory的Join Key
輸入本機IP
單節(jié)點輸入n
連接外部數(shù)據(jù)庫輸入n
依次輸入pg數(shù)據(jù)庫地址、用戶、密碼
安裝成功
完整安裝記錄:
root@node1:~/jfrog-xray-3.33.3-deb# ./install.shBeginning JFrog Xray setupThis script will install Xray and its dependencies.
After installation, logs can be found at /root/jfrog-xray-3.33.3-deb/install.log
[WARN] Running with 3GB Total RAM. Recommended value: 4GB
Running system diagnostics checks, logs can be found at [/root/jfrog-xray-3.33.3-deb/systemDiagnostics.log]Installation Directory (Default: /var/opt/jfrog/xray): The JFrog URL allows Xray to connect to a JFrog Platform Instance.
(You can copy the JFrog URL from Admin > Security > Settings)
JFrog URL: http://192.168.204.102:8082
Attempt to connect JFrogURL succeededThe Join key is the secret key used to establish trust between services in the JFrog Platform.
(You can copy the Join Key from Admin > Security > Settings)
Join Key: For IPv6 address, enclose value within square brackets as follows : [<ipv6_address>]
Please specify the IP address of this machine (Default: 192.168.204.104): 192.168.204.104Are you adding an additional node to an existing product cluster? [y/N]: nThe installer can install a PostgreSQL database, or you can connect to an existing compatible PostgreSQL database
(https://service.jfrog.org/installer/System+Requirements#SystemRequirements-RequirementsMatrix)
If you are upgrading from an existing installation, select N if you have externalized PostgreSQL, select Y if not.
Do you want to install PostgreSQL? [Y/n]: nProvide the database connection details
PostgreSQL url. Example: [postgres://<IP_ADDRESS>:<PORT>/xraydb?sslmode=disable]: postgres://192.168.204.102:5432/xraydb?sslmode=disableDatabase username (If your existing connection URL already includes the username, leave this empty): xrayDatabase password (If your existing connection URL already includes the password, leave this empty): Database connection successfulInstalling/Verifying RabbitMQ dependencies (this may take several minutes)...
Installing missing esl-erlang dependencies requires internet access, proceeding with installation...Xray InstallationInstalling/Verifying Xray (/root/jfrog-xray-3.33.3-deb/xray/xray.deb) (this may take several minutes)...PostgreSQL InstallationInstallation complete. Installation log can be found at [/root/jfrog-xray-3.33.3-deb/install.log]Start Xray with:
> systemctl start xray.serviceCheck Xray status with:
> systemctl status xray.serviceInstallation directory was set to /opt/jfrog/xray
You can find more information in the log directory /opt/jfrog/xray/var/logSystem configuration templates can be found under /opt/jfrog/xray/var/etc
Copy any configuration you want to modify from the template to /opt/jfrog/xray/var/etc/system.yaml
(6)啟動服務(wù)
systemctl start xray.service
systemctl status xray.service
(7)查看日志
tail -f /var/opt/jfrog/xray/log/console.log
(8)JFrog查看服務(wù)
目前只有1個
(9)刷新Arifactory,會彈出一個Getting Started頁面
(10)輸入Xray的license
這里可以選第一個,把之前的授權(quán)復制過來
下一步,這里會卡主
原因如下
也可以自行申請
https://www.jfrogchina.com/xray/
5. 使用JFrog 增刪項目
(1)新建項目
(2)新建
(3)完成
(4)分配到本地
顯示已分配
(5)分配成員
查看已分配成員
(6)項目概覽
?
(7)修改上傳大小
選擇左下角Artifactory
選擇Settings
默認大小為100M
修改
(8) 上傳制品
大小為1.98GB
已上傳
(9) 刪除項目
無法刪除
先刪除資源
確認
刪除成功
繼續(xù)刪除已有倉庫
刪除
刪除成功
此時完整項目可以刪除成功
二、問題
1.Ubuntu 如何通過apt方式部署 JFrog 制品庫
?查看java版本
java -version
(3)安裝java
sudo apt update
sudo apt install -y default-jdk
再次查看版本
java -version
(4)將 MariaDB 數(shù)據(jù)庫服務(wù)器存儲庫添加到系統(tǒng)中
curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s --
(5)安裝 MariaDB 服務(wù)器和客戶端軟件包
sudo apt update
sudo apt install mariadb-server mariadb-client -y
(6)啟動數(shù)據(jù)庫服務(wù)
sudo systemctl enable --now mariadb
(7)添加JFrog Artifactory存儲庫
echo "deb https://releases.jfrog.io/artifactory/artifactory-debs xenial main" | sudo tee -a /etc/apt/sources.list.d/artifactory.list;
查看
(8)導入存儲庫 GGP 秘鑰
curl -fsSL https://releases.jfrog.io/artifactory/api/gpg/key/public|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/artifactory.gpg
(9)更新
sudo apt update
(10)安裝JFrog Artifactory
sudo apt install jfrog-artifactory-oss
完整記錄:
root@master1:~# sudo apt install jfrog-artifactory-oss
正在讀取軟件包列表... 完成
正在分析軟件包的依賴關(guān)系樹
正在讀取狀態(tài)信息... 完成
下列軟件包是自動安裝的并且現(xiàn)在不需要了:gir1.2-goa-1.0
使用'sudo apt autoremove'來卸載它(它們)。
下列【新】軟件包將被安裝:jfrog-artifactory-oss
升級了 0 個軟件包,新安裝了 1 個軟件包,要卸載 0 個軟件包,有 116 個軟件包未被升級。
需要下載 1,117 MB 的歸檔。
解壓縮后會消耗 2,087 MB 的額外空間。
獲取:1 https://releases.jfrog.io/artifactory/artifactory-debs xenial/main amd64 jfrog-artifactory-oss amd64 7.84.12 [1,117 MB]
已下載 1,117 MB,耗時 29分 23秒 (634 kB/s)
正在選中未選擇的軟件包 jfrog-artifactory-oss。
(正在讀取數(shù)據(jù)庫 ... 系統(tǒng)當前共安裝有 158907 個文件和目錄。)
準備解壓 .../jfrog-artifactory-oss_7.84.12_amd64.deb ...
dpkg-query: 沒有找到與 artifactory 相匹配的軟件包
Checking if group artifactory exists...
Group artifactory doesn't exist. Creating ...
Checking if user artifactory exists...
User artifactory doesn't exist. Creating ...
Checking if artifactory data directory exists
Removing tomcat work directory
正在解壓 jfrog-artifactory-oss (7.84.12) ...
正在設(shè)置 jfrog-artifactory-oss (7.84.12) ...
Adding the artifactory service to auto-start... DONE************ SUCCESS ****************
The Installation of Artifactory has completed successfully.Note: We recommend that you use Artifactory with an external PostgreSQL database.For details about how to configure the database, refer tohttps://jfrog.com/help/r/jfrog-installation-setup-documentation/postgresql-for-artifactoryTo run Artifactory with any database other than PostgreSQL (embedded Derby,MySQL, Oracle, Microsoft SQL Server and MariaDB),before running Artifactory,you are required to set the allowNonPostgresql parameter as true.For more information, refer tohttps://jfrog.com/help/r/jfrog-installation-setup-documentation/choose-the-right-databaseStart Artifactory with:
> systemctl start artifactory.serviceCheck Artifactory status with:
> systemctl status artifactory.serviceInstallation directory was set to /opt/jfrog/artifactory
You can find more information in the log directory /opt/jfrog/artifactory/var/log
System configuration templates can be found under /opt/jfrog/artifactory/var/etc
Copy any configuration you want to modify from the template to /opt/jfrog/artifactory/var/etc/system.yamlTriggering migration script, this will migrate if needed ...
正在處理用于 systemd (245.4-4ubuntu3.23) 的觸發(fā)器 ...
(11)啟動服務(wù)(如報錯,請參考問題集)
sudo systemctl start artifactory.service && sudo systemctl enable artifactory.service
(12)檢查服務(wù)狀態(tài)
systemctl status artifactory.service
(13)查看數(shù)據(jù)庫
root@master1:~# cd /opt/jfrog/artifactory/app/misc/dbroot@master1:/opt/jfrog/artifactory/app/misc/db# ls
createdb_mariadb.sql createdb_mssqlBlob.sql createdb_mssqlRecreateBlob.sql createdb_mssql.sql createdb_mysql.sql createdb_postgres.sql
(14)為 JFrog Artifactory 創(chuàng)建 MariaDB 數(shù)據(jù)庫
sudo mariadb -u rootsource /opt/jfrog/artifactory/app/misc/db/createdb_mariadb.sql;
exit
(14)測試
curl 127.0.0.1:8081
?2.Ubuntu 如何通過docker方式部署 JFrog 制品庫
(1) 查看端口
lsof -i:8081
8081已被占用
(2)拉取鏡像
oss社區(qū)社區(qū)版
docker pull docker.bintray.io/jfrog/artifactory-oss
查看鏡像
docker images | grep artifactory-oss
(3)掛載卷
持久化容器數(shù)據(jù)
docker volume create data_artifactory
(4)查看卷詳情
宿主機文件位置
docker volume inspect data_artifactory
(5)創(chuàng)建容器
docker run --name jfrog-artifactory -d -v data_artifactory:/var/opt/jfrog/artifactory -p 8011:8081 -p 8012:8082 docker.bintray.io/jfrog/artifactory-oss
查看進程
docker ps | grep jfrog
(6)測試
curl 127.0.0.1:8011
3.安裝jdk報錯
(1)報錯
等待緩存鎖:無法獲得鎖 /var/lib/dpkg/lock-frontend。鎖正由進程 29960(unattended-upgr)
(2)原因分析
這個錯誤通常是由于其他進程正在使用APT包管理器而導致的。在你的情況下,進程29960(unattended-upgr)正在持有APT的鎖。這是因為系統(tǒng)正在進行軟件更新或升級。在進行這些操作時,APT會鎖定相關(guān)文件以防止多個進程同時修改它們,以確保系統(tǒng)的穩(wěn)定性和一致性。
(3)解決方法
殺掉進程
sudo kill 29960
清除鎖文件:手動清除,手動清除APT的鎖文件
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/cache/apt/archives/lock
成功:
4.安裝JFrog Artifactory報錯
(1)報錯
暫時不能解析域名“jfrog-prod-use1-shared-virginia-main.s3.amazonaws.com”
E: 無法下載 https://releases.jfrog.io/artifactory/artifactory-debs/pool/jfrog-artifactory-oss/jfrog-artifactory-oss-7.84.12.deb 暫時不能解析域名“jfrog-prod-use1-shared-virginia-main.s3.amazonaws.com”
(2)原因分析
未添加hosts,通過設(shè)置host
,強制把訪問節(jié)點重定向。
(3)解決方法
添加hosts:
vim /etc/hosts
219.76.4.4 s3.amazonaws.com
219.76.4.4 github-cloud.s3.amazonaws.com
5.JFrog Artifactory 啟動報錯
(1)報錯
(2)查閱
https://stackoverflow.com/questions/45297704/problems-with-catalina-pid-and-artifactory-pid-while-upgrading-artifactory-to-th
查看日志
查看異常
journalctl -xe
(3)解決方法
vim /etc/systemd/system/artifactory.service
修改前:
修改后:
systemctl daemon-reload
執(zhí)行判斷
root@master1:~# /opt/jfrog/artifactory/app/bin/artifactoryManage.sh start
/usr/bin/netstat
2024-05-31T05:21:04.973Z [shell] [INFO ] [] [artifactoryManage.sh:87 ] [main] - Starting Artifactory tomcat as user artifactory...
2024-05-31T05:21:05.008Z [shell] [INFO ] [] [installerCommon.sh:1617 ] [main] - Checking open files and processes limits
2024-05-31T05:21:05.048Z [shell] [INFO ] [] [installerCommon.sh:1620 ] [main] - Current max open files is 1024
2024-05-31T05:21:05.089Z [shell] [INFO ] [] [installerCommon.sh:1631 ] [main] - Current max open processes is 15362
yaml validation succeeded
2024-05-31T05:21:05.157Z [shell] [INFO ] [] [installerCommon.sh:2991 ] [main] - System.yaml validation succeededDatabase connection check failed Could not determine database type
2024-05-31T05:21:05.399Z [shell] [INFO ] [] [installerCommon.sh:3493 ] [main] - Setting JF_SHARED_NODE_ID to master1
2024-05-31T05:21:05.521Z [shell] [INFO ] [] [installerCommon.sh:3493 ] [main] - Setting JF_SHARED_NODE_IP to 192.168.204.102
2024-05-31T05:21:05.631Z [shell] [INFO ] [] [installerCommon.sh:3493 ] [main] - Setting JF_SHARED_NODE_NAME to master1
2024-05-31T05:21:05.998Z [shell] [INFO ] [] [artifactoryCommon.sh:221 ] [main] - Using Tomcat template to generate : /opt/jfrog/artifactory/app/artifactory/tomcat/conf/server.xml
2024-05-31T05:21:06.195Z [shell] [INFO ] [] [systemYamlHelper.sh:981 ] [main] - Resolved ${artifactory.port||8081} to default value : 8081
2024-05-31T05:21:06.312Z [shell] [INFO ] [] [systemYamlHelper.sh:981 ] [main] - Resolved ${artifactory.tomcat.connector.sendReasonPhrase||false} to default value : false
2024-05-31T05:21:06.430Z [shell] [INFO ] [] [systemYamlHelper.sh:981 ] [main] - Resolved ${artifactory.tomcat.connector.relaxedPathChars||_SQUARE_BRACKETS_} to default value : _SQUARE_BRACKETS_
2024-05-31T05:21:06.552Z [shell] [INFO ] [] [systemYamlHelper.sh:981 ] [main] - Resolved ${artifactory.tomcat.connector.relaxedQueryChars||_SQUARE_BRACKETS_} to default value : _SQUARE_BRACKETS_
2024-05-31T05:21:06.673Z [shell] [INFO ] [] [systemYamlHelper.sh:981 ] [main] - Resolved ${artifactory.tomcat.connector.maxThreads||200} to default value : 200
2024-05-31T05:21:06.876Z [shell] [INFO ] [] [systemYamlHelper.sh:981 ] [main] - Resolved ${artifactory.tomcat.maintenanceConnector.port||8091} to default value : 8091
2024-05-31T05:21:06.998Z [shell] [INFO ] [] [systemYamlHelper.sh:981 ] [main] - Resolved ${artifactory.tomcat.maintenanceConnector.maxThreads||5} to default value : 5
2024-05-31T05:21:07.114Z [shell] [INFO ] [] [systemYamlHelper.sh:981 ] [main] - Resolved ${artifactory.tomcat.maintenanceConnector.acceptCount||5} to default value : 5
2024-05-31T05:21:07.304Z [shell] [INFO ] [] [systemYamlHelper.sh:981 ] [main] - Resolved ${access.http.port||8040} to default value : 8040
2024-05-31T05:21:07.423Z [shell] [INFO ] [] [systemYamlHelper.sh:981 ] [main] - Resolved ${access.tomcat.connector.sendReasonPhrase||false} to default value : false
2024-05-31T05:21:07.544Z [shell] [INFO ] [] [systemYamlHelper.sh:981 ] [main] - Resolved ${access.tomcat.connector.maxThreads||50} to default value : 50
2024-05-31T05:21:07.782Z [shell] [INFO ] [] [systemYamlHelper.sh:621 ] [main] - Resolved JF_PRODUCT_HOME (/opt/jfrog/artifactory) from environment variable
2024-05-31T05:21:08.046Z [shell] [INFO ] [] [systemYamlHelper.sh:981 ] [main] - Resolved ${shared.tomcat.workDir||/opt/jfrog/artifactory/var/work/artifactory/tomcat} to default value : /opt/jfrog/artifactory/var/work/artifactory/tomcat========================
JF Environment variables
========================JF_SHARED_NODE_ID : master1
JF_SHARED_NODE_IP : 192.168.204.102
JF_ARTIFACTORY_PID : /var/run/artifactory.pid
JF_SYSTEM_YAML : /opt/jfrog/artifactory/var/etc/system.yaml
JF_PRODUCT_HOME : /opt/jfrog/artifactory
JF_ROUTER_TOPOLOGY_LOCAL_REQUIREDSERVICETYPES : jfrt,jfac,jfmd,jffe,jfob,jfevt
JF_SHARED_NODE_NAME : master1
2024-05-31T05:21:10.096Z [shell] [ERROR] [] [installerCommon.sh:3379 ] [main] - ##############################################################################
2024-05-31T05:21:10.134Z [shell] [ERROR] [] [installerCommon.sh:3380 ] [main] - Ownership mismatch. You can try executing following instruction and do a restart
2024-05-31T05:21:10.178Z [shell] [ERROR] [] [installerCommon.sh:3381 ] [main] - Command : chown -R artifactory:artifactory /opt/jfrog/artifactory/var/log
2024-05-31T05:21:10.216Z [shell] [ERROR] [] [installerCommon.sh:3382 ] [main] - ##############################################################################
出現(xiàn)關(guān)鍵信息:
授權(quán):
chown -R artifactory:artifactory /opt/jfrog/artifactory/var/log
成功重新啟動:
再次查看日志
cd /opt/jfrog/artifactory/var/log
ls
6.啟動artifactory鏡像報錯
(1)報錯
缺少master.key
(2)原因分析
未聲明變量。
(3)解決方法
export MASTER_KEY=$(openssl rand -hex 32)echo ${MASTER_KEY}
?7.HELM 方式如何安裝JFrog
(1)查閱
https://github.com/helm/helm/releases/tag/v3.15.1
目前最新版為v3.15.1
(2) 部署HELM
1)安裝 helm
//下載二進制 Helm client 安裝包
helm-v3.15.1-linux-amd64.tar.gztar -zxvf helm-v3.15.1-linux-amd64.tar.gz
mv linux-amd64/helm /usr/local/bin/helm
helm version//命令補全
source <(helm completion bash)
(3)添加JFrog HELM倉庫
helm repo add jfrog https://charts.jfrog.io
(4)更新
helm repo update
(5)查看可用的 JFrog Helm 圖表
helm search repo jfrog
(6)下載 Helm 圖表
helm pull jfrog/artifactory-oss
(7) K8S創(chuàng)建命名空間
kubectl create ns devops-artifactory-dev
(8) 創(chuàng)建項目
helm install artifactory-oss \--set artifactory.nginx.enabled=false \--set artifactory.postgresql.enabled=false \--set postgresql.enabled=false \--set artifactory.artifactory.service.type=NodePort \--set artifactory.artifactory.resources.requests.cpu="500m" \--set artifactory.artifactory.resources.limits.cpu="2" \--set artifactory.artifactory.resources.requests.memory="1Gi" \--set artifactory.artifactory.resources.limits.memory="4Gi" \--set artifactory.artifactory.javaOpts.xms="1g" \--set artifactory.artifactory.javaOpts.xmx="3g" \jfrog/artifactory-oss -n devops-artifactory-dev
刪除項目
helm unstall artifactory-oss -n devops-artifactory-dev
8.安裝JFrog報錯
(1)報錯
(2)原因分析
無相關(guān)用戶。
(3)解決方法
創(chuàng)建相關(guān)用戶
useradd artifactory
chown artifactory:artifactory /opt/jfrog/artifactory/var/etc
成功:
9.dpkg如何刪除已有項目
(1)? dpkg 查看已安裝軟件包
dpkg -l
dpkg -l | grep jfrog
systemctl stop artifactory.service
netstat -antlp | grep 8081
(2)刪除已有項目
dpkg -r jfrog-artifactory-pro
10.JFrog有哪些服務(wù)命令
(1)命令
1)停止服務(wù)
systemctl stop artifactory.service 2)檢查服務(wù)狀態(tài)
systemctl status artifactory.service 3)重啟服務(wù)
systemctl restart artifactory.service