216 lines
10 KiB
TeX
Executable File
216 lines
10 KiB
TeX
Executable File
\section{Yum (Red Hat)}
|
|
\begin{justify}
|
|
Um Software unter Red Hat zu installieren, gibt es das Programm {\ttfamily yum}
|
|
in der Shell. \subsection{Proxy Einstellung} Damit man Software installieren kann, sollte man in der {\ttfamily .bashrc} f"ur den User {\ttfamily root} folgende Variablen hinzuf"ugen.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Proxy Variablen, label=lst:bash]
|
|
root@tux>grep http .bashrc
|
|
export http_proxy=http://10.18.14.81:80/
|
|
export ftp_proxy=http://10.18.14.81:80/
|
|
export HTTP_PROXY=http://10.18.14.81:80/
|
|
export FTP_PROXY=http://10.18.14.81:80/
|
|
\end{lstlisting}
|
|
%-------------------------------------------------------------------------------
|
|
% Section: Software installieren
|
|
%-------------------------------------------------------------------------------
|
|
\subsection{Software installieren}
|
|
Mit {\ttfamily install} oder auch {\ttfamily groupinstall} werden Pakete installiert. Mit der Option {\ttfamily -y} wird das Paket ohne R"uckfrage installiert.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Software installieren, label=lst:bash]
|
|
root@tux>yum groupinstall kde-desktop gnome-dektop
|
|
|
|
root@tux>yum -y install samba.x86_64
|
|
\end{lstlisting}
|
|
%-------------------------------------------------------------------------------
|
|
% Section: Software loeschen
|
|
%-------------------------------------------------------------------------------
|
|
\subsection{Software l"oschen}
|
|
Mit {\ttfamily remove} kann man installierte Pakete l"oschen und mit {\ttfamily groupremove} ganze Paketgruppen.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Software deinstallieren, label=lst:bash]
|
|
root@tux>yum remove firefox.x86_64
|
|
|
|
root@tux>yum groupremove gnome-desktop
|
|
\end{lstlisting}
|
|
%-------------------------------------------------------------------------------
|
|
% Section: Software aktualisieren
|
|
%-------------------------------------------------------------------------------
|
|
\subsection{Software aktualisieren}
|
|
Ein Paket wird mit {\ttfamily update} aktualisiert. Ohne die Angabe des Software Pakets, werden alle Applikationen aktualisiert. Gibt man noch die Option {\ttfamily -y} mit an, so werden die Updates ohne nachfragen installiert.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Software aktualisieren, label=lst:bash]
|
|
root@tux>yum update firefox.x86_64
|
|
|
|
root@tux>yum -y update
|
|
\end{lstlisting}
|
|
Vor einem Update kann man sich die Pakete anzeigen lassen, die aktualisert werden.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Updates auflisten, label=lst:bash]
|
|
root@tux>yum list updates
|
|
Loaded plugins: downloadonly, refresh-packagekit, security
|
|
Updated Packages
|
|
coreutils.x86_64 8.4-19.0.1.el6_4.2 ol6_latest
|
|
coreutils-libs.x86_64 8.4-19.0.1.el6_4.2 ol6_latest
|
|
gdb.x86_64 7.2-60.el6_4.1 ol6_latest
|
|
glx-utils.x86_64 9.0-0.8.el6_4.3 ol6_latest
|
|
.
|
|
\end{lstlisting}
|
|
\newpage
|
|
\begin{justify}
|
|
Ganze Paketgruppen lassen sich mit {\ttfamily groupupdate} aktualisieren.
|
|
\end{justify}
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Paketgruppen aktualisieren, label=lst:bash]
|
|
root@tux>yum groupupdate 'Graphical Internet'
|
|
Dependencies Resolved
|
|
Upgrade 5 Package(s)
|
|
Is this ok [Y/N]: y
|
|
Running Transaction
|
|
Updating : evolution-data-server-3.0.2-1.el6.x86_64 1/10
|
|
Updating : evolution-3.0.2-3.el6.x86_64 2/10
|
|
Updating : evolution-NetworkManager-3.0.2-3.el6.x86_64 3/10
|
|
Updating : evolution-help-3.0.2-3.el6.x86_64 4/10
|
|
Updating : empathy-3.0.2-3.el6.x86_64 5/10
|
|
Cleanup : evolution-NetworkManager-3.0.2-3.el6.x86_64 6/10
|
|
Cleanup : evolution-help-3.0.2-3.el6.x86_64 7/10
|
|
Cleanup : evolution-3.0.2-3.el6.x86_64 8/10
|
|
Cleanup : empathy-3.0.2-3.el6.x86_64 9/10
|
|
Cleanup : evolution-data-server-3.0.2-1.el6.x86_64 10/10
|
|
\end{lstlisting}
|
|
%-------------------------------------------------------------------------------
|
|
% Section: Paket suchen
|
|
%-------------------------------------------------------------------------------
|
|
\subsection{Paket suchen}
|
|
M"ochte man den Paketnamen eines Programms wissen, so wird hierzu der Befehl {\ttfamily yum search} benutzt.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Paket suchen, label=lst:bash]
|
|
root@tux>yum search samba
|
|
Loaded plugins: downloadonly, refresh-packagekit, security
|
|
========== N/S Matched: samba ==========
|
|
samba-client.x86_64: Samba client programs
|
|
samba-common.i686: Files used by both Samba servers and clients
|
|
samba-common.x86_64: Files used by both Samba servers and clients
|
|
samba-doc.x86_64: Documentation fort he Samba suite
|
|
\end{lstlisting}
|
|
%-------------------------------------------------------------------------------
|
|
% Section: Vorhandene Pakete
|
|
%-------------------------------------------------------------------------------
|
|
\subsection{Vorhandene Pakete}
|
|
Alle vorhandenen Pakete in der Yum Database werden mit {\ttfamily list} angezeigt. Als erstes werden die installierten Pakete angezeigt und danach die Available Packages.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Vorhandene Pakete anzeigen, label=lst:bash]
|
|
root@tux>yum list | less
|
|
Loaded plugins: downloadonly, refresh-packagekit, security
|
|
\end{lstlisting}
|
|
%-------------------------------------------------------------------------------
|
|
% Section: Installierte Pakete
|
|
%-------------------------------------------------------------------------------
|
|
\subsection{Installierete Pakete}
|
|
Installierte Pakete k"onnen mit {\ttfamily list installed} angezeigt werden.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Installierte Pakete, label=lst:bash]
|
|
root@tux>yum list installed | less
|
|
Loaded plugins: downloadonly, refresh-packagekit, security
|
|
Installed Packages
|
|
ConsoleKit.x86_64 0.4.1-3.el6 @anaconda-OracleLinuxServer
|
|
ConsoleKit-libs.x86_64 0.4.1-3.ol6 @anaconda-OracleLinuxServer
|
|
.
|
|
.
|
|
\end{lstlisting}
|
|
%-------------------------------------------------------------------------------
|
|
% Section: Paket Informationen
|
|
%-------------------------------------------------------------------------------
|
|
\subsection{Paket Informationen}
|
|
Informationen "uber Pakete k"onnen mit {\ttfamily yum info} angezeigt werden.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Paket Informationen, label=lst:bash]
|
|
root@tux>yum info firefox
|
|
Loaded plugins: downloadonly, refresh-packagekit, security
|
|
Installed Packages
|
|
Name : firefox
|
|
Arch : x86_64
|
|
Version : 17.0.6
|
|
Release : 1.0.1.el6_4
|
|
Size : 29M
|
|
Repo : installed
|
|
From repo : ol6_latest
|
|
Summary : Mozilla Firefox Web Browser
|
|
URL : http://www.mozilla.org/projects/firefox/
|
|
License : MPLv1.1 or GPLv2+ or LGPLv2+
|
|
Description : Mozilla Firefox is an open-source web browser, designed for
|
|
: standards compliance, performance and portability.
|
|
\end{lstlisting}
|
|
%-------------------------------------------------------------------------------
|
|
% Section: Repository
|
|
%-------------------------------------------------------------------------------
|
|
\subsection{Repository}
|
|
Mit {\ttfamily yum repolist} werden nur die Repositories ausgegeben, die f"ur das System aktiviert sind.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Aktive Repositories, label=lst:bash]
|
|
root@tux>yum repolist
|
|
Loaded plugins: downloadonly, refresh-packagekit, security
|
|
repo_id repo_name status
|
|
ol6_UEK_latest Latest Unbreakable Enterprise Kernel .. 176
|
|
ol6_latest OracleLinux 6Server latest (x86_64) 21.522
|
|
\end{lstlisting}
|
|
Alle Repositories werden mit {\ttfamily yum repolist all} angezeigt.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Alle Repositories, label=lst:bash]
|
|
root@tux>yum repolist all
|
|
Loaded plugins: downloadonly, refresh-packagekit, security
|
|
repo_id repo_name status
|
|
ol6_UEK_base Unbreakable Enterprise Kernel for Oracle.. disabled
|
|
ol6_UEK_latest Latest Unbreakable Enterprise Kernel .. enabled:176
|
|
OL6_ga_base Oracle Linux 6Server GA installation disabled
|
|
ol6_latest OracleLinux 6Server latest (x86_64) enabled:21.522
|
|
.
|
|
.
|
|
\end{lstlisting}
|
|
Im Verzeichnis {\ttfamily /etc/yum.repos.d} gibt es die Datei {\ttfamily public-yum-ol6.repo}. In dieser Datei befinden sich alle Repositories und hier kann man sie auch aktivieren. Ein Update der Datei kann man folgenderma"sen machen.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Update Repositories, label=lst:bash]
|
|
root@tux>cd /etc/yum.repos.d
|
|
|
|
root@tux>mv public-yum-ol6.repo public-yum-ol6.repo.disabled
|
|
|
|
root@tux>wget http://public-yum.oracle.com/public-yum-ol6.repo
|
|
\end{lstlisting}
|
|
\newpage
|
|
%-------------------------------------------------------------------------------
|
|
% Section: Repository hinzufuegen
|
|
%-------------------------------------------------------------------------------
|
|
\subsection{Repository hinzuf"ugen}
|
|
Um ein neues Repository hinzuf"ugen zu k"onnen, muss vorher die Release Informationen heruntergeladen und installiert werden.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Added Repositories, label=lst:bash]
|
|
root@tux>wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel_release-6-8.noarch.rpm
|
|
|
|
root@tux>rpm -ivh epel_release-6-8.noarch.rpm
|
|
|
|
root@tux>yum repolist
|
|
\end{lstlisting}
|
|
Erfolgt nach {\ttfamily yum repolist} die Fehlermeldung: {\ttfamily Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again}, so ist die Variable
|
|
{\ttfamily https\_proxy} zu setzten.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Proxy setzten, label=lst:bash]
|
|
root@tux>export https_proxy=https://10.18.41.81:80/
|
|
\end{lstlisting}
|
|
%-------------------------------------------------------------------------------
|
|
% Section: Update mit Cron
|
|
%-------------------------------------------------------------------------------
|
|
\subsection{Update mit Cron}
|
|
Sollen die Updates vollautomatisch heruntergeladen und installiert werden, so kann man das am einfachsten mit dem Programm {\ttfamily yum-cron} erledigen. Dieses Paket muss vorher installiert werden.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Installieren yum-cron, label=lst:bash]
|
|
root@tux>yum install yum-cron
|
|
\end{lstlisting}
|
|
Nach erfolgreicher Installation befindet sich die Konfigurationsdatei unter {\ttfamily /etc/sysconfig} mit dem Namen {\ttfamily yum-cron}. Nach erfolgter Konfiguration muss der Daemon f"ur {\ttfamily yum-cron} eingerichtet werden.
|
|
\listBash
|
|
\begin{lstlisting}[captionpos=b, caption=Enable yum-cron, label=lst:bash]
|
|
root@tux>service yum-cron start
|
|
|
|
root@tux>chkonfig yum-cron on
|
|
\end{lstlisting}
|
|
Nun befindet sic him Verzeichnis {\ttfamily /etc/cron.daily} die Datei {\ttfamily 0yum.cron}.
|
|
\end{justify}
|