千家信息网

怎么在HP-UX11.31下安装bash环境

发表于:2025-12-01 作者:千家信息网编辑
千家信息网最后更新 2025年12月01日,这篇文章主要讲解了"怎么在HP-UX11.31下安装bash环境",文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习"怎么在HP-UX11.31下安装bash
千家信息网最后更新 2025年12月01日怎么在HP-UX11.31下安装bash环境

这篇文章主要讲解了"怎么在HP-UX11.31下安装bash环境",文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习"怎么在HP-UX11.31下安装bash环境"吧!

bash默认:

(1)有命令历史记忆功能,可以使用上下键切换命令;

(2)命令输入为文件格式,进退简单,符合人的习惯;

(3)可以使用TAB键补全命令或目录;

(4)bash是以人为体验为中心设计;

sh默认:

(1)默认没有历史记忆功能,但可以通过配置环境变量达到.

(2)命令输入为vi模式,输入命令时,就像我们使用vi编辑,i是插入,x是删除,u撤销等,

(3)没有命令补齐功能.可以使用ECS键补齐目录.

(4)在功能设计上却有独到之处.

习惯了bash环境,下面我们就在HP-UX上安装bash环境做一个详细的安装,步骤如下所示:

1、检查HP_UX的版本

root@rx2660 [/]uname -a

HP-UX rx2660 B.11.31 U ia64 1544395069 unlimited-user license

2、下载相应的软件包

软件包下载地址:

http://hpux.connect.org.uk/hppd/cgi-bin/search?package=on&description=on&term=bash

看到有一个简介Run-time dependencies: gettext、libiconv、libunistring、readline、termcap是bash环境运行的依赖包,全部下载下来。

3、通过FTP上传到HP-UX操作系统的/bash文件夹下

root@rx2660 [/bash]ll

total 111440

-rw-r----- 1 root sys 10557440 Jan 11 02:29 bash-4.4.012-ia64_64-11.31.depot.gz

-rw-r----- 1 root sys 26501120 Jan 11 02:29 gettext-0.19.8.1-ia64_64-11.31.depot.gz

-rw-r----- 1 root sys 3450880 Jan 11 02:29 libiconv-1.15-ia64_64-11.31.depot.gz

-rw-r----- 1 root sys 10414080 Jan 11 02:29 libunistring-0.9.7-ia64_64-11.31.depot.gz

-rw-r----- 1 root sys 550089 Jan 11 02:59 make-4.2.1-ia64_64-11.31.depot.gz

-rw-r----- 1 root sys 3481600 Jan 11 02:29 readline-7.0.003-ia64_64-11.31.depot.gz

-rw-r----- 1 root sys 2078720 Jan 11 02:29 termcap-1.3.1-ia64_64-11.31.depot.gz

4、安装

安装下面的顺序依次进行安装,需要注意的是安装的路径必须是绝对路径,不能使用相对路径;如果是相对路径,就会出现下面报错信息:

root@rx2660 [/bash]swinstall -s make-4.2.1-ia64_64-11.31.depot.gz \*

======= 01/11/98 03:00:39 EAT BEGIN swinstall SESSION

(non-interactive) (jobid=rx2660-0011)

* Session started for user "root@rx2660".

* Beginning Selection

* Target connection succeeded for "rx2660:/".

ERROR: Could not contact host "make-4.2.1-ia64_64-11.31.depot.gz".

Make sure the hostname is correct and an absolute pathname is

specified (beginning with "/").

* Source connection failed for

"make-4.2.1-ia64_64-11.31.depot.gz:/var/spool/sw".

WARNING: More information may be found in the daemon logfile on this

target (default location is

make-4.2.1-ia64_64-11.31.depot.gz:/var/adm/sw/swagentd.log).

* Selection had errors.

======= 01/11/98 03:00:39 EAT END swinstall SESSION (non-interactive)

(jobid=rx2660-0011)

正确的安装方法:

root@rx2660 [/bash]swinstall -s /bash/gettext-0.19.8.1-ia64_64-11.31.depot.gz \*

======= 01/11/98 02:56:17 EAT BEGIN swinstall SESSION

(non-interactive) (jobid=rx2660-0009)

* Session started for user "root@rx2660".

* Beginning Selection

* Target connection succeeded for "rx2660:/".

* Source:

/bash/gettext-0.19.8.1-ia64_64-11.31.depot.gz

* Targets: rx2660:/

* Software selections:

gettext.gettext-MAN,r=0.19.8.1,a=HP-UX_B.11.31_64

gettext.gettext-RUN,r=0.19.8.1,a=HP-UX_B.11.31_64

* Selection succeeded.

* Beginning Analysis and Execution

* Session selections have been saved in the file

"/.sw/sessions/swinstall.last".

* The analysis phase succeeded for "rx2660:/".

* The execution phase succeeded for "rx2660:/".

* Analysis and Execution succeeded.

