Benutzer-Werkzeuge

Webseiten-Werkzeuge


os_unix

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste ÜberarbeitungBeide Seiten der Revision
os_unix [2019/02/21 10:13] – [Monitoring] gpipperros_unix [2019/12/08 17:33] – [Scripting] gpipperr
Zeile 1: Zeile 1:
 +===== Linux ===== 
 +
 +==== Allgemein ====
 +
 +
 +Unix Manpages für verschiedene Betriebsysteme wie HP UX:
 +  *   => http://www.polarhome.com/service/man/?qf=&tf=2&of=HP-UX&sf=1
 +
 +
 +
 +
 +Alternative Distributionen zu Oracle Linux für den Datenbank Betrieb:
 +  * https://www.scientificlinux.org/
 +
 +
 +
 +Für den echten Unix Freund:
 +
 +  * http://www.polarhome.com/
 +
 +
 +----
 +
 +==== Scripting ====
 +
 +  * [[linux:vi|Wichtige Shell Befehle für den Oracle DBA unter Linux und  Solaris]]
 +  * [[linux:delete_audit_logs|Oracle Audit Log Files unter Linux löschen]]
 +  * [[linux:check_password_complexity|Linux Password Komplexität prüfen]]
 +
 +
 +
 +
 +===Quellen===
 +
 +
 +
 +  * http://openbook.rheinwerk-verlag.de/linux_unix_programmierung/index.htm
 +  * http://openbook.rheinwerk-verlag.de/shell_programmierung/
 +  * http://www.dedoimedo.com/computers/linux-cool-hacks.html
 +
 +----
 +
 +
 +=== Monitoring===
 +
 +HTOP
 +
 +  * http://hisham.hm/htop/
 +  
 +NMON  
 +  * http://nmon.sourceforge.net/pmwiki.php
 +
 +
 +SYSLOG
 +
 +  * https://www.graylog.org/
 +
 +
 +----
 +
 +==== Server ====
 +
 +== Installation: ==
 +
 +  * [[linux:install_oracle_hp_DL380p|Installation Oracle Linux auf einem HP ProLiant DL380p Gen 8-Server für eine Datenbank Installation]]
 +
 +
 +
 +== Für Oracle Linux 7 Open Repostiory EPEL einbinden ==
 +
 +<code bash>
 +wget https://ftp.fau.de/epel/epel-release-latest-7.noarch.rpm
 +rpm -ivh epel-release-latest-7.noarch.rpm
 +yum repolist
 +</code>
 +
 +
 +
 +==Shortcuts beim booten:==
 +
 +Mit der Tasten Kombination <key>ALT</key> und <key>D</key> dann der Splashscreen einer Oracle oder Red Hat Linux Installation "enfernt" werden um die aktuellen Kommandos zu verfolgen.
 +
 +==Im Single Mode booten:==
 +
 +Im Grup Menü Zeile den passenden Kernel aussuchen, mit <key>a</key> in den Edit Modus springen und ein **" single"** an das Ende der Zeile schreiben und starten.
 +
 +== Root Platten neu mounten:==
 +
 +Wird beim Start von Linux (z.B. bei einer neu importieren VM) das root file system nur als read only gemounted, in Single User mode starten und neu mounten und in den nächsten Runlevel springen.
 +
 +<code bash>
 +mount -o remount /
 +init 3
 +</code> 
 +
 +
 +----
 +
 +==== Storage ====
 +
 +  * [[linux:ds3400_sas_failover|Eine IBM DS3400 für ein Oracle Real Application Cluster mit SALS Karten konfigurieren]]
 +
 +  * [[linux:check_hpsa_driver_in_use|Welchen Treiber verwendet ein PCI RAID Device unter Linux 6?]]
 + 
 +iSCSI  
 +
 +  * [[vmware:iscsi_target_for_shared_disks|iSCSI  Target für das Bereitstellen von Cluster Platten in VMWare  unter Linux 7]]
 +  * [[vmware:iscsi_target_for_shared_disks_linux6|iSCSI  Target für das Bereitstellen von Cluster Platten in VMWare unter Linux 6]]
 +
 +
 +NFS
 +
 +  * [[linux:nfs_share_vot_files_oracle_rac|NFS für einen VOT File eines Oracle Real Applikation Clusters verwenden]]
 +
 +
 +Linux I/O Scheduler:
 +
 +  * http://www.thomas-krenn.com/de/wiki/Linux_I/O_Scheduler
 +
 +
 +IO Überlegungen
 +  * https://www.slashroot.in/linux-system-io-monitoring
 +
 +===Disk Aligment Linux testen und bei einer neuen Partition einstellen===
 +
 +Verfügbare Platten anzeigen mit cat /proc/partitions
 +
 +Partition auf der Lun einrichten mit “fdisk /dev/xxx“
 +
 +Neue Partition mit:
 +Antworten:  **"n", "p", "1", "Return", "Return", "p" **
 +
 +Aligment prüfen /einstellen mit:
 +Antworten: **"x", "p","b", "1", "64", "w"**
 +
 +Gleiches Problem wie unter Windows siehe auch [[windows:disk_aligment|Disk Aligment unter Windows prüfen]]
 +
 +===CD Mounten===
 +
 +Normale CD mounten **-t iso9660**:
 +<code bash>
 +mount -t iso9660 /dev/scd0 /media/cdrom
 +</code>
 +
 +Iso Image mounten:
 +<code bash>
 +mkdir /media/iso1
 +mount -o loop my_image.iso /media/iso1
 +</code>
 +
 +===Die 5% reservierten Speicherplatz auf einer ext3/ext4 freigeben===
 +
 +Per default werden auf einem ext3/ext4 Filesystem 5% für root "reserviert".
 +Für die Fileystem, die für das OS unerläslich sind, ist das ein guter Schutz gegen zu 100% volle Platten.
 +
 +Daher ist "Used"+"Avail" nicht gleich "Disksize" im Normalfall!:
 +<code bash>
 +df -h
 +Filesystem    Disksize  Used Avail Use% 
 +/dev/sda1     100G        92G  2.7G  98% 
 +</code>
 +
 +Überpürfen mit:
 +<code bash>
 +sudo tune2fs -l /dev/sda1 | grep 'Reserved block count'
 +</code> 
 +
 +Anpassen:
 +<code bash>
 +sudo tune2fs -m 0 /dev/sda1
 +</code>
 +
 +----
 +
 +
 +----
 +
 + 
 +====Networking:====
 +
 +  * [[linux:mail_versandt_telnet|Mit Telnet eine E-Mail versenden]]
 +  * [[linux:clonen_linux_ol6_netwerkkarte| Fehlermeldung Device "eth0 does not seem to be present"]]
 +  * http://linux-ip.net/
 +  * [[https://www.ibm.com/developerworks/community/blogs/58e72888-6340-46ac-b488-d31aa4058e9c/entry/linux_netstat_command_explained_with_10_examples?lang=en|IBM Block - Linux netstat command explained with 10 examples]]
 +
 +
 +IP Adressen Daten abfragen:
 +
 +  * https://centralops.net/co/domaindossier.aspx
 +===Ubiquiti https://www.ubnt.com/ UniFi Netzwerk Komponenten===
 +
 +  * [[raspberry:fedberry_quick_install|Fedberry Linux Betriebsystem mit dem Raspberry PI 2 - Ubiquiti Network Controller]]
 +  * [[linux:unifi_vpn_windows_10| Securtiy Gateway - VPN Problem unter Windows 10 lösen]]
 + 
 +
 +
 +===Oracle Real Application Cluster RAC===  
 +
 +  * [[linux:zeroconf_netzwerk_konfiguration| Problem mit einer Zero Network Konfiguration und Oracle RAC]]
 +  * [[linux:oracle_rac_global_cache_block_lost| Netzwerkprobleme auf einen Oracle RAC Interconnect untersuchen - Global Cache Block Lost Events auf Netwerkprobleme zurückführen]]
 +===Hostname setzen===
 +
 +**root**
 +
 +Hostname manuell setzen:
 +<code bash>
 +hostname oraoms12c01.pipperr.local
 +</code>
 +
 +
 +Permanente Konfiguration:
 +<code bash>
 +#
 +#Konfiguration hinterlegen
 +vi /etc/sysconfig/network
 +
 +HOSTNAME="oraoms12c01.pipperr.local"
 +
 +#
 +#Namensauflösung hinterlegen
 +vi /etc/hosts
 +
 +10.10.10.225 oraoms12c01.pipperr.local oraoms12c01
 +
 +#
 +#Netzwerk neu starten
 +service network restart
 +
 +#testen
 +
 +dnsdomainname
 +hostname -f
 +hostname -a
 +
 +</code>
 +
 +== Linux 7 ===
 +
 +<code bash>
 +#über Kommando werkzeug
 +hostnamectl set-hostname racdb01.pipperr.local
 +
 +# Neue Session starten und püfen
 +nmcli general hostname
 +
 +cat /etc/hostname
 +
 +</code>
 +
 +see => http://www.itzgeek.com/how-tos/linux/centos-how-tos/change-hostname-in-centos-7-rhel-7.html
 + 
 +===Bonding:===
 +
 +Siehe auch dieser Bonding Beispiel:[[dba:rac_add_second_ip|Ein neues VIP und ein neues Netzwerk einem RAC Cluster ONLINE hinzufügen - siehe Abschnitt über das Bonding von dem neuen Interface]]
 +
 +  * http://www.howtoforge.com/network_card_bonding_centos
 +  * http://www.cyberciti.biz/tips/linux-bond-or-team-multiple-network-interfaces-nic-into-single-interface.html
 +  * https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/s2-networkscripts-interfaces_802.1q-vlan-tagging.html
 +
 +== Welche Interface sind in einem Bond zusammen gefasst ==
 +
 +<code bash>
 +
 + cat /proc/net/bonding/bond0 | grep -E "Slave Interface|Permanent"
 +
 +</code>
 +
 +
 +=== Routen anzeigen lassen ===
 +
 +<code bash>
 +
 +## Default route
 +
 +
 +route -n
 +
 +
 +## IP route
 +
 +
 +#welche Tables gibt es :
 +
 +cat  /etc/iproute2/rt_tables
 +
 +#anzeigen lassen:
 +
 +ip route
 +
 +ip route show table local
 +# etc.
 +
 +</code>
 +
 +  * http://linux-ip.net/html/tools-ip-route.html
 +
 +
 +=== Open Ports prüfen ===
 +
 +Auf neueren Client ist oft kein telnet mehr installiert, wie pürft man jetzt aber ob ein Port offen ist?
 +
 +<code bash>
 +# alter Weg:
 +telnet <host> <port>
 +
 +
 +# Alternative curl:
 +
 +
 +#Wenn es funktioniert:
 +
 +curl http://gpi-oem01.pipperr.local:5900 -v
 +
 +* About to connect() to gpi-oem01.pipperr.local port 5900 (#0)
 +*   Trying 10.51.20.91... connected
 +* Connected to gpi-oem01.pipperr.local (10.51.20.91) port 5900 (#0)
 +> GET / HTTP/1.1
 +> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.3.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
 +> Host: gpi-oem01.pipperr.local
 +> Accept: */*
 +>
 +
 +* Connection #0 to host gpi-oem01.pipperr.local left intact
 +* Closing connection #0
 +
 +
 +#Wenn es nicht geht:
 +
 +curl http://gpi-oem01.pipperr.local:5901 -v
 +* About to connect() to gpi-oem01.pipperr.local port 5901 (#0)
 +*   Trying 10.51.20.91... Connection refused
 +* couldn't connect to host
 +* Closing connection #0
 +curl: (7) couldn't connect to host
 +
 +
 +</code>
 +
 +curl siehe http://curl.haxx.se/docs/manpage.html
 +
 +
 +----
 +
 +
 +----
 +
 +
 +====DNS====
 +
 +
 +DNS Server mit Power DNS aufsetzen:
 +
 +  * [[linux:power_dns|Power DNS - Eine Alternative zu bind]]
 +  * [[raspberry:pidora_power_dns|Raspberry PI als DNS Applicance für PowerDNS]]
 +
 +Öffentliche DNS Server:
 +  * http://public-dns.tk/nameserver/de.html - DNS Server im Netz
 +
 +
 +----
 +
 +===NTP===
 +
 +
 +
 +  * [[linux:linux_rac_ntp|Uhrzeit im Oracle Cluster prüfen]]
 +
 +
 +Alternativ unter Windows => [[windows:windows_ntp_w32tm_zeitdienst|NTP Service MS Windows 2008 / 2012 auf einen eigenen NTP Server konfigurieren]]
 +----
 +
 +=== Firewall ===
 +
 +  * http://opnsense.org/about/features/
 +
 +----
 +
 +=== dtrace ===
 +
 +
 +  * [[linux:dtrace_linux_7|Erste Schritte mit dtrace unter Linux 7]]
 +
 +
 +----
 +
 +=== Abrtd ===
 +
 +
 +  * [[linux:abrtd_linux_rac|Abrtd - Kernel Dumps - Linux 6]]
 +
 +
 +----
 +=== Alternative Repositories ===
 +
 +EPRL
 +
 +
 +<code bash>
 +## RHEL/CentOS 7 64-Bit ##
 +wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
 +
 +rpm -ivh epel-release-7-5.noarch.rpm
 +
 +yum repolist
 +
 +
 +yum --enablerepo=epel info nmon
 +
 +yum --enablerepo=epel install nmon
 +
 +</code>
 +
 +
 +Oracle Public => http://public-yum.oracle.com/
 +
 +<code bash>
 +#Linux 7
 +cd /etc/yum.repos.d
 +wget http://public-yum.oracle.com/public-yum-ol7.repo
 +</code>
 +
 +
 +----
 +
 +
 +====Memory:====
 +
 +  * [[linux:huge_pages_linux_oracle|Huge Pages für eine Oracle Datenbank einrichten]]
 +  * [[linux:memory_oracle_verbrauch|Speicherbedarf unter Linux erkennen]]
 +  * [[linux:memory_system_v_opc_parameter|System V IPC-Parameter]]
 +  * [[linux:linux_prozesses_status_d|High Load und niedrige CPU Auslastung auf einem Linux System analysieren]]
 + 
 +How to Configure the Linux Out-of-Memory Killer:
 +  * http://www.oracle.com/technetwork/articles/servers-storage-dev/oom-killer-1911807.html
 +
 +
 +----
 +
 +====Fun:====
 +
 +  * [[raspberry:pidora_quick_install|Pidora als Linux  Betriebsystem für den Raspberry PI]]
 +
 +
 +Emulatoren 
 +  * http://linux.about.com/od/soft/tp/5-Games-Console-Emulators-For-Linux.htm
 +
 +
 +----
 +
 +====Bash:====
 +
 +  * [[linux:bash_script_snippets|Bash Snippets für Skripting]]
 +  * [[linux:rsync_wrapper_script|Beispiel für ein rsync Skript]]
 +  
 +  
 +  * [[linux:linux_screen|Scripte mit screen in den Hintergrund schieben]]
 +
 +
 +History Verhalten:
 +  * http://mywiki.wooledge.org/BashFAQ/088
 +
 +
 +----
 +
 +==== Securtiy ====
 +
 +  * [[linux:linux_switch_user_with_super|Super zum Wechseln von Usern verwenden]]
 +  * [[linux:linux_setuid_getgid_stickybit|Besondere Berechtigungen auf Dateien und Verzeichnissen unter Linux -  File Permissions (setuid, setgid and Sticky Bit) ]]
 +
 +
 +----
 +====Apache:====  
 +
 +  * [[http://www.clockwatchers.com/htaccess_intro.html|.htaccess Tutorial]]
 +
 +
 +----
 +
 +==== Solaris ====
 +
 +[[http://de.wikipedia.org/wiki/OpenSolaris|OpenSolaris]] wurde von Oracle  am 13. August 2010 eingesellt.
 +
 +Die Weiterentwicklung erfolgt nun als opensource distribution zum Beispiel unter:
 +
 +  * http://openindiana.org/
 +
 +
 +
 +----
 +
 +==== HP Unix ====
 +
 +==Shell==
 +
 +ESC Taste für das expandieren von Dateinamen (wie normalerweise TAB)
 +
 +Anpassen an Bash siehe => http://www.dadbm.com/how-to-make-hp-ux-korn-shell-similar-to-linux-bash/
 +
 +===DF===
 +
 +Der DF Befehlt unter HP UX ist etwas gewöhnungsbedürftig um leicht lesbare Werte zu erhalten.
 +
 +Hier ein praktisches Script um das auszuwerten: http://www.snapdba.com/2012/10/readable-df-h-output-in-hp-ux/
 +
 +<code bash>
 +df -Pk | awk '
 +BEGIN {print "Filesystem                          Mount Point                 Total GB   Avail GB    Used GB  Used"
 +       print "----------------------------------- ------------------------- ---------- ---------- ---------- -----"}
 +END {print ""}
 +/dev/ || /^[0-9a-zA-Z.]*:\// {
 +printf ("%-35.35s %-25s %10.2f %10.2f %10.2f %4.0f%\n",$1,$6,$2/1024/1024,$4/1024/1024,$3/1024/1024,$5)
 +}'
 +</code> 
 +Vielen Dank an [[http://www.snapdba.com/|Garth]]!
 +
 +
 +Gleiches Prinzip auf für einzelne Dateien:
 +<code bash>
 +ls -l | awk 'BEGIN{mega=1048576} $5 >= mega {$5 = $5/mega "MB"} {print}'
 +
 +du -sk  * 
 +
 +</code>
 +
 +----
 +
 +==== OpenStack====
 +
 +siehe => https://www.openstack.org/
 +
 +
 +Oracle 12c auf Solaris in einer OpenStack private Cloud Lösung:
 +
 +  * https://www.mirantis.com/
 +
 +
 +Hadoop auf OpenStack
 +
 +  * https://www.youtube.com/watch?v=MAaSiMLE05A
 +
 +
 +
 +----
 +
 +==== Docker ====
 +
 +
 +Video:
 +  * https://www.youtube.com/watch?v=mcMeTCUjGa8
 +
 +
 +----
 +
  
os_unix.txt · Zuletzt geändert: 2024/01/11 09:36 von gpipperr