华为aarch64架构的泰山服务器EulerOS 2.0 (SP8)系统离线安装saltstack3003.1实践

华为泰山服务器的CPU芯片架构为aarch64,所装系统为EulerOS 2.0 (SP8)aarch64系统,安装saltstack比较困难。本文讲解通过pip安装方式离线安装saltstack3003.1以进行集中化管理和维护。

一、系统环境

1、操作系统版本

[root@localhost ~]# cat /etc/os-release
NAME="EulerOS"
VERSION="2.0 (SP8)"
ID="euleros"
ID_LIKE="rhel fedora centos"
VERSION_ID="2.0"
PRETTY_NAME="EulerOS 2.0 (SP8)"
ANSI_COLOR="0;31"

2、python版本及所能识别支持的包信息 

[root@localhost ~]# python
Python 3.7.0 (default, Mar 16 2020, 00:02:15) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pip
>>> import pip._internal.pep425tags
>>> print(pip._internal.pep425tags.get_supported())
[('cp37', 'cp37m', 'linux_aarch64'), ('cp37', 'abi3', 'linux_aarch64'), ('cp37', 'none', 'linux_aarch64'), ('cp36', 'abi3', 'linux_aarch64'), ('cp35', 'abi3', 'linux_aarch64'), ('cp34', 'abi3', 'linux_aarch64'), ('cp33', 'abi3', 'linux_aarch64'), ('cp32', 'abi3', 'linux_aarch64'), ('py3', 'none', 'linux_aarch64'), ('cp37', 'none', 'any'), ('cp3', 'none', 'any'), ('py37', 'none', 'any'), ('py3', 'none', 'any'), ('py36', 'none', 'any'), ('py35', 'none', 'any'), ('py34', 'none', 'any'), ('py33', 'none', 'any'), ('py32', 'none', 'any'), ('py31', 'none', 'any'), ('py30', 'none', 'any')]
>>> exit()
[root@localhost ~]#

3、服务器CPU架构

[root@localhost ~]# uname -m
aarch64

 4、操作系统内核信息

[root@localhost ~]# rpm -qa |grep kernel
kernel-4.19.36-vhulk1907.1.0.h702.eulerosv2r8.aarch64
kernel-headers-4.19.36-vhulk1907.1.0.h475.eulerosv2r8.aarch64

二、准备相关的软件包

1、软件包内容

[root@localhost tmp]# cd salt-pip/
[root@localhost salt-pip]# ll
total 13752
-rw-r-----. 1 root root  155255 Sep 18 19:20 certifi-2022.12.7-py3-none-any.whl
-rw-r-----. 1 root root   45489 Sep 18 19:20 charset_normalizer-3.0.1-py3-none-any.whl
-rw-r-----. 1 root root    9570 Sep 18 19:20 contextvars-2.4.tar.gz
-rw-r-----. 1 root root   20315 Sep 18 19:20 distro-1.8.0-py3-none-any.whl
-rw-r-----. 1 root root   61538 Sep 18 19:20 idna-3.4-py3-none-any.whl
-rw-r-----. 1 root root  116441 Sep 18 19:20 immutables-0.19-cp37-cp37m-linux_aarch64.whl
-rw-r-----. 1 root root  133357 Sep 18 19:20 Jinja2-3.0.0-py3-none-any.whl
-rw-r-----. 1 root root    9669 Sep 18 19:20 MarkupSafe-2.1.1-py3-none-any.whl
-rw-r-----. 1 root root   15541 Sep 18 19:20 msgpack-1.0.4-py3-none-any.whl
-rw-r-----. 1 root root 2071041 Sep 18 19:20 pycryptodomex-3.16.0-cp35-abi3-linux_aarch64.whl
-rw-r-----. 1 root root  656952 Sep 18 19:20 PyYAML-6.0-cp37-cp37m-linux_aarch64.whl
-rw-r-----. 1 root root  863287 Sep 18 19:20 pyzmq-25.0.0-cp37-cp37m-linux_aarch64.whl
-rw-r-----. 1 root root   62822 Sep 18 19:20 requests-2.28.2-py3-none-any.whl
-rw-r-----. 1 root root     256 Sep 18 19:20 requirements-euler2.8-salt.txt
-rw-r-----. 1 root root 9654098 Sep 18 19:20 salt-3003.1-py3-none-any.whl
-rw-r-----. 1 root root   26662 Sep 18 19:20 typing_extensions-4.4.0-py3-none-any.whl
-rw-r-----. 1 root root  140642 Sep 18 19:20 urllib3-1.26.14-py2.py3-none-any.whl

