实验六 Linux中软件的安装与卸载_第1页
实验六 Linux中软件的安装与卸载_第2页
实验六 Linux中软件的安装与卸载_第3页
实验六 Linux中软件的安装与卸载_第4页
实验六 Linux中软件的安装与卸载_第5页
已阅读5页,还剩6页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、实验六 Linux中软件的安装与卸载(一)rpm软件包查询校验【需求】u 查询系统是否安装了openssh服务器;u 查询ls属于哪个软件包;u 查询软件包openssh-server包含了哪些文件;u 校验/etc/inittab是否发生改变;u 校验软件包openssh-server。【系统及软件环境】操作系统:Red Hat AS 4.0【实验配置文件及命令】1配置文件:无2命令:/bin/rpm,/usr/bin/which【实验步骤】1 查询系统是否安装了openssh服务器。rootlinux /# rpm -qa | grep opensshopenssh-server-3.6.

2、1p2-33.30.1openssh-askpass-gnome-3.6.1p2-33.30.1openssh-3.6.1p2-33.30.1openssh-askpass-3.6.1p2-33.30.1openssh-clients-3.6.1p2-33.30.12 查询ls属于哪个软件包。rootlinux /# which lsalias ls='ls -color=tty' /bin/lsrootlinux /# rpm -qf /bin/lscoreutils-4.5.3-263查询软件包openssh-server包含了哪些文件。rootlinux /# rpm -

3、ql openssh-server/etc/pam.d/sshd/etc/rc.d/init.d/sshd/etc/ssh/etc/ssh/sshd_config/usr/libexec/openssh/sftp-server/usr/sbin/sshd/usr/share/man/man5/sshd_config.5.gz/usr/share/man/man8/sftp-server.8.gz/usr/share/man/man8/sshd.8.gz/var/empty/sshd4校验/etc/inittab是否发生改变。rootlinux /# rpm -Vf /etc/inittabS.

4、5.T c /etc/inittabS.5.T c /etc/rc.d/rc.localS.5.T c /etc/sysctl.conf5校验软件包openssh-server。rootlinux /# rpm -V openssh-serverS.5.T c /etc/pam.d/sshd.5.T c /etc/ssh/sshd_config【实验故障与分析】 下面的表格中列出了在实验过程中可能会出现的故障及其解决方法。看看是不是对你的实验有所帮助?如果你在实验中还遇到了其他的问题或故障,不妨记录在表格中,通过自己的实践,或者与老师、同学一起找找解决问题的方法。序 号实验故障分析与解决1rp

5、m -ql openssh-server没有输出可能是因为没有安装该软件包23【启发联想】1如何查询软件包的信息?2当校验某个文件发现了可疑的改变时,该如何处理?(二)rpm软件包安装的依赖性问题处理【需求】u 因开发需要,系统需要安装gcc软件。【系统及软件环境】1操作系统:Red Hat AS 4.02软件:gcc-3.4.5-2【实验配置文件及命令】1配置文件:无2命令:/bin/rpm【实验步骤】1查询系统是否安装了gcc。rootlinux /tmp# rpm -qa | grep gcclibgcc-3.4.5-2compat-libgcc-296-2.96-132.7.2上面的结

6、果显示表明系统没有安装gcc,所以需要从网上下载该软件包,或插入包含该软件的光盘。本实验假设所有软件包都已放在/tmp目录中。2安装gcc-3.4.5-2。rootlinux /tmp# rpm -ivh gcc-3.4.5-2.i386.rpmwarning: gcc-3.4.5-2.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60eerror: Failed dependencies: glibc-devel >= 2.2.90-12 is needed by gcc-3.4.5-2.i386 Suggested resolution

7、s: glibc-devel-2.3.4-2.19.i386.rpm上面的错误显示表明系统在安装gcc时出现了依赖性关系问题,gcc依赖于glibc-devel,所以要想安装gcc,必须先安装glibc-devel。3安装glibc-devel。rootlinux /tmp# rpm -ivh glibc-devel-2.3.4-2.19.i386.rpmwarning: glibc-devel-2.3.4-2.19.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60eerror: Failed dependencies: glibc-heade

8、rs is needed by glibc-devel-2.3.4-2.19.i386 glibc-headers = 2.3.4-2.19 is needed by glibc-devel-2.3.4-2.19.i386 Suggested resolutions: glibc-headers-2.3.4-2.19.i386.rpm上面的错误显示表明系统在安装glibc-devel时又出现了依赖性关系问题,glibc-devel依赖于glibc-headers,所以要想安装glibc-devel,必须先安装glibc-headers。4安装glibc-headers。rootlinux /t

