Linux YUM制作自己的yum repository

配置步骤:

1.通过网络发布自己的package目录

2.创建本地repository

3.配置自己的yum源

操作实现:

1 安装createrepo 工具该工具用来创建本地的repository data.

命令:yum install createrepo
详细信息:

[root@node1 ~]# yum install createrepo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package createrepo.noarch 0:0.9.9-28.el7 will be installed
--> Processing Dependency: python-deltarpm for package: createrepo-0.9.9-28.el7.noarch
--> Processing Dependency: deltarpm for package: createrepo-0.9.9-28.el7.noarch
--> Running transaction check
---> Package deltarpm.x86_64 0:3.6-3.el7 will be installed
---> Package python-deltarpm.x86_64 0:3.6-3.el7 will be installed
--> Finished Dependency Resolution
--> Finding unneeded leftover dependencies
Found and removing 0 unneeded dependencies Dependencies Resolved ================================================================================================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================================================================================================
Installing:
createrepo noarch 0.9.9-28.el7 base 94 k
Installing for dependencies:
deltarpm x86_64 3.6-3.el7 base 82 k
python-deltarpm x86_64 3.6-3.el7 base 31 k Transaction Summary
================================================================================================================================================================================================================
Install 1 Package (+2 Dependent packages) Total download size: 207 k
Installed size: 558 k
Is this ok [y/d/N]: y
Downloading packages:
(1/3): createrepo-0.9.9-28.el7.noarch.rpm | 94 kB 00:00:00
(2/3): python-deltarpm-3.6-3.el7.x86_64.rpm | 31 kB 00:00:00
(3/3): deltarpm-3.6-3.el7.x86_64.rpm | 82 kB 00:00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 278 kB/s | 207 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : deltarpm-3.6-3.el7.x86_64 1/3
Installing : python-deltarpm-3.6-3.el7.x86_64 2/3
Installing : createrepo-0.9.9-28.el7.noarch 3/3
Verifying : createrepo-0.9.9-28.el7.noarch 1/3
Verifying : deltarpm-3.6-3.el7.x86_64 2/3
Verifying : python-deltarpm-3.6-3.el7.x86_64 3/3 Installed:
createrepo.noarch 0:0.9.9-28.el7 Dependency Installed:
deltarpm.x86_64 0:3.6-3.el7 python-deltarpm.x86_64 0:3.6-3.el7 Complete!

  

2.下载以下实验包,用来做自己的源:

