首先就是,
我们在61 nginx上 搭建好了 局域网 的yum 仓库
把用到的相关的 rpm 提前下载好 (这里有待完善的, 客户端 先从本地找,找不到 就去 服务端 的 外网 下载安装)
basic 相关的 rpm:
- vim
- tree
- lrzsz
- wget
- unzip
- net-tools
- MySQL-python
- ntpdate
- bash-completion.noarch
- bash-completion-extras.noarch
只下载, 不安装
yum -y install --downloadonly --downloaddir /share/packages/ NetworkManager
yum -y reinstall --downloadonly --downloaddir /share/packages/ (之前如果按住过 ,可以用这个命令)
库列表:
vim tree lrzsz wget unzip net-tools MySQL-python ntpdate bash-completion.noarch bash-completion-extras.noarch keepalived mariadb-server nginx redis nfs-utils
扩展库: nginx
- pcre2-10.23-2.el7.x86_64 (nginx 需要)
- jemalloc(redis 需要)
配置 yumfunc 模块
[root@m01 /etc/ansible/roles]#ansible-galaxy init yumfunc
- Role yumfunc was created successfully
[root@m01 /etc/ansible/roles/yumfunc/tasks]#cat main.yml
- name: mkdir /etc/yum.repos.d/bac
file:
path: /etc/yum.repos.d/bac
state: directory
- name: mv *.repo to bac
shell: "mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bac"
- name: add local yum repository
yum_repository:
name: local
description: local yum repo
baseurl: http://172.16.1.61/packages/
gpgcheck: no
enabled: 1
问题:
nginx 需要依赖 libpcre2-8.so.0 :解决方案
yum install pcre2-10.23-2.el7.x86_64
redis 需要依赖 libjemalloc.so.1()(64bit) : 解决方案
(jemalloc)
欢迎来撩 : 汇总all