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 ...
随机推荐
- [Xcode]使用target进行协同开发
协同开发时候发现难免会因为某些条件宏导致上传到SVN的代码影响到其他同时,但是每一次去修很多条件编译也不是很方便,所以可以通过新建自己的target来控制product. 一.创建自己的target: ...
- HDU2844_Coins【多重背包】【二进制优化】
Coins Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Subm ...
- autoit 处理文件上传弹出框,并在JAVA中调用
Java 代码 //定义exe 文件存放的绝对路径 File file2 = new File("."); String command = file2.getCanonical ...
- spark的action和transformations汇集
汇总了Spark支持的Transformations 和Actions 用于备忘! 參考 http://spark.apache.org/docs/latest/programming-guide.h ...
- 敏捷开发-Scrum 真实
近期研究前 Scrum 数据编译的文件,在接下来的团队和项目开发.项目根据该引入 Scrum 一些练习,提高团队成员和项目之间的交付质量的合作. 参考资料: <轻松Scrum之旅-敏捷开发故事& ...
- 该项目的建设maven片:4.协调和依赖,spring依赖注入demo
源码下载 协调 <groupId>com.demo.animal</groupId> <artifactId>animal-core</artifactId& ...
- 漫谈并发编程(二):java线程的创建与基本控制
java线程的创建 定义任务 在java中使用任务这个名词来表示一个线程控制流的代码段,用Runnable接口来标记一个任务,该接口的run方法为线程运行的代码段. public ...
- Maven中Spring-Data-Redis存储对象(redisTemplate) (转)
Redis是一种nosql数据库,在开发中常用做缓存.Jedis是Redis在java中的redis- client.在此之前,希望已经了解redis的基本使用和Maven的使用.建立Maven Pr ...
- 第一个Python程序的Hello Python,竟然有问题
print 'hello python' 运行时显示:SyntaxError: invalid syntax 解决办法: 这应该是版本的问题,Python2的话直接就可以输出,但是到了Python3需 ...
- Linux下SVN账户密码保存设置
Linux下用SVN进行更新等操作时,总是提示输入用户名和密码,很不方便.因此搜了下解决办法,总结如下: 打开SVN配置文件: vim /home/<user>/.subversion/c ...