9、mp# rpm -ivh glibc-headers-2.3.4-2.19.i386.rpmwarning: glibc-headers-2.3.4-2.19.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60eerror: Failed dependencies: kernel-headers is needed by glibc-headers-2.3.4-2.19.i386 kernel-headers >= 2.2.1 is needed by glibc-headers-2.3.4-2.19.i386 Suggested reso

10、lutions: glibc-kernheaders-2.4-9.1.98.EL.i386.rpm 上面的错误显示表明系统在安装glibc-headers时又出现了依赖性关系问题,glibc-headers依赖于glibc-kernheaders,所以要想安装glibc-headers,必须先安装glibc-kernheaders。5安装glibc-kernheaders。rootlinux /tmp# rpm -ivh glibc-kernheaders-2.4-9.1.98.EL.i386.rpmwarning: glibc-kernheaders-2.4-9.1.98.EL.i386.r

11、pm: V3 DSA signature: NOKEY, key ID db42a60ePreparing. # 100% 1:glibc-kernheaders # 100% 安装glibc-kernheaders成功。6安装glibc-headers、glibc-devel、gcc。rootlinux /tmp# rpm -ivh glibc-headers-2.3.4-2.19.i386.rpm glibc-devel-2.3.4-2.19.i386.rpm gcc-3.4.5-2.i386.rpmwarning: glibc-headers-2.3.4-2.19.i386.rpm: V

12、3 DSA signature: NOKEY, key ID db42a60ePreparing. # 100% 1:glibc-headers # 33% 2:glibc-devel # 67% 3:gcc # 100%至此,gcc已安装成功。7再次查询系统是否已经安装gcc。rootlinux /tmp# rpm -qa | grep gcclibgcc-3.4.5-2compat-libgcc-296-2.96-132.7.2gcc-3.4.5-2上面的结果显示表明gcc已安装成功。【实验故障与分析】下面的表格中列出了在实验过程中可能会出现的故障及其解决方法。看看是不是对你的实验有所帮助

13、?如果你在实验中还遇到了其他的问题或故障,不妨记录在表格中,通过自己的实践,或者与老师、同学一起找找解决问题的方法。序号实验故障分析与解决1rpm -ivh gcc-3.4.5-2.i386.rpm报错找不到该软件包这是因为当前目录中没有该软件包,上面实验是假设已经把这些软件包拷贝到/tmp目录中了23【启发联想】1当两个软件包互相依赖时,该如何处理?2当校验某个文件发现了可疑的改变时,该如何处理?(三)非编译型tar包软件的安装【需求】u 采用tar包方式安装webmin。【系统及软件环境】1操作系统:Red Hat AS 4.02软件:webmin-1.150.tar.gz【实验配置文件及

14、命令】1配置文件:无2命令:/bin/tar,/bin/ls,/usr/bin/less【实验步骤】1从网上下载软件包webmin-1.150.tar.gz,假设存放在/tmp目录下,首先解包。rootlinux tmp# lskkk newfile test.log tmp.tar.gz ksocket-root orbit-root tmp.tar TRANS.TBLmy.tar test tmp.tar.bz2 webmin-1.150.tar.gzrootlinux tmp# tar -zxvf webmin-1.150.tar.gzrootlinux tmp# lskkk newfi

15、le test.log tmp.tar.gz webmin-1.150.tar.gzksocket-root orbit-root tmp.tar TRANS.TBLmy.tar test tmp.tar.bz2 webmin-1.1502进入目录webmin-1.150,查看README文档,获取安装方法。rootlinux tmp# cd webmin-1.150rootlinux webmin-1.150# less READMEWebmin can be installed in two different ways :1) By just running the setup.sh s

16、cript in the same directory as this README file, with no arguments. You will be asked a series of questions such as the configuration directory, your chosen login name and password, and possibly your operating system. For questions where a default is shown in square brackets, you can just hit enter

17、to accept the default (which is usually correct).2) By running the setup.sh script in this directory, but with a command-line argument such as /usr/local/webmin . When a directory like this is provided, Webmin's scripts will be copied to the chosen directory and it will be configured to run from

18、 that location.3执行setup.sh安装。rootlinux webmin-1.150# ./setup.sh /tmp/webmin* Welcome to the Webmin setup script, version 1.150 *Webmin is a web-based interface that allows Unix-like operatingsystems and common Unix services to be easily administered.Installing Webmin from /tmp/webmin-1.150 to /tmp/w

