RHEL6 builds a YFT source server based on vsftd

  

1. Why build a local YUM source? When using the YUM client tool to upgrade and install software online in a Linux host, it is often given to users due to network connection speed and network bandwidth. Installation creates unnecessary trouble. However, if you build a local-based YUM source server in the LAN, you can greatly solve the problem of slower user installation software. 2. How to build a local YUM source idea: You can get the required rpm package from the rhel6 installation CD, and use the HTTP or FTP protocol to build a YUM source server on the local LAN. Steps to install the createrepo tool createrepoa is mainly used to collect The header information of the rpm package file in the directory to create repodata depot data (gzip compressed xml file). Mount /dev/cdrom /media/cdrom///mount the disk rpm -ivh /media/cdrom/Packages/createrepo-0.9.8-4.el6.noarch.rpm(2)Install the FTP server rpm -ivh /media/Cdrom/Packages/vsftpd(3) Configure the software repository directory. Copy all RPM packages from the CD to /var/ftp/by referring to the server directory mkdir /var/ftp/pub/Packagesmkdir /var/ftp/pub/repodata. In the pub/Packages directory (to ensure that the hard disk has enough disk space) cp -rv /media/cdrom/Packages/* /var/ftp/pub/Packages/(3) Create the repository information file cd /var/ftp/pub /createrepo --database ./[root@server pub]# ls repodata/filelists.sqlite.bz2 other.sqlite.bz2 primary.sqlite.bz2 repomd.xmlfilelists.xml.gz other.xml.gz primary.xml.gz can See that the corresponding software repository information file has been created (4) Start the vsftpd service service vsftpd startchkconfig --level 35 vsftpd on (5) In another client test, first create a repo file to specify the YUM source location vi /etc/Yum.repos.d/server1.repo, note that the file extension should end with repo, the file content is as follows [rhel6] //soft The name of the warehouse name=rhel6 //Description of the software repository baseurl=ftp://192.168.100.1/pub //The location of the software repository enabled=1 //Whether the software warehouse gpgcheck=1? //Check the GPG signature (used Verify that the package to be installed is REDHAT official) gpgkey=file://etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release GPG signing key location Use yum client tool to install samba[root@mail ~]# yum -y install samba*Loaded plugins: refresh-packagekit, rhnpluginThis system is not registered with RHN.RHN support will be disabled.Setting up Install ProcessPackage samba-winbind-clients-3.5.4-68.el6.x86_64 already Installed and latest versionPackage samba-common-3.5.4-68.el6.x86_64 already installed and latest versionPackage samba-client-3.5.4-68.el6.x86_64 already installed and latest versionResolving Dependencies--> Running transaction check-- -> Package samba.x86_64 0:3.5.4-68.el6 set to be updated---> Package samba-winbind.x86_64 0:3.5.4-68.el6 set to be updated--> Finished Dependency ResolutionDependencies Reso Lved========================================================== ========================================================================================================== =========================================================== ========================================================================================================================================== =========================================================== ======================================= Install 2 Package(s)Upgrade 0 Package(s)Total download size: 8.6 MInstalled size: 30 MDownloading Packages:(1/2): samba-3.5.4-68.el6.x86_64.rpm |  5.0 MB 00:00 (2/2): samba-winbind-3.5.4-68.el6.x86_64.rpm |  3.6 MB 00:00--------------------------------------------- --------------------------------------Total 25 MB/s |  8.6 MB 00:00Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning TransactionInstalling : samba-winbind-3.5.4-68.el6.x86_64 1/2Installing : samba-3.5.4-68.el6.x86_64 2/2Installed:samba.x86_64 0:3.5 .4-68.el6 samba-winbind.x86_64 0:3.5.4-68.el6Complete! You're done. I will explain later on the use of the yum tool. Rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release Import Signature Key

Copyright © Windows knowledge All Rights Reserved