[root@node1 ~]# repotrack -p fiopkgs fio
Downloading acl-2.2.51-15.el7.x86_64.rpm
Downloading audit-libs-2.8.5-4.el7.x86_64.rpm
Downloading audit-libs-2.8.5-4.el7.i686.rpm
Downloading basesystem-10.0-7.el7.centos.noarch.rpm
Downloading bash-4.2.46-35.el7_9.x86_64.rpm
Downloading bc-1.06.95-13.el7.x86_64.rpm
Downloading binutils-2.27-44.base.el7_9.1.x86_64.rpm
Downloading boost-iostreams-1.53.0-28.el7.x86_64.rpm
Downloading boost-iostreams-1.53.0-28.el7.i686.rpm
Downloading boost-random-1.53.0-28.el7.x86_64.rpm
Downloading boost-random-1.53.0-28.el7.i686.rpm
Downloading boost-system-1.53.0-28.el7.x86_64.rpm
Downloading boost-system-1.53.0-28.el7.i686.rpm
Downloading boost-thread-1.53.0-28.el7.i686.rpm
Downloading boost-thread-1.53.0-28.el7.x86_64.rpm
Downloading bzip2-libs-1.0.6-13.el7.x86_64.rpm
Downloading bzip2-libs-1.0.6-13.el7.i686.rpm
Downloading ca-certificates-2021.2.50-72.el7_9.noarch.rpm
Downloading centos-release-7-9.2009.1.el7.centos.x86_64.rpm
Downloading chkconfig-1.7.6-1.el7.x86_64.rpm
Downloading coreutils-8.22-24.el7_9.2.x86_64.rpm
Downloading cpio-2.11-28.el7.x86_64.rpm
Downloading cracklib-2.9.0-11.el7.x86_64.rpm
Downloading cracklib-2.9.0-11.el7.i686.rpm
Downloading cracklib-dicts-2.9.0-11.el7.x86_64.rpm
Downloading cryptsetup-libs-2.0.3-6.el7.x86_64.rpm
Downloading curl-7.29.0-59.el7_9.1.x86_64.rpm
Downloading cyrus-sasl-lib-2.1.26-24.el7_9.x86_64.rpm
Downloading cyrus-sasl-lib-2.1.26-24.el7_9.i686.rpm
Downloading daxctl-libs-65-5.el7.x86_64.rpm
Downloading dbus-1.10.24-15.el7.x86_64.rpm
Downloading dbus-libs-1.10.24-15.el7.x86_64.rpm
Downloading device-mapper-1.02.170-6.el7_9.5.x86_64.rpm
Downloading device-mapper-libs-1.02.170-6.el7_9.5.x86_64.rpm
Downloading device-mapper-libs-1.02.170-6.el7_9.5.i686.rpm
Downloading diffutils-3.3-5.el7.i686.rpm
Downloading diffutils-3.3-5.el7.x86_64.rpm
Downloading dracut-033-572.el7.x86_64.rpm
Downloading elfutils-default-yama-scope-0.176-5.el7.noarch.rpm
Downloading elfutils-libelf-0.176-5.el7.i686.rpm
Downloading elfutils-libelf-0.176-5.el7.x86_64.rpm
Downloading elfutils-libs-0.176-5.el7.x86_64.rpm
Downloading elfutils-libs-0.176-5.el7.i686.rpm
Downloading expat-2.1.0-14.el7_9.i686.rpm
Downloading expat-2.1.0-14.el7_9.x86_64.rpm
Downloading filesystem-3.2-25.el7.x86_64.rpm
Downloading findutils-4.5.11-6.el7.x86_64.rpm
Downloading fio-3.7-2.el7.x86_64.rpm
Downloading gawk-4.0.2-4.el7_3.1.x86_64.rpm
Downloading gdbm-1.10-8.el7.x86_64.rpm
Downloading glib2-2.56.1-9.el7_9.x86_64.rpm
Downloading glib2-2.56.1-9.el7_9.i686.rpm
Downloading glibc-2.17-326.el7_9.i686.rpm
Downloading glibc-2.17-326.el7_9.x86_64.rpm
Downloading glibc-common-2.17-326.el7_9.x86_64.rpm
Downloading gmp-6.0.0-15.el7.i686.rpm
Downloading gmp-6.0.0-15.el7.x86_64.rpm
Downloading grep-2.20-3.el7.x86_64.rpm
Downloading groff-base-1.22.2-8.el7.x86_64.rpm
Downloading gzip-1.5-11.el7_9.x86_64.rpm
Downloading hardlink-1.0-19.el7.x86_64.rpm
Downloading hostname-3.13-3.el7_7.1.x86_64.rpm
Downloading hwdata-0.252-9.7.el7.x86_64.rpm
Downloading info-5.1-5.el7.x86_64.rpm
Downloading initscripts-9.49.53-1.el7_9.1.x86_64.rpm
Downloading iproute-4.11.0-30.el7.x86_64.rpm
Downloading iptables-1.4.21-35.el7.x86_64.rpm
Downloading iputils-20160308-10.el7.x86_64.rpm
Downloading json-c-0.11-4.el7_0.x86_64.rpm
Downloading keyutils-libs-1.5.8-3.el7.i686.rpm
Downloading keyutils-libs-1.5.8-3.el7.x86_64.rpm
Downloading kmod-20-28.el7.x86_64.rpm
Downloading kmod-libs-20-28.el7.x86_64.rpm
Downloading kpartx-0.4.9-135.el7_9.x86_64.rpm
Downloading krb5-libs-1.15.1-51.el7_9.i686.rpm
Downloading krb5-libs-1.15.1-51.el7_9.x86_64.rpm
Downloading libacl-2.2.51-15.el7.x86_64.rpm
Downloading libacl-2.2.51-15.el7.i686.rpm
Downloading libaio-0.3.109-13.el7.x86_64.rpm
Downloading libattr-2.4.46-13.el7.i686.rpm
Downloading libattr-2.4.46-13.el7.x86_64.rpm
Downloading libblkid-2.23.2-65.el7_9.1.i686.rpm
Downloading libblkid-2.23.2-65.el7_9.1.x86_64.rpm
Downloading libcap-2.22-11.el7.x86_64.rpm
Downloading libcap-2.22-11.el7.i686.rpm
Downloading libcap-ng-0.7.5-4.el7.i686.rpm
Downloading libcap-ng-0.7.5-4.el7.x86_64.rpm
Downloading libcom_err-1.42.9-19.el7.x86_64.rpm
Downloading libcom_err-1.42.9-19.el7.i686.rpm
Downloading libcurl-7.29.0-59.el7_9.1.x86_64.rpm
Downloading libcurl-7.29.0-59.el7_9.1.i686.rpm
Downloading libdb-5.3.21-25.el7.i686.rpm
Downloading libdb-5.3.21-25.el7.x86_64.rpm
Downloading libdb-utils-5.3.21-25.el7.x86_64.rpm
Downloading libffi-3.0.13-19.el7.i686.rpm
Downloading libffi-3.0.13-19.el7.x86_64.rpm
Downloading libgcc-4.8.5-44.el7.x86_64.rpm
Downloading libgcc-4.8.5-44.el7.i686.rpm
Downloading libgcrypt-1.5.3-14.el7.x86_64.rpm
Downloading libgcrypt-1.5.3-14.el7.i686.rpm
Downloading libgpg-error-1.12-3.el7.i686.rpm
Downloading libgpg-error-1.12-3.el7.x86_64.rpm
Downloading libibverbs-22.4-6.el7_9.x86_64.rpm
Downloading libidn-1.28-4.el7.i686.rpm
Downloading libidn-1.28-4.el7.x86_64.rpm
Downloading libmnl-1.0.3-7.el7.x86_64.rpm
Downloading libmount-2.23.2-65.el7_9.1.i686.rpm
Downloading libmount-2.23.2-65.el7_9.1.x86_64.rpm
Downloading libnetfilter_conntrack-1.0.6-1.el7_3.x86_64.rpm
Downloading libnfnetlink-1.0.1-4.el7.x86_64.rpm
Downloading libnl3-3.2.28-4.el7.x86_64.rpm
Downloading libpmem-1.5.1-2.1.el7.x86_64.rpm
Downloading libpmemblk-1.5.1-2.1.el7.x86_64.rpm
Downloading libpwquality-1.2.3-5.el7.i686.rpm
Downloading libpwquality-1.2.3-5.el7.x86_64.rpm
Downloading librados2-10.2.5-4.el7.i686.rpm
Downloading librados2-10.2.5-4.el7.x86_64.rpm
Downloading librbd1-10.2.5-4.el7.x86_64.rpm
Downloading librdmacm-22.4-6.el7_9.x86_64.rpm
Downloading libselinux-2.5-15.el7.x86_64.rpm
Downloading libselinux-2.5-15.el7.i686.rpm
Downloading libsemanage-2.5-14.el7.x86_64.rpm
Downloading libsepol-2.5-10.el7.i686.rpm
Downloading libsepol-2.5-10.el7.x86_64.rpm
Downloading libsmartcols-2.23.2-65.el7_9.1.i686.rpm
Downloading libsmartcols-2.23.2-65.el7_9.1.x86_64.rpm
Downloading libssh2-1.8.0-4.el7.x86_64.rpm
Downloading libssh2-1.8.0-4.el7.i686.rpm
Downloading libstdc++-4.8.5-44.el7.i686.rpm
Downloading libstdc++-4.8.5-44.el7.x86_64.rpm
Downloading libtasn1-4.10-1.el7.i686.rpm
Downloading libtasn1-4.10-1.el7.x86_64.rpm
Downloading libuser-0.60-9.el7.i686.rpm
Downloading libuser-0.60-9.el7.x86_64.rpm
Downloading libutempter-1.1.6-4.el7.x86_64.rpm
Downloading libutempter-1.1.6-4.el7.i686.rpm
Downloading libuuid-2.23.2-65.el7_9.1.x86_64.rpm
Downloading libuuid-2.23.2-65.el7_9.1.i686.rpm
Downloading libverto-0.2.5-4.el7.i686.rpm
Downloading libverto-0.2.5-4.el7.x86_64.rpm
Downloading libxml2-2.9.1-6.el7_9.6.x86_64.rpm
Downloading lua-5.1.4-15.el7.x86_64.rpm
Downloading lz4-1.8.3-1.el7.x86_64.rpm
Downloading lz4-1.8.3-1.el7.i686.rpm
Downloading ncurses-5.9-14.20130511.el7_4.x86_64.rpm
Downloading ncurses-base-5.9-14.20130511.el7_4.noarch.rpm
Downloading ncurses-libs-5.9-14.20130511.el7_4.x86_64.rpm
Downloading ncurses-libs-5.9-14.20130511.el7_4.i686.rpm
Downloading ndctl-libs-65-5.el7.x86_64.rpm
Downloading nspr-4.32.0-1.el7_9.x86_64.rpm
Downloading nspr-4.32.0-1.el7_9.i686.rpm
Downloading nss-3.67.0-4.el7_9.x86_64.rpm
Downloading nss-3.67.0-4.el7_9.i686.rpm
Downloading nss-pem-1.0.3-7.el7.x86_64.rpm
Downloading nss-pem-1.0.3-7.el7.i686.rpm
Downloading nss-softokn-3.67.0-3.el7_9.x86_64.rpm
Downloading nss-softokn-3.67.0-3.el7_9.i686.rpm
Downloading nss-softokn-freebl-3.67.0-3.el7_9.i686.rpm
Downloading nss-softokn-freebl-3.67.0-3.el7_9.x86_64.rpm
Downloading nss-sysinit-3.67.0-4.el7_9.x86_64.rpm
Downloading nss-tools-3.67.0-4.el7_9.x86_64.rpm
Downloading nss-util-3.67.0-1.el7_9.i686.rpm
Downloading nss-util-3.67.0-1.el7_9.x86_64.rpm
Downloading numactl-libs-2.0.12-5.el7.x86_64.rpm
Downloading openldap-2.4.44-25.el7_9.i686.rpm
Downloading openldap-2.4.44-25.el7_9.x86_64.rpm
Downloading openssl-libs-1.0.2k-25.el7_9.x86_64.rpm
Downloading openssl-libs-1.0.2k-25.el7_9.i686.rpm
Downloading p11-kit-0.23.5-3.el7.i686.rpm
Downloading p11-kit-0.23.5-3.el7.x86_64.rpm
Downloading p11-kit-trust-0.23.5-3.el7.i686.rpm
Downloading p11-kit-trust-0.23.5-3.el7.x86_64.rpm
Downloading pam-1.1.8-23.el7.x86_64.rpm
Downloading pam-1.1.8-23.el7.i686.rpm
Downloading pciutils-3.5.1-3.el7.x86_64.rpm
Downloading pciutils-libs-3.5.1-3.el7.i686.rpm
Downloading pciutils-libs-3.5.1-3.el7.x86_64.rpm
Downloading pcre-8.32-17.el7.i686.rpm
Downloading pcre-8.32-17.el7.x86_64.rpm
Downloading perl-5.16.3-299.el7_9.x86_64.rpm
Downloading perl-Carp-1.26-244.el7.noarch.rpm
Downloading perl-Encode-2.51-7.el7.x86_64.rpm
Downloading perl-Exporter-5.68-3.el7.noarch.rpm
Downloading perl-File-Path-2.09-2.el7.noarch.rpm
Downloading perl-File-Temp-0.23.01-3.el7.noarch.rpm
Downloading perl-Filter-1.49-3.el7.x86_64.rpm
Downloading perl-Getopt-Long-2.40-3.el7.noarch.rpm
Downloading perl-HTTP-Tiny-0.033-3.el7.noarch.rpm
Downloading perl-PathTools-3.40-5.el7.x86_64.rpm
Downloading perl-Pod-Escapes-1.04-299.el7_9.noarch.rpm
Downloading perl-Pod-Perldoc-3.20-4.el7.noarch.rpm
Downloading perl-Pod-Simple-3.28-4.el7.noarch.rpm
Downloading perl-Pod-Usage-1.63-3.el7.noarch.rpm
Downloading perl-Scalar-List-Utils-1.27-248.el7.x86_64.rpm
Downloading perl-Socket-2.010-5.el7.x86_64.rpm
Downloading perl-Storable-2.45-3.el7.x86_64.rpm
Downloading perl-Text-ParseWords-3.29-4.el7.noarch.rpm
Downloading perl-Time-HiRes-1.9725-3.el7.x86_64.rpm
Downloading perl-Time-Local-1.2300-2.el7.noarch.rpm
Downloading perl-constant-1.27-2.el7.noarch.rpm
Downloading perl-libs-5.16.3-299.el7_9.x86_64.rpm
Downloading perl-libs-5.16.3-299.el7_9.i686.rpm
Downloading perl-macros-5.16.3-299.el7_9.x86_64.rpm
Downloading perl-parent-0.225-244.el7.noarch.rpm
Downloading perl-podlators-2.5.1-3.el7.noarch.rpm
Downloading perl-threads-1.87-4.el7.x86_64.rpm
Downloading perl-threads-shared-1.43-6.el7.x86_64.rpm
Downloading pkgconfig-0.27.1-4.el7.x86_64.rpm
Downloading pkgconfig-0.27.1-4.el7.i686.rpm
Downloading popt-1.13-16.el7.i686.rpm
Downloading popt-1.13-16.el7.x86_64.rpm
Downloading procps-ng-3.3.10-28.el7.x86_64.rpm
Downloading procps-ng-3.3.10-28.el7.i686.rpm
Downloading python-2.7.5-90.el7.x86_64.rpm
Downloading python-libs-2.7.5-90.el7.x86_64.rpm
Downloading qrencode-libs-3.4.1-3.el7.x86_64.rpm
Downloading rdma-core-22.4-6.el7_9.x86_64.rpm
Downloading readline-6.2-11.el7.i686.rpm
Downloading readline-6.2-11.el7.x86_64.rpm
Downloading rpm-4.11.3-48.el7_9.x86_64.rpm
Downloading rpm-libs-4.11.3-48.el7_9.x86_64.rpm
Downloading sed-4.2.2-7.el7.x86_64.rpm
Downloading setup-2.8.71-11.el7.noarch.rpm
Downloading shadow-utils-4.6-5.el7.x86_64.rpm
Downloading shared-mime-info-1.8-5.el7.x86_64.rpm
Downloading sqlite-3.7.17-8.el7_7.1.i686.rpm
Downloading sqlite-3.7.17-8.el7_7.1.x86_64.rpm
Downloading systemd-219-78.el7_9.5.x86_64.rpm
Downloading systemd-libs-219-78.el7_9.5.i686.rpm
Downloading systemd-libs-219-78.el7_9.5.x86_64.rpm
Downloading sysvinit-tools-2.88-14.dsf.el7.x86_64.rpm
Downloading tar-1.26-35.el7.x86_64.rpm
Downloading tzdata-2022a-1.el7.noarch.rpm
Downloading ustr-1.0.4-16.el7.x86_64.rpm
Downloading util-linux-2.23.2-65.el7_9.1.x86_64.rpm
Downloading util-linux-2.23.2-65.el7_9.1.i686.rpm
Downloading xz-5.2.2-2.el7_9.x86_64.rpm
Downloading xz-libs-5.2.2-2.el7_9.x86_64.rpm
Downloading xz-libs-5.2.2-2.el7_9.i686.rpm
Downloading zlib-1.2.7-20.el7_9.x86_64.rpm
Downloading zlib-1.2.7-20.el7_9.i686.rpm

  3.安装httpd发布自己的包

