Archive for the 'docker' Category

Menginstall Docker di CentOS 6.5

June 16, 2014

Setelah baru cuma sekadar baca – baca mengenai docker dan linux container, sepertinya menarik.

Akhirnya baru hari ini ada waktu untuk ngoprek coba install dan bikin – bikin docker.
Ternyata tidak sesusah keliatannya, syukurlah dokumentasi dan manual installasinya disediakan lumayan lengkap dan mudah diikuti.

Malah ada emulator-nya segala buat yang mau sekadar nyoba, dan ternyata disitu racunnya, jadi keterusan install beneran deh. 🙂

docker.com

Kali ini saya coba install di vps saya yang cuma punya memory 512MB dan disk cuma 20GB dengan sistem operasi Linux CentOS 6.5

Berikut catatannya:

Untuk CentOS 6 packet rpm docker-io ada pada repository epel, untuk menggunakan epel cukup download packet epel-release nya dialamat berikut:

http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html

 

[root@dudulz-box ~]# wget http://kartolo.sby.datautama.net.id/EPEL/6/i386/epel-release-6-8.noarch.rpm
--2014-06-16 06:20:14-- http://kartolo.sby.datautama.net.id/EPEL/6/i386/epel-release-6-8.noarch.rpm
Resolving kartolo.sby.datautama.net.id... 123.255.202.74, 2403:ba00:602::1e
Connecting to kartolo.sby.datautama.net.id|123.255.202.74|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14540 (14K) [application/x-redhat-package-manager]
Saving to: âepel-release-6-8.noarch.rpmâ

100%[======================================>] 14,540 34.7K/s in 0.4s

2014-06-16 06:20:14 (34.7 KB/s) - âepel-release-6-8.noarch.rpmâ

Install package epel-release nya:

[root@dudulz-box ~]# rpm -ivh epel-release-6-8.noarch.rpm
warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]

Sekarang coba cari package docker-io:

[root@dudulz-box ~]# yum search docker-io
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/metalink | 13 kB 00:00
* base: mirrors.kernel.org
* epel: mirrors.kernel.org
* extras: mirrors.kernel.org
* updates: mirrors.kernel.org
epel | 4.4 kB 00:00
epel/primary_db | 6.2 MB 00:00
epel/pkgtags | 1.0 MB 00:00
============================ N/S Matched: docker-io ============================
docker-io.x86_64 : Automates deployment of containerized applications

Name and summary matches only, use "search all" for everything.

Ok, sudah ketemu. Mari mulai kita install docker-io nya sekarang:

[root@dudulz-box ~]# yum install docker-io
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.kernel.org
* epel: mirrors.kernel.org
* extras: mirrors.kernel.org
* updates: mirrors.kernel.org
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package docker-io.x86_64 0:0.11.1-4.el6 will be installed
--> Processing Dependency: xz for package: docker-io-0.11.1-4.el6.x86_64
--> Processing Dependency: lxc for package: docker-io-0.11.1-4.el6.x86_64
--> Processing Dependency: libcgroup for package: docker-io-0.11.1-4.el6.x86_64
--> Running transaction check
---> Package libcgroup.x86_64 0:0.40.rc1-5.el6_5.1 will be installed
---> Package lxc.x86_64 0:0.9.0-2.el6 will be installed
--> Processing Dependency: liblxc.so.0()(64bit) for package: lxc-0.9.0-2.el6.x86 _64
---> Package xz.x86_64 0:4.999.9-0.3.beta.20091007git.el6 will be installed
--> Running transaction check
---> Package lxc-libs.x86_64 0:0.9.0-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
docker-io x86_64 0.11.1-4.el6 epel 4.4 M
Installing for dependencies:
libcgroup x86_64 0.40.rc1-5.el6_5.1 updates 125 k
lxc x86_64 0.9.0-2.el6 epel 78 k
lxc-libs x86_64 0.9.0-2.el6 epel 116 k
xz x86_64 4.999.9-0.3.beta.20091007git.el6 base 137 k

Transaction Summary
================================================================================
Install 5 Package(s)

Total download size: 4.9 M
Installed size: 24 M
Is this ok [y/N]: y
Downloading Packages:
(1/5): docker-io-0.11.1-4.el6.x86_64.rpm | 4.4 MB 00:00
(2/5): libcgroup-0.40.rc1-5.el6_5.1.x86_64.rpm | 125 kB 00:00
(3/5): lxc-0.9.0-2.el6.x86_64.rpm | 78 kB 00:00
(4/5): lxc-libs-0.9.0-2.el6.x86_64.rpm | 116 kB 00:00
(5/5): xz-4.999.9-0.3.beta.20091007git.el6.x86_64.rpm | 137 kB 00:00
--------------------------------------------------------------------------------
Total 32 MB/s | 4.9 MB 00:00
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOK EY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
Userid : EPEL (6)
Package: epel-release-6-8.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : libcgroup-0.40.rc1-5.el6_5.1.x86_64 1/5
Installing : lxc-libs-0.9.0-2.el6.x86_64 2/5
Installing : lxc-0.9.0-2.el6.x86_64 3/5
Installing : xz-4.999.9-0.3.beta.20091007git.el6.x86_64 4/5
Installing : docker-io-0.11.1-4.el6.x86_64 5/5
Verifying : xz-4.999.9-0.3.beta.20091007git.el6.x86_64 1/5
Verifying : lxc-libs-0.9.0-2.el6.x86_64 2/5
Verifying : docker-io-0.11.1-4.el6.x86_64 3/5
Verifying : libcgroup-0.40.rc1-5.el6_5.1.x86_64 4/5
Verifying : lxc-0.9.0-2.el6.x86_64 5/5

Installed:
docker-io.x86_64 0:0.11.1-4.el6

Dependency Installed:
libcgroup.x86_64 0:0.40.rc1-5.el6_5.1
lxc.x86_64 0:0.9.0-2.el6
lxc-libs.x86_64 0:0.9.0-2.el6
xz.x86_64 0:4.999.9-0.3.beta.20091007git.el6

Complete!

Sampai disini proses installasinya sudah selesai, langkah berikutnya adalah menjalankan service docker.

Cek versi docker:

[root@dudulz-box ~]# docker version
Client version: 0.11.1
Client API version: 1.11
Go version (client): go1.2.1
Git commit (client): fb99f99/0.11.1
2014/06/16 06:21:41 Get http:///var/run/docker.sock/v1.11/version: dial unix /var/run/docker.sock: no such file or directory

Jalankan service docker:

[root@dudulz-box ~]# service docker start
Starting cgconfig service: [ OK ]
Starting docker: [ OK ]

Masukkan service docker ke dalam start up script jika mau langsung up bila servernya restart:

[root@dudulz-box ~]# chkconfig docker on

Setelah selesai semua, nah disinilah mulai menarik.
Tapi sayang kalau saya lanjutkan disini, bersambung aja deh 😀

Salam.

Advertisements