redhat:base-redhat:basics-redhat

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
redhat:base-redhat:basics-redhat [2017/08/22 10:14] michaelredhat:base-redhat:basics-redhat [2019/06/11 10:24] (current) – [System Information] michael
Line 1: Line 1:
 ====== Grundlagen für Redhat / CentOS7 ====== ====== Grundlagen für Redhat / CentOS7 ======
  
 +{{ :linux:linux_grundlagen.jpg?nolink&600 |}}
  
 ---- ----
  
 ===== Basis Know-How Redhat Systems ===== ===== Basis Know-How Redhat Systems =====
 +
 +  * [[linux:user-and-groups|]]
 +  * [[linux:dateirechte|]]
 +
  
 <WRAP center box 100%> <WRAP center box 100%>
 ==== System Aktualisieren / Warten ==== ==== System Aktualisieren / Warten ====
 ''Grundlegende Systemwartung, durch Installation, von aktuellen Paketen und Upgraden des Kernels.'' ''Grundlegende Systemwartung, durch Installation, von aktuellen Paketen und Upgraden des Kernels.''
-  - <wrap em>Upgrade System and Packages:</wrap><code># yum -y update</code>+ 
 +<wrap em>Upgrade System and Packages:</wrap><code># yum update -y</code>
 </WRAP> </WRAP>
  
Line 25: Line 31:
 ==== motd - Message of the day==== ==== motd - Message of the day====
 ''Eigene motd (Login-Nachricht), nach dem Aufbau einer neuen SSH-Verbindung anzeigen lassen:'' ''Eigene motd (Login-Nachricht), nach dem Aufbau einer neuen SSH-Verbindung anzeigen lassen:''
- 
-Add description and serial number to motd: 
  
 <code># echo ' <code># echo '
-      hxxxxx + ############################################################################## 
-      IT2 Debian Test Server (251xxxxx)+ #                                                                            # 
 + #                 This is the admin-server of Michael Reber.                 # 
 + #                                                                            # 
 + #                                ATTENTION:                                  # 
 + #                                                                            # 
 + #             Unauthorized access to this system is prohibited !             # 
 + #                                                                            # 
 + #    This system is actively monitored and all connections may be logged.    # 
 + #         By accessing this system, you consent to this monitoring.          # 
 + #                                                                            # 
 + ##############################################################################
  
-      Debian Stable (i386) Linux+' > /etc/motd</code> 
 +</WRAP>
  
-      IT2 ApplicationServices+<WRAP center box 100%> 
 +==== Neuer User anlegen ==== 
 +''Benutzer anlegen und setzen von Passwort.'' 
 +<code># adduser michael 
 +# passwd michael</code>
  
-      "akunamatata -> no worries mate .."+''<wrap em>Root Privilegien für User:</wrap>'' 
 + 
 +''As root, run this command to add your new user to the wheel group (substitute the highlighted word with your new user):'' <code># usermod -aG wheel michael</code> 
 +''Now your user can run commands with super user privileges!''  
 + 
 +''<wrap em>Root Privilegien für User & without PW:</wrap>'' 
 + 
 +<code># echo "michael ALL=NOPASSWD: ALL" > /etc/sudoers.d/michael</code>
  
