Red Hat Enterprise Linux
a crash course
1
La 1ère école 100 % dédiée à l'open source
Open Source School est fondée à l'initiative de Smile, leader de
l'intégration et de l'infogérance open source, et de l'EPSI,établissement
privé pionnier de l’enseignement supérieur en informatique.
Dans le cadre du Programme d’Investissements d’Avenir (PIA), le
gouvernement français a décidé de soutenir la création de cette école en
lui attribuant une première aide de 1,4M€ et confirme sa volonté de
soutenir la filière du Logiciel Libre actuellement en plein développement.
Avec une croissance annuelle de plus de 10%, et 4 000
postes vacants chaque année dans le secteur du Logiciel
Libre, OSS entend répondre à la pénurie de compétences du
secteur en mobilisant l’ensemble de l’écosystème et en
proposant la plus vaste offre en matière de formation aux
technologies open source tant en formation initiale qu'en
formation continue.
2
Les formations du plein emploi !
 Formation Continue
Open Source School "Executive Education" est un organisme
de formation qui propose un catalogue de plus de 200
formations professionnelles et différents dispositifs de
reconversion permettant le retour à l’emploi (POE) ou une
meilleure employabilité pour de nombreux professionnels de
l’informatique.
 Pour vos demandes : formations@opensourceschool.fr
 Formation Initiale