[root@node1 fiopkgs]# yum install httpd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.4.6-97.el7.centos.5 will be installed
--> Processing Dependency: httpd-tools = 2.4.6-97.el7.centos.5 for package: httpd-2.4.6-97.el7.centos.5.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-97.el7.centos.5.x86_64
--> Running transaction check
---> Package httpd-tools.x86_64 0:2.4.6-97.el7.centos.5 will be installed
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Finished Dependency Resolution
--> Finding unneeded leftover dependencies
Found and removing 0 unneeded dependencies Dependencies Resolved ================================================================================================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================================================================================================
Installing:
httpd x86_64 2.4.6-97.el7.centos.5 updates 2.7 M
Installing for dependencies:
httpd-tools x86_64 2.4.6-97.el7.centos.5 updates 94 k
mailcap noarch 2.1.41-2.el7 base 31 k Transaction Summary
================================================================================================================================================================================================================
Install 1 Package (+2 Dependent packages) Total download size: 2.8 M
Installed size: 9.6 M
Is this ok [y/d/N]: y
Downloading packages:
(1/3): mailcap-2.1.41-2.el7.noarch.rpm | 31 kB 00:00:00
(2/3): httpd-tools-2.4.6-97.el7.centos.5.x86_64.rpm | 94 kB 00:00:01
(3/3): httpd-2.4.6-97.el7.centos.5.x86_64.rpm | 2.7 MB 00:00:17
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 164 kB/s | 2.8 MB 00:00:17
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : httpd-tools-2.4.6-97.el7.centos.5.x86_64 1/3
Installing : mailcap-2.1.41-2.el7.noarch 2/3
Installing : httpd-2.4.6-97.el7.centos.5.x86_64 3/3
Verifying : mailcap-2.1.41-2.el7.noarch 1/3
Verifying : httpd-tools-2.4.6-97.el7.centos.5.x86_64 2/3
Verifying : httpd-2.4.6-97.el7.centos.5.x86_64 3/3 Installed:
httpd.x86_64 0:2.4.6-97.el7.centos.5 Dependency Installed:
httpd-tools.x86_64 0:2.4.6-97.el7.centos.5 mailcap.noarch 0:2.1.41-2.el7 Complete! [root@node1 fiopkgs]# mkdir -p /var/www/html/CentOS/fio
[root@node1 fiopkgs]# cp -p ./*.rpm /var/www/html/CentOS/fio
[root@node1 CentOS]# createrepo -o . fio/
Spawning worker 0 with 241 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@node1 CentOS]# ls -al
total 28
drwxrwxrwx. 4 root root 4096 Jun 30 10:22 .
drwxr-xr-x. 3 root root 20 Jun 29 20:46 ..
drwxr-xr-x. 2 root root 12288 Jun 30 10:21 fio
drwxr-xr-x. 2 root root 4096 Jun 30 10:22 repodata [root@node1 fiopkgs]# chmod -R 777 /var/www/html/CentOS/
###
[root@node1 html]# vi /etc/httpd/conf.d/welcome.conf
#
# This configuration file enables the default "Welcome" page if there
# is no default index page present for the root URL. To disable the
# Welcome page, comment out all the lines below.
#
# NOTE: if this file is removed, it will be restored on upgrades.
#
#<LocationMatch "^/+$">
# Options -Indexes
# ErrorDocument 403 /.noindex.html
#</LocationMatch> #<Directory /usr/share/httpd/noindex>
# AllowOverride None
# Require all granted
#</Directory> #Alias /.noindex.html /usr/share/httpd/noindex/index.html
#Alias /noindex/css/bootstrap.min.css #/usr/share/httpd/noindex/css/bootstrap.min.css
#Alias /noindex/css/open-sans.css /usr/share/httpd/noindex/css/open-sans.css
#Alias /images/apache_pb.gif /usr/share/httpd/noindex/images/apache_pb.gif
#Alias /images/poweredby.png /usr/share/httpd/noindex/images/poweredby.png [root@node1 html]# /usr/sbin/apachectl restart

  之后通过网络连接如下:http://192.168.xx.xxx/CentOS/