NOTE: More information may be found in the agent logfile using the

command "swjob -a log rx2660-0009 @ rx2660:/".

======= 01/11/98 02:56:43 EAT END swinstall SESSION (non-interactive)

(jobid=rx2660-0009)

root@rx2660 [/bash]swinstall -s /bash/termcap-1.3.1-ia64_64-11.31.depot.gz \*

======= 01/11/98 03:04:02 EAT BEGIN swinstall SESSION

(non-interactive) (jobid=rx2660-0014)

* Session started for user "root@rx2660".

* Beginning Selection

* Target connection succeeded for "rx2660:/".

* Source:

/bash/termcap-1.3.1-ia64_64-11.31.depot.gz

* Targets: rx2660:/

* Software selections:

termcap.termcap-RUN,r=1.3.1,a=HP-UX_B.11.31_64

* Selection succeeded.

* Beginning Analysis and Execution

* Session selections have been saved in the file

"/.sw/sessions/swinstall.last".

* The analysis phase succeeded for "rx2660:/".

* The execution phase succeeded for "rx2660:/".

* Analysis and Execution succeeded.

NOTE: More information may be found in the agent logfile using the

command "swjob -a log rx2660-0014 @ rx2660:/".

======= 01/11/98 03:04:06 EAT END swinstall SESSION (non-interactive)

(jobid=rx2660-0014)

root@rx2660 [/bash]swinstall -s /bash/libiconv-1.15-ia64_64-11.31.depot.gz \*

======= 01/11/98 03:04:36 EAT BEGIN swinstall SESSION

(non-interactive) (jobid=rx2660-0015)

* Session started for user "root@rx2660".

* Beginning Selection

* Target connection succeeded for "rx2660:/".

* Source:

/bash/libiconv-1.15-ia64_64-11.31.depot.gz

* Targets: rx2660:/

* Software selections:

libiconv.libiconv-MAN,r=1.15,a=HP-UX_B.11.31_64

libiconv.libiconv-RUN,r=1.15,a=HP-UX_B.11.31_64

* Selection succeeded.

* Beginning Analysis and Execution

* Session selections have been saved in the file

"/.sw/sessions/swinstall.last".

* The analysis phase succeeded for "rx2660:/".

* The execution phase succeeded for "rx2660:/".

* Analysis and Execution succeeded.

NOTE: More information may be found in the agent logfile using the

command "swjob -a log rx2660-0015 @ rx2660:/".

======= 01/11/98 03:04:39 EAT END swinstall SESSION (non-interactive)

(jobid=rx2660-0015)

root@rx2660 [/bash]swinstall -s /bash/libunistring-0.9.7-ia64_64-11.31.depot.gz \*

======= 01/11/98 03:05:22 EAT BEGIN swinstall SESSION

(non-interactive) (jobid=rx2660-0016)

* Session started for user "root@rx2660".

* Beginning Selection

* Target connection succeeded for "rx2660:/".

* Source:

/bash/libunistring-0.9.7-ia64_64-11.31.depot.gz

* Targets: rx2660:/

* Software selections:

libunistring.libunistring-INC,r=0.9.7,a=HP-UX_B.11.31_64

libunistring.libunistring-RUN,r=0.9.7,a=HP-UX_B.11.31_64

* Selection succeeded.

* Beginning Analysis and Execution

* Session selections have been saved in the file

"/.sw/sessions/swinstall.last".

* The analysis phase succeeded for "rx2660:/".

* The execution phase succeeded for "rx2660:/".

* Analysis and Execution succeeded.

NOTE: More information may be found in the agent logfile using the

command "swjob -a log rx2660-0016 @ rx2660:/".

======= 01/11/98 03:05:27 EAT END swinstall SESSION (non-interactive)

(jobid=rx2660-0016)

root@rx2660 [/bash]swinstall -s /bash/bash-4.4.012-ia64_64-11.31.depot.gz \*

======= 01/11/98 03:06:23 EAT BEGIN swinstall SESSION

(non-interactive) (jobid=rx2660-0017)

* Session started for user "root@rx2660".

* Beginning Selection

* Target connection succeeded for "rx2660:/".

* Source:

/bash/bash-4.4.012-ia64_64-11.31.depot.gz

* Targets: rx2660:/

* Software selections:

bash.bash-RUN,r=4.4.012,a=HP-UX_B.11.31_64

* Selection succeeded.

* Beginning Analysis and Execution

* Session selections have been saved in the file

"/.sw/sessions/swinstall.last".

* The analysis phase succeeded for "rx2660:/".

* The execution phase succeeded for "rx2660:/".

* Analysis and Execution succeeded.

NOTE: More information may be found in the agent logfile using the

command "swjob -a log rx2660-0017 @ rx2660:/".

======= 01/11/98 03:06:25 EAT END swinstall SESSION (non-interactive)

(jobid=rx2660-0017)

