一、centos6.6安裝Docker 1.7.1 / linux核心2.6升級到3.11.4
Docker官網上針對Centos的的安裝需求如下:
Docker requires a 64-bit installation regardless of your CentOS version. Also, your kernel must be 3.10 at minimum, which CentOS 7 runs.
看來如果我們想在低於3.x核心的作業系統(比如Centos6.6)上裝Docker最新版,勢必要升級核心了。且不說升級核心步驟繁瑣、容易出錯,單就這種比較怪異的搭配:Centos6.x
+ Kerneol3.X + Docker1.11,就沒有人能夠保證其穩定性。故我的建議是設法在Centos6.6上安裝較低版本的
[[email protected] docker]# uname -a
Linux bogon 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/linux
[[email protected] docker]# cat /etc/redhat-release
CentOS release 6.6 (Final)
[[email protected] docker]# docker
bash: docker: command not found
[[email protected] docker]# yum install docker
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* epel: dl.fedoraproject.org
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
http://repos.fedorapeople.org/repos/peter/erlang/epel-6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
No package docker available.
Error: Nothing to do
[[email protected] docker]# yum install docker-io
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.tuna.tsinghua.edu.cn
* epel: pubmirror1.math.uh.edu
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
http://repos.fedorapeople.org/repos/peter/erlang/epel-6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
No package docker-io available.
Error: Nothing to do
可以看到,在Centos6.7的標準yum源中已經沒有Docker的安裝包了,這時,我們需要安裝EPEL。
EPEL(Extra Packages for Enterprise Linux),企業版Linux額外包,RHEL分佈非標準包的社群類庫。安裝如下:
[[email protected] docker]# rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Retrieving http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
warning: /var/tmp/rpm-tmp.em6i9i: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing... ########################################### [100%]
1:epel-release ########################################### [100%]
接下來安裝Docker1.7.1,在1.7.1中,安裝包名稱為docker-io,故我們的安裝命令如下:
[[email protected] docker]# yum install docker-io
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink | 7.1 kB 00:00
* base: mirrors.tuna.tsinghua.edu.cn
* epel: mirrors.tuna.tsinghua.edu.cn
* extras: mirrors.tuna.tsinghua.edu.cn
* updates: mirrors.tuna.tsinghua.edu.cn
epel | 4.3 kB 00:00
epel/primary_db | 5.9 MB 00:13
http://repos.fedorapeople.org/repos/peter/erlang/epel-6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
Resolving Dependencies
--> Running transaction check
---> Package docker-io.x86_64 0:1.7.1-2.el6 will be installed
--> Processing Dependency: lxc for package: docker-io-1.7.1-2.el6.x86_64
--> Processing Dependency: libcgroup for package: docker-io-1.7.1-2.el6.x86_64
--> Running transaction check
---> Package libcgroup.x86_64 0:0.40.rc1-23.el6 will be installed
---> Package lxc.x86_64 0:1.0.9-1.el6 will be installed
--> Processing Dependency: lua-lxc(x86-64) = 1.0.9-1.el6 for package: lxc-1.0.9-1.el6.x86_64
--> Processing Dependency: lua-alt-getopt for package: lxc-1.0.9-1.el6.x86_64
--> Processing Dependency: liblxc.so.1()(64bit) for package: lxc-1.0.9-1.el6.x86_64
--> Running transaction check
---> Package lua-alt-getopt.noarch 0:0.7.0-1.el6 will be installed
---> Package lua-lxc.x86_64 0:1.0.9-1.el6 will be installed
--> Processing Dependency: lua-filesystem for package: lua-lxc-1.0.9-1.el6.x86_64
---> Package lxc-libs.x86_64 0:1.0.9-1.el6 will be installed
--> Running transaction check
---> Package lua-filesystem.x86_64 0:1.4.2-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================================================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================================================================================================================
Installing:
docker-io x86_64 1.7.1-2.el6 epel 4.6 M
Installing for dependencies:
libcgroup x86_64 0.40.rc1-23.el6 base 131 k
lua-alt-getopt noarch 0.7.0-1.el6 epel 6.9 k
lua-filesystem x86_64 1.4.2-1.el6 epel 24 k
lua-lxc x86_64 1.0.9-1.el6 epel 16 k
lxc x86_64 1.0.9-1.el6 epel 122 k
lxc-libs x86_64 1.0.9-1.el6 epel 257 k
Transaction Summary
================================================================================================================================================================================================================================
Install 7 Package(s)
Total download size: 5.1 M
Installed size: 20 M
Is this ok [y/N]: y
Downloading Packages:
(1/7): docker-io-1.7.1-2.el6.x86_64.rpm | 4.6 MB 00:10
(2/7): libcgroup-0.40.rc1-23.el6.x86_64.rpm | 131 kB 00:00
(3/7): lua-alt-getopt-0.7.0-1.el6.noarch.rpm | 6.9 kB 00:00
(4/7): lua-filesystem-1.4.2-1.el6.x86_64.rpm | 24 kB 00:00
(5/7): lua-lxc-1.0.9-1.el6.x86_64.rpm | 16 kB 00:00
(6/7): lxc-1.0.9-1.el6.x86_64.rpm | 122 kB 00:00
(7/7): lxc-libs-1.0.9-1.el6.x86_64.rpm | 257 kB 00:00
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 457 kB/s | 5.1 MB 00:11
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
Userid : EPEL (6) <[email protected]>
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 : lxc-libs-1.0.9-1.el6.x86_64 1/7
Installing : lua-filesystem-1.4.2-1.el6.x86_64 2/7
Installing : lua-lxc-1.0.9-1.el6.x86_64 3/7
Installing : libcgroup-0.40.rc1-23.el6.x86_64 4/7
Installing : lua-alt-getopt-0.7.0-1.el6.noarch 5/7
Installing : lxc-1.0.9-1.el6.x86_64 6/7
Installing : docker-io-1.7.1-2.el6.x86_64 7/7
Verifying : lua-lxc-1.0.9-1.el6.x86_64 1/7
Verifying : lxc-libs-1.0.9-1.el6.x86_64 2/7
Verifying : lxc-1.0.9-1.el6.x86_64 3/7
Verifying : docker-io-1.7.1-2.el6.x86_64 4/7
Verifying : lua-alt-getopt-0.7.0-1.el6.noarch 5/7
Verifying : libcgroup-0.40.rc1-23.el6.x86_64 6/7
Verifying : lua-filesystem-1.4.2-1.el6.x86_64 7/7
Installed:
docker-io.x86_64 0:1.7.1-2.el6
Dependency Installed:
libcgroup.x86_64 0:0.40.rc1-23.el6 lua-alt-getopt.noarch 0:0.7.0-1.el6 lua-filesystem.x86_64 0:1.4.2-1.el6 lua-lxc.x86_64 0:1.0.9-1.el6 lxc.x86_64 0:1.0.9-1.el6 lxc-libs.x86_64 0:1.0.9-1.el6
Complete!
[[email protected] docker]# docker -v
Docker version 1.7.1, build 786b29d/1.7.1
安裝完成!
至此,本想升級Linux核心,但按照下面的教程沒有成功,所以 http://www.docker.org.cn/book/docker/what-is-docker-16.html ,docker入門手冊繼續!docker
pull learn/tutorial時報錯,繼續下一步(自動下載),就OK!
======================================================================================================================
檢查當前版本
[[email protected]~]$ uname -r
2.6.32-279.el6.x86_64
檢視當前的/boot/grub/grub.conf內容:
下面使用root使用者操作:
[[email protected]~]# cat /boot/grub/grub.conf
#grub.conf generated by anaconda
#
#Note that you do not have to rerun grub after making changes to this file
#NOTICE: You do not have a /bootpartition. This means that
# all kernel and initrd paths arerelative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version roroot=/dev/sda1
# initrd/boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
titleCentOS (2.6.32-279.el6.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.32-279.el6.x86_64ro root=UUID=41262435-0821-4978-a349-5edf0b1caf32 rd_NO_LUKS rd_NO_LVMLANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgbquiet
initrd/boot/initramfs-2.6.32-279.el6.x86_64.img
安裝所需要的工具:
[[email protected]~]# yum install wget gcc gc bc gd make perl ncursec-devel xz –y
如果此處,執行時遇到問題,比如:
Loaded plugins: fastestmirror, security
Determining fastest mirrors
Setting up Install Process
No package gc available.
No package ncursec-devel available.
Nothing to do
【這是由於沒有配置正確yum的源導致,可通過ll /etc/yum.repos.d/來檢查,看看是否是存在CentOS-Base.repo,
以及內容:
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6】
下載核心檔案:
cd /usr/src
xz -d
Linux-3.11.4.tar.xz # 解壓.xz (補充:目前可以直接使用 tar xvJf ***.tar.xz來解壓)
tar -xvf linux-3.11.4.tar # 解壓.tar
cd linux-3.11.4
清理系統內的環境變數及依賴
make mrproper #清除環境變數
cp /boot/config-* /usr/src/kernels/ #為了方便編譯配置,將/boot下的配置檔案複製到當前目錄下的/usr/src/kernels/檔案中
make menuconfig出現General setup選單,根據自己的需要對Kernel進行增、減。
報錯時:(yum install ncurses ncurses-devel)
make clean
make bzImage #生成核心檔案
make modules #編譯模組(注:此處需要很長時間,請耐心等待,給我的環境輕鬆一個半小時+)
make modules_install #安裝模組
make install #安裝,此處報了一個vmware的錯【ERROR: modinfo: could not find module vmware_balloon】,是因為在VM中執行導致的,但不影響升級
下面修改/boot/grub/grub.conf檔案,把default=1改為0
[[email protected]]# vi /boot/grub/grub.conf
#grub.conf generated by anaconda
#
#Note that you do not have to rerun grub after making changes to this file
#NOTICE: You do not have a /bootpartition. This means that
# all kernel and initrd paths arerelative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version roroot=/dev/sda1
# initrd/boot/initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
titleCentOS (3.11.4)
root (hd0,0)
kernel /boot/vmlinuz-3.11.4 roroot=UUID=41262435-0821-4978-a349-5edf0b1caf32 rd_NO_LUKS rd_NO_LVMLANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgbquiet
initrd /boot/initramfs-3.11.4.img
titleCentOS (2.6.32-279.el6.x86_64)
root (hd0,0)
kernel/boot/vmlinuz-2.6.32-279.el6.x86_64 roroot=UUID=41262435-0821-4978-a349-5edf0b1caf32 rd_NO_LUKS rd_NO_LVMLANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgbquiet
initrd/boot/initramfs-2.6.32-279.el6.x86_64.img
重啟之後看看版本號:
reboot
uname -r
[[email protected] ~]$ uname -r
3.11.4
此時升級完成。
相關推薦
一、centos6.6安裝Docker 1.7.1 / linux核心2.6升級到3.11.4
Docker官網上針對Centos的的安裝需求如下: Docker requires a 64-bit installation regardless of your CentOS version. Also, your kernel must be 3.10 at min
一、CentOS6.5安裝ElasticSearch5.5完整紀錄與問題總結
前言:網上有很多相關方面的教程,但是卻沒有系統的體系,最近在學ElasticSearch,所以先整理一份,互相交流學習。 整體過程概述 1. 設定普通使用者,ElasticSearch預設只能使用普通使用者啟動。 2. 配置環境,需要依賴JDK環境
核心模組編譯、載入&解除安裝及檢視執行結果 -- linux核心
MODPOST 1 modules看到這個的話說明編譯通過了,生成正確的核心模組檔案hellomod.ko =============================================== [載入] 執行insmod hellomod.ko [解除安裝] rmmod hellomod [檢視核心
linux核心2.6升級到3.11.4
檢查當前版本 [[email protected]~]$ uname -r 2.6.32-279.el6.x86_64 檢視當前的/boot/grub/grub.conf內容: 下面使用root使用者操作: [[email protected]~]#
Linux核心2.6.34.14新增系統呼叫及編譯方法(CentOS-6.4-x86_64)
<?xml version="1.0" encoding="UTF-8"?> //我新增系統呼叫步驟,僅供參考,尤其是系統呼叫的實現部分,建議大家自己寫,除了我這種好像還可以用sys_open系列來寫 #define 核心版本 linux-2.6.34.14
170503、centos6.5安裝mysql5.6.30
pro groupadd init.d 解決方法 pad 配置文件 虛擬機 isp cnblogs 準備:虛擬機地址:192.168.0.110 安裝目錄/usr/local/ 首先卸載已經安裝的mysql使用命令查看rpm -qa | grep mysql卸載使用 rp
centos 7.6 安裝 docker
先移除舊的 docker,然後再安裝 docker-ce。 sudo yum remove docker \ docker-client \ docker-client-latest \
CentOS6.9安裝mysql-5.7.18-1.el6.i686.rpm-bundle.tar
先去(http://mirrors.sohu.com/mysql/MySQL-5.7/)下載 將下載的檔案上傳到伺服器/usr/local下,接著執行如下命令 rpm -qa|grep mysql #檢視mysql是否安裝,如果已經安裝需要解除安裝,如果是 yum -y remove
CentOS6.5安裝mysql-5.7.18-1.el6.x86_64.rpm-bundle.tar
先去官網(https://dev.mysql.com/downloads/mysql/),在Select Operating System選擇Red Hat Enterprise Lin
jdk1.6,1.7,1.8解壓版無需安裝(64位)
jdk1.6,1.7,1.8解壓使用版64位無需安裝,歡迎下載連結:https://pan.baidu.com/s/1qG2CjTI4maF78zz8PPiWag 密碼:jj67也可以使用下面的連結下載安裝:1、java SE 1.6各個版本 jdk http://www.o
elasticsearch-1.7.1 (es Windows 64) 安裝、啟動、停止的詳細記錄
elastic adj.有彈力的;可伸縮的;靈活的 restful adj.平靜的,悠閒的,讓人得到休息的;安生RESTful API 為了建立 Elasticsearch ,第一步是確保正確安裝Java 環境。我就預設安裝了,因為我確實安裝了,jdk 1.8版本的。 這個
一、cent OS安裝配置JDK
創建 本地文件 http acl network 環境變量 目錄 target jdk下載 到oracle官網下載JDKhttp://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.htm
Centos6.6安裝選包及基礎場景說明2
pro 場景 sysconfig text eth0 fig http ima blog 架構師11期ha-10.8 添加兩個網卡,橋接,再啟動機器ff setup vi /etc/sysconfig/network-scripts/ifcfg-eth0Centos6.6安
CentOS6.5 安裝docker
pos rpm 技術 問題 arch ews .aspx project 內核 一、環境 1.本次是在centOS6.5上安裝docker 2.centos6.5的內核是 3.首先安裝epel epel-release-6-8.noarch.
九周第四次課(2月26日) 11.1 LAMP架構介紹 11.2 MySQL、MariaDB介紹 11.3/11.4/11.5 MySQL安裝 擴展 mysql5.5源碼編譯安裝
when image safe x86 lease x86_64 roc use my.cnf 11.1 LAMP架構介紹11.2 MySQL、MariaDB介紹11.3/11.4/11.5 MySQL安裝擴展mysql5.5源碼編譯安裝 http://www.amin
一、使用pip安裝Python包
nump buck 版本 一個 包管理 步驟 image IT 是否 一、使用pip安裝Python包 大多數較新的Python版本都自帶pip,因此首先可檢查系統是否已經安裝了pip。在Python3中,pip有時被稱為pip3. 1、在Linux和
mysql安裝-CentOS6下解壓安裝mysql-5.7.20-linux-glibc2.12-x86_64.tar.gz
cannot x86 sed 一次 article www. 連接 初始 fresh 刪除已經安裝版本 yum list installed mysql [root@localhost ~]# yum list installed mysql Loaded plugi
一、Git系列安裝
windows 至少 fin href 進行 roc fec 系統 -o 一、GIt簡介 Git是一個開源的分布式版本控制系統,用以有效、高速的處理從很小到非常大的項目版本管理。Git 是 Linus Torvalds 為了幫助管理 Linux 內核開發而開發的一個開放源碼
2、CentOS6.5 安裝Open×××使用easy-rsa3.0.3
心跳 重新啟動 config 8.0 def 互訪 tap tables issue 1、安裝eple源yum install -y epel-releasesed -i ‘s/mirrorlist=https/mirrorlist=http/g‘ /etc/yum.rep