心血来潮,编译安装了一下bash.
先安装C编译器,make程序,内核头文件
[root@talenpc ~]# yum install gcc make kernel-headers
下载bash源码文件,在官方下载,不知道现在最新的版本是多少,使用ftp登陆下载
[root@talenpc ~]$ ftp ftp.gnu.org
Trying 208.118.235.20...
Connected to ftp.gnu.org (208.118.235.20).
220 GNU FTP server ready.
Name (ftp.gnu.org:talen): anonymous
230-Due to U.S. Export Regulations, all cryptographic software on this
230-site is subject to the following legal notice:
230-
230- This site includes publicly available encryption source code
230- which, together with object code resulting from the compiling of
230- publicly available source code, may be exported from the United
230- States under License Exception "TSU" pursuant to 15 C.F.R. Section
230- 740.13(e).
230-
230-This legal notice applies to cryptographic software only. Please see
230-the Bureau of Industry and Security (www.bxa.doc.gov) for more
230-information about current U.S. regulations.
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd gnu/bash
250 Directory successfully changed.
ftp> hash
Hash mark printing on (1024 bytes/hash mark).
ftp> get bash-4.2.tar.gz
local: bash-4.2.tar.gz remote: bash-4.2.tar.gz
227 Entering Passive Mode (208,118,235,20,106,32).
150 Opening BINARY mode data connection for bash-4.2.tar.gz (7009201 bytes).
####################################################################
...
226 Transfer complete.
7009201 bytes received in 91.2 secs (76.82 Kbytes/sec)
ftp> quit
221 Goodbye.
将文件放置到/opt目录,解压缩
[root@talenpc opt]# tar zxvf bash-4.2.tar.gz
[root@talenpc opt]# cd bash-4.2/
[root@talenpc bash-4.2]# ./configure ..zzZZ时间还挺漫长
[root@talenpc bash-4.2]# make
[root@talenpc bash-4.2]# make install
安装完毕
[root@talenpc bash-4.2]# rpm -qa |grep bash
bash-4.1.2-8.el6.i686
[root@talenpc ~]# /usr/local/bin/bash --version
GNU bash, 版本 4.2.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
许可证 GPLv3+: GNU GPL 许可证版本3或者更高 <http://gnu.org/licenses/gpl.html>
这是自由软件,您可以自由地更改和重新发布。
先安装C编译器,make程序,内核头文件
[root@talenpc ~]# yum install gcc make kernel-headers
下载bash源码文件,在官方下载,不知道现在最新的版本是多少,使用ftp登陆下载
[root@talenpc ~]$ ftp ftp.gnu.org
Trying 208.118.235.20...
Connected to ftp.gnu.org (208.118.235.20).
220 GNU FTP server ready.
Name (ftp.gnu.org:talen): anonymous
230-Due to U.S. Export Regulations, all cryptographic software on this
230-site is subject to the following legal notice:
230-
230- This site includes publicly available encryption source code
230- which, together with object code resulting from the compiling of
230- publicly available source code, may be exported from the United
230- States under License Exception "TSU" pursuant to 15 C.F.R. Section
230- 740.13(e).
230-
230-This legal notice applies to cryptographic software only. Please see
230-the Bureau of Industry and Security (www.bxa.doc.gov) for more
230-information about current U.S. regulations.
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd gnu/bash
250 Directory successfully changed.
ftp> hash
Hash mark printing on (1024 bytes/hash mark).
ftp> get bash-4.2.tar.gz
local: bash-4.2.tar.gz remote: bash-4.2.tar.gz
227 Entering Passive Mode (208,118,235,20,106,32).
150 Opening BINARY mode data connection for bash-4.2.tar.gz (7009201 bytes).
####################################################################
...
226 Transfer complete.
7009201 bytes received in 91.2 secs (76.82 Kbytes/sec)
ftp> quit
221 Goodbye.
将文件放置到/opt目录,解压缩
[root@talenpc opt]# tar zxvf bash-4.2.tar.gz
[root@talenpc opt]# cd bash-4.2/
[root@talenpc bash-4.2]# ./configure ..zzZZ时间还挺漫长
[root@talenpc bash-4.2]# make
[root@talenpc bash-4.2]# make install
安装完毕
[root@talenpc bash-4.2]# rpm -qa |grep bash
bash-4.1.2-8.el6.i686
[root@talenpc ~]# /usr/local/bin/bash --version
GNU bash, 版本 4.2.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2011 Free Software Foundation, Inc.
许可证 GPLv3+: GNU GPL 许可证版本3或者更高 <http://gnu.org/licenses/gpl.html>
这是自由软件,您可以自由地更改和重新发布。
在法律允许的范围内没有担保.