附带swinstall安装界面步骤:http://www.thegeekstuff.com/2010/06/install-remove-depot-packages/

5、查看软件包的安装情况

root@rx2660 [/bash]swlist

# Initializing...

# Contacting target "rx2660"...

#

# Target: rx2660:/

#

……(此处省略N行记录)

#

# Product(s) not contained in a Bundle:

#

OnlineJFS B.11.31 Online features of the VxFS File System

bash 4.4.012 bash

gettext 0.19.8.1 gettext

libiconv 1.15 libiconv

libunistring 0.9.7 libunistring

termcap 1.3.1 termcap

6、修改环境变量

root@rx2660 [/]chmod 744 .profile

root@rx2660 [/]vi .profile

".profile" 50 lines, 975 characters

# @(#)B.11.31_LR

# Default (example of) super-user's .profile file

# Do not put "." in PATH; it is a potential security breach.

# Do not put "/usr/local/bin" in PATH; it is a potential security breach.

# Example assumes /home/root exists.

set +u

PATH=/usr/sbin:$PATH:/sbin:/home/root

# Be sure that VUE does not invoke tty commands

if [ ! "$VUE" ]; then

# Set up the terminal:

if [ "$TERM" = "" ]

then

eval ` tset -s -Q -m ':?hp' `

else

eval ` tset -s -Q `

fi

stty erase "^H" kill "^U" intr "^C" eof "^D"

stty hupcl ixon ixoff

tabs

echo

echo "Value of TERM has been set to \"$TERM\". "

export TERM

".profile" 50 lines, 975 characters

# Set up shell environment:

set -u # error if undefined variable.

trap "echo 'logout root'" 0 # what to do on exit.

# Set up shell variables:

MAIL=/var/mail/root

# don't export, so only login shell checks.

echo "WARNING: YOU ARE SUPERUSER !!\n"

umask 027

#增加下面一句

export PATH=$PATH:/usr/local/bin

7、退出会话,重新登录检查bash是否可用

root@rx2660 [/]bash

/usr/lib/hpux64/dld.so: Unable to find library 'libhistory.so'.

Killed

运行bash,出现上面的报错信息:是由于缺少依赖的包

解决方法:

root@rx2660 [/bash]swinstall -s /bash/readline-7.0.003-ia64_64-11.31.depot.gz \*

======= 01/11/98 03:21:11 EAT BEGIN swinstall SESSION

(non-interactive) (jobid=rx2660-0019)

* Session started for user "root@rx2660".

* Beginning Selection

* Target connection succeeded for "rx2660:/".

* Source:

/bash/readline-7.0.003-ia64_64-11.31.depot.gz

* Targets: rx2660:/

* Software selections:

readline.readline-INC,r=7.0.003,a=HP-UX_B.11.31_64

readline.readline-RUN,r=7.0.003,a=HP-UX_B.11.31_64

* Selection succeeded.

* Beginning Analysis and Execution

* Session selections have been saved in the file

"/.sw/sessions/swinstall.last".

* The analysis phase succeeded for "rx2660:/".

* The execution phase succeeded for "rx2660:/".

* Analysis and Execution succeeded.

NOTE: More information may be found in the agent logfile using the

command "swjob -a log rx2660-0019 @ rx2660:/".

======= 01/11/98 03:21:15 EAT END swinstall SESSION (non-interactive)

(jobid=rx2660-0019)

再次运行bash成功,这样就可以使用tab键补全指令信息

root@rx2660 [/]bash

bash-4.4#

bash-4.4#

感谢各位的阅读,以上就是"怎么在HP-UX11.31下安装bash环境"的内容了,经过本文的学习后,相信大家对怎么在HP-UX11.31下安装bash环境这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是,小编将为大家推送更多相关知识点的文章,欢迎关注!

环境 命令 功能 路径 信息 软件 软件包 学习 输入 运行 内容 历史 变量 情况 文件 方法 步骤 目录 记忆 面的 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 信阳货币量化交易软件开发报价 三级网络技术教程2017 网络安全相关报道 东川区品牌软件开发市场价 云服务器的费用入账科目是 太原数字币量化交易软件开发价格 数据库表空间自动扩容失败 云服务器桌面连接命令 大学数据库成绩 用两个关键词查数据库 合肥市软件开发培训哪家好 魔兽正式服三区服务器 杭州正规网络技术市场价格 一台服务器可以多人同时操作么 网络安全与管理笔记 检测网络安全与信息宣传工作 网网络安全手抄报图片 戴尔服务器侧边底部代码 如何查询戴尔服务器型号 阿里云数据库怎么重启 国内服务器存储上市公司 2019网络安全技术能手 数据库设计 心得 联通骨干云服务器延迟 广乐网络技术有限公司官网 聊城戴尔服务器供货商 网络安全大比武的培训心得 无人机软件开发公司有哪些 上海早道网络技术有限公司 FIFA22链接服务器超慢
0