0% found this document useful (0 votes)
306 views9 pages

Linux Musab

The document provides instructions on how to mount an ISO image file located at /dev/sr0 to the /run/media/root/RHEL-7.6 Server.x86_64 directory and view its contents in the /root/mnt directory using the mount command. It then discusses checking the status of installed packages and installing or removing packages using RPM commands like rpm -q, rpm -i, and rpm -e. Finally, it covers fixing corrupted commands, updating packages, and viewing package configuration files.

Uploaded by

chandra doddi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
306 views9 pages

Linux Musab

The document provides instructions on how to mount an ISO image file located at /dev/sr0 to the /run/media/root/RHEL-7.6 Server.x86_64 directory and view its contents in the /root/mnt directory using the mount command. It then discusses checking the status of installed packages and installing or removing packages using RPM commands like rpm -q, rpm -i, and rpm -e. Finally, it covers fixing corrupted commands, updating packages, and viewing package configuration files.

Uploaded by

chandra doddi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 9

Red_Hat_Enterprise_Linux-Release_Notes-7-en-US-7-2.el7.

noarch

I want to see the status of "mount commnad .

Location of cd-rom drive with .ISO image--> /dev/sr0 /run/media/root/RHEL-7.6


Server.x86_64
/root/mnt --> mount with the directory.
============================================================

How will mount the cd-rom drive in linux.


# mount /dev/sr0 /run/media/root/RHEL-7.6 Server.x86_64 /root/mnt/

This is the command


# mount /dev/sr0 /run/media/root/RHEL-7.6 Server.x86_64 /root/mnt/

Default Path: mount /dev/sr0 /run/media/root/RHEL-7.6 Server.x86_64

Create the directory:- /root/mnt or /mnt

or
create the directory and mount with on it.

In the " / directory" create the folder called "mnt"


1. # mkdir mnt

Please the following syntax.

2. [root@localhost /]# mount /dev/sr0 /mnt/

3 .# mount
[root@localhost /]# mount /dev/sr0 /mnt/
mount: /dev/sr0 is write-protected, mounting read-only

# cd mnt

# cd Package

#ls

====================================================================
RPM --> Redhat package Manager
==============================================
To see the word count .

[root@localhost Packages]# ls |wc -l


5153 package

w---> word Count.


C--> count.
==============================================

1.To check all the installed packages in the system

root@ Linux~] #rpm -qa

a. q --> Query
b. a--> all
Note:- Install software
Uninstalled software
Updated software
2. To checke whether a particuler package is installed or not.
a. #rpm -qa vsftpd
b. # rpm -qa |grep -i vsf*
==================================
finger package whether installed or not. Please check the below command.

How to install the finger package check below commands.

a. [root@localhost Packages]# rpm -q finger


package finger is not installed

b. [root@localhost Packages]# ls finger*


finger-0.17-52.el7.x86_64.rpm finger-server-0.17-52.el7.x86_64.rpm

How to install finger package.

a) [root@localhost Packages]# rpm -ivh finger-0.17-52.el7.x86_64.rpm --test


warning: finger-0.17-52.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID
fd431d51: NOKEY
Preparing... ################################# [100%]

Note:- Now remove from --test option let us started the installation.
[b) root@localhost Packages]# rpm -ivh finger-0.17-52.el7.x86_64.rpm

c) After the installation check the status using below command.


[root@localhost Packages]# rpm -q finger
finger-0.17-52.el7.x86_64

Note:- i -- installation
v--- verbose
h--- hash processe

--test --- it's a dummy priview for you it is showing the installation.
Now remove form --test option let us start the installation.

-- test to display the parsentage of ## (hash process)


==============================================

How to remove the package and check the status

[root@localhost Packages]# rpm -e finger


[root@localhost Packages]# rpm -evh finger
[root@localhost Packages]# rpm -q finger
package finger is not installed

-e --> remove /erase


-q --> query
==============================================
[root@localhost Packages]# rpm -qip finger-0.17-52.el7.x86_64.rpm
P--> Stands for path of the package information about.

warning: finger-0.17-52.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID


fd431d51: NOKEY
Name : finger
Version : 0.17
Release : 52.el7
Architecture: x86_64
Install Date: (not installed)
Group : Applications/Internet
Size : 32929
License : BSD
Signature : RSA/SHA256, Friday 22 August 2014 09:17:34 PM IST, Key ID
199e2f91fd431d51
Source RPM : finger-0.17-52.el7.src.rpm
Build Date : Tuesday 19 August 2014 06:08:54 PM IST
Build Host : x86-021.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor : Red Hat, Inc.
Summary : The finger client
Description :
Finger is a utility which allows users to see information about system
users (login name, home directory, name, how long they've been logged
in to the system, etc.). The finger package includes a standard
finger client.

You should install finger if you'd like to retrieve finger information


from other systems.

===========================================

After installed the corospondent package evince-libs-3.28.2-5.el7.x86_64"" how to


