Linux YUM制作自己的yum repository
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的更多相关文章
- linux:网络yum源和制作本地光盘yum源
linux:存放yum源的位置:/etc/yum.repos.d/,该目录下全是一些yum源 一.网络yum源: 如图:下面全部都是yum源,后缀是".repo"都是合法的yum源 ...
- 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 ...
- Linux程序包管理之yum及源代码安装
第十六章.Linux程序包管理之yum及源代码安装 目录 yum介绍 yum配置文件 yum的repo配置文件中可用的变量 yum命令的使用 使用光盘作为本地yum仓库 如何创建yum仓库 编译安装的 ...
- CentOS 6.5 网络服务器功能的实现②:运用光盘(镜像)制作一个本地yum源
在用Linux安装软件时(rpm安装方式),有时会出现“包依赖”的现象.因此,我们可以用yum工具来实现一次性安装所有rpm工具包的功能. 实例:在此服务器上用yum的方式安装DHCP服务和TFTP服 ...
- 【Linux笔记】CentOS&RHEL YUM基础知识
以下内容收集自网络,以作参考. 一.YUM是什么 YUM = Yellow dog Updater, Modified. 主要功能是更方便的添加/删除/更新RPM包. 它能自动解决包的倚赖性问题. 它 ...
- Linux之RedHat7如何更换yum源
目前,我们常见的系统大概就是Windows.Linux和Mac OS了.Windows系统应该是大部分人最早开始接触的系统,毕竟Windows系统使用起来相当方便,只需要点点鼠标,外加会简单的打字,一 ...
- Linux中升级更新命令yum upgrade和yum update的区别
区别 Linux升级命令有两个分别是yum upgrade和yum update, 这个两个命令是有区别的: 代码如下: yum -y update #升级所有包,同时也升级软件和系统内核 yum - ...
- Linux中的安装神器--yum源安装
linux配置yum源 一.修改yum的配置文件 /etc/yum.repos.d/xxx.repo 1.进入yum配置文件目录 # cd /etc/yum.r ...
- redhat linux 5上创建本地yum源
1.挂载光驱 [root@rh5rac1 ~]#mkdir -p /mnt/cdrom [root@rh5rac1 ~]#mount /dev/cdrom /mnt/cdrom 2.将redhat光盘 ...
随机推荐
- 2021.11.14 CF1583E Moment of Bloom(LCA+图上构造)
2021.11.14 CF1583E Moment of Bloom(LCA+图上构造) https://www.luogu.com.cn/problem/CF1583E 题意: She does h ...
- VOC数据集可视化
from gettext import find import os from xml.etree import ElementTree as ET import cv2 def drawBoxOnV ...
- 面试官:请用SQL模拟一个死锁
文章首发于公众号:BiggerBoy 有读者说面试被问到怎么用SQL模拟数据库死锁? 这位读者表示对Java中的死锁还是略知一二的,但是突然用SQL写死锁的案例之前还真没遇到过,这个问题没答上来.所以 ...
- 1.5 Linux中大量使用脚本语言,而不是C语言!
说到在 Linux 下的编程,很多人会想到用C语言,Linux 的内核.shell.基础命令程序,也的确是用C语言编写的,这首先证明了一点,C语言很强很通用. 到目前为止,C语言依然垄断着计算机工业中 ...
- ZooKeeper 到底解决了什么问题?
点击上方"开源Linux",选择"设为星标" 回复"学习"获取独家整理的学习资料! 目标 ZooKeeper 很流行,有个基本的疑问: Zo ...
- GIL与普通互斥锁区别,死锁现象,信号量,event事件,进程池与线程池,协程
GIL与普通互斥锁区别 GIL锁和互斥锁的异同点 相同: 都是为了解决解释器中多个线程资源竞争的问题 异: 1.互斥锁是Python代码层面的锁,解决Python程序中多线程共享资源的问题(线程数据共 ...
- 没想到吧!这个可可爱爱的游戏居然是用 ECharts 实现的!
摘要:echarts 是一个很强大的图表库,除了我们常见的图表功能,还可以自定义图形,这个功能让我们可以很简单地在画布上绘制一些非常规的图形,基于此,我们来玩一些花哨的:做一个 Flappy Bird ...
- 出现bash: ifconfig:command not found的解决办法,即安装ifconfig命令(亲测有效)
初装centos 7时,运行config报 command not found 错误, ifconfig命令是设置或显示网络接口的程序,可以显示出我们机器的网卡信息,可是有些时候最小化安装CentOS ...
- Svelte3.x网页聊天实例|svelte.js仿微信PC版聊天svelte-webchat
基于Svelte3+SvelteKit+Sass仿微信Mac界面聊天实战项目SvelteWebChat. 基于svelte3+svelteKit+sass+mescroll.js+svelte-lay ...
- 层层剖析一次 HTTP POST 请求事故
vivo 互联网服务器团队- Wei Ling 本文主要讲述的是如何根据公司网络架构和业务特点,锁定正常请求被误判为跨域的原因并解决. 一.问题描述 某一个业务后台在表单提交的时候,报跨域错误,具体如 ...