본문 바로가기
?

단축키

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 4845
447 How to install tcpreplay on CentOS 6.5 Hojung 2015.08.21 10157
446 Install et131x network interface driver in CentOS 6 (LW25-BDUO3) file Hojung 2015.07.03 5811
445 How to find CentOS and kernel version Hojung 2015.04.30 5220
444 MD5 Test Hojung 2015.04.01 5233
443 MAC times in Linux (atime, mtime, ctime, crtime, touch, stat, debugfs) Hojung 2015.01.13 6333
442 How to generate a key with passphrase Hojung 2014.11.22 6363
441 Most Common OpenSSL Commands Hojung 2014.11.21 6962
440 How to use screen command Hojung 2014.11.17 5243
439 snorby (on testing) Hojung 2014.11.17 8062
438 APM (Apache + PHP + MySQL) with phpmyadmin in CentOS VM Hojung 2014.11.16 6421
437 10 Ways to Generate a Random Password from the Command Line Hojung 2014.11.16 5436
436 How to increase the size of a Linux LVM by adding a new disk file Hojung 2014.11.14 5784
435 Configuring logrotate for Rails logs file Hojung 2014.11.13 6145
434 Installing Splunk on CentOS file Hojung 2014.10.31 8035
433 Web performance test with ab (ruby web, dd, ab) file Hojung 2014.10.01 6970
432 Web performance test with Pylot (ruby web, dd, pylot) file Hojung 2014.10.01 6565
431 Install and Configure NTP to Synchronize The System Clock (ntpd, ntpdate) Hojung 2014.09.17 6049
430 How to disable IPv6 in CentOS 6 Hojung 2014.09.04 6260
429 IDS with snort in CentOS (Snort, Barnyard2) Hojung 2014.08.19 9619
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