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光盘 ...
随机推荐
- AOT和单文件发布对程序性能的影响
前言 这里先和大家介绍一下.NET一些发布的历史,以前的.NET框架原生并不支持最终编译结果的单文件发布(需要依赖第三方工具),我这里新建了一个简单的ASP.NET Core项目,发布以后的目录就会像 ...
- javaScript中Math内置对象基本方法入门
概念 Math 是javaScript的内置对象,包含了部分数学常数属性和数学函数方法. Math 不是一个函数对象,用户Number类型进行使用,不支持BigInt. Math 的所有属性与方法都是 ...
- QMetaObject::connectSlotsByName: No matching signal for XXX 原理探究
问题引出: 在尝试实现<Qt5.9 c++开发指南>混合UI编程章节时,用纯代码形式实现了个小按钮,然后加了个对应的槽函数,运行时就提示了这个信息. 原因探究: 首先查阅官方手册中的说明: ...
- python mysqldb 报错: ProgrammingError: must be real number, not str 解决
代码: sql = 'insert into book(book_name,book_desc,origin_price,publish_id,tag_id,book_img) values(%s,% ...
- Kubernetes生产环境最佳实践
点击上方"开源Linux",选择"设为星标" 回复"学习"获取独家整理的学习资料! 众所周知,Kubernetes很难! 以下是在生产中使用 ...
- 逆向进阶,利用 AST 技术还原 JavaScript 混淆代码
什么是 AST AST(Abstract Syntax Tree),中文抽象语法树,简称语法树(Syntax Tree),是源代码的抽象语法结构的树状表现形式,树上的每个节点都表示源代码中的一种结构. ...
- Web3.0应用程序架构
Web 3.0 应用程序(或"DApps")的架构与 Web 2.0 应用程序完全不同. 以博客园为例,这是一个简洁的博客网站,用户可以发布自己的内容并可以评论他人的内容进行互动. ...
- 新作!分布式系统韧性架构压舱石OpenChaos
摘要:本文首先以现今分布式系统的复杂性和稳定性的需求引出混沌工程概念,并阐述了OpenChaos在传统混沌工程上的优化与创新. 背景 随着Serverless,微服务(含服务网格)与越来越多的容器化架 ...
- 基于SqlSugar的开发框架循序渐进介绍(3)-- 实现代码生成工具Database2Sharp的整合开发
我喜欢在一个项目开发模式成熟的时候,使用代码生成工具Database2Sharp来配套相关的代码生成,对于我介绍的基于SqlSugar的开发框架,从整体架构确定下来后,我就着手为它们量身定做相关的代码 ...
- linux篇-linux 下tomcat服务每天定时启动
1l先准备一个脚本 #!/bin/sh #./etc/profile export JAVA_HOME=/usr/java/jdk1.6.0_45 sh /home/tomcat-bingchuang ...