100% logiciels libres et 100% alternance, le cursus Open
Source School s’appuie sur le référentiel des blocs de
compétences de l’EPSI.
Il est sanctionné par un titre de niveau I RNCP, Bac+5.
Le programme est proposé dans 6 campus à Bordeaux, Lille,
Lyon, Montpellier, Nantes, Paris.
3
Nos domaines de formations
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Plan
1 Introduction to RHEL
2 Basic system administration
3 Package management
4 Differences in system components
5 Finding help
6 Practice
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 2/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Introduction to RHEL
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 3/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
History
History
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 4/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
History
History
1991: Linux 0.01
1994: Red Hat Linux 1.0
1996: Debian 1.1
1997: RPM
2003: Fedora and RHEL
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 5/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Licencing
Licencing
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 6/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Licencing
Licencing
Red Hat Enterprise Linux is a commercial distribution of open
source software
You need to pay a subscribtion for updates and support
Sources are freely available
Source availability led to community managed derivatives :
CentOS : enterprise focused
Scientific Linux : for science !
Also commercial derivatives like Oracle Linux
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 7/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Lifecycle
Lifecycle
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 8/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Lifecycle
Lifecycle
RHEL versions have only one number (RHEL4, RHEL5,
RHEL6,...)
5 years of active life (bugfixes and improvements)
5 years of maintenance (only security fixes)
3 years of special Extended Life Cycle (only some security
fixes), additional subscription required
additional subscription requires
Incremental updates (4.5, 5.6, 6.1 ...)
Debian only has a lifecycle of 3 years, similar to the
maintenance phase
Versions of components may slightly change between updates,
but no major upgrades
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 9/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Basic system administration
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 10/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Don’t panic!
Don’t panic!
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 11/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Don’t panic!
Don’t panic!
RHEL is similar to debian, and most other distributions
All kernel utilities are the same : uname, ps, top, vmstat,
ifconfig,...
Basic GNU utilities are the same : sort, grep, awk, ...
Only high-level sysadmin tools change : apt-get,
update-rc.d, ...
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 12/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
System configuration
System configuration
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 13/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
System configuration
System configuration
Most config files are in /etc/sysconfig
sysconfig/network : gateway, DNS...
sysconfig/network-scripts/ifcfg-eth0 : interface
configuration
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 14/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Service management
Service management
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 15/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Service management
Service management
chkconfig --list (--add ...) : manage enabled services
service httpd start
service network restart
use init.d and rcN.d in the background
When you install a package, it will not automatically be
started for you
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 16/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Package management
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 17/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Package management
Package management uses yum
repositories in /etc/yum.repos.d
yum search keywork
yum info package
yum install package
yum remove package
yum update [package]
yum clean all
rpm -qa
rpm -ql package
rpm -qf /path/to/file
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 18/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
EPEL repository
RedHat has much less packages than Debian, usually,
additional packages are required
The only allowed repository is EPEL (Extra Packages for
Enterprise Linux)
Maintainted by the Fedora Project
Stability is guaranteed
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 19/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Differences in system componen
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 20/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
apache
apache
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 21/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
apache
apache
Apache is called httpd
The user is called apache
Default docroot is /var/www/html
Config in /etc/httpd/conf
VHosts in /etc/httpd/conf.d/*.conf
/etc/init.d/httpd configtest
/etc/init.d/httpd reload
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 22/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
php
php
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 23/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
php
php
Config is in /etc/php.ini
Includes in /etc/php.d
You can copy php.ini to php-cli.ini if you want a
different config for batchs
On RHEL5.6 and above, you can use PHP 5.3 through the
php53 packages
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 24/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
mysql
mysql
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 25/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
mysql
mysql
Configuration is in /etc/my.cnf
almost nothing by default
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 26/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Finding help
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 27/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Finding help
From the included documentation :
yum install [links] Deployment Guide-en-US
htmlview
/usr/share/doc/Deployment Guide-en-US-5.2/index.html
Online :
http://docs.redhat.com/
The Deployment Guide is the most interesting document
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 28/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Practice
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 29/30
Introduction to RHEL Basic system administration Package management Differences in system components Finding help Practic
Practice
Install varnish (from EPEL)
Make varnish listen on port 80
Make apache listen on port 8080
Make varnish use apache as a backend
Make varnish start on boot
Make varnish log using apache format (varnishncsa)
www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 30/30

Redhat enterprise Linux

  • 1.
    Red Hat EnterpriseLinux a crash course
  • 2.
    1 La 1ère école100 % dédiée à l'open source Open Source School est fondée à l'initiative de Smile, leader de l'intégration et de l'infogérance open source, et de l'EPSI,établissement privé pionnier de l’enseignement supérieur en informatique. Dans le cadre du Programme d’Investissements d’Avenir (PIA), le gouvernement français a décidé de soutenir la création de cette école en lui attribuant une première aide de 1,4M€ et confirme sa volonté de soutenir la filière du Logiciel Libre actuellement en plein développement. Avec une croissance annuelle de plus de 10%, et 4 000 postes vacants chaque année dans le secteur du Logiciel Libre, OSS entend répondre à la pénurie de compétences du secteur en mobilisant l’ensemble de l’écosystème et en proposant la plus vaste offre en matière de formation aux technologies open source tant en formation initiale qu'en formation continue.
  • 3.
    2 Les formations duplein emploi !  Formation Continue Open Source School "Executive Education" est un organisme de formation qui propose un catalogue de plus de 200 formations professionnelles et différents dispositifs de reconversion permettant le retour à l’emploi (POE) ou une meilleure employabilité pour de nombreux professionnels de l’informatique.  Pour vos demandes : formations@opensourceschool.fr  Formation Initiale 100% logiciels libres et 100% alternance, le cursus Open Source School s’appuie sur le référentiel des blocs de compétences de l’EPSI. Il est sanctionné par un titre de niveau I RNCP, Bac+5. Le programme est proposé dans 6 campus à Bordeaux, Lille, Lyon, Montpellier, Nantes, Paris.
  • 4.
  • 5.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Plan 1 Introduction to RHEL 2 Basic system administration 3 Package management 4 Differences in system components 5 Finding help 6 Practice www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 2/30
  • 6.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Introduction to RHEL www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 3/30
  • 7.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic History History www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 4/30
  • 8.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic History History 1991: Linux 0.01 1994: Red Hat Linux 1.0 1996: Debian 1.1 1997: RPM 2003: Fedora and RHEL www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 5/30
  • 9.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Licencing Licencing www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 6/30
  • 10.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Licencing Licencing Red Hat Enterprise Linux is a commercial distribution of open source software You need to pay a subscribtion for updates and support Sources are freely available Source availability led to community managed derivatives : CentOS : enterprise focused Scientific Linux : for science ! Also commercial derivatives like Oracle Linux www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 7/30
  • 11.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Lifecycle Lifecycle www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 8/30
  • 12.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Lifecycle Lifecycle RHEL versions have only one number (RHEL4, RHEL5, RHEL6,...) 5 years of active life (bugfixes and improvements) 5 years of maintenance (only security fixes) 3 years of special Extended Life Cycle (only some security fixes), additional subscription required additional subscription requires Incremental updates (4.5, 5.6, 6.1 ...) Debian only has a lifecycle of 3 years, similar to the maintenance phase Versions of components may slightly change between updates, but no major upgrades www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 9/30
  • 13.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Basic system administration www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 10/30
  • 14.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Don’t panic! Don’t panic! www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 11/30
  • 15.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Don’t panic! Don’t panic! RHEL is similar to debian, and most other distributions All kernel utilities are the same : uname, ps, top, vmstat, ifconfig,... Basic GNU utilities are the same : sort, grep, awk, ... Only high-level sysadmin tools change : apt-get, update-rc.d, ... www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 12/30
  • 16.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic System configuration System configuration www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 13/30
  • 17.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic System configuration System configuration Most config files are in /etc/sysconfig sysconfig/network : gateway, DNS... sysconfig/network-scripts/ifcfg-eth0 : interface configuration www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 14/30
  • 18.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Service management Service management www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 15/30
  • 19.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Service management Service management chkconfig --list (--add ...) : manage enabled services service httpd start service network restart use init.d and rcN.d in the background When you install a package, it will not automatically be started for you www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 16/30
  • 20.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Package management www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 17/30
  • 21.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Package management Package management uses yum repositories in /etc/yum.repos.d yum search keywork yum info package yum install package yum remove package yum update [package] yum clean all rpm -qa rpm -ql package rpm -qf /path/to/file www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 18/30
  • 22.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic EPEL repository RedHat has much less packages than Debian, usually, additional packages are required The only allowed repository is EPEL (Extra Packages for Enterprise Linux) Maintainted by the Fedora Project Stability is guaranteed www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 19/30
  • 23.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Differences in system componen www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 20/30
  • 24.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic apache apache www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 21/30
  • 25.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic apache apache Apache is called httpd The user is called apache Default docroot is /var/www/html Config in /etc/httpd/conf VHosts in /etc/httpd/conf.d/*.conf /etc/init.d/httpd configtest /etc/init.d/httpd reload www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 22/30
  • 26.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic php php www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 23/30
  • 27.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic php php Config is in /etc/php.ini Includes in /etc/php.d You can copy php.ini to php-cli.ini if you want a different config for batchs On RHEL5.6 and above, you can use PHP 5.3 through the php53 packages www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 24/30
  • 28.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic mysql mysql www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 25/30
  • 29.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic mysql mysql Configuration is in /etc/my.cnf almost nothing by default www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 26/30
  • 30.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Finding help www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 27/30
  • 31.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Finding help From the included documentation : yum install [links] Deployment Guide-en-US htmlview /usr/share/doc/Deployment Guide-en-US-5.2/index.html Online : http://docs.redhat.com/ The Deployment Guide is the most interesting document www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 28/30
  • 32.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Practice www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 29/30
  • 33.
    Introduction to RHELBasic system administration Package management Differences in system components Finding help Practic Practice Install varnish (from EPEL) Make varnish listen on port 80 Make apache listen on port 8080 Make varnish use apache as a backend Make varnish start on boot Make varnish log using apache format (varnishncsa) www.opensourceschool.fr – Licence Creative Commons (CC BY-SA 3.0 FR) – 30/30