Home  Home  Home  Kontakt  Kontakt  Kontakt  Inhalt  Inhalt  Inhalt  Blog  Blog  Blog  FAQ  FAQ  FAQ

CentOS-7 in VirtualBox 5.2

Download

CentOS iso download

download (www.centos.org)

=> http://isoredirect.centos.org/centos/7/isos/x86_64/
=> http://linuxsoft.cern.ch/centos/7/isos/x86_64/ \

Icon  Name                                    Last modified      Size  Description
[DIR] Parent Directory                                             -
[TXT] 0_README.txt                            09-May-2018 22:16  2.4K
[   ] CentOS-7-x86_64-DVD-1804.iso            03-May-2018 23:07  4.2G
[   ] CentOS-7-x86_64-DVD-1804.torrent        11-May-2018 17:43   84K
[   ] CentOS-7-x86_64-Everything-1804.iso     07-May-2018 14:55  8.8G
[   ] CentOS-7-x86_64-Everything-1804.torrent 11-May-2018 17:43  176K
[   ] CentOS-7-x86_64-LiveGNOME-1804.iso      02-May-2018 20:21  1.3G
[   ] CentOS-7-x86_64-LiveGNOME-1804.torrent  11-May-2018 17:43   52K
[   ] CentOS-7-x86_64-LiveKDE-1804.iso        02-May-2018 20:28  1.8G
[   ] CentOS-7-x86_64-LiveKDE-1804.torrent    11-May-2018 17:43   71K
[   ] CentOS-7-x86_64-Minimal-1804.iso        03-May-2018 23:07  906M
[   ] CentOS-7-x86_64-Minimal-1804.torrent    11-May-2018 17:43   36K
[   ] CentOS-7-x86_64-NetInstall-1804.iso     03-May-2018 22:34  495M
[   ] CentOS-7-x86_64-NetInstall-1804.torrent 11-May-2018 17:43   20K
[TXT] sha1sum.txt                             09-May-2018 22:02  454
[TXT] sha1sum.txt.asc                         11-May-2018 17:12  1.3K
[TXT] sha256sum.txt                           09-May-2018 21:59  598
[TXT] sha256sum.txt.asc                       11-May-2018 17:12  1.4K

Erklärung der Files: 0_README.txt (linuxsoft.cern.ch)

List of images in this directory
================================

CentOS-7-x86_64-DVD-1804.iso
  This DVD image contains all the packages that can be installed using the
  installer. This is the recommended image for most users.

CentOS-7-x86_64-NetInstall-1804.iso
  This is the network install and rescue image. The installer will ask from
  where it should fetch the packages to be installed. This image is most
  useful if you have a local mirror of CentOS packages.

CentOS-7-x86_64-Everything-1804.iso
  This image contains the complete set of packages for  CentOS Linux 7. It can be
  used for installing or populating a local mirror. This image needs a 16GB USB
  flash drive as it is too large for DVD isos.
...

Download verifizieren (optional)

ls -l
sha256sum -c sha256sum.txt 2>&1 | grep OK
-rw-rw-r-- 1 grossnik grossnik 4470079488 Jul 12 13:13 CentOS-7-x86_64-DVD-1804.iso
-rw-rw-r-- 1 grossnik grossnik  713031680 Mär 19  2017 CentOS-7-x86_64-Minimal-1611.iso
-rw-rw-r-- 1 grossnik grossnik  519045120 Jul 12 14:17 CentOS-7-x86_64-NetInstall-1804.iso
-rw-rw-r-- 1 grossnik grossnik  505434112 Nov 27  2017 cern-centos-7.iso
-rw-rw-r-- 1 grossnik grossnik        598 Jul 12 13:52 sha256sum.txt
-rw-rw-r-- 1 grossnik grossnik       1458 Jul 12 13:52 sha256sum.txt.asc

CentOS-7-x86_64-DVD-1804.iso: OK
CentOS-7-x86_64-NetInstall-1804.iso: OK
wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7
gpg --quiet --with-fingerprint ./RPM-GPG-KEY-CentOS-7
gpg --import ./RPM-GPG-KEY-CentOS-7
gpg --verify ./sha256sum.txt.asc
sha256sum -c sha256sum.txt.asc 2>&1 | grep OK
pub  4096R/F4A80EB5 2014-06-23 CentOS-7 Key (CentOS 7 Official Signing Key) 
      Schl.-Fingerabdruck = 6341 AB27 53D7 8A78 A7C2  7BB1 24C6 A8A7 F4A8 0EB5

gpg: Schlüssel F4A80EB5: Öffentlicher Schlüssel "CentOS-7 Key (CentOS 7 Official Signing Key) " importiert
gpg: Anzahl insgesamt bearbeiteter Schlüssel: 1
gpg:               importiert: 1  (RSA: 1)

gpg: Unterschrift vom Fre 11 Mai 2018 17:12:24 CEST mittels RSA-Schlüssel ID F4A80EB5
gpg: Korrekte Unterschrift von »CentOS-7 Key (CentOS 7 Official Signing Key) «
gpg: WARNUNG: Dieser Schlüssel trägt keine vertrauenswürdige Signatur!
gpg:          Es gibt keinen Hinweis, daß die Signatur wirklich dem vorgeblichen Besitzer gehört.
Haupt-Fingerabdruck  = 6341 AB27 53D7 8A78 A7C2  7BB1 24C6 A8A7 F4A8 0EB5
gpg: "WARNUNG: Keine abgetrennte Signatur; die Datei './sha256sum.txt' wurde NICHT überprüft!

