omd through puppet

[root@puppetmaster ~]#puppet module search omd [root@puppetmaster ~]#puppet module install tanny1910-omd [root@puppetmaster ~]# puppet module search epel [root@puppetmaster ~]# puppet module install stahnma-epel [root@puppetmaster ~]# cat /etc/puppet/manifests/site.pp hiera_include("classes") [root@puppetmaster ~]# cat /etc/puppet/hieradata/common.yaml --- classes: - 'epel' - 'omd' - 'omd::check_mk::agent' - 'omd::check_mk::plugins::puppet' --------------------------------------------------- client -side -------------------------------------------- [root@puppetserver ~]# rpm -Uvh https://labs.consol.de/repo/stable/rhel7/i386/labs-consol-stable.rhel7.noarch.rpm Retrieving https://labs.consol.de/repo/stable/rhel7/i386/labs-consol-stable.rhel7.noarch.rpm Preparing... ################################# [100%] … Continue reading omd through puppet

Manage-Users

[root@server ~]# vim /etc/puppet/manifests/site.pp hiera_include('classes') node default { include users::students } --------------------------------------------------------------------- [root@server ~]# mkdir -p /etc/puppet/modules/users/manifests/ [root@server ~]# vim /etc/puppet/modules/users/manifests/students.pp class users::students { user { 'mohammed': ensure => present, groups => ['sudo', 'users'], managehome => 'true', shell => '/bin/bash', password => '$6$4T7f7FMX$hnSX1.CaAiKI1dSQnKdFX0T782N6QYOTFoU2V0A0tywyHR28jxNgcgSGCabFO5m20Fv4ulxokRLhraELyFfFu.', } group { "sudo": ensure => "present", } } --------------------------------------------------------------------- [root@server ~]# … Continue reading Manage-Users

ssh-puppet

[root@server ~]# puppet module search ssh Notice: Searching https://forgeapi.puppetlabs.com ... NAME DESCRIPTION AUTHOR KEYWORDS aptituz-ssh puppet module to manage ssh @aptituz hostkey openssh ssh systemsathomesdotcom-ssh puppet module to manage ssh @systemsathomesdotcom hostkey openssh ssh attachmentgenie-ssh Puppet ssh Module @attachmentgenie ssh-server ssh-client ssh thias-ssh SSH module @thias openssh ssh sshd spiette-ssh openssh server and client configuration … Continue reading ssh-puppet

Ntp-Through Puppet

[root@server ~]# puppet module search ntp Notice: Searching https://forgeapi.puppetlabs.com ... NAME DESCRIPTION AUTHOR KEYWORDS ghoneycutt-ntp Manage NTP @ghoneycutt ntp time services sync dhoppe-ntp This module installs, configures and manages the NTP service. @dhoppe ntp puppetlabs-ntp Installs, configures, and manages the NTP service. @puppetlabs ntp time aix rhel centos ntpd thias-ntp Network Time Protocol module @thias … Continue reading Ntp-Through Puppet

Time-Zone through puppet

[root@server ~]# puppet module search timezone Notice: Searching https://forgeapi.puppetlabs.com ... NAME DESCRIPTION AUTHOR KEYWORDS bashtoni-timezone Configure /etc/localtime and associated system files @bashtoni linux timezone attachmentgenie-timezone Puppet timezone Module @attachmentgenie localtime tzdata timezone example42-timezone Puppet module to manage timezones @example42 timezone time example42 ghoneycutt-timezone Manage system time zone @ghoneycutt saz-timezone UNKNOWN @saz centos debian ubuntu timezone … Continue reading Time-Zone through puppet

Apache through puppet

[root@server ~]# puppet module list /etc/puppet/modules (no modules installed) /usr/share/puppet/modules (no modules installed) -------------------------------------------------------------------------------- [root@server ~]# puppet module install puppetlabs-apache Notice: Preparing to install into /etc/puppet/modules ... Notice: Downloading from https://forgeapi.puppetlabs.com ... Notice: Installing -- do not interrupt ... /etc/puppet/modules └─┬ puppetlabs-apache (v1.10.0) ├── puppetlabs-concat (v2.1.0) └── puppetlabs-stdlib (v4.12.0) -------------------------------------------------------------------------------- [root@server ~]# puppet module list … Continue reading Apache through puppet

DIFFERENT TYPES OF APACHE VIRTUAL-HOST IMPLEMENTATION

 Different types of Apache virtual-host implementation Running several name-based web sites on a single IP address. [root@www ~]# hostname  http://www.linuxmadeeasy.in [root@www ~]# ifconfig  eth0      Link encap:Ethernet  HWaddr 00:0C:29:FD:20:1A inet addr:172.16.28.175  Bcast:172.16.28.255  Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fefd:201a/64 Scope:Link UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1 RX packets:61 errors:0 dropped:0 overruns:0 frame:0 TX packets:54 errors:0 dropped:0 overruns:0 … Continue reading DIFFERENT TYPES OF APACHE VIRTUAL-HOST IMPLEMENTATION

RESTRICT USER FROM EXECUTING rm COMMAND

Restrict user from executing rm command [root@nginx ~]# ls -lh /bin/rm -rwxr-xr-x. 1 root root 57K Oct 14  2014 /bin/rm [root@nginx ~]# getfacl /bin/rm getfacl: Removing leading '/' from absolute path names # file: bin/rm # owner: root # group: root user::rwx group::r-x other::r-x [root@nginx ~]# setfacl -m u:yesdani:rw /bin/rm [root@nginx ~]# getfacl /bin/rm getfacl: … Continue reading RESTRICT USER FROM EXECUTING rm COMMAND

LDAP server-client configuration

[root@ldap ~]# hostname ldap.example.com [root@ldap ~]# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 52:54:00:2c:a3:07 brd ff:ff:ff:ff:ff:ff inet 192.168.122.98/24 brd 192.168.122.255 scope global … Continue reading LDAP server-client configuration