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. sqlmap源码分析(一)

    Sqlmap源码分析(一) 此次分析的sqlmap目标版本为1.6.1.2#dev 只对sqlmap的核心检测代码进行详细分析其他的一带而过 sqlmap.py文件结构 为了不让篇幅过长下面只写出了s ...

  2. windows 安装 kalfka 并快速启动

    1.安装Java 环境 https://www.java.com/zh_CN/ 直接下载安装即可 (如果之前有配置过java环境 可以先跳过此步骤,但是如果运行的时候报错就需要把之前的jdk环境变量删 ...

  3. Cesium DrawCommand [1] 不谈地球 画个三角形

    目录 0. 前言 0.1. 源码中的 DrawCommand 1. 创建 1.1. 构成要素 - VertexArray 1.2. 构成要素 - ShaderProgram 1.3. 构成要素 - W ...

  4. 修复Arch Linux和Manjaro Linux无法显示emoji的问题

    安装好Arch Linux或Manjaro Linux系统后默认没办法正常显示emoji,通常会变成方框或者带有unicode码的方块: 这是因为缺失字体以及相关的字体配置导致的. 当然也有一小部分应 ...

  5. Linux网络重点知识总结性梳理

    一个执着于技术的公众号 1 OSI七层模型 层次 说明 功能/协议 应用层 应用程序及接口 提供应用程序的接口:FTP telnet http pop3等 表示层 对数据进行转换.加密和压缩 将上层的 ...

  6. Google Summer of Code谷歌编程之夏活动流程全解析(上)

    本期由尔等同学来对话Casbin罗杨老师,为大家介绍开源及GSoC活动流程. > 罗杨:GSoC 2013.2015学生.GSoC期间在Nmap开源社区作为主力开发了Windows平台网络抓包工 ...

  7. web安全之信息收集篇

    信息收集 1.网络信息 网络信息就包括网站的厂商.运营商,网站的外网出口.后台.OA. 2.域名信息 通过域名可以查洵网站的所有人.注册商.邮箱等信息 --->Whois 第三方查询,查询子域网 ...

  8. 管家婆财贸ERP系列功能对比财贸c3-c8-c9功能对比介绍

    管家婆财贸ERP系列功能对比财贸c3-c8-c9功能对比介绍 管家婆财贸ERP产品功能 序号 名称 说明 一 采购管理 对日常订货.入库.退货.估价入库等业务进行处理,多种方便灵活的订单定制方式,实现 ...

  9. redis 基础1

    1.redis是什么? redis是非关系型数据库key-value数据库,开源免费.是当下NoSQL技术之一 2.redis能干吗? (1)内存存储,可以持久化,redis存储在内存中,内存的话是断 ...

  10. Springboot目录结构分析

    1 src/main/java 存储源码 2 src/main/resource 资源文件夹    (1)src/main/resource/static 用于存放静态资源,如css.js.图片.文件 ...