Benutzer-Werkzeuge

Webseiten-Werkzeuge


systemeinstellungen_bei_centos_7

Dies ist eine alte Version des Dokuments!


Systemeinstellungen bei CentOS 7

Jeder CentOS 7-Server mit Minimal-Installation aufgesetzt

  • Min RAM: 1536MB
  • Tastatur: Deutsch
  • kdump disabled

zusätzliche Pakete

  • acpid
  • bash-completion
  • epel-release
  • rsync
  • vim
  • wget
  • xinetd

SELinux

Bei internen Servern wird SELinux von enforcing auf disabled umgestellt. Reboot erforderlich.

[root@server]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

Useranlage

[root@virtserv]# useradd -u 1010 -m backuppc
[root@virtserv]# su - backuppc

[backuppc@virtserv ~]$ scheffe@backuppc4
The authenticity of host 'backuppc4 (192.168.13.41)' can't be established.
ECDSA key fingerprint is SHA256:kbl36qOtGqCKzFTf9shprve4bw3LemJCfGTfY9Iy/R4.
ECDSA key fingerprint is MD5:a5:32:de:b1:72:4c:c2:c6:f3:68:15:95:ce:0f:57:1d.
Are you sure you want to continue connecting (yes/no)? no
Host key verification failed.

[backuppc@virtserv ~]$ cd .ssh/
[backuppc@virtserv .ssh]$ vi authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEArYzOt9RYxEvLeZ2s1pr94f1AaS6ebhol3fi+oZasUBIJezVK29dX6t+i+U0cejxr+mR8wCHfQHB02iOyxQ6fk0jn119UuViqFwSVpTIpQRl61MoZFnpThbwHihPsmggHATnuGn7V0F5ZN/9szh2OZDuqnP3rS7e7kr/wqgwNqcoBTSZSCv88WPR8k4sdNdqWS9WruEUVIwtMbwz/NH0OVpOYvDWi4LzLVhc9rTLTU1ShfpEQDbrv5Lhfcl273eHpXdF1eH3SlqhJbciRuFR9sL6pUsSXFUncuGQOK8xBx9nt4D5qEuPX2Lhf/3MXcgld1CeafaXJK5N47cTLc7BFgw== backuppc@backup.lan.klotzbuecher.biz

[backuppc@virtserv .ssh]$ chmod 600 authorized_keys

SSH

Postfix

folgendes in /etc/postfix/main.cf am Ende hinzufügen. Dadurch kann der Server Mails am Mailserver einwerfen, jedoch keine empfangen.

mydomain = lan.klotzbuecher.biz
myhostname = server.lan.klotzbuecher.biz
myorigin = $mydomain
mynetworks = 127.0.0.0/8
smtp_generic_maps = hash:/etc/postfix/generic
smtp_tls_security_level = may
relayhost = mailserv.lan.klotzbuecher.biz

Sudoers

[root@server ~]# visudo -f /etc/sudoers.d/backuppc 
# Allows backuppc to do backups and restores

# BackupPC 3
#backuppc  ALL=NOPASSWD: /usr/bin/rsync --server *

# BackupPC 4
backuppc  ALL=NOPASSWD: /usr/bin/rsync *

vim

Globale Einstellungen für vim können in der /etc/vim/vimrc durcgeführt werden.

Passt die Farben für dunklen Hintergrund an.

set background=dark

Repo

systemeinstellungen_bei_centos_7.1538253961.txt.gz · Zuletzt geändert: 2022/04/25 20:21 (Externe Bearbeitung)