In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
YUM warehouse configuration and command is what, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
YUM software warehouse can install, uninstall, automatically upgrade rpm software packages and other tasks, YUM software warehouse can solve the limitations of large-scale server clusters.
Deploy YUM software repository 1. Prepare network installation source (server side) YUM software repository is usually released with the help of HTTP protocol or FTP protocol, so that software source services can be provided to all clients in the network. In order to facilitate the client to query the software package and obtain the lazy relationship and other information, the warehouse data (repodate file) needs to be provided in the software repository, in which all the rpm header information in the directory is collected.
The source of RPM package 1.CentOS released a collection of RPM packages; 2. A collection of RPM packages released by third-party organizations; 3. User-defined collection of RPM packages. 1. Prepare the software repository directory in the installation CD of the centos 7 system, the repodate data has been established for the software directory Packages. Therefore, as long as the contents of the entire CD-ROM are released through HTTP and FTP, it can be used as a software repository.
[root@localhost ~] # rpm-ivh / mnt/Packages/vsftpd-3.0.2-21.el7.x86_64.rpm / / install the FTP service by rpm [root@localhost ~] # mkdir / var/ftp/centos7 [root@localhost ~] # cp-rf / mnt/* / var/ftp/centos7/ create a directory (custom defined Must be in a directory where you can access the FTP service anonymously) / / then copy everything under the CD to the packages on the non-Centos 7 CD collected for users in that directory. In addition to the corresponding directories that need to be prepared, you also need to manually create repodate files, which requires the use of createrepo tools.
[root@localhost ~] # mkdir / var/ftp/other [root@localhost ~] # cd / var/ftp/other/ go to the directory where the rpm package is stored [root@localhost other] # createrepo. / / use the createrepo tool to create the repodate file, / / and make the data file location is the current directory 2. Start the FTP service and ensure that anonymous users can access [root@localhost ~] # systemctl start vsftpd [root@localhost ~] # systemctl enable vsftpd / / start the FTP service and set it to boot self-starting [root@localhost ~] # ftp 127.0.0.1 Connected to 127.0.0.1 (127.0.0.1). 220 (vsFTPd 3.0.2) Name (127.0.0.1:root): / / Direct enter 530 Permission denied. Login failed. Ftp > / / Test FTP service can be accessed anonymously. 2. Configure the location of the software repository (client) the software repository information used by the yum tool must be stored in the / etc/yum.repos.d directory with the extension ".repo" (it is recommended that the original files in the directory be removed from the specified directory). The original files are configuration files that can be downloaded directly from the Internet.
[root@localhost ~] # mv / etc/yum.repos.d/* / a [root@localhost ~] # vim / etc/yum.repos.d/a.repo / / create a new YUM warehouse The contents are as follows: # create and install the rpm package [ftp] / / Warehouse ID name=ftp / / Warehouse name in the CD image published through FTP, and customize The baseurl= ftp://192.168.1.1/centos7 / / URL access path can be ignored (the FTP service must be specified to the parent directory of the repodate data file) enabled=1 / / whether to enable the software repository (1 enabled, 0 not enabled) the default value is 1 This option ignores gpgcheck=1 / / whether to verify the signature of the package (1 enable 0 do not enable) gpgkey= file://etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 / / specify the location of the public key file # create and install the rpm package [ftp1] name=ftp1 baseurl= ftp://192.168.1.1/other enabled=1 gpgcheck=0 / / that publishes non-CD images through FTP. This item is generally 0, and the signature authentication of the software is not enabled # the rpm package [http] name=http baseurl= http://192.168.1.1 / / HTTP service in the CD image published by HTTP Simply specify the IP address of the HTTP service enabled=1 gpgcheck=0 # if the CD is mounted locally [local] name=local baseurl= file:///mnt / / specify the CD image mount location enabled=1 gpgcheck=0 uses the yum tool management package in the CentOS 7 server, the yum tool is the most commonly used YUM client tool Provided by the default installation of the yum-3.4.3-150.el7.centos.noarch package.
1. Query the software package 1.yum list-query the software package list [root@localhost ~] # yum list / / to get the software installation in the system, and you can also query the list of software packages available in the software warehouse. [root@localhost ~] # yum list installed / / list only packages installed in the system [root@localhost ~] # yum list available / / list only packages available in the software repository (but not yet installed) [root@localhost ~] # yum list updates / / list packages that can be upgraded 2.yum info-- query package description information [root@localhost ~] # yum info vsftpd / / add package view Detailed description has been loaded with the plug-in: fastestmirror The langpacks source'a 'does not have a name specified in the configuration file Use identity instead of Loading mirror speeds from cached hostfile installed package name: vsftpd Architecture: x86 packages 64 version: 3.0.2 release: 21.el7 size: 348 k Source: installed introduction: Very Secure Ftp Daemon URL: https://security.appspot.com/vsftpd.html Protocol: GPLv2 with exceptions description: vsftpd is a Very Secure FTP daemon. It was written completely from: scratch.3.yum search-- query specified software package [root@localhost ~] # yum search vsftpd / / query vsftpd related software package [root@localhost ~] # yum search vsftpd / / enlarge the query scope
Second, install, upgrade, uninstall the software package using the yum command to operate, automatically check and resolve the lazy relationship between the software packages, during which the user will be prompted to press "y" to confirm. If you want automatic confirmation, "`you can add the"-y "option after the yum command.
[root@localhost ~] # yum-y install vsftpd / / install the vsftpd service [root@localhost ~] # yum-y update vsftpd / / Update the vsftpd service [root@localhost ~] # yum-y remove vsftpd / / Uninstall the vsftpd service if the YUM configuration file is written incorrectly, after modifying the configuration file, it is recommended to use
[root@localhost] # yum clean all / / to successfully use the YUM mechanism to update the system and software, a software repository containing various rpm installation package files and their lazy software is required. The server that provides the software repository is also known as the "source" server.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
1. There are three basic working modes of vi editor. First, you need to
© 2024 shulou.com SLNews company. All rights reserved.