Category Archives: Bash

Sparse files in linux

dd if=/dev/zero of=sparse_file_name bs=1 count=0 seek=500G

iscsi target

config files for the latest version if iet are found in /etc/iet/ NOT /etc/init.d

install pmacctd on XenServer

Download

http://www.pmacct.net/#downloads

enable Base repo on Dom0

yum install gcc gcc-c++ autoconf make libpcap libpcap-devel

./configure
make
make install

GIT

I hate setting up new repo’s…

If you have a local repo that you would like to share, on the remote server create a new directory (with correct permissions).

NFS Port Mapping IPTABLEs Setup

Great post instructing how to lock down an NFS server

http://nxlinuxadmin.blogspot.com/2010/05/iptables-for-nfs-server.html

php-wkhtmltox

wkhtmltox is a great piece of kit to convert webpages to PDF format.

It is – however – an absolute Pita to install, as there are minimal resources on the net for installing this onto a Linux Server.

Yum Update excluding packages

http://www.cyberciti.biz/faq/redhat-centos-linux-yum-update-exclude-packages/

yum –exclude=perl* update

Block IP addresses with iptables

iptables -A INPUT -s IP-ADDRESS -j DROP

then save

service iptables save

Spawn Rsync Expect Timeout!

So you’ve written a bash script to do a rsync backup, but the script times out?

Scratching your heading trying to figure out what the issue is?

CHROOT local users to their own directory

Once VSFTPD is installed, edit the

/etc/vsftpd/vsftpd.conf file and add the following line if it does not exist

chroot_local_user=YES