-' > /etc/motd</code> 
 </WRAP> </WRAP>
  
 +<WRAP center box 100%>
 +==== Die Grösse eines Ordners anzeigen ====
 +''Zeigt die effektive Grösse - human readable und rekursiv über alle Files dar.''
 +<code># du -hs foswiki/</code>
 +<sxh plain; gutter: false;>4.6G    foswiki/</sxh>
 +
 +</WRAP>
 +
 +<WRAP center box 100%>
 +==== SSH Login auf Server mit DNS oder User-Hash Problemen ====
 +''Das normale Login auf einen Linux Server via SSH:''
 +<code># ssh vrh7f</code>
 +
 +<sxh plain; gutter: false;>
 +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 +@       WARNING: POSSIBLE DNS SPOOFING DETECTED!          @
 +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 +The RSA host key for vb7gl9 has changed,
 +and the key for the corresponding IP address 172.18.13.12
 +is unknown. This could either mean that
 +DNS SPOOFING is happening or the IP address for the host
 +and its host key have changed at the same time.
 +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 +@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
 +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 +IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
 +Someone could be eavesdropping on you right now (man-in-the-middle attack)!
 +It is also possible that a host key has just been changed.
 +The fingerprint for the RSA key sent by the remote host is
 +SHA256:o7win3mceJwnnehEyiVaOM6ePdiKOWivbtUMhxHVr58.
 +Please contact your system administrator.
 +Add correct host key in /home/rebermi/.ssh/known_hosts to get rid of this messag                                                                                 e.
 +Offending RSA key in /etc/ssh/ssh_known_hosts:778
 +RSA host key for vb7gl9 has changed and you have requested strict checking.
 +Host key verification failed.</sxh>
 +
 +----
 +
 +''<wrap em>Trotz Error auf Server einloggen:</wrap>''
 +
 +<code># ssh -o stricthostkeychecking=no vrh7f</code>
 +
 +</WRAP>
  
 ---- ----
Line 46: Line 114:
 ===== Systemverwaltung ===== ===== Systemverwaltung =====
 ''Wichtige Tools, zum konfigurieren, abändern der System Einstellungen.'' ''Wichtige Tools, zum konfigurieren, abändern der System Einstellungen.''
 +
 +<WRAP center box 100%>
 +==== Wechseln der Zeitzone ====
 +  - ''Die aktuelle System-Zeitzone'' (Timezone) kann man sehr einfach anschauen: <code># timedatectl</code>
 +  - ''Wenn man nun auf eine neue Timezone zu wechseln möchte, macht es sinn, sich zuerst die verfügbaren Zeitzonen anzuzeigen lassen:'' <code># timedatectl list-timezones</code>
 +  - Um nun die aktuelle Timezone (Zeitzone) zu wechseln, verwendet man set-timezone zusammen mit der gewünschten TIMEZONE. <wrap em>Beispiel für die Schweiz</wrap>: <code># timedatectl set-timezone Europe/Zurich</code>
 +
 +</WRAP>
 +
 +
 +
 +
  
  
Line 64: Line 144:
 <WRAP center box 100%> <WRAP center box 100%>
 ==== Show Kernel Version and Architecture ==== ==== Show Kernel Version and Architecture ====
-<code># uname -a</code> +  - ''Display the current Kernel Version:''<code># uname -a</code><sxh plain; gutter: false;>
-<sxh plain; gutter: false;>+
 Linux vstif2.pnet.ch 3.10.0-514.21.1.el7.x86_64 #1 SMP Sat Apr 22 02:41:35 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux Linux vstif2.pnet.ch 3.10.0-514.21.1.el7.x86_64 #1 SMP Sat Apr 22 02:41:35 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
 +</sxh>
 +  - ''Show System Server Release Version:''<code># cat /etc/redhat-release</code><sxh plain; gutter: false;>
 +Red Hat Enterprise Linux Server release 7.4 (Maipo)
 </sxh> </sxh>
 </WRAP> </WRAP>
Line 213: Line 295:
 <WRAP center box 100%> <WRAP center box 100%>
 ==== Show Installed Packages ==== ==== Show Installed Packages ====
-<code># dpkg -l</code>+<code># rpm -qa</code>
 <sxh plain; gutter: false;> <sxh plain; gutter: false;>
