2

RHEL/CentOS7 create custom cdrom

Once in a while you will need to install a system thats not on the network and instead of manually installing it you want it automated with a kickstart file. For most hosts you can create a floppy image with the kickstart file and mount it however on most Dell servers due to the way it handles the device names it can be tricky and this is where a custom cdrom can help. – download the dvd iso – mount the iso.. mkdir dvd; mount -o loop rhel-server-7.2-dvd.iso ./dvd – create a temp directory and copy over the files.. mkdir… Continue Reading

0

use fail2ban to block wordpress login attempts

Today while monitoring traffic on my server I noticed that there was 1 IP from UK that is keep accessing my server and generating noticeable amount of traffic. I did a quick IP lookup and netstat to find that the IP was accessing port 80 on my server. I then went to the httpd logs and searched for the IP and wala! it is trying to log into my wordpress site attempt after attempt. Since I already have fail2ban running on my server I decided to look into using fail2ban to ban lots of failed attempts looking at my logs… Continue Reading

0

Linux cleanup before turning images into templates for virtual environments

After the OS is installed and prepped there are some cleanup steps needed before turning it into a template. Remove old kernels Remove yum cache Clean out log files Remove device persistencies Clean up MAC and UUID Clean up history and keys I made a sample script that will automate the process. Instead of hosting the script here I’ve moved it to my github.

0

all things subscription-manager

Register and auto subscribe in one step # subscription-manger register –username –password –auth-attach Register first then attach a subscription in the customer portal # subscription-manger register Attach a subscription from any available that match the system # subscription-manager attach –auth Register with a specific pool # subscription-manager attach –pool= Get pool id # subscription-manager list –available –all Check your enabled subscriptions # subscription-manger list Status of consumed subscriptions # subscription-manager list -consumed Unregister system # subscription-manager remove –all # subscription-manager unregister # subscription-manager clean list all provided repos # subscription-manager repos –list enable/disable repos # subscription-manager repos –enable or –disalbe

0

VM image introspection

Image formats RAW – Unstructured disk image format. QCOW2 – Disk format supported by QEMU emulator. ISO – Sector-by-sector copy of the data on a disk, stored in a binary file. AKI – Indicates an Amazon Kernel Image. AMI – Indicates an Amazon Machine Image. ARI – Indicates an Amazon RAMDisk Image. VDI – Disk format supported by VirtualBox virtual machine monitor and the QEMU emulator. VHD – Common disk format used by virtual machine monitors from VMWare, VirtualBox, and others. VMDK – Disk format supported by many common virtual machine monitors. Every image format comes with a set a… Continue Reading

0

who is using the most memory

simple sort to show which application is using the most memory. ps -elf | awk ‘{print $10, $3, $4, $15, $16}’| sort -nr | head 572923 mysql 1246 /usr/libexec/mysqld –basedir=/usr 257775 root 6260 /usr/bin/python /usr/bin/fail2ban-server 176636 clamav 1086 clamd 146010 2001 27443 /usr/sbin/httpd 122691 apache 30546 /usr/sbin/httpd 121580 apache 27444 /usr/sbin/httpd 121410 apache 6437 /usr/sbin/httpd 121362 apache 6438 /usr/sbin/httpd 121223 apache 6439 /usr/sbin/httpd 121222 apache 6428 /usr/sbin/httpd in my case its mysqld.

15

racadm quick dirty cheatsheet

iDRAC racadm quick and dirty cheatsheet. racadm command can be issues via iDRAC/CMC/OS if svradmin-racadm is installed. Also you can specify -h option to access remote servers RAC as long as you have network access. Also if you are having problems with racadm “Failed to initialize transport” install openssl-devel. full documentation for iDRAC7 can be found here. % Get all iDRAC settings in a file racadm get -f config.txt If you like you can change the contents of config.txt and apply it back to iDRAC racadm set -f config.txt % Set password for root user racadm set iDRAC.Users.2.Password PASSWORD” %… Continue Reading

0

Dell SUU on 64bit CentOS/RHEL

Dell SUU (Server Update Utility) is a tool provided as an ISO from Dell that runs on windows and linux to search for drivers and firmware updates. In 32bit CentOS/RHEL SUU runs without problems however in 64bit correct pre-reqs are required for SUU to work correctly. SUU manual is located here. yum -y install glibc.i686 compat-libstdc++-33.i686 libstdc++.i686 zlib.i686 libxml2.i686 libXp.i686 libXtst.i686 ncurses-libs pam.i686 procmail mount the ISO. you can do this 2 ways. #1 using virtual media in the IDRAC or #2 loop mounting the iso from the OS after transferring the ISO to the OS. Check for updates ./suu… Continue Reading

0

LDAP MD5 Cert Error on RHEL/CentOS 6.4+

With the update of nss-3.14.0 LDAP stopped using the MD5 signed certificate. nss-3.14.0 update deems that MD5 as unsecure. The change causes authentication of users using LDAP to fail. There are 4 possible ways to fix this problem 1) update the LDAP certificate to use other type of encryption than MD5 2) modify each kernel line in /etc/grub.conf to add support for MD5 and also in create nss.sh in /etc/profile.d in /etc/grub.conf add to the end of each kernel line systemd.setenv=NSS_HASH_ALG_SUPPORT=+MD5 in /etc/profile.d create nss.sh with export NSS_HASH_ALG_SUPPORT=+MD5 REBOOT 3) export the correct options to /etc/sysconfig/init in /etc/sysconfig/init add export… Continue Reading

0

Docker Common Commands: 101 Part 2

The comprehensive Docker command line reference is located here. However we will cover some basic commands. Image Build an image docker build -rm=true . Install an image docker pull ${IMAGE} List of installed images docker images docker images –tree (tree view) docker images -no-trunc (detailed listing) Remove an image docker rmi ${IMAGE_ID} Remove all untagged images docker rmi $(docker images | grep “^” awk ‘{ print $3 }’) Remove all images docker rm $(docker ps -aq) Container Run a container docker run (many other options on this) List containers docker ps docker ps -a (list all containers) Stop a container… Continue Reading