2、依赖包描述文件requirements-euler2.8-salt.txt内容 

[root@localhost salt-pip]# cat requirements-euler2.8-salt.txt 
certifi==2022.12.7
charset-normalizer==3.0.1
contextvars==2.4
idna==3.4
immutables==0.19
Jinja2==3.0.0
MarkupSafe==2.1.1
msgpack==1.0.4
pycryptodomex==3.16.0
PyYAML==6.0
pyzmq==25.0.0
requests==2.28.2
salt==3003.1
typing-extensions==4.4.0
urllib3==1.26.14

 三、安装测试

1、编写安装脚本install.sh

#!/bin/bash
##__author__='daigjianbing'pip3 install --no-index --find-links . -r requirements-euler2.8-salt.txt
which salt-minion
salt --version
targetfile='/usr/lib/systemd/system/salt-minion.service'
if [ ! -f $targetfile ];thencat > $targetfile <<"EOF"
##__author__='daigjianbing'
[Unit]
Description=The Salt Minion
Documentation=man:salt-minion(1) file:///usr/share/doc/salt/html/contents.html https://docs.saltstack.com/en/latest/contents.html
After=network.target salt-master.service[Service]
KillMode=process
Type=notify
NotifyAccess=all
LimitNOFILE=8192
ExecStart=/usr/local/bin/salt-minion[Install]
WantedBy=multi-user.target
EOF
fichmod 644 $targetfile
systemctl daemon-reloadif [ ! -d "/etc/salt" ]; thenmkdir -p /etc/saltchmod 755 /etc/salt
fitargetfile='/etc/salt/minion'
if [ ! -f $targetfile ];thencat > $targetfile <<"EOF"
##__author__='daigjianbing'
master: server
id: test
hash_type: sha256
EOF
fisystemctl enable --now salt-minion
systemctl status salt-minion

2、执行安装

[root@localhost salt-pip]# sh install.sh
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Looking in links: .
Collecting certifi==2022.12.7 (from -r requirements-euler2.8-salt.txt (line 1))
Collecting charset-normalizer==3.0.1 (from -r requirements-euler2.8-salt.txt (line 2))
Collecting contextvars==2.4 (from -r requirements-euler2.8-salt.txt (line 3))
Collecting idna==3.4 (from -r requirements-euler2.8-salt.txt (line 4))
Collecting immutables==0.19 (from -r requirements-euler2.8-salt.txt (line 5))
Collecting Jinja2==3.0.0 (from -r requirements-euler2.8-salt.txt (line 6))
Collecting MarkupSafe==2.1.1 (from -r requirements-euler2.8-salt.txt (line 7))
Collecting msgpack==1.0.4 (from -r requirements-euler2.8-salt.txt (line 8))
Collecting pycryptodomex==3.16.0 (from -r requirements-euler2.8-salt.txt (line 9))
Collecting PyYAML==6.0 (from -r requirements-euler2.8-salt.txt (line 10))
Collecting pyzmq==25.0.0 (from -r requirements-euler2.8-salt.txt (line 11))
Collecting requests==2.28.2 (from -r requirements-euler2.8-salt.txt (line 12))
Collecting salt==3003.1 (from -r requirements-euler2.8-salt.txt (line 13))
Collecting typing-extensions==4.4.0 (from -r requirements-euler2.8-salt.txt (line 14))
Collecting urllib3==1.26.14 (from -r requirements-euler2.8-salt.txt (line 15))
Requirement already satisfied: distro>=1.0.1 in /usr/local/lib/python3.7/site-packages (from salt==3003.1->-r requirements-euler2.8-salt.txt (line 13)) (1.8.0)
Installing collected packages: certifi, charset-normalizer, typing-extensions, immutables, contextvars, idna, MarkupSafe, Jinja2, msgpack, pycryptodomex, PyYAML, pyzmq, urllib3, requests, salt
Successfully installed Jinja2-3.0.0 MarkupSafe-2.1.1 PyYAML-6.0 certifi-2022.12.7 charset-normalizer-3.0.1 contextvars-2.4 idna-3.4 immutables-0.19 msgpack-1.0.4 pycryptodomex-3.16.0 pyzmq-25.0.0 requests-2.28.2 salt-3003.1 typing-extensions-4.4.0 urllib3-1.26.14
/usr/local/bin/salt-minion
salt 3003.1
Created symlink /etc/systemd/system/multi-user.target.wants/salt-minion.service → /usr/lib/systemd/system/salt-minion.service.
● salt-minion.service - The Salt MinionLoaded: loaded (/usr/lib/systemd/system/salt-minion.service; enabled; vendor preset: disabled)Active: active (running) since Mon 2023-09-18 20:17:21 CST; 11ms agoDocs: man:salt-minion(1)file:///usr/share/doc/salt/html/contents.htmlhttps://docs.saltstack.com/en/latest/contents.htmlMain PID: 291056 (salt-minion)Tasks: 1 (limit: 51200)Memory: 17.0MCGroup: /system.slice/salt-minion.service└─291056 /usr/bin/python3 /usr/local/bin/salt-minionSep 18 20:17:20 localhost systemd[1]: Starting The Salt Minion...
Sep 18 20:17:21 localhost systemd[1]: Started The Salt Minion.

