In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Turn off the firewall, turn off SElinux
Build local server yum source image 163yum source this experiment only realizes building yum source in local service provider, can make other servers as clients can install packages through yum command, but cannot install package group if you have materials that can realize the construction of local yum source and can realize package group function, welcome to correct, I QQ: × × ×
Experimental environment:
A HP DL380 G7 server, 300G hard disk, RHEL7.0 64-bit operating system IP address: 10.49.128.96
Packages that need to be installed in advance:
Yum-utils (including reposync command)
Createrepo Editing yum Library tool
Nginx or httpd
Delete the original .repo file under / etc/yum.repos.d/
Touch rhel-debuginfo.repo
Edit rhel-debuginfo.repo enter the following:
[base]
Name=CentOS-$releasever-Base
Baseurl= http://mirrors.163.com/centos/7/os/$basearch/
Gpgcheck=1
Gpgkey= http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
# released updates
[updates]
Name=CentOS-$releasever-Updates
Baseurl= http://mirrors.163.com/centos/7/updates/$basearch/
Gpgcheck=1
Gpgkey= http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
[extras]
Name=CentOS-$releasever-Extras
Baseurl= http://mirrors.163.com/centos/7/extras//$basearch/
Gpgcheck=1
Gpgkey= http://mirrors.163.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7
[centosplus]
Name=CentOS-$releasever-Plus
Baseurl= http://mirrors.163.com/centos/7/centosplus//$basearch/
Gpgcheck=1
Enabled=0
Refresh the cache:
Yum clean all
Yum makecache
Yum install epel-release-y
Yum install yum-utils createrepo-y
Yum install nginx-y or yum install httpd-y
Yum repolist
Set up the rpm inventory catalog:
Mkdir-p / home/benddijingxiangyuan/wangyi163/CentOS/7/64bit/
Start downloading the rpm package synchronously:
Reposync-- repoid=base-p / home/benddijingxiangyuan/wangyi163/CentOS/7/64bit/
Reposync-- repoid=extras-p / home/benddijingxiangyuan/wangyi163/CentOS/7/64bit/
Reposync-- repoid=updates-p / home/benddijingxiangyuan/wangyi163/CentOS/7/64bit/
Reposync-- repoid=epel-p / home/benddijingxiangyuan/wangyi163/CentOS/7/64bit/
(using the-- repoid option mirrors the corresponding package and creates a folder with the same name as the value specified by-- repoid=xx)
Create index: (createrepo-po source directory index metadata output location directory)
Cd / home/benddijingxiangyuan/wangyi163/CentOS/7/64bit/base/Packages
Createrepo. /
Cd / home/benddijingxiangyuan/wangyi163/CentOS/7/64bit/extras/Packages
Createrepo. /
Cd / home/benddijingxiangyuan/wangyi163/CentOS/7/64bit/updates/Packages
Createrepo. /
Cd / home/benddijingxiangyuan/wangyi163/CentOS/7/64bit/epel/Packages
Set the root directory of the http service:
Solution 1: use nginx to provide http services
Server {
Listen 80
Server_name localhost
Root / home/benddijingxiangyuan
# charset koi8-r
# access_log logs/host.access.log main;location / {autoindex on; autoindex_exact_size off; autoindex_localtime on;}
Option 2: using httpd (apache) to provide http services:
Comment on the line DocumentRoot "/ var/www/html" in the / etc/httpd/conf/httpd.conf file
Create a directory / var/log/httpd/bengdiyumyuam/
Create files, yum_access_log and yum_error_log in / var/log/httpd/bengdiyumyuam/
Create the file Bendiyumyuan.conf in / etc/httpd/conf.d, as follows:
ServerName localhost
DocumentRoot "/ home/benddijingxiangyuan/wangyi163/CentOS/7/64bit"
CustomLog / var/log/httpd/bengdiyumyuam/yum_access_log combined
ErrorLog / var/log/httpd/bengdiyumyuam/yum_error_log
LogLevel warn
Options Indexes
AllowOverride None
Require all granted
Create a local.repo file under client server / etc/yum.repos.d/, as follows:
[base]
Name=local-Base (GDS)
Baseurl= http://10.49.128.96/wangyi163/CentOS/7/64bit/base/Packages
Enabled=1
Gpgcheck=0
[updates]
Name=local-Updates (GDS)
Baseurl= http://10.49.128.96/wangyi163/CentOS/7/64bit/updates/Packages
Enabled=1
Gpgcheck=0
[extras]
Name=local-Extras (GDS)
Baseurl= http://10.49.128.96/wangyi163/CentOS/7/64bit/extras/Packages
Enabled=1
Gpgcheck=0
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
© 2024 shulou.com SLNews company. All rights reserved.