RH133读书笔记(2)-Lab 2 Working with packages
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的更多相关文章
- RH133读书笔记(1)-Lab 1 Managing Startup
Lab 1 Managing Startup Goal: To familiarize yourself with the startup process System Setup: A system ...
- RH133读书 笔记(5) - Lab 5 User and Group Administration
Lab 5 User and Group Administration Goal: To build skills for user and group administration. Estimat ...
- RH133读书 笔记(4) - Lab 4 System Services
Lab 4 System Services Goal: Develop skills using system administration tools and setting up and admi ...
- RH133读书 笔记(3) - Lab 3 Configuring the kernel
Lab 3 Configuring the kernel Goal: Develop skills tuning the /proc filesystem. Gain some experience ...
- 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 ...
- RH133读书笔记(9)-Lab 9 Installation and System-Initialization
Lab 9 Installation and System-Initialization Goal: Successfully install Red Hat Enterprise Linux. Sy ...
- RH133读书笔记(8)-Lab 8 Manage Network Settings
Lab 8 Manage Network Settings Goal: To build skills needed to manually configure networking Estimate ...
- RH133读书笔记(7)-Lab 7 Advanced Filesystem Mangement
Lab 7 Advanced Filesystem Mangement Goal: Develop skills and knowlege related to Software RAID, LVM, ...
- RH133读书笔记(10)-Lab 10 Exploring Virtualization
Lab 10 Exploring Virtualization Goal: To explore the Xen virtualization environment and the creation ...
随机推荐
- 【cocos2d-x不要在生产白片步骤】第二项:制作Block分类
由于游戏非常多使用阻断,因此,我们创建了一个单独的类中Block. 于Blcok.h声明了两个初始化函数: static Block* createWithArgs(Color3B color, Si ...
- 单服务器防护linux iptables脚本
#!/bin/bashiptables -Fiptables -P INPUT DROPiptables -P OUTPUT ACCEPTiptables -P FORWARD DROP/sbin/i ...
- Redis启动多端口,运行多实例(转)
使用redis在同一台机器上,启用多个端口,实现多个实例,完成集群的模拟实现. 启动多实例 redis默认启动端口为6379,我们可以使用 --port 来指定多个端口,如下,在linux终端命令: ...
- python手记(48)
#!/usr/bin/env python # -*- coding: utf-8 -*- #http://blog.csdn.net/myhaspl #code:myhaspl@qq.com imp ...
- 设置 zend studio 默认编码为UTF8
今天用zend studio 打开文件时发现为乱码,这肯定是编码出了问题,我看了一下果然是编码出了问题,默认的是以GBK编码方式打开,我换utf8编码打开就好了,换编码打开的方法是: 1点击工具栏中的 ...
- VMware虚拟机上网络连接(network type)的三种模式--bridged、host-only、NAT
VMware虚拟机上网络连接(network type)的三种模式--bridged.host-only.NAT VMWare提供了三种工作模式,它们是bridged(桥接模式).NAT(网络地址转换 ...
- bat文件无法双击运行
问题: win7系统下新建txt文件,编辑脚本内容后,保存为test.bat.每次双击它,只会默认以txt格式打开它,而不是运行它. 解决: 1. 双击打开“我的电脑”,然后在“工具”下选择“文件夹选 ...
- HDU-2647拓扑排序
这道题不能用矩阵表示,因为1w*1w绝对超内存,分析数据,前一个a的钱要多于后一个b,所以我们要把b作为出度,a为入度,如果不明白这个地方,举例:b——>a——>c——>d ,b为8 ...
- MVC的DependencyResolver组件
MVC的DependencyResolver组件 一.前言 DependencyResolver是MVC中一个重要的组件,从名字可以看出,它负责依赖对象的解析,可以说它是MVC框架内部使用的一个IOC ...
- Android中目的地Intent的使用
一.什么是Intent? Intent的中文意思是目的.在Android中也是“目的”的意思.就是我们要去哪里,从这个activity要前往另一个Activity就需要用到Intent. 示例代码一: ...