CentOS Installation

Aus Meine Wiki
Wechseln zu: Navigation, Suche


Kein Setup Befehl auf dem CentOS 6/7

Wenn es CentOS von Minimal ISO installiert wurde, ist Setup-Tool nicht vorhanden. Setup-Tool kann nachinstalliert werden.

Suche nach vorhandenen Setup-Tool Konfig Paketen
  yum search system-config 
Centos 7
  yum install setuptool 
  yum install system-config-firewall* 
  yum install system-config-keyboard system-config-date system-config-language system-config-users
CentOS 6
  yum install setuptool
  yum install system-config-network
  yum install system-config-firewall*
  yum install system-config-securitylevel-tui
  yum install system-config-keyboard
ntsysv-Tool. Ein Utility für aktivieren und deaktivieren von services.
  • Durch den Parameter -y (direkt hinter yum einzugeben) kann die manuelle Bestätigung vor dem Installationsvorgang umgangen werden.
  yum -y install ntsysv
  ntsysv
Installation von netstat, nmap on CentOS 7
  yum install net-tools nmap


Ablauf

Guideline für eine Minimal Installation

Netwerkeinrichtung
  cd /etc/sysconfig/network-scripts/
  vim /etc/sysconfig/network-scripts/ifcfg-eth0
  vim /etc/sysconfig/network-scripts/route-eth2
  
  route
  route -n
  /etc/init.d/network status
  /etc/init.d/network restart
LVM Partition
Allgemeine

Updates installieren

  yum update -y

Hostname setzen

  hostnamectl set-hostname servername

Software installieren

  yum install -y vim rsync zip unzip wget gzip tar make lynx ftp gpg smartmontools ntp nmap net-tools 
  yum install -y bash-completion telnet bind-utils yum-utils gcc psmisc mailx lsof multitail

Firewalld entfernen

  yum -y remove firewalld

IPv6 deaktivieren

  echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
  sysctl -p

Logrotate erhoehen

  vim /etc/logrotate.conf
     # keep 30 weeks worth of backlogs
     rotate 30
     compress

Vim Style ändern

  echo "set background=dark" >> ~/.vimrc

NTP aktivieren

  systemctl enable ntpd.service
  systemctl start ntpd.service

Selinux abschalten

  sed -i 's/enforcing/disabled/g' /etc/selinux/config /etc/selinux/config

VM Ware Tools installieren (nur bei Installation in einer VMWARE VM)

  wget https://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub
  wget https://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-DSA-KEY.pub
  pm --import ./VMWARE-PACKAGING-GPG-DSA-KEY.pub
  pm --import ./VMWARE-PACKAGING-GPG-RSA-KEY.pub
  m -f VMWARE-PACKAGING-GPG-DSA-KEY.pub
  m -f VMWARE-PACKAGING-GPG-RSA-KEY.pub
  echo "[vmware-tools]" >> /etc/yum.repos.d/vmware-tools.repo
  echo "name = VMware Tools" >> /etc/yum.repos.d/vmware-tools.repo
  echo "baseurl = http://packages.vmware.com/packages/rhel7/x86_64/" >> /etc/yum.repos.d/vmware-tools.repo
  echo "enabled = 1" >> /etc/yum.repos.d/vmware-tools.repo
  echo "gpgcheck = 1" >> /etc/yum.repos.d/vmware-tools.repo
  yum install -y open-vm-tools
  systemctl start vmtoolsd.service
  systemctl enable vmtoolsd.service


iptraf


How to check CentOS Version

Link



Log
dmesg : (Befehl) dmesg is an (display or driver) message. It is used to examine or control the kernel ring buffer.
The dmesg command shows the current content of the kernel syslog ring buffer messages while the /var/log/dmesg file contains what was in that ring buffer when the boot process last completed.
messages : It contains global system messages, including the messages that are logged during system startup. There are several things that are logged in /var/log/messages including mail, cron, daemon, kern, auth, etc.