下载编译安装bash

心血来潮,编译安装了一下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>

这是自由软件,您可以自由地更改和重新发布。

在法律允许的范围内没有担保.



  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值