Вы находитесь на странице: 1из 4

The following Blog is a short summary on Redhat and ubuntu and some differences between them,

we have also provided a some commands and file names on how to configure network
in RedHat PCs and in Ubuntu PCs, so you could understand that configuring network in both of
them is different.

Red Hat Enterprise Linux is not free, and its also used for business.Red Hat Linux, assembled by
the company Red Hat, was a popular Linux based operating system.
Red Hat Linux 1.0 was released on November 3, 1994. It was originally called Red Hat Commercial
Linux[2] It is the first Linux distribution to use the packaging system, the RPM Package Manager
as its packaging format, and over time has served as the starting point for several other
distributions, such as Mandriva Linux and Yellow Dog Linux.
Red Hats Features:
Red Hat Linux introduced a graphical installer called Anaconda, intended to be easy to use for
novices, and which has since been adopted by some other Linux distributions. It also introduced a
built-in tool called Lokkit for configuring the firewall capabilities.
It uses .rpm package called Red Hat Package Manager.
Definition rpm: The RPM Package Manager (RPM) is a powerful command linedriven package
management system capable of installing, uninstalling, verifying, querying, and updating software
packages. Each software package consists of an archive of files along with information about the
package like its version, a description, etc.
Now What is yum? yum, also called Yellow dog Updater Modified, is a Linux utility which is use to
install RPM packages/Binary Files (.rpm files). You can use yum with the following options.
Installing packages(.rpm):- To install any .rpm packages follow these command.
# yum install packagename
# rpm -ivh packagename.rpm
Networking
Networking Files are that files by which system get connected in the Network.
By editing these files system will be get connected in Network.
To set IP Address
# system-config-network

or in the below file:


# cat /etc/sysconfig/network-scipts/ifcfg-eth0

To set gateway
# system-config-network

or in the below file:


# cat /etc/sysconfig/network

To set DNS
#cat /etc/resolv.conf
To set hostname
# hostname yourcomputerName
# cat /etc/sysconfig/network

Booting Files

# cat /boot/grub/grub.confAbout grub.conf :- Grub Conf is a Gnome2 based GRUB configuration

editor. It provides an easy to use interface allowing effortless modification of OSs and the
flexibility to configure the most obscure options. Designed to require minimal user interaction
while providing tools for the most adventurous user.
To see the version of Operating System:
# cat /etc/redhat-release

To on services permanently:
# chkconfig servicename on

Ubuntu Ubuntu is an operating system, like windows.Ubuntu is a Linux distribution that starts with
the breadth of Debian and adds regular releases (every six months), a clear focus on the user and
usability (it should Just Work, TM) and a commitment to security updates with 18 months of
support for every release. Ubuntu ships with the latest Gnome release as well as a selection of
server and desktop software that makes for a comfortable desktop experience off a
single installation CD.
Ubuntu uses the.deb apt package:- Ubuntu uses .deb package for package installation as like .rpm
of Red Hat.
Ubuntu also uses apt-get package installer to install packages by using command mode.
To install package Graphically, synaptic package manager.
Installing Packages (.deb)
# apt-get install packagename
# dpkg -i packagename.deb

To install packages Graphically by synaptic:


System -> Administrator -> Synaptic Package Manager
Networking
Some files to get connected system in Network.To set IP Address & Gatway
# cat /etc/network/interfaces

To set DNS
# cat /etc/resolv.conf
To set hostname
# cat /etc/hostname

Package Management
Ubuntu has more packages available than Fedora, so youll have a better chance of finding what
you want in the repositories. As with Fedora, graphical applications will put a link into
the Applicationsmenu.

Graphical Tools
The Synaptic package Manager is an excellent tool for finding, fetching and installing packages.
Press System -> Administration -> Synaptic Package Manager to start Synaptic.

Command Line Tools


Ubuntu uses apt-get instead of yum, up2date and so on to find, download, and install packages and
their dependencies.

Note that, unlike yum, apt-get is only for packages available in repositories it cannot handle
packages you have already downloaded. The dpkg command is used instead.