看到 active (running),可见salt-minion服务已正常运行起来了。

四、验证结果

1、验证版本及可执行程序情况 

root@localhost salt-pip]# salt --version
salt 3003.1
[root@localhost salt-pip]# /usr/local/bin/salt-minion --version
salt-minion 3003.1
[root@localhost salt-pip]# ll /usr/local/bin/salt*
-rwxr-xr-x. 1 root root  225 Sep 18 20:17 /usr/local/bin/salt
-rwxr-xr-x. 1 root root  223 Sep 18 20:17 /usr/local/bin/salt-api
-rwxr-xr-x. 1 root root  225 Sep 18 20:17 /usr/local/bin/salt-call
-rwxr-xr-x. 1 root root  227 Sep 18 20:17 /usr/local/bin/salt-cloud
-rwxr-xr-x. 1 root root  221 Sep 18 20:17 /usr/local/bin/salt-cp
-rwxr-xr-x. 1 root root  223 Sep 18 20:17 /usr/local/bin/salt-key
-rwxr-xr-x. 1 root root  229 Sep 18 20:17 /usr/local/bin/salt-master
-rwxr-xr-x. 1 root root  229 Sep 18 20:17 /usr/local/bin/salt-minion
-rw-r-----. 1 root root 1027 Sep 18 20:17 /usr/local/bin/salt-proxy
-rwxr-xr-x. 1 root root  223 Sep 18 20:17 /usr/local/bin/salt-run
-rwxr-xr-x. 1 root root  223 Sep 18 20:17 /usr/local/bin/salt-ssh
-rwxr-xr-x. 1 root root  229 Sep 18 20:17 /usr/local/bin/salt-syndic
-rwxr-xr-x. 1 root root  227 Sep 18 20:17 /usr/local/bin/salt-unity

 2、核对服务运行情况

如上,可见安装已完全成功。

五、相关安装包下载

本人打包好的安装包文件下载

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/112125.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

五层网络模型

分层的意义 当遇到一个复杂问题的时候&#xff0c;可以使用分层的思想把问题简单化 比如&#xff0c;你有半杯82年的可乐&#xff0c;想分享给你的朋友王富贵&#xff0c;但你们已经10年没有联系了。要完成这件事&#xff0c;你可能要考虑&#xff1a; 我用什么装可乐&#x…

企业架构LNMP学习笔记48

数据结构类型操作&#xff1a; 数据结构&#xff1a;存储数据的方式 数据类型 算法&#xff1a;取数据的方式&#xff0c;代码就把数据进行组合&#xff0c;计算、存储、取出。 排序算法&#xff1a;冒泡排序、堆排序 二分。 key&#xff1a; key的命名规则不同于一般语言…

