There is a way to only download the rpm package from a repository using RedHat/CentOS 6.x yum install yum-plugin-downloadonly yum install –downloadonly –downloaddir=/tmp nmap To download a package already installed use yum reinstall –downloaddir=/tmp –downloadonly php-common.x86_64
How to add a disk to lvm
Add disk and expand in a Logical Volume no reboot, but not for /root /(boot). Tested in Linux CentOS/RedHat 5.7 /var First add a disk in (VMWare) Scan echo “- – -” > /sys/class/scsi_host/host0/scan fdisk -l fdisk /dev/sdb n,p,1,w Format […]
vimrc example
This is a nice vi / vim color schema Edit ~/.vimrc set cindent set shiftwidth=3 set tabstop=3 set expandtab set ruler ” some colors: “white on black” hi normal ctermfg=white ctermbg=black guifg=white guibg=black hi nontext ctermfg=blue ctermbg=black guifg=blue guibg=black […]
bash script to convert pdf to jpg
I wrote this shell script to convert around 7 million PDF’s. The initial Java version had trouble with performance, it crashed a lot and used way to much memory. So old bash again did a clean and fast job. Overview: […]
check aws elb hosts
This scripts counts how many active instances are inService of a AWS ElasticLoadBalancer (ELB). The code is based on a simple API call via bash elb-describe-instance-health Here is the code: #!/bin/bash #This script uses AWS command line tools to get […]
check apache script
This script monitor Apache ./check_apache OK – Apache Status Req/s = 0.6 Idel = 4 Busy = 7|Req=0.6;Idle=4;Busy=7 Tested on Ubuntu 12.04 lighthttpd and It works only whe apache mod_status is on. I also included security on the mod_status access […]
how to add a RAM HD
Procedure how to add a RAM HD into Linux, tested on RedHat/CentOS # grubby –update-kernel=`grubby –default-kernel` –args=’ramdisk_size=2048000′ # reboot … after boot … # dd if=/dev/zero of=/dev/ram1 bs=1k count=2048000 # mkfs -t ext3 -j -m 0 /dev/ram1 # mkdir /mnt/ConversaoMem […]