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

Nginx through puppet

[root@puppetmaster ~]# cat /etc/puppet/modules/nginx/manifests/init.pp # Class: nginx # # This module manages NGINX. # # Parameters: # # There are no default parameters for this class. All module parameters are managed # via the nginx::params class # # Actions: # # Requires: # puppetlabs-stdlib - https://github.com/puppetlabs/puppetlabs-stdlib # # Packaged NGINX # - RHEL: EPEL or … Continue reading Nginx through puppet

Apache-though puppet

[root@puppetmaster ~]# cat /etc/puppet/modules/apache/manifests/init.pp # Class: apache # # This class installs Apache # # Parameters: # # Actions: # - Install Apache # - Manage Apache service # # Requires: # # Sample Usage: # class apache ( $apache_name = $::apache::params::apache_name, $service_name = $::apache::params::service_name, $default_mods = true, $default_vhost = true, $default_charset = undef, $default_confd_files … Continue reading Apache-though puppet

puppet modules

---------------------------------------------------------------------------------------------------------------------------------[root@puppetmaster ~]# puppet module search ftp Notice: Searching https://forgeapi.puppetlabs.com ... NAME DESCRIPTION AUTHOR KEYWORDS jhoblitt-pureftpd Manages the pure-ftpd package with comprehensive configuration support @jhoblitt mysql ldap ftp redhat rhel centos cyberious-pget Powershell Alternative to wget or curl @cyberious wget curl ftp sftp https http thias-vsftpd vsftpd FTP server @thias centos rhel ftp debian ubuntu example42-vsftpd … Continue reading puppet modules