-||/ Name                       Version                    Description +pyserial-2.6-6.el7.noarch 
-+++-==========================-==========================-==================================================================== +libblkid-2.23.2-43.el7.x86_64 
-ii  acpid                      1.0.4-5                    Utilities for using ACPI power management +tfm-rubygem-rails-i18n-4.0.8-1.el7sat.noarch 
-ii  adduser                    3.102                      Add and remove users and groups +basesystem-10.0-7.el7.noarch 
-ii  apt                        0.6.46.4-0.1               Advanced front-end for dpkg +pulp-selinux-2.8.7.14-1.el7sat.noarch 
-ii  apt-utils                  0.6.46.4-0.1               APT utility programs +gawk-4.0.2-4.el7_3.1.x86_64 
-ii  aptitude                   0.4.4-4                    terminal-based apt frontend +tfm-rubygem-sprockets-rails-2.3.3-1.el7sat.noarch 
-ii  base-files                                          Debian base system miscellaneous files +libsndfile-1.0.25-10.el7.x86_64 
-ii  base-passwd                3.5.11                     Debian base system master password and group files +libsemanage-2.5-8.el7.x86_64 
-ii  bash                       3.1dfsg-8                  The GNU Bourne Again SHell +tfm-rubygem-highline-1.6.21-4.el7sat.noarch 
-ii  bsdmainutils               6.1.6                      collection of more utilities from FreeBSD +rubygem-bundler_ext-0.3.0-7.el7sat.noarch 
-ii  bsdutils                   2.12r-19                   Basic utilities from 4.4BSD-Lite +fuse-2.9.2-8.el7.x86_64 
-ii  busybox                    1.1.3-4                    Tiny utilities for small and embedded systems +tfm-rubygem-will_paginate-3.0.7-1.el7sat.noarch 
-ii  console-common             0.7.69                     Basic infrastructure for text console configuration +popt-1.13-16.el7.x86_64 
-ii  console-data               1.01-7                     Keymaps, fonts, charset maps, fallback tables for console-tools +cairo-1.14.8-2.el7.x86_64 
-ii  console-tools              0.2.3dbs-65                Linux console and font utilities +libmspack-0.5-0.5.alpha.el7.x86_64 
-ii  coreutils                  5.97-5.3                   The GNU core utilities +tfm-rubygem-trollop-2.0-5.el7sat.noarch 
-ii  cpio                       2.6-17                     GNU cpio -- a program to manage archives of files +libcap-ng-0.7.5-4.el7.x86_64 
-ii  cron                       3.0pl1-100                 management of regular background processing +geronimo-jms-1.1.1-19.el7.noarch 
-ii  debconf                    1.5.11                     Debian configuration management system +python-libs-2.7.5-58.el7.x86_64 
-ii  debconf-i18n               1.5.11                     full internationalization support for debconf +tfm-rubygem-facter-2.4.0-3.el7sat.x86_64 
-ii  debian-archive-keyring     2007.07.31~etch1           GnuPG archive keys of the Debian archive +findutils-4.5.11-5.el7.x86_64 
-ii  debianutils                2.17                       Miscellaneous utilities specific to Debian +apache-commons-logging-1.1.2-7.el7.noarch 
-ii  dhcp3-client               3.0.4-13                   DHCP Client +openldap-2.4.44-5.el7.x86_64 
-ii  dhcp3-common               3.0.4-13                   Common files used by all the dhcp3* packages +tfm-rubygem-awesome_print-1.0.2-13.el7sat.noarch 
-ii  diff                       2.8.1-11                   File comparison utilities +tomcat-7.0.76-2.el7.noarch 
-ii  dmidecode                  2.8-4                      Dump Desktop Management Interface data +ruby-2.0.0.648-30.el7.x86_64 
-ii  dpkg                       1.13.25                    package maintenance system for Debian +tfm-rubygem-formatador-0.2.1-9.el7sat.noarch 
-ii  dselect                    1.13.25                    user tool to manage Debian packages +unzip-6.0-16.el7.x86_64 
-ii  e2fslibs                   1.39+1.40-WIP-2006.11.14+d ext2 filesystem libraries +fuse-libs-2.9.2-8.el7.x86_64 
-ii  e2fsprogs                  1.39+1.40-WIP-2006.11.14+d ext2 file system utilities and libraries +tfm-rubygem-fog-vsphere-0.6.3-1.el7sat.noarch 
-ii  ed                         0.2-20                     The classic unix line editor +qrencode-libs-3.4.1-3.el7.x86_64 
-ii  eject                      2.1.4-3                    ejects CDs and operates CD-Changers under Linux +openssl-1.0.2k-8.el7.x86_64 
-ii  findutils                  4.2.28-1                   utilities for finding files--find, xargs, and locate +redhat-release-server-7.4-18.el7.x86_64 
-ii  gcc-4.1-base               4.1.1-21                   The GNU Compiler Collection (base package) +tfm-rubygem-activerecord-session_store-0.1.2-1.el7sat.noarch 
-ii  gnupg                      1.4.6-2                    GNU privacy guard - a free PGP replacement +cracklib-2.9.0-11.el7.x86_64 
-ii  gpgv                       1.4.6-2                    GNU privacy guard - signature verification tool +python-pulp-oid_validation-2.8.7.14-1.el7sat.noarch 
-ii  grep                       2.5.1.ds2-6                GNU grep, egrep and fgrep +libcgroup-0.41-13.el7.x86_64 
-ii  groff-base                 1.18.1.1-12                GNU troff text-formatting system (base system components) +tfm-rubygem-hammer_cli_katello-0.0.22.29-1.el7sat.noarch 
-ii  grub                       0.97-27                    GRand Unified Bootloader +libutempter-1.1.6-4.el7.x86_64 
-ii  gzip                       1.3.5-15                   The GNU compression utility +puppet-3.8.6-2.el7sat.noarch 
-ii  hostname                   2.93                       utility to set/show the host name or domain name +setroubleshoot-plugins-3.0.65-1.el7.noarch 
-ii  ifupdown                   0.6.8                      high level tools to configure network interfaces +tfm-rubygem-ancestry-2.0.0-4.el7sat.noarch 
-ii  info                       4.8.dfsg.1-4               Standalone GNU Info documentation browser +.. 
-ii  initramfs-tools            0.85h                      tools for generating an initramfs +</sxh> 
-ii  initscripts                2.86.ds1-38                Scripts for initializing and shutting down the system +</WRAP>
-ii  installation-report        2.29                       system installation report +
-ii  iptables                   1.3.6.0debian1-5           administration tools for packet filtering and NAT +
-ii  iputils-ping               20020927-6                 Tools to test the reachability of network hosts +
-ii  klibc-utils                1.4.34-1                   small statically-linked utilities built with klibc +
-ii  klogd                      1.4.1-18                   Kernel Logging Daemon +
-ii  laptop-detect              0.12.1                     attempt to detect a laptop +
-ii  libacl1                    2.2.41-1                   Access control list shared library +
-ii  libattr1                   2.4.32-1                   Extended attribute shared library +
-ii  libblkid1                  1.39+1.40-WIP-2006.11.14+d block device id library +
-ii  libbz2-1.0                 1.0.3-6                    high-quality block-sorting file compressor library - runtime +
-ii  libc6                      2.3.6.ds1-13etch2          GNU C Library: Shared libraries +
-ii  libcap1                    1.10-14                    support for getting/setting POSIX.1e capabilities +
-ii  libcomerr2                 1.39+1.40-WIP-2006.11.14+d common error description library +
-ii  libconsole                 0.2.3dbs-65                Shared libraries for Linux console and font manipulation +
-ii  libdb4.2                   4.2.52+dfsg-2              Berkeley v4.2 Database Libraries [runtime] +
-ii  libdb4.                  4.3.29-8                   Berkeley v4.3 Database Libraries [runtime] +
-ii  libdb4.4                   4.4.20-8                   Berkeley v4.Database Libraries [runtime] +
-ii  libdevmapper1.02           1.02.08-1                  The Linux Kernel Device Mapper userspace library +
-ii  libedit2                   2.9.cvs.20050518-2.2       BSD editline and history libraries +
-ii  libgcc1                    4.1.1-21                   GCC support library +
-ii  libgcrypt11                1.2.3-2                    LGPL Crypto library runtime library +
-ii  libgdbm3                   1.8.3-3                    GNU dbm database routines (runtime version) +
-ii  libgnutls13                1.4.4-3                    the GNU TLS library - runtime library +
-ii  libgpg-error0              1.4-1                      library for common error values and messages in GnuPG components +
-ii  libklibc                   1.4.34-1                   minimal libc subset for use with initramfs +
-ii  libkrb53                   1.4.4-7etch4               MIT Kerberos runtime libraries +
-ii  libldap2                   2.1.30-13.3                OpenLDAP libraries +
-ii  liblocale-gettext-perl     1.05-1                     Using libc functions for internationalization in Perl +
-ii  liblzo1                    1.08-3                     data compression library (old version) +
-ii  libncurses5                5.5-5                      Shared libraries for terminal handling +
-ii  libncursesw5               5.5-5                      Shared libraries for terminal handling (wide character support) +
-ii  libnewt0.52                0.52.2-10                  Not Erik's Windowing Toolkit - text mode windowing with slang +
-ii  libopencdk8                0.5.9-2                    Open Crypto Development Kit (OpenCDK) (runtime) +
-ii  libpam-modules             0.79-4                     Pluggable Authentication Modules for PAM +
-ii  libpam-runtime             0.79-4                     Runtime support for the PAM library +
-ii  libpam0g                   0.79-4                     Pluggable Authentication Modules library +
-ii  libpopt0                   1.10-3                     lib for parsing cmdline parameters +
-ii  libreadline5               5.2-2                      GNU readline and history libraries, run-time libraries +
-ii  libsasl2                   2.1.22.dfsg1-8             Authentication abstraction library +
-ii  libsasl2-2                 2.1.22.dfsg1-8             Authentication abstraction library +
-ii  libselinux1                1.32-3                     SELinux shared libraries +
-ii  libsepol1                  1.14-2                     Security Enhanced Linux policy library for changing policy binaries +
-ii  libsigc++-2.0-0c2a         2.0.17-                  type-safe Signal Framework for C++ - runtime +
-ii  libslang2                  2.0.6-4                    The S-Lang programming library runtime version +
-ii  libss2                     1.39+1.40-WIP-2006.11.14+d command-line interface parsing library +
-ii  libssl0.9.8                0.9.8c-4etch1              SSL shared libraries +
-ii  libstdc++                4.1.1-21                   The GNU Standard C++ Library v3 +
-ii  libtasn1-                0.3.6-2                    Manage ASN.1 structures (runtime) +
-ii  libtext-charwidth-perl     0.04-4                     get display widths of characters on the terminal +
-ii  libtext-iconv-perl         1.4-3                      converts between character sets in Perl +
-ii  libtext-wrapi18n-perl      0.06-5                     internationalized substitute of Text::Wrap +
-ii  libusb-0.1-4               0.1.12-5                   userspace USB programming library +
-ii  libuuid1                   1.39+1.40-WIP-2006.11.14+d universally unique id library +
-ii  libvolume-id0              0.105-4                    libvolume_id shared library +
-ii  libwrap0                   7.6.dbs-13                 Wietse Venema's TCP wrappers library +
-ii  linux-image-2.6.18-5-amd64 2.6.18.dfsg.1-13etch4      Linux 2.6.18 image on AMD64 +
-ii  locales                    2.3.6.ds1-13etch2          GNU C Library: National Language (locale) data [support] +
-ii  login                      4.0.18.1-7                 system login tools +
-ii  logrotate                  3.7.1-3                    Log rotation utility +
-ii  lsb-base                   3.1-23.2etch1              Linux Standard Base 3.1 init script functionality +
-ii  lvm-common                 1.5.20                     The Logical Volume Manager for Linux (common files) +
-ii  lvm2                       2.02.06-4                  The Linux Logical Volume Manager +
-ii  makedev                    2.3.1-83                   creates device files in /dev +
-ii  man-db                     2.4.3-6                    The on-line manual pager +
-ii  manpages                   2.39-1                     Manual pages about using a GNU/Linux system +
-ii  mawk                       1.3.3-11                   a pattern scanning and text processing language +
-ii  mktemp                     1.5-2                      Makes unique filenames for temporary files +
-ii  module-init-tools          3.3-pre4-2                 tools for managing Linux kernel modules +
-ii  mount                      2.12r-19                   Tools for mounting and manipulating filesystems +
-ii  nano                       2.0.2-1etch1               free Pico clone with some new features +
-ii  ncurses-base               5.5-5                      Descriptions of common terminal types +
-ii  ncurses-bin                5.5-5                      Terminal-related programs and man pages +
-ii  net-tools                  1.60-17                    The NET-3 networking toolkit +
-ii  netbase                    4.29                       Basic TCP/IP networking system +
-ii  netcat                     1.10-32                    TCP/IP swiss army knife +
-ii  openbsd-inetd              0.20050402-6               The OpenBSD Internet Superserver +
-ii  openssh-client             4.3p2-9                    Secure shell client, an rlogin/rsh/rcp replacement +
-ii  openssh-server             4.3p2-9                    Secure shell server, an rshd replacement +
-ii  passwd                     4.0.18.1-7                 change and administer password and group data +
-ii  perl-base                  5.8.8-7                    The Pathologically Eclectic Rubbish Lister +
-ii  procps                     3.2.7-3                    /proc file system utilities +
-ii  readline-common            5.2-2                      GNU readline and history libraries, common files +
-ii  sed                        4.1.5-1                    The GNU sed stream editor +
-ii  ssh                        4.3p2-9                    Secure shell client and server (transitional package) +
-ii  sudo                       1.6.8p12-4                 Provide limited super user privileges to specific users +
-ii  sysklogd                   1.4.1-18                   System Logging Daemon +
-ii  sysv-rc                    2.86.ds1-38                System-V-like runlevel change mechanism +
-ii  sysvinit                   2.86.ds1-38                System-V-like init utilities +
-ii  sysvinit-utils             2.86.ds1-38                System-V-like utilities +
-ii  tar                        1.16-2                     GNU tar +
-ii  tasksel                    2.66                       Tool for selecting tasks for installation on Debian systems +
-ii  tasksel-data               2.66                       Official tasks used for installation of Debian systems +
-ii  tcpd                       7.6.dbs-13                 Wietse Venema's TCP wrapper utilities +
-ii  traceroute                 1.4a12-21                  traces the route taken by packets over a TCP/IP network +
-ii  tzdata                     2007b-1                    Time Zone and Daylight Saving Time Data +
-ii  udev                       0.105-4                    /dev/ and hotplug management daemon +
-ii  update-inetd               4.27-0.5                   inetd.conf updater +
-ii  usbutils                   0.72-7                     USB console utilities +
-ii  util-linux                 2.12r-19                   Miscellaneous system utilities +
-ii  vim-common                 7.0-122+1etch3             Vi IMproved - Common files +
-ii  vim-tiny                   7.0-122+1etch3             Vi IMproved - enhanced vi editor - compact version +
-ii  wget                       1.10.2-2                   retrieves files from the web +
-ii  whiptail                   0.52.2-10                  Displays user-friendly dialog boxes from shell scripts +
-ii  zlib1g                     1.2.3-13                   compression library - runtime+
  