19、ebmin .*Webmin uses separate directories for configuration files and log files.Unless you want to run multiple versions of Webmin at the same timeyou can just accept the defaults.Config file directory /etc/webmin: /tmp/webminLog file directory /var/webmin: /tmp/webmin*Webmin is written entirely in P

20、erl. Please enter the full path to thePerl 5 interpreter on your system.Full path to perl (default /usr/bin/perl): /usr/bin/perl4安装完成后,可用浏览器打开webmin,例如::10000 (IP地址:端口号)【实验故障与分析】下面的表格中列出了在实验过程中可能会出现的故障及其解决方法。看看是不是对你的实验有所帮助?如果你在实验中还遇到了其他的问题或故障,不妨记录在表格中,通过自己的实践,或者与老师、同学一起找找解决问题的方法。序号实验故

21、障分析与解决1无法登录到webmin服务器这是因为安装时没有正确设置登录的账号和口令23【启发联想】1如何通过webmin来进行系统管理?2如何配置webmin的ssl模块支持?(四)编译型tar包软件的安装【需求】u 采用tar包方式安装proftpd。【系统及软件环境】1操作系统:Red Hat AS 4.02软件:proftpd-1.2.9.tar.gz,gcc,make【实验配置文件及命令】1配置文件: 无2命令:/bin/tar,/bin/ls,/usr/bin/less,/usr/bin/make【实验步骤】1从网上下载软件包proftpd-1.2.9.tar.gz,假设存放在/t

22、mp目录下,首先解包。rootlinux tmp# lskkk my.tar orbit-root test tmp.tar tmp.tar.gzksocket-root newfile proftpd-1.2.9.tar.gz test.log tmp.tar.bz2 TRANS.TBL rootlinux tmp# tar -zxvf proftpd-1.2.9.tar.gzrootlinux tmp# lskkk newfile proftpd-1.2.9.tar.gz tmp.tar TRANS.TBLksocket-root orbit-root test tmp.tar.bz2my

23、.tar proftpd-1.2.9 test.log tmp.tar.gz2进入目录proftpd-1.2.9,查看README文档获取安装方法。rootlinux tmp# cd proftpd-1.2.9rootlinux proftpd-1.2.9# less READMEInstallation Overview-For detailed installation instructions, see the INSTALL file in the rootdirectory of the source distribution.The ProFTPD source distribut

24、ion is designed to be configured using theGNU autotools, so compiling and installing follows the familiar commandsequence of './configure ; make ; make install'. However, a significantportion of ProFTPD's configurability is done at compile time, so it ishighly recommended that you read I

25、NSTALL and all the README.* files thatpertain to your platform and desired features before building the sources.ProFTPD uses a single configuration file. A few examples are included inthe sample-configurations subdirectory of the source distribution.On most systems, the inetd or xinetd configuration

26、 must be changed,either to remove the current ftpd entry to run ProFTPD standalone,or to change the current ftpd entry to use the proftpd daemon.3根据README文档的说明,查看INSTALL文件。rootlinux proftpd-1.2.9# less INSTALL1. Configure the software. Run the GNU autoconf 'configure' script in the top level

27、 directory to create config.h and all the Makefiles. In addition to configuring ProFTPD to compile on your system, you can use this step to customize some parameters of or add optional features to ProFTPD. There are many configuration options. To use the default values, you would simply run: $ ./con

28、figure By default the ProFTPD files will be installed as user 'root' and the first group with gid 0 listed in /etc/group, usually 'root' or 'wheel'. If you wish to install using a different user or group ownership, set the install_user and install_group environment variables

29、before running configure. Using a Bourne-ish style shell (e.g. sh, ksh, bash), you can do this on the command line like this: $ install_user=root install_group=wheel ./configure4配置。rootlinux proftpd-1.2.9# ./configure prefix=/usr/local/proftpdchecking build system type. i686-pc-linux-gnuchecking hos

30、t system type. i686-pc-linux-gnuchecking target system type. i686-pc-linux-gnuchecking for gcc. gccchecking for C compiler default output. a.outchecking whether the C compiler works. yeschecking whether we are cross compiling. nochecking for suffix of executables.checking for suffix of object files.

31、 ochecking whether we are using the GNU C compiler. yeschecking whether gcc accepts -g. yeschecking for gcc option to accept ANSI C. none neededchecking whether make sets $(MAKE). yeschecking for a BSD-compatible install. /usr/bin/install c5编译。rootlinux proftpd-1.2.9# makeecho #define BUILD_STAMP "date" >include/buildstamp.hcd lib/ && make libmake1: Entering directory /tmp/proftpd-1.2.9/lib'gcc

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论