In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
Nexus how to build a yum warehouse, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
1. Create a local yum image storage space (to facilitate subsequent migration to other servers)
two。 Create a yum repository
3. Download dependent rpm package
[root@830bb90bd2b6 down] # ls
Erlang-19.0.4-1.el7.centos.x86_64.rpm rabbitmq-server-3.6.6-1.el7.noarch.rpm wget-1.14-18.el7_6.1.x86_64.rpm
[root@830bb90bd2b6 down] # du-sh rabbitmq-server-3.6.6-1.el7.noarch.rpm
5.3m rabbitmq-server-3.6.6-1.el7.noarch.rpm
[root@830bb90bd2b6 down] # yum-y install rabbitmq-server-3.6.6-1.el7.noarch.rpm-- downloadonly-- downloaddir=/down
Loaded plugins: fastestmirror, ovl
Examining rabbitmq-server-3.6.6-1.el7.noarch.rpm: rabbitmq-server-3.6.6-1.el7.noarch
Marking rabbitmq-server-3.6.6-1.el7.noarch.rpm to be installed
Resolving Dependencies
-> Running transaction check
-> Package rabbitmq-server.noarch 0RU 3.6.6-1.el7 will be installed
-- > Processing Dependency: logrotate for package: rabbitmq-server-3.6.6-1.el7.noarch
Loading mirror speeds from cached hostfile
-- > Processing Dependency: socat for package: rabbitmq-server-3.6.6-1.el7.noarch
-> Running transaction check
-> Package logrotate.x86_64 0RU 3.8.6-17.el7 will be installed
-> Package socat.x86_64 0RU 1.7.3.2-2.el7 will be installed
-> Processing Dependency: libwrap.so.0 () (64bit) for package: socat-1.7.3.2-2.el7.x86_64
-> Running transaction check
-> Package tcp_wrappers-libs.x86_64 0RU 7.6-77.el7 will be installed
-> Finished Dependency Resolution
Dependencies Resolved
= Package Arch Version Repository Size
= Installing:
Rabbitmq-server noarch 3.6.6-1.el7 / rabbitmq-server-3.6.6-1.el7.noarch 5.9m
Installing for dependencies:
Logrotate x8631 64 3.8.6-17.el7 nexus 70k
Socat x8631 64 1.7.3.2-2.el7 nexus 290k
Tcp_wrappers-libs x86x67.6-77.el7 nexus 66k
Transaction Summary
= Install 1 Package (+ 3 Dependent packages)
Total size: 6.3 M
Total download size: 426 k
Installed size: 7.2 M
Background downloading packages, then exiting:
(1ap3): logrotate-3.8.6-17.el7.x86_64.rpm | 70 kB 00:00:01
(2ap3): tcp_wrappers-libs-7.6-77.el7.x86_64.rpm | 66 kB 00:00:00
(3go 3): socat-1.7.3.2-2.el7.x86_64.rpm | 290 kB 00:00:01
- Total 260 kB/s | 426 kB 00:00:01
Exiting because "Download Only" specified
[root@830bb90bd2b6 down] # ls
Erlang-19.0.4-1.el7.centos.x86_64.rpm rabbitmq-server-3.6.6-1.el7.noarch.rpm tcp_wrappers-libs-7.6-77.el7.x86_64.rpm
Logrotate-3.8.6-17.el7.x86_64.rpm socat-1.7.3.2-2.el7.x86_64.rpm wget-1.14-18.el7_6.1.x86_64.rpm
Yum-y install rabbitmq-server-3.6.6-1.el7.noarch.rpm-- downloadonly-- downloaddir=/down
# download the dependent package of the rabbitmq-server-3.6.6-1.el7.noarch.rpm package to the / down directory
4. Write batch upload scripts
[root@830bb90bd2b6 down] # ll
Total 24508
-rw-r--r-- 1 root root 18580960 Aug 15 2016 erlang-19.0.4-1.el7.centos.x86_64.rpm
-rw-r--r-- 1 root root 71372 Nov 12 2018 logrotate-3.8.6-17.el7.x86_64.rpm
-rw-r--r-- 1 root root 46 Jul 21 09:53 lst.sh
-rw-r--r-- 1 root root 5487706 Nov 22 2016 rabbitmq-server-3.6.6-1.el7.noarch.rpm
-rw-r--r-- 1 root root 296632 Aug 10 2017 socat-1.7.3.2-2.el7.x86_64.rpm
-rw-r--r-- 1 root root 67868 Jul 4 2014 tcp_wrappers-libs-7.6-77.el7.x86_64.rpm
-rw-r--r-- 1 root root 560272 May 16 15:48 wget-1.14-18.el7_6.1.x86_64.rpm
[root@830bb90bd2b6 down] # find. / * .rpm
. / erlang-19.0.4-1.el7.centos.x86_64.rpm
. / logrotate-3.8.6-17.el7.x86_64.rpm
. / rabbitmq-server-3.6.6-1.el7.noarch.rpm
. / socat-1.7.3.2-2.el7.x86_64.rpm
. / tcp_wrappers-libs-7.6-77.el7.x86_64.rpm
. / wget-1.14-18.el7_6.1.x86_64.rpm
[root@830bb90bd2b6 down] # find. / * .rpm | awk-F "/" 'print {$2}'
Awk: cmd. Line:1: print {$2}
Awk: cmd. Line:1: ^ syntax error
[root@830bb90bd2b6 down] # find. / * .rpm | awk-F "/"'{print $2}'
Erlang-19.0.4-1.el7.centos.x86_64.rpm
Logrotate-3.8.6-17.el7.x86_64.rpm
Rabbitmq-server-3.6.6-1.el7.noarch.rpm
Socat-1.7.3.2-2.el7.x86_64.rpm
Tcp_wrappers-libs-7.6-77.el7.x86_64.rpm
Wget-1.14-18.el7_6.1.x86_64.rpm
[root@830bb90bd2b6 down] # clear
[root@830bb90bd2b6 down] # find. / * .rpm | awk-F "/"'{print $2}'
Erlang-19.0.4-1.el7.centos.x86_64.rpm
Logrotate-3.8.6-17.el7.x86_64.rpm
Rabbitmq-server-3.6.6-1.el7.noarch.rpm
Socat-1.7.3.2-2.el7.x86_64.rpm
Tcp_wrappers-libs-7.6-77.el7.x86_64.rpm
Wget-1.14-18.el7_6.1.x86_64.rpm
[root@830bb90bd2b6 down] # vi lst.sh
[root@830bb90bd2b6 down] # chmod + x lst.sh
[root@830bb90bd2b6 down] #. / lst.sh
< HTTP/1.1 100 Continue * We are completely uploaded and fine < HTTP/1.1 200 OK < Date: Sun, 21 Jul 2019 10:24:05 GMT < Server: Nexus/3.17.0-01 (OSS) < X-Content-Type-Options: nosniff < Content-Security-Policy: sandbox allow-forms allow-modals allow-popups allow-presentation allow-scripts allow-top-navigation < X-XSS-Protection: 1; mode=block < Content-Length: 0 < * Connection #0 to host 192.168.1.100 left intact * About to connect() to 192.168.1.100 port 8089 (#0) * Trying 192.168.1.100... * Connected to 192.168.1.100 (192.168.1.100) port 8089 (#0) * Server auth using Basic with user 'admin' >PUT / repository/yum_local/libaio-0.3.109-13.el7.x86_64.rpm HTTP/1.1
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.29.0
> Host: 192.168.1.100 purl 8089
> Accept: * / *
> Content-Length: 24744
> Expect: 100-continue
>
5. Script content
[root@830bb90bd2b6 down] # cat lst.sh
! # / bin/bash
File_rpm= `find. / * .rpm | awk-F "/"'{print $2}'`
For itm in ${file_rpm}; do
Curl-v-- user 'admin:admin'-- upload-file. / ${itm} http://192.168.1.100:8089/repository/yum_local/${itm}
Done
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.