know about the information.

To see the below command.

[root@localhost ~]# rpm -qi evince-libs-3.28.2-5.el7.x86_64


Name : evince-libs
Version : 3.28.2
Release : 5.el7
Architecture: x86_64
Install Date: Friday 08 November 2019 08:57:05 PM IST
Group : Unspecified
Size : 1223353
License : GPLv2+ and GPLv3+ and LGPLv2+ and MIT and Afmparse
Signature : RSA/SHA256, Wednesday 01 August 2018 02:18:41 PM IST, Key ID
199e2f91fd431d51
Source RPM : evince-3.28.2-5.el7.src.rpm
Build Date : Tuesday 24 July 2018 10:08:47 PM IST
Build Host : x86-040.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor : Red Hat, Inc.
URL : https://wiki.gnome.org/Apps/Evince
Summary : Libraries for the evince document viewer
Description :
This package contains shared libraries needed for evince

========================================================================
AFTER INSTALL THE PACKAGE THERE IS NO SPECIFY LOCATION TO FIND OUT THE PACKAGE.
TO SEE AFTER INSTALL THE PACKAGE DETAILED INFORMATION.

[root@localhost ~]# rpm -q finger


finger-0.17-52.el7.x86_64
[root@localhost ~]# rpm -qi finger-0.17-52.el7.x86_64
Name : finger
Version : 0.17
Release : 52.el7
Architecture: x86_64
Install Date: Saturday 30 November 2019 10:45:11 PM IST
Group : Applications/Internet
Size : 32929
License : BSD
Signature : RSA/SHA256, Friday 22 August 2014 09:17:34 PM IST, Key ID
199e2f91fd431d51
Source RPM : finger-0.17-52.el7.src.rpm
Build Date : Tuesday 19 August 2014 06:08:54 PM IST
Build Host : x86-021.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor : Red Hat, Inc.
Summary : The finger client
Description :
Finger is a utility which allows users to see information about system
users (login name, home directory, name, how long they've been logged
in to the system, etc.). The finger package includes a standard
finger client.

You should install finger if you'd like to retrieve finger information


from other systems.

=================================================================
HOW TO FIX CORREPTED COMMANDS

Commands are releated to package they are not directly has package.

Date command which will placed into the following location.


[root@localhost ~]# which date
/usr/bin/date

Mount command which will placed into the following location


[root@localhost ~]# which mount
/usr/bin/mount

cp --> cp which is the command for coping the data from soure to destination.

[root@localhost ~]# cp /usr/bin/date /usr/bin/mount


cp: overwrite ‘/usr/bin/mount’? yes
[root@localhost ~]#
[root@localhost ~]# mount
Sun Dec 1 00:46:01 IST 2019

Note:- overwrite this file new data.

When i was use "date command & mount command" which will display the date only. How
to fix the mount command.

to see the below steps:-

which command belongs to which package. Then we have to go there perticuler


location and installed it.

TO SEE HOW TO FIX THE MOUNT COMMAND


==========================================================
1. [root@localhost Packages]# which mount
/usr/bin/mount

2. [root@localhost Packages]# rpm -qf /usr/bin/mount


util-linux-2.23.2-59.el7.x86_64

3.[root@localhost Packages]# ls util-linux-2.23.2-59.el7.x86_64.*


util-linux-2.23.2-59.el7.x86_64.rpm

[root@localhost Packages]# rpm -ivh util-linux-2.23.2-59.el7.x86_64.rpm


warning: util-linux-2.23.2-59.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key
ID fd431d51: NOKEY
Preparing... ################################# [100%]
package util-linux-2.23.2-59.el7.x86_64 is already installed

or

[root@localhost Packages]# rpm -ivh util-linux-2.23.2-59.el7.x86_64.rpm --force


warning: util-linux-2.23.2-59.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key
ID fd431d51: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:util-linux-2.23.2-59.el7 ################################# [100%]

NOW CHECK THE MOUNT POINT

# mount

all are going good...

Note:- -qf --> "q" for query and "f" for file location

util-linux-2.23.2-59.el7.x86_64 --> This is the package for reinstall the "mount


command"

===========================================================

HOW TO UDPATE THE PACKAGE TO SEE BELOW COMMAND

# rpm -Uvh

Note:- U stands for update the package

===========================================================
HOW TO SEE THE CONFIGURATION FILES FOR "OPENSSH"

a) [root@localhost Packages]# rpm -q openssh


This is package for leleated openssh command
openssh-7.4p1-16.el7.x86_64

b) [root@localhost Packages]# rpm -qlc openssh

This is releted for configuration location.


/etc/ssh/moduli

c) [root@localhost Packages]# rpm -qlc openssh (Double Tabs)

openssh openssh-clients openssh-server

Q --> query
L --> list
C --> config file
============================================================
TO SEE THE INFORMATION ABOUT THE INSTALLED PACKAGE

Bellow are the example

[root@localhost Packages]# rpm -qi finger


