본문 바로가기
?

단축키

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
번호 제목 글쓴이 날짜 조회 수
8 Most Common OpenSSL Commands Hojung 2014.11.21 6779
7 How to generate a key with passphrase Hojung 2014.11.22 6150
6 MAC times in Linux (atime, mtime, ctime, crtime, touch, stat, debugfs) Hojung 2015.01.13 6164
5 MD5 Test Hojung 2015.04.01 5080
4 How to find CentOS and kernel version Hojung 2015.04.30 4940
3 Install et131x network interface driver in CentOS 6 (LW25-BDUO3) file Hojung 2015.07.03 5622
2 How to install tcpreplay on CentOS 6.5 Hojung 2015.08.21 9926
» How to install Java on linux with no Internet connectivity (using local repository) Hojung 2015.12.22 4652
Board Pagination ‹ Prev 1 ... 14 15 16 17 18 19 20 21 22 23 Next ›
/ 23

Designed by sketchbooks.co.kr / sketchbook5 board skin

나눔글꼴 설치 안내


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

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

설치 취소

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5