4. 配置自己的本地网络源

[root@node1 yum.repos.d]# vi localweb.repo
[localweb]
name=localweb
baseurl=http://192.168.xx.xxx/CentOS/
enable=1
gpgcheck=0 [root@node1 yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: localweb
Cleaning up list of fastest mirrors
Other repos take up 541 M of disk space (use --verbose for details) [root@node1 yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
localweb | 2.9 kB 00:00:00
(1/3): localweb/filelists_db | 154 kB 00:00:00
(2/3): localweb/other_db | 103 kB 00:00:00
(3/3): localweb/primary_db | 185 kB 00:00:00
Metadata Cache Created [root@node1 yum.repos.d]# yum list available
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Available Packages
audit-libs.i686 2.8.5-4.el7 localweb
bash.x86_64 4.2.46-35.el7_9 localweb
binutils.x86_64 2.27-44.base.el7_9.1 localweb
boost-iostreams.i686 1.53.0-28.el7 localweb
boost-iostreams.x86_64 1.53.0-28.el7 localweb
boost-random.i686 1.53.0-28.el7 localweb
boost-random.x86_64 1.53.0-28.el7 localweb
boost-system.i686 1.53.0-28.el7 localweb
boost-thread.i686 1.53.0-28.el7 localweb
bzip2-libs.i686 1.0.6-13.el7 localweb
ca-certificates.noarch 2021.2.50-72.el7_9 localweb
centos-release.x86_64 7-9.2009.1.el7.centos localweb

  

Linux YUM制作自己的yum repository的更多相关文章

  1. linux:网络yum源和制作本地光盘yum源

    linux:存放yum源的位置:/etc/yum.repos.d/,该目录下全是一些yum源 一.网络yum源: 如图:下面全部都是yum源,后缀是".repo"都是合法的yum源 ...

  2. Linux关于yum命令Error: Cannot retrieve repository metadata (repomd.xml) for repository:xxxxxx.

    Linux关于yum命令Error: Cannot retrieve repository metadata (repomd.xml) for repository:xxxxxx. 问题: Linux ...

  3. Linux程序包管理之yum及源代码安装

    第十六章.Linux程序包管理之yum及源代码安装 目录 yum介绍 yum配置文件 yum的repo配置文件中可用的变量 yum命令的使用 使用光盘作为本地yum仓库 如何创建yum仓库 编译安装的 ...

  4. CentOS 6.5 网络服务器功能的实现②:运用光盘(镜像)制作一个本地yum源

    在用Linux安装软件时(rpm安装方式),有时会出现“包依赖”的现象.因此,我们可以用yum工具来实现一次性安装所有rpm工具包的功能. 实例:在此服务器上用yum的方式安装DHCP服务和TFTP服 ...

  5. 【Linux笔记】CentOS&RHEL YUM基础知识

    以下内容收集自网络,以作参考. 一.YUM是什么 YUM = Yellow dog Updater, Modified. 主要功能是更方便的添加/删除/更新RPM包. 它能自动解决包的倚赖性问题. 它 ...

  6. Linux之RedHat7如何更换yum源

    目前,我们常见的系统大概就是Windows.Linux和Mac OS了.Windows系统应该是大部分人最早开始接触的系统,毕竟Windows系统使用起来相当方便,只需要点点鼠标,外加会简单的打字,一 ...

  7. Linux中升级更新命令yum upgrade和yum update的区别

    区别 Linux升级命令有两个分别是yum upgrade和yum update, 这个两个命令是有区别的: 代码如下: yum -y update #升级所有包,同时也升级软件和系统内核 yum - ...

  8. Linux中的安装神器--yum源安装

    linux配置yum源 一.修改yum的配置文件     /etc/yum.repos.d/xxx.repo          1.进入yum配置文件目录        # cd /etc/yum.r ...

  9. redhat linux 5上创建本地yum源

    1.挂载光驱 [root@rh5rac1 ~]#mkdir -p /mnt/cdrom [root@rh5rac1 ~]#mount /dev/cdrom /mnt/cdrom 2.将redhat光盘 ...

随机推荐

  1. 基础设施即代码(IAC),Zalando Postgres Operator UI 入门

    Postgres Operator UI 提供了一个图形界面,方便用户体验数据库即服务.一旦 database 和/或 Kubernetes (K8s) 管理员设置了 operator,其他团队就很容 ...

  2. Windows 下 MSYS2 环境配置和 MinGW-w64 C++ 环境配置

    Windows 下 MSYS2 环境配置和 MinGW-w64 C++ 环境配置 1.简介 本文主要是 Windows 下 MSYS2 环境配置和 MinGW-w64 C++编译环境配置方法 2.下载 ...

  3. Rancher部署PostgreSQL容器

    1.打开工作负载,选择部署服务 2.选择合适的PostgreSQL镜像 镜像地址https://registry.hub.docker.com/_/postgres,也可使用公司内部镜像库 网络模式选 ...

  4. 【Java分享客栈】一文搞定CompletableFuture并行处理,成倍缩短查询时间。

    前言   工作中你可能会遇到很多这样的场景,一个接口,要从其他几个service调用查询方法,分别获取到需要的值之后再封装数据返回.   还可能在微服务中遇到类似的情况,某个服务的接口,要使用好几次f ...

  5. 使用 Python 来自动回微信

    准备 Python3 Python Itchat库(可以通过pip install itchat来安装) (可选)Python Pymongo库(可以通过pip install pymongo来安装) ...

  6. python3 Softmax函数

    Softmax函数公式 Softmax的作用简单的说就计算一组数值中每个值的占比 import torch import torch.nn.functional as F # 原始数据tensor y ...

  7. 题解0011:图书管理(哈希、vector)

    信奥一本通--哈希 里的例题2 题目链接:http://ybt.ssoier.cn:8088/problem_show.php?pid=1456 题目描述:两个命令,一个是进一本名字为s的图书,一个是 ...

  8. 利用expect批量修改Linux服务器密码

    一个执着于技术的公众号 背景 修改Linux系统密码,执行passwd即可更改密码.可如果有成千上百台服务器呢,通过ssh的方式逐一进行修改,对我们来说,工作量是非常大,且效率非常低下.因此采用批量修 ...

  9. HandlerMethodArgumentResolver 自定义使用

    HandlerMethodArgumentResolver 自定义使用 1.HandlerMethodArgumentResolver 的应用场景 ​ HandlerMethodArgumentRes ...

  10. svelte组件:svelte3.x自定义美化虚拟滚动条组件svelte-scrollbar

    基于svelte3.0自定义pc端虚拟滚动条组件svelteScrollbar. svelte-scrollbar:运用svelte3.x创建的桌面pc版自定义美化滚动条组件.支持是否原生滚动条.自动 ...