November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Rebuilding the initrd RHEL 3, 4, 5 and initramfs RHEL 6, 7

Rebuilding the initrd (RHEL 3, 4, 5)

# cp /boot/initrd-$(uname -r).img /boot/initrd-$(uname -r).img.$(date +%m-%d-%H%M%S).bak # mkinitrd -f -v /boot/initrd-$(uname -r).img $(uname -r)

If you are in a kernel version different to the initrd you are building (including if you are in Rescue Mode) you must specify the full kernel version, without architecture:

# mkinitrd -f […]

Single User mode is password protected by the root password on RHEL 7

# RHEL 5 # ——————————————————————————————

# To force users to enter password in Single User mode, add following line to /etc/inittab:

~:S:respawn:/sbin/sulogin

# The changes to this file takes effect after a system reboot

# To make init re-read the /etc/inittab without rebooting the system, type the command

/sbin/init q

# RHEL 6 # ——————————————————————————————

[…]

Installing FIGlet In Linux

Installing FIGlet In Linux Install a FIGlet utility, to be able to convert text to ASCII Art from the Linux command line.

In Ubuntu, Debian, Linux Mint etc. $ sudo apt-get install figlet

In CentOS, RHEL, Fedora etc. $ yum install figlet

Generate ASCII Text Banners

o use FIGlet with its default settings, simply type […]

Output from rpm -qa, how to extract only the name of the package?

Output from rpm -qa, how to extract only the name of the package?

If you need to migrate to a new computer and want to install the same packages that were on your old computer on the new one, the following pipes all the packages into a list that you can then use to […]

CENTOS 7.2 TEXT TO GUI

[root@clusterserver1 ~]# yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.usonyx.net * epel: mirror.wanxp.id * extras: centos.usonyx.net * updates: centos.usonyx.net repo id repo name status !base/7/x86_64 CentOS-7 – Base 9,007 !epel/x86_64 Extra Packages for Enterprise Linux 7 – x86_64 10,304 !extras/7/x86_64 CentOS-7 – Extras 356 !updates/7/x86_64 CentOS-7 – Updates 2,002 […]

CentOS 6.8 to compile and install LNMP

CentOS 6.8?nginx 1.9.14?mysql 5.6.23?php 5.6.17

service iptables stop chkconfig iptables off setenforce 0

vi /etc/sysconfig/selinux SELINUX=disabled

yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel openldap-clients […]

swapon: swapfile: swapon failed: Invalid argument

fallocate -l 4G /swapfile chmod 600 /swapfile mkswap /swapfile

swapon /swapfile swapon: /swapfile: swapon failed: Invalid argument

echo “/swapfile swap swap sw 0 0” >> /etc/fstab echo “vm.swappiness = 10” >>/etc/sysctl.conf echo “vm.vfs_cache_pressure = 50” >> /etc/sysctl.conf

The problem with fallocate(1) is that it uses filesystem ioctls to make the allocation fast and effective, […]

CentOS 7 Change Network Interface Name From Eno* To Eth0

CentOS 7 Change Network Interface Name From Eno* To Eth0

After you installed CentOS 7.0 or RHEL 7.0 system, you maybe notice that the default name of network interface was changed from “Eth*” to “Eno*”. How do I change network interface name to “Eth0? in CentOS 7.0? This post will show you the ways to […]

GlusterFS servers on RHEL 7 and Centos 7

GlusterFS servers on RHEL 7 and Centos 7

vi /etc/hosts

192.168.1.71 apache1.rmohan.com apache1 192.168.1.72 apache2.rmohan.com apache2 192.168.1.74 apache3.rmohan.com apache3

For this lab, we disabled both firewall and SELinux

vi /etc/selinux/config egrep “^SELINUX=” /etc/sysconfig/selinux SELINUX=disabled systemctl is-enabled firewalld disabled

systemctl disable firewalld yum update yum -y install wget openssh* net-tools ntp ntpdate -u 0.centos.pool.ntp.org

[…]

How to setup Pagespeed module in Nginx using rpm or yum on CentOS 7

How to setup Pagespeed module in Nginx using rpm or yum on CentOS 7

Adding Pagespeed module in Apache is very easy with package manager:

sudo yum install at # if you do not already have ‘at’ installed sudo rpm -U mod-pagespeed-*.rpm

… but if we want to add Pagespeed module in Nginx, first thing […]