본문 바로가기
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print

How to install Java on linux with no Internet connectivity (using local repository)


linux A: running in centos 6.6 and connected to the Internet

linux B: running in centos 6.6 and NOT connected to the Internet


here we download java package with dependencies from linux A which is connected to the Internet then configure local repository in linux B with the packages downloaded via linux A. At last java will be installed with dependencies by yum.


###################################################

# from linux A that is connected to the Internet

###################################################


1. install yum-utils for repotrack

yum install -y yum-utils


2. download packages along with all dependencies

repotrack -a x86_64 -p /tmp/packages createrepo java-1.7.0-openjdk


3. remove packages for i686 due to a bug in repotrack

rm -rf /tmp/packages/*i686.rpm



########################################################

# from laptop that is connected to both linux A and B

########################################################


1. copy the packages dir from linux A to local drive

scp -r user@linuxA:/tmp/packages ./


2. copy the packages dir from local drive to linux B

scp -r ./packages user@linuxA:/tmp/



##############################################

# from linux B NOT connected to the Internet

##############################################


1. install createrepo with its dependencies

cd /tmp/packages

rpm -Uvh deltarpm-*

rpm -Uvh python-deltarpm-*

rpm -Uvh libxml2-*

rpm -Uvh createrepo-*


2. change ownership for packages dir

chown -R root.root /tmp/packages


3. run createrepo to create local repo

createrepo /tmp/packages

chmod -R o-w+r /tmp/packages


4. set the repo configuration file

cat > /etc/yum.repos.d/myrepo.repo

------------------8<--------------------

[local]

name=My Local Repo

baseurl=file:///tmp/packages

enabled=1

gpgcheck=0

------------------8<--------------------


5. install java package

yum install java-1.7.0-openjdk


Title
List of Articles
번호 제목 글쓴이 날짜 조회 수
» How to install Java on linux with no Internet connectivity (using local repository) Hojung 2015.12.22 3790
447 How to install tcpreplay on CentOS 6.5 Hojung 2015.08.21 8628
446 Install et131x network interface driver in CentOS 6 (LW25-BDUO3) file Hojung 2015.07.03 4933
445 How to find CentOS and kernel version Hojung 2015.04.30 4297
444 MD5 Test Hojung 2015.04.01 4463
443 MAC times in Linux (atime, mtime, ctime, crtime, touch, stat, debugfs) Hojung 2015.01.13 5382
442 How to generate a key with passphrase Hojung 2014.11.22 5642
441 Most Common OpenSSL Commands Hojung 2014.11.21 6091
440 How to use screen command Hojung 2014.11.17 4545
439 snorby (on testing) Hojung 2014.11.17 7293
438 APM (Apache + PHP + MySQL) with phpmyadmin in CentOS VM Hojung 2014.11.16 5434
437 10 Ways to Generate a Random Password from the Command Line Hojung 2014.11.16 4747
436 How to increase the size of a Linux LVM by adding a new disk file Hojung 2014.11.14 4942
435 Configuring logrotate for Rails logs file Hojung 2014.11.13 5410
434 Installing Splunk on CentOS file Hojung 2014.10.31 7277
433 Web performance test with ab (ruby web, dd, ab) file Hojung 2014.10.01 6257
432 Web performance test with Pylot (ruby web, dd, pylot) file Hojung 2014.10.01 5800
431 Install and Configure NTP to Synchronize The System Clock (ntpd, ntpdate) Hojung 2014.09.17 5316
430 How to disable IPv6 in CentOS 6 Hojung 2014.09.04 5446
429 IDS with snort in CentOS (Snort, Barnyard2) Hojung 2014.08.19 8842
Board Pagination ‹ Prev 1 2 3 4 5 6 7 8 9 10 ... 23 Next ›
/ 23

Designed by sketchbooks.co.kr / sketchbook5 board skin

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5