-h034w5:~dpkg -l | grep ^ii | wc -l +<WRAP center box 100%> 
-148+==== Show Contents of one Installed Package ==== 
 +''rpm -ql PACKAGENAME'' 
 +<code>rpm -ql httpd</code> 
 +<sxh plain; gutter: false;> 
 +/etc/httpd 
 +/etc/httpd/conf 
 +/etc/httpd/conf.d 
 +/etc/httpd/conf.d/README 
 +/etc/httpd/conf.d/autoindex.conf 
 +/etc/httpd/conf.d/userdir.conf 
 +/etc/httpd/conf.d/welcome.conf 
 +/etc/httpd/conf.modules.d 
 +/etc/httpd/conf.modules.d/00-base.conf 
 +/etc/httpd/conf.modules.d/00-dav.conf 
 +/etc/httpd/conf.modules.d/00-lua.conf 
 +/etc/httpd/conf.modules.d/00-mpm.conf 
 +/etc/httpd/conf.modules.d/00-proxy.conf 
 +/etc/httpd/conf.modules.d/00-systemd.conf 
 +/etc/httpd/conf.modules.d/01-cgi.conf 
 +/etc/httpd/conf/httpd.conf 
 +/etc/httpd/conf/magic 
 +/etc/httpd/logs 
 +/etc/httpd/modules 
 +/etc/httpd/run 
 +/etc/logrotate.d/httpd 
 +/etc/sysconfig/htcacheclean 
 +/etc/sysconfig/httpd 
 +/run/httpd 
 +/run/httpd/htcacheclean 
 +/usr/lib/systemd/system/htcacheclean.service 
 +/usr/lib/systemd/system/httpd.service 
 +/usr/lib/tmpfiles.d/httpd.conf 
 +/usr/lib64/httpd 
 +/usr/lib64/httpd/modules 
 +/usr/lib64/httpd/modules/mod_access_compat.so 
 +/usr/lib64/httpd/modules/mod_actions.so 
 +/usr/lib64/httpd/modules/mod_alias.so 
 +/usr/lib64/httpd/modules/mod_allowmethods.so 
 +/usr/lib64/httpd/modules/mod_asis.so 
 +..
 </sxh> </sxh>
 </WRAP> </WRAP>
 +
 +
 +<WRAP center box 100%>
 +==== Show what exactly a Package does on installation ====
 +''rpm -qp --scripts PACKAGENAME''
 +<code># rpm -qp --scripts patchman-1.0.20-1.noarch.rpm</code>
 +<sxh plain; gutter: false;>
 +postinstall scriptlet (using /bin/sh):
 +#!/bin/sh
 +
 +if [ ! -e /etc/httpd/conf.d/patchman.conf ] ; then
 +    cp /etc/patchman/apache.conf.example /etc/httpd/conf.d/patchman.conf
 +fi
 +
 +if ! grep /usr/lib/python2.7/site-packages /etc/httpd/conf.d/patchman.conf >/dev/null 2>&1 ; then
 +    sed -i -e "s/^\(Define patchman_pythonpath\).*/\1 \/usr\/lib\/python2.7\/site-packages/" \
 +    /etc/httpd/conf.d/patchman.conf
 +fi
 +
 +service httpd reload
 +
 +patchman-set-secret-key
 +chown apache /etc/patchman/local_settings.py
 +
 +mkdir -p /var/lib/patchman/db
 +patchman-manage collectstatic --noinput
 +
 +patchman-manage makemigrations
 +patchman-manage migrate --run-syncdb
 +
 +chown -R apache:apache /var/lib/patchman
 +chcon --type httpd_sys_rw_content_t /var/lib/patchman/db/patchman.db
 +
 +echo
 +echo "Remember to run 'patchman-manage createsuperuser' to create a user."
 +echo
 +</sxh>
 +</WRAP>
 +
 +----
 +
 +===== Redhat Dokumentation zum Thema =====
 +
 +<WRAP center round download 80%>
 +''{{ :redhat:base-redhat:red_hat_enterprise_linux-7-system_administrators_guide-en-us.pdf |}}''
 +</WRAP>
 +
 +
  
  
  • redhat/base-redhat/basics-redhat.txt
  • Last modified: 2019/06/11 10:24
  • by michael