Lab 2 Working with packages

Goal: To gain working experience with package management

System Setup: A working install of Red Hat Enterprise Linux 5 connected to the classroom network

Situation: You have been asked to connect a system to your company's private yum repository to install and update software.

Sequence 1: Using RPM

Instructions:

1. Change to /net/server1/var/ftp/pub. In the Server directory, use rpm -i to install the x3270-x11 RPM. This should fail. Correct the problem.

# cd /net/server1/var/ftp/pub
# cd Server
# rpm -ivh x3270-x11*
warning: x3270-x11-3.3.4p73.el5.1.i386.rpm: Header V3 DSA ...
error: Failed dependencies:
x3270 = 3.3.4p7 is needed by x3270-x11-3.3.4p73.el5.1.i386

The RPM is indicating it can not install until you resolve the dependencies. Install the x3270 RPM, then attempt x3270-x11 again.

# rpm -ivh x3270-3.3.4p7*
warning: x3270-3.3.4p73.el5.1.i386.rpm: Header V3 DSA ...
Preparing... ############################ [100%]
1:x3270 ############################ [100%]

# rpm -ivh x3270x11*
warning: x3270-x11-3.3.4p73.el5.1.i386.rpm: Header V3 DSA ...
Preparing... ############################ [100%]
1:x3270-x11 ############################ [100%]

2. In the errata directory, use rpm -i to install the autofs RPM. This should fail. Correct the problem.

a. [root@stationX]# cd ../errata

b. [root@stationX]# rpm -ivh autofs*
warning: autofs...
Preparing... ############################ [100%]
file /usr/lib/autofs/lookup_file.so from install of
autofs-5.0.10.rc2.43.0.2 conflicts with file from package
autofs-5.0.10.rc2.42
... output truncated ...

c. The install failed, since another version of the RPM is already installed. This time, attempt an upgrade instead of an install.

d. [root@stationX]# rpm -Uvh autofs*
warning: autofs...
Preparing... ############################ [100%]
1:autofs ############################ [100%]

3. Use rpm queries to answer the following questions. In the blank spaces, write in the command used to find the answers.

What files are in the initscripts package?

[root@stationX]# rpm -ql initscripts

On what host was the bash RPM built, and what is its installed size?

[root@stationX]# rpm -qi bash

Has the pam package changed since it was installed?

[root@stationX]# rpm -V pam

Which installed packages have "gnome" in their names?

[root@stationX]# rpm -qa | grep gnome

Which RPM provides /etc/inittab?

[root@stationX]# rpm -qf /etc/inittab

Which RPM provides /etc/hosts? Why?

[root@stationX]# rpm -qf /etc/hosts

No RPM provides /etc/hosts because this file is created by Anaconda during installation.

4. RPM signatures

Practice checking the signature and integrity of an RPM package file of your choosing from your CD-ROM or from server1.

Import Red Hat's GPG key to RPM's system-wide keyring. The key can be found on first CD or /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release.

[root@stationX]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Check the signature of some original RPMs from the server.

[root@stationX]# cd /net/server1/var/ft/pub/Server
[root@stationX]# rpm -K mutt-version.i386.rpm

Create a corrupted RPM, and then verify it. Start by copying an RPM file to /tmp, then use the cat command to append some extraneous data to the end of the file.

[root@stationX]# cp /net/server1/var/ftp/pub/Server/mutt-version.i386.rpm /tmp
[root@stationX]# cat /bin/date >> /tmp/mutt-version.i386.rpm
[root@stationX]# rpm -K /tmp/mutt-version.i386.rpm

This command should fail.

Sequence 2: Connecting to a private repository

Scenario: You are asked to connect your system to the private repository located on server1.

Deliverable: A system configured to use the repository located on server1

Instructions:

1. Create a file /etc/yum.repos.d/server1.repo pointing to a repository with the name GLS located at the URL http://server1.example.com/pub/gls/RPMS. Make sure you enable the repository.

Create the file /etc/yum.repos.d/server1.repo with the following content:

[GLS]
name=Private classroom repository
baseurl=http://server1.example.com/pub/gls/RPMS
enabled=1
gpgcheck=0

Make sure you have configured the repository correctly by issuing the command: yum list rhce-ts.

Sequence 3: Installing new packages using yum

Instructions:

1. Use yum to list all packages containing 'rhce-ts' in their name.

To list all packages containing 'rhce-ts' in their name you could issue the command: yum list '*rhce-ts*'

2. Install the package you just found in the previous step.

To install the package rhce-ts you could issue the command yum install rhce-ts When yum asks for confirmation enter y.

Sequence 4: Updating software using yum

Instructions:

1. Use yum to check if there are updates available for your system.

Replace your existing /etc/yum.repos.d/server1.repo file by downloading an updated copy from the URL ftp://server1.example.com/pub/gls/server1.repo. This will point yum to additional repositories containing the base Red Hat Enterprise Linux packages and available updates to those packages.

a. [root@stationX]# cd /etc/yum.repos.d