[root@localhost Packages]# rpm -qi openssh
============================================================
TO SEE THE INFORMATION ABOUT THE PACKAGE BEFORE INSTALLATION

A) [root@localhost Packages]# ls |grep -i openssh

openssh-7.4p1-16.el7.x86_64.rpm
openssh-askpass-7.4p1-16.el7.x86_64.rpm
openssh-clients-7.4p1-16.el7.x86_64.rpm
openssh-keycat-7.4p1-16.el7.x86_64.rpm
openssh-server-7.4p1-16.el7.x86_64.rpm

B) [root@localhost Packages]# rpm -qip openssh-7.4p1-16.el7.x86_64.rpm


warning: openssh-7.4p1-16.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID
fd431d51: NOKEY
Name : openssh
Version : 7.4p1
Release : 16.el7
Architecture: x86_64
Install Date: (not installed) ***************
Group : Applications/Internet
Size : 1987388
License : BSD
Signature : RSA/SHA256, Friday 24 November 2017 08:49:40 PM IST, Key ID
199e2f91fd431d51
Source RPM : openssh-7.4p1-16.el7.src.rpm
Build Date : Friday 24 November 2017 07:43:09 PM IST
Build Host : x86-034.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor : Red Hat, Inc.
URL : http://www.openssh.com/portable.html
Summary : An open source implementation of SSH protocol versions 1 and 2
Description :
SSH (Secure SHell) is a program for logging into and executing
commands on a remote machine. SSH is intended to replace rlogin and
rsh, and to provide secure encrypted communications between two
untrusted hosts over an insecure network. X11 connections and
arbitrary TCP/IP ports can also be forwarded over the secure channel.

OpenSSH is OpenBSD's version of the last free version of SSH, bringing


it up to date in terms of security and features.

This package includes the core files necessary for both the OpenSSH
client and server. To make this package useful, you should also
install openssh-clients, openssh-server, or both.

TO SEE THE INFORMATION ABOUT THE PACKAGE BEFORE INSTALLATION


SECONFD EXAMPLE:
=======================
[root@localhost Packages]# ls |grep -i vsftpd
vsftpd-3.0.2-25.el7.x86_64.rpm
[root@localhost Packages]# rpm -qip vsftpd-3.0.2-25.el7.x86_64.rpm
warning: vsftpd-3.0.2-25.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID
fd431d51: NOKEY
Name : vsftpd
Version : 3.0.2
Release : 25.el7
Architecture: x86_64
Install Date: (not installed) ***********************************
Group : System Environment/Daemons
Size : 361335
License : GPLv2 with exceptions
Signature : RSA/SHA256, Thursday 21 June 2018 03:16:06 PM IST, Key ID
199e2f91fd431d51
Source RPM : vsftpd-3.0.2-25.el7.src.rpm
Build Date : Thursday 21 June 2018 01:57:52 PM IST
Build Host : x86-034.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor : Red Hat, Inc.
URL : https://security.appspot.com/vsftpd.html
Summary : Very Secure Ftp Daemon
Description :
vsftpd is a Very Secure FTP daemon. It was written completely from
scratch.
[root@localhost Packages]#

=====================================
HOW TO SEE THE CONFIGURERATION FILES OF SUDO COMMAND

[root@localhost Packages]# rpm -qlc sudo


/etc/pam.d/sudo
/etc/pam.d/sudo-i
/etc/sudo-ldap.conf
/etc/sudo.conf
/etc/sudoers

=================================
# rpm -qlc openssh

It will showing the openssh configuration files


==================================

===========================================================
YUM --YELLOWDOG UPDATER MADIFIED
===================================

Ftp--> local
http:- internet

copy from rhel76 media to following location /var/ftp/pub

This is copying command from cd-rom to local system

# cp -rvfp /media /var/ftp/pub


======================================
steps:-

root@Rehe_01 ~]# rpm -q vsftpd


package vsftpd is not installed

[root@Rehe_01 ~]# rpm -q vsftpd


package vsftpd is not installed
[root@Rehe_01 ~]# cd rheliso/mnt/Packages/
[root@Rehe_01 Packages]# ls vsftpd*
vsftpd-3.0.2-25.el7.x86_64.rpm
[root@Rehe_01 Packages]# rpm -ivh vsftpd-3.0.2-25.el7.x86_64.rpm
warning: vsftpd-3.0.2-25.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID
fd431d51: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:vsftpd-3.0.2-25.el7 ################################# [100%]
[root@Rehe_01 Packages]#

whenever installed vsftpd autometically created the ftp folder in /var folder and
inside one more folder created pub

[root@Rehe_01 Packages]# cd /var/ftp/


[root@Rehe_01 ftp]# ls
pub

[root@Rehe_01 ftp]# cd pub


[root@Rehe_01 pub]#

If anything whichever you want to share software this location.


my side i keep the data and somebody else keep the data everything in this loction.

/var/ftp/pub/rheliso/mnt/

You might also like