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  

Apache Error: “semget: No space left on device”

semget: No space left on device

To see how many semaphores are being used, SSH to your server as root and run the following:

ipcs -s

In order to get Apache started again, we must clear the semaphores. Run this for-loop to flush them:

for whatever in `ipcs -s | awk ‘{print $2}’`; do ipcrm […]

OpenSSH: Client Information leak from use of roaming connection feature (CVE-2016-0777)

Overview

A flaw in OpenSSH, discovered and reported by Qualys on Jan. 14, 2016, could potentially allow an information leak (CVE-2016-0777) or buffer overflow (CVE-2016-0778) via the OpenSSH client. Specifically, an undocumented feature called roaming, introduced in OpenSSH version 5.4, can be exploited to expose a client’s private SSH key.

Impact

The roaming feature, which […]

Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

root@core /]# yum list Loaded plugins: fastestmirror Determining fastest mirrors Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again

  [epel] … sslverify=false

sed -i “s/mirrorlist=https/mirrorlist=http/” /etc/yum.repos.d/epel.repo

Monit process

# mysql check process mysqld with pidfile /var/lib/mysql/ns388683.pid group database start program = “/etc/init.d/mysql start” stop program = “/etc/init.d/mysql stop” if failed host 127.0.0.1 port 3306 then restart if 5 restarts within 5 cycles then timeout # nginx check process nginx with pidfile /opt/nginx/logs/nginx.pid start program = “/etc/init.d/nginx start” stop program = “/etc/init.d/nginx stop” […]

MonitSMS

Create a new file named MonitSMS.sh in your /root directory (or wherever you prefer – i use root because I manage many different type of OS) and paste the following code:

#!/bin/sh /usr/bin/curl \ -X POST http://textbelt.com/text \ -d number=1111111111 \ -d “message=[$MONIT_HOST] $MONIT_SERVICE – $MONIT_DESCRIPTION”

Change 1111111111 to your cell/mobile phone number. Give it […]

useradd Not copying any file from skel directory into it.

Useradd in Linux – Not copying any file from skel directory into it useradd: warning: the home directory already exists. Not copying any file from skel directory into it.

If the directory didn’t exist , the Linux useradd process creates the directory and copies the skel files : .kshrc , .bashrc , .bash_profile and .bash_logout […]

How to use Redhat 7.2 to start MQ queue managers at system boot time, and stop them when the system shuts down.

“systemd is a suite of basic building blocks for a Linux system. It provides a system and service manager that runs as PID 1 and starts the rest of the system. systemd… offers on-demand starting of daemons, keeps track of processes using Linux control groups, …and implements an elaborate transactional dependency-based service control logic.”

tions […]

Kickstart CentOS 7: Making ISO for automated installation

Kickstart” is powerful tool for automated OS installation and configuration available in CentOS or RHEL. You can install CentOS without touching keyboard or mouse and even can automate post installation configuration process.

I’m recently building a Hadoop cluster for R&D, which makes me repeatedly install and re-install CentOS on several virtual machines. This is boring […]

KVM: How to resize (grow) an ext4 LVM VM

We use LVM both on the guest and the CentOS KVM host. Let’s upgrade from 5 GB to 15 GB on the guest.

1. Shutdown the VM.

2. On the KVM host, take a backup of the VM LV in case something goes wrong.

[root@host ~]# dd if=/dev/vg_host01/lv_guest01-vm of=./lv_guest01-vm-5gb

3. On the KVM host, […]

Quick copy & paste how-to: Install KVM on CentOS 6

CentOS 6.7 64bit ISO: ftp://ftp.hosteurope.de/mirror/centos.org/6.7/isos/x86_64/CentOS-6.7-x86_64-netinstall.iso

URL for netinstall: ftp://ftp.hosteurope.de/mirror/centos.org/6.7/os/x86_64

LVM vg: 100%

Host: lv_root / 200 GB

vi /etc/sysconfig/selinux SELINUX=disabled

yum install wget screen lynx vim kvm libvirt python-virtinst qemu-kvm ncftp tigervnc tigervnc-server system-config-firewall-tui xterm twm bridge-utils virt-manager openssh-askpass openssh-clients dbus-python dbus

yum groupinstall Desktop

yum update

/etc/init.d/messagebus start

system-config-firewall-tui -> disable firewall

vi /etc/sysconfig/vncservers […]