b. [root@stationX]# mv server1.repo /tmp/

c. [root@stationX]# wget ftp://server1.example.com/pub/gls/server1.repo

d. To find out if there are updates available for your system use the command: yum check-update

2. Select one package from the previous step and update it.

a. To update only a specific package you can use yum update package-name

b. Install the kernel package:

[root@stationX]# yum update kernel

3. Now install all available updates for your system.

a. To install all available updates for your system issue the command: yum update

RH133读书笔记(2)-Lab 2 Working with packages的更多相关文章

  1. RH133读书笔记(1)-Lab 1 Managing Startup

    Lab 1 Managing Startup Goal: To familiarize yourself with the startup process System Setup: A system ...

  2. RH133读书 笔记(5) - Lab 5 User and Group Administration

    Lab 5 User and Group Administration Goal: To build skills for user and group administration. Estimat ...

  3. RH133读书 笔记(4) - Lab 4 System Services

    Lab 4 System Services Goal: Develop skills using system administration tools and setting up and admi ...

  4. RH133读书 笔记(3) - Lab 3 Configuring the kernel

    Lab 3 Configuring the kernel Goal: Develop skills tuning the /proc filesystem. Gain some experience ...

  5. RH133读书笔记(6) - Lab 6 Adding New Filesystems to the Filesystem Tree

    Lab 6 Adding New Filesystems to the Filesystem Tree Goal: Develop skills and knowlege related to par ...

  6. RH133读书笔记(9)-Lab 9 Installation and System-Initialization

    Lab 9 Installation and System-Initialization Goal: Successfully install Red Hat Enterprise Linux. Sy ...

  7. RH133读书笔记(8)-Lab 8 Manage Network Settings

    Lab 8 Manage Network Settings Goal: To build skills needed to manually configure networking Estimate ...

  8. RH133读书笔记(7)-Lab 7 Advanced Filesystem Mangement

    Lab 7 Advanced Filesystem Mangement Goal: Develop skills and knowlege related to Software RAID, LVM, ...

  9. RH133读书笔记(10)-Lab 10 Exploring Virtualization

    Lab 10 Exploring Virtualization Goal: To explore the Xen virtualization environment and the creation ...

随机推荐

  1. HDU 3277Marriage Match III(二分+并查集+拆点+网络流之最大流)

    题目地址:HDU 3277 这题跟这题的上一版建图方法差点儿相同,仅仅只是须要拆点.这个点拆的也非常巧妙,既限制了流量,还仅仅限制了一部分,曾经一直以为拆点会所有限制,原来也能够用来分开限制,学习了. ...

  2. “>>”和“>>>” java

    “>>”算术右移运算符, 表示带符号右移,它使用最高位填充移位后左侧的空位.右移的结果为:每移一位,第一个操作数被2除一次,移动的次数由第二个操作数确定.按二进制形式把所有的数字向右移动对 ...

  3. graphterm 0.40.1 : Python Package Index

    graphterm 0.40.1 : Python Package Index graphterm 0.40.1 Downloads ↓ A Graphical Terminal Interface ...

  4. Android 调用谷歌语音识别

    調用谷歌语音识别其实很简单,直接利用 intent 跳转到手机里面的谷歌搜索 代码也很简单,直接调用方法 startVoiceRecognitionActivity() 如果大家手机里面没有谷歌搜索, ...

  5. Android经常使用开源组件汇总

    http://www.cnblogs.com/scige/p/3456790.html UI相关 图片 Android-Universal-Image-Loader:com.nostra13.univ ...

  6. 基于Java的开源CMS系统选择(转)

    CMS概述 对于网站CMS系统而言,基于PHP的是主流,如Drupal/Joomla在各个主流虚拟机提供商上都是标准配置,也被广泛使用. 但如果你拥有Java团队,或者项目目标是想建立一个企业网使用的 ...

  7. nginx 301跳转到带www域名方法rewrite(转)

    首先一.得在你的域名管理里面定义 test.com和www.test.com指向你的主机ip地址,我们可以使用nslookup命令测试:直接输入 nslookup test.com和nslookup ...

  8. Swift编程语言学习10—— 枚举属性监视器

    属性监视器 属性监视器监控和响应属性值的变化,每次属性被设置值的时候都会调用属性监视器.甚至新的值和如今的值同样的时候也不例外. 能够为除了延迟存储属性之外的其它存储属性加入属性监视器,也能够通过重载 ...

  9. error C2471: 无法更新程序数据库

    这段时间在使用VS做一个项目.在使用过程中,今天遇到了一个问题,也就是题目所说的那样: error C2471: 无法更新程序数据库.之后在网上搜了一下,得到了两种解决方案,两种方案分别如下: (一) ...

  10. GString及IntelliJIdea中调试Groovy的操作步骤

    今天是学习Groovy的第一天,首先我觉得学习任何一种语言都要先弄清楚这种语言的特性,因为只有了解了特性之后学习才能达到好的效果,那么groovy的特点是什么的.我觉得groovy是一种动态语言,动态 ...