In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Set up a local yum repository:
System: Centos6.5
Go to Ali image to download the yum source of Centos6, and install the system eple-release source:
# wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo#yum install epel-release-y
Install the nginx service and the command for createrepo to create the yum repository:
# yum install nginx-y # yum install createrepo
Create a yum repository / data/yum_repo/rhel6_64, and hang it with cdrom:
# mkdir / data/yum_repo/rhel6_64-p#mkdir / mnt/cdrom
Hang the CD CD in the / mnt/cdrom/ directory:
# mount / dev/cdrom / mnt/cdrom/
The rpm package in copy CD to the local yum repository directory you just created:
# cp / mnt/cdrom/Packages/* / data/yum_repo/rhel6_64/Packages/
Turn the rpm package into a software package for the yum repository:
# createrepo / data/yum_repo/rhel6_64/Packages/
Yum repository nginx resource mapping:
Back up the default default.conf files.
# mv default.conf default.conf.bak
Create a nginx yum.conf file configuration:
Server {listen 80; server_name _; # Load configuration files for the default server block. Include / etc/nginx/default.d/*.conf; location / {root / data/yum_repo/rhel6_64;}}
Edit the nginx.conf file and enable the file browsing feature to facilitate web to access the yum source to check whether it is correct:
Http {autoindex on; # enable nginx directory browsing function autoindex_exact_size off; # File size is displayed from KB autoindex_localtime on; # shows that the file modification time is the server local time}
Start the nginx service:
# / etc/init.d/nginx start
Web accesses the nginx address to see the package directory:
Yum source file configuration:
# cat cc.repo [rhrl] name=rhelbaseurl= http://192.168.30.128/Packages/enabled=1 # whether to open the warehouse, 1: enable, 0: disable gpgcheck=0 # check whether gpgkey,1 is enabled, 0: disable # yum clean all to clear the local cache of the yum mechanism on the # yum makecache yum server; function to improve the speed of searching and installing software
Verify that the apache package is not installed in the system, and perform the installation to verify that the yum warehouse can provide services:
# rpm-qa httpd#yum install httpd-y
Install the package to test whether the Yum source is ok:
Update local yum source
Place the customized package in the local yum repository and update the yum source repository:
[root@sh-puppet-master ~] # mv java-1.7.0_80-1.x86_64.rpm / data/yum_repo/rhel6_64/Packages/ [root @ sh-puppet-master ~] # createrepo-- update / data/yum_repo/rhel6_64/Packages/Spawning worker 0 with 1 pkgsWorkers FinishedGathering worker resultsSaving Primary metadataSaving file lists metadataSaving other metadataGenerating sqlite DBsSqlite DBs complete
Please cache locally, cache the latest software package of the yum server (if you don't have a clear local cache, you can't see the newly added package)
# yum clean all# yum makecache
Uninstall java packages that already exist on the system:
Yum remove-y java
Check to see if there is a custom java package in the Yum source:
[root@sh-puppet-master] # yum list javaLoaded plugins: fastestmirror, securityLoading mirror speeds from cached hostfileAvailable Packagesjava.x86_64 1.7.080-1
Install the java package:
[root@sh-puppet-master ~] # yum install java.x86_64-y
# is it true that you customized the java version and whether the java installation is complete?
[root@sh-puppet-master ~] # ls / etc/profile.d/java.sh/etc/profile.d/java.sh [root@sh-puppet-master ~] # cat / etc/profile.d/java.shexport JAVA_HOME=/usr/local/javaexport JRE_HOME=/usr/local/java/jreexport CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASSPATHexport PATH=$JAVA_HOME/bin:$ path [root @ sh-puppet-master ~ ] # source / etc/profile [root@sh-puppet-master ~] # java-versionjava version "1.7.0o80" Java (TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot (TM) 64-Bit Server VM (build 24.80-b11 Mixed mode)
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.