[root@localhost ~]# ansible-galaxy init limits.conf - limits.conf was created successfully [root@localhost ~]# ansible-doc pam_limits [root@localhost ~]# vim limits.conf/tasks/main.yml --- # tasks file for limits.conf - pam_limits: domain: "{{ item.domain }}" limit_type: "{{ item.limit_type }}" limit_item: "{{ item.limit_item }}" value: "{{ item.value }}" with_items: "{{ limits_conf_settings }}" [root@localhost ~]# vim limits_conf.yml --- - hosts: all roles: … Continue reading limits.conf with ansible
Month: September 2017
how to use sysctl with ansible
[root@localhost ~]# sysctl -a |grep vm.swappiness vm.swappiness = 30 [root@localhost ~]# ansible-galaxy init sysctl - sysctl was created successfully [root@localhost ~]# ansible-doc sysctl [root@localhost ~]# vim test.yml --- - hosts: localhost roles: - sysctl vars: sysctl_settings: - name: vm.swappiness value: 90 [root@localhost ~]# vim sysctl/tasks/main.yml --- # tasks file for sysctl - name: sysctl settings … Continue reading how to use sysctl with ansible
How to set ulimit values
1. Soft limit: is the value that the kernel enforces for the corresponding resource. 2. Hard limit: acts as a ceiling for the soft limit. [root@localhost ~]# cat /etc/security/limits.conf # /etc/security/limits.conf # #This file sets the resource limits for the users logged in via PAM. #It does not affect resource limits of the system services. … Continue reading How to set ulimit values
learning php
Note: install vagrant on your physical machine(laptop or desktop) mohammedrafi@NOC-RAFI:~$ mkdir phplearning mohammedrafi@NOC-RAFI:~$ cd phplearning/ mohammedrafi@NOC-RAFI:~/phplearning$ mohammedrafi@NOC-RAFI:~/phplearning$ vagrant --version Vagrant 1.8.1 mohammedrafi@NOC-RAFI:~/phplearning$ vim Vagrantfile VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "ubuntu/trusty32" config.vm.network "forwarded_port", guest: 80, host: 8080 config.vm.provision "shell", path: "provisioner.sh" end mohammedrafi@NOC-RAFI:~/phplearning$ vim provisioner.sh #!/bin/bash sudo apt-get install python-software-properties -y sudo C_ALL=en_US.UTF-8 … Continue reading learning php
Allow icmp with specific Message Types
It can be with Type or Description ICMP Message Types Description ICMP Message Types: ex: iptables -I INPUT -p icmp --icmp-type echo-request -s 1.2.3.4 -j ACCEPT Type: ex: iptables -I INPUT -p icmp --icmp-type 8 -s 1.2.3.4 -j ACCEPT ICMP Message Types The type field identifies the type of the message sent by the host or gateway. Many of … Continue reading Allow icmp with specific Message Types
Installing PHP
Installing PHP: PHP originally stood for Personal Home Page, but of late it is referred to as Hypertext Preprocessor. It is a server-side scripting language designed for web development. It is one of the core standing pillars for the LAMP (Linux, Apache, MySQL, and PHP) or LEMP (Linux, Nginx, MySQL, and PHP) stack. Please keep … Continue reading Installing PHP
nginx deep dive
What Is a Web Server ? Web server is a server that hosts an application that listens to the HTTP requests. It is the web server’s responsibility to hear (i.e., to understand HTTP) what the browser is saying , and respond appropriately. Sometimes, it could be as simple as fetching a file from the file … Continue reading nginx deep dive