Table of Equivalent Commands


Below is a table of equivalent commands for package management on both Ubuntu/Debian and
Red Hat/Fedora systems.
Task
Red Hat/Fedora
Adding, Removing and Upgrading Packages
Refresh list of available packages
Yum refreshes each time
its used
Install a package from a repository
yum
install package_name
Install a package file
yum install package.rpm
rpm -i package.rpm
Remove a package
rpm -e package_name
Check for package upgrades
yum check-update
Upgrade packages
Upgrade the entire system
Package Information
Get information about an available
package
Show available packages
List all installed packages
Get information about a package
Get information about an installed
package
List files in an installed package
List documentation files in an installed
package
List configuration files in an installed
package
Show the packages a given package
depends on
Show other packages that depend on
a
given package (reverse dependency)
Package File Information
Get information about a package file
List files in a package file
List documentation files in a package
file
List configuration files in a package
file
Extract files in a package

Find package that installed a file


Find package that provides a
particular file
Misc. Packaging System Tools
Show stats about the package cache
Verify all installed packages
Remove packages from the local cache
directory

yum update
rpm -Uvh [args]
yum upgrade

Ubuntu
apt-get update
apt-get install package_name
dpkg install package.deb
apt-get
apt-get
apt-get
apt-get

remove package_name
-s upgrade
-s dist-upgrade
dist-upgrade

apt-get dist-upgrade

yum
search package_name
yum list available
yum list installed
rpm -qa
yum info package_name
rpm -qi package_name

apt-cache search package_name

rpm -ql package_name


rpm -qd package_name

dpkg listfiles package_name

rpm -qc package_name

rpm -qR package_name

apt-cache depends

rpm -q -whatrequires
[args]

apt-cache rdepends

rpm -qpi package.rpm


rpm -qpl package.rpm
rpm -qpd package.rpm

dpkg info package.deb


dpkg contents package.deb

rpm -qpc package.rpm

rpm2cpio package.rpm |
cpio -vid
rpm -qf filename
yum provides filename

dpkg-deb
extract package.debdir-toextract-to
dpkg search filename
apt-file search filename

rpm -Va
yum clean packages

apt-cache stats
debsums
apt-get clean

apt-cache dumpavail
dpkg list
apt-cache show package_name
dpkg status package_name

Remove only obsolete packages from


the local cache directory
Remove header files from the local
cache directory
(forcing a new download of same on
next use)
General Packaging System Information
Package file extension
Repository location configuration

apt-get autoclean

yum clean headers

apt-file purge

*.rpm
/etc/yum.conf

*.deb
/etc/apt/sources.list

Services
Services on Ubuntu are managed in a broadly similar way to those on Red Hat.

Graphical Tools
Services can be configured by clicking System -> Administration -> Services. A tool
called Boot-Up Manager is also available.

Command Line Tools


Below is a table of example commands for managing services. The apache/httpd service is used as
an example.
Task

Red Hat /
Fedora

Ubuntu

Starting/stopping services
immediately
Enabling a service at boot

service httpd
start
chkconfig
httpd on
chkconfig
httpd off

invoke-rc.d apache
start
update-rc.d apache
defaults
update-rc.d apache
purge

Disabling a service at boot

Ubuntu
(with sysv-rc-conf or
sysvconfig)
service apache start
sysv-rc-conf apache on
sysv-rc-conf apache off

Note: Whereas Red Hat and Fedora servers boot into runlevel 3 by default, Ubuntu servers default
to runlevel 2.
Note: The service and invoke-rc.d commands call init scripts to do the actual work. You can also
start and stop services by doing e.g. /etc/init.d/apache start on Ubuntu, or /etc/init.d/httpd start on Red
Hat/Fedora.

Network
Graphical Tools
Fedora/RHEL have system-config-network, ubuntu pre 10.04 had gnome-nettool to edit static ip
address, since 10.04 nm-connection-editor is the best choice. For Ubuntu 10.04 Studio there is
only manual editing of files since NetworkMontor is not included

Вам также может понравиться