RFID设备在自动化堆场中的管理应用

随着信息技术的高速发展&#xff0c;带动了港口生产和管理技术的长足进步&#xff0c;港口堆场内的自动化场桥的智能化水平成为码头提高生产率一个重要标签。各地海关着力于现代化科技手段&#xff0c;努力构筑新型的便捷通关模式&#xff0c;在进出口环节做好管理和服务。 全…

回溯算法 解题思路

文章目录 算法介绍回溯算法能解决的问题解题模板1. 组合问题2. N皇后问题 算法介绍 回溯法&#xff08;Back Tracking Method&#xff09;&#xff08;探索与回溯法&#xff09;是一种选优搜索法&#xff0c;又称为试探法&#xff0c;按选优条件向前搜索&#xff0c;以达到目标…

彩色相机工作原理——bayer格式理解

早期&#xff0c;图像传感器只能记录光的强弱&#xff0c;无法记录光的颜色&#xff0c;所以只能拍摄黑白照片。 1974年,拜尔提出了bayer阵列&#xff0c;发明了bayer格式图片。不同于高成本的三个图像传感器方案&#xff0c;拜尔提出只用一个图像传感器&#xff0c;在其前面放…

Linux系统编程6(线程互斥,锁,同步,生产消费模型)

上篇文章介绍完线程的概念后&#xff0c;我们将在这篇文章中初步探讨线程编程以及线程应用中的问题&#xff0c;这篇文章将以抢票系统为例&#xff0c;贯穿整篇文章。笔者将介绍在多线程编程中会出现的问题&#xff0c;什么是同步&#xff1f;什么是互斥&#xff1f;为什么多线…

小米手机安装面具教程(Xiaomi手机获取root权限)

文章目录 1.Magisk中文网&#xff1a;2.某呼&#xff1a;3.最后一步打开cmd命令行输入的时候:4.Flash Boot 通包-Magisk&#xff08;Flash Boot通刷包&#xff09;5.小米Rom下载&#xff08;官方刷机包&#xff09;6.Magisk最新版本国内源下载 1.Magisk中文网&#xff1a; htt…

markdown工具Atom预览与插件安装

​atom是以命令行作为插件选项的入口 打开命令输入框 Windows: ctrl shift p Mac: command shift p 输入命令安装 输入 markdown preview toggle &#xff0c;可以偷懒只输入mdpt(模糊匹配) 按enter键即可看到预览&#xff0c;如图&#xff0c;左边编辑&#xff0c;右…

KubeSphere 在互联网医疗行业的应用实践

作者&#xff1a;宇轩辞白&#xff0c;运维研发工程师&#xff0c;目前专注于云原生、Kubernetes、容器、Linux、运维自动化等领域。 前言 2020 年我国互联网医疗企业迎来了“爆发元年”&#xff0c;越来越多居民在家隔离期间不方便去医院看诊&#xff0c;只好采取在线诊疗的手…

springboot和vue:五、RESTful服务+HTTP状态码+swagger配置

RESTful RESTful的特点 每一个URI代表一种资源客户端使用GET、POST、PUT、DELETE四种表示操作方式的动词对服务端资源进行操作&#xff1a;POST用于新建资源&#xff08;也可以用于更新资源&#xff09;&#xff0c;PUT用于更新资源资源的表现形式是JSON或者HTML。客户端与服…

用Python实现链式调用

嗨喽&#xff0c;大家好呀~这里是爱看美女的茜茜呐 我们在使用Django的models查询数据库时&#xff0c;可以看到有这种写法&#xff1a; form app.models import XXX query XXX.objects.all() query query.filter(name123, age456).filter(salary999)在这种写法里面&#xf…

如何判断一个元素是否在可视区域?

如何判断一个元素是否在可视区域&#xff1f; 1. 通过元素的位置信息和滚动条滚动的高度1-1 client 系列1-1-1 clientWidth、clientHeight1-1-2 clientTop、clientLeft1-1-3 clientX、clientY 1-2 offset系列1-2-1 offsetTop、offsetLeft1-2-2 offsetWidth、offsetHeight1-2-3 …