CentOS-7-x86_64-DVD-1804.iso: OK
CentOS-7-x86_64-NetInstall-1804.iso: OK

Gast erstellen und minimal System installieren

ToDo

CentOS-7
minimal
bridge host-only internal
# root und user Passwörter merken

via ssh in den CentOS Gast verbinden

grossnik@tuvok:~$ ssh ds@192.168.2.20
The authenticity of host '192.168.2.20 (192.168.2.20)' can't be established.
ECDSA key fingerprint is SHA256:SQZ2L1XDT2aCzUmiaQn9zYevWB4vq595nwV1M72aRDM.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.2.20' (ECDSA) to the list of known hosts.
ds@192.168.2.20's password:
Last login: Fri Jul 13 01:29:48 2018

CentOS Gast updaten

sudo yum update
Wir gehen davon aus, dass der lokale Systemadministrator Ihnen die
Regeln erklärt hat.  Normalerweise läuft es auf drei Regeln hinaus:

    #1) Respektieren Sie die Privatsphäre anderer.
    #2) Denken Sie nach, bevor Sie tippen.
    #3) Mit großer Macht kommt große Verantwortung.

[sudo] Passwort für ds:
Geladene Plugins: fastestmirror
Determining fastest mirrors
 * base: linuxsoft.cern.ch
 * extras: linuxsoft.cern.ch
 * updates: linuxsoft.cern.ch
base                                                                  | 3.6 kB  00:00:00
extras                                                                | 3.4 kB  00:00:00
updates                                                               | 3.4 kB  00:00:00
(1/4): base/7/x86_64/group_gz                                         | 166 kB  00:00:01
(2/4): extras/7/x86_64/primary_db                                     | 150 kB  00:00:02
(3/4): base/7/x86_64/primary_db                                       | 5.9 MB  00:00:10
(4/4): updates/7/x86_64/primary_db                                    | 3.6 MB  00:00:10
Abhängigkeiten werden aufgelöst

Transaktionsübersicht
=============================================================================================
Installieren    1 Paket
Aktualisieren  55 Pakete

Gesamte Downloadgröße: 159 M
Is this ok [y/d/N]:
...

(55/56): linux-firmware-20180220-62.2.git6d51311.el7_5.noarch.rpm     |  57 MB  00:00:32
(56/56): kernel-3.10.0-862.6.3.el7.x86_64.rpm                         |  46 MB  00:05:39
---------------------------------------------------------------------------------------------
Gesamt                                                       461 kB/s | 159 MB  00:05:53
Schlüssel wird von file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 geholt
GPG-Schlüssel 0xF4A80EB5 importieren:
 Benutzerkennung     : "CentOS-7 Key (CentOS 7 Official Signing Key) "
 Fingerabdruck: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Paket    : centos-release-7-5.1804.el7.centos.x86_64 (@anaconda)
 Von       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Ist dies in Ordnung? [j/N] :

Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Aktualisieren    : nspr-4.19.0-1.el7_5.x86_64                                        1/111
  Aktualisieren    : nss-util-3.36.0-1.el7_5.x86_64                                    2/111
  Aktualisieren    : libgcc-4.8.5-28.el7_5.1.x86_64                                    3/111
...
  sudo.x86_64 0:1.8.19p2-14.el7_5
  tzdata.noarch 0:2018e-3.el7

Komplett!

Swap File erstellen

sudo mkdir /var/swap/
sudo dd if=/dev/zero of=/var/swap/swapfile bs=1024 count=2097152
sudo chmod 600 /var/swap/swapfile
sudo mkswap    /var/swap/swapfile
sudo swapon    /var/swap/swapfile

grep /var/swap/swapfile /etc/fstab > /dev/null || sudo sh -c 'echo "/var/swap/swapfile  swap swap  pri=1000 0 0" >> /etc/fstab'

Weniger Kernel’s vorrätig halten

sudo sed -i.bak.$(date +%Y%m%d_%H%M%S) 's/installonly_limit=5/installonly_limit=3/' /etc/yum.conf 
[ds@centos7-ds-1 ~]$ ls -l /etc/yum.conf*
-rw-r--r--. 1 root root 970 13. Jul 02:10 /etc/yum.conf
-rw-r--r--. 1 root root 970 13. Apr 23:58 /etc/yum.conf.bak

[ds@centos7-ds-1 ~]$ diff /etc/yum.conf /etc/yum.conf.bak.*
10c10
< installonly_limit=3
---
> installonly_limit=5

Ein paar Tools installieren

sudo yum install bash-completion
sudo yum install wget
sudo yum install nmap 
sudo yum install mc
sudo yum install emacs
sudo yum install epel-release
sudo yum install htop atop

Netzwerkkarten prüfen

nmcli d
DEVICE  TYPE      STATE            CONNECTION 
enp0s3  ethernet  verbunden        enp0s3     
enp0s8  ethernet  nicht verbunden  --         
enp0s9  ethernet  nicht verbunden  --         
lo      loopback  nicht verwaltet  --         
sudo nmtui
sudo systemctl restart network

Säubern (optional)

sudo yum clean all
sudo rm -rf /var/cache/yum
df
Dateisystem    1K-Blöcke Benutzt Verfügbar Verw% Eingehängt auf
/dev/sda1       32895760 3428252  27773456   11% /
devtmpfs          497096       0    497096    0% /dev
tmpfs             507684       0    507684    0% /dev/shm
tmpfs             507684    6872    500812    2% /run
tmpfs             507684       0    507684    0% /sys/fs/cgroup
tmpfs             101540       0    101540    0% /run/user/1000