Category Archives: Linux Administration
Create Remove Swapfile
#!/bin/sh
#———————————————————-#
function create_swapfile()
{
echo “Creating Swap file …”
dd if=/dev/zero of=/swapfile bs=1024 count=12582912
mkswap /swapfile
swapon /swapfile
}
#———————————————————-#
function remove_swapfile()
{
echo “Removing Swap file …”
swapoff /swapfile
rm /swapfile
}
#———————————————————-#
remove_swapfile
VIM replace tab for spaces
vi ~/.vimrc
To get vim to interpret tab as an “indent” command instead of an insert-a-tab command, do this:
set softtabstop=2
To set the mod-N indentation used when you hit the tab key in vim (what Emacs calls c-basic-offset), do this:
set shiftwidth=2
To cause the TAB file-character to be displayed as mod-N in vi and vim (what Emacs calls [...]
How to Increase Server Stack Size
How to Check Server Stack Size
[kevin] ulimit -s
[kevin] 10240
How to increase 2x Stack Size
[kevin] ulimit -s 20880
[kevin] 20880
How to update PHP 5.3 and MySQL on CentOS 5.3
http://binit933x.wordpress.com/2009/03/05/how-i-updated-php-mysql-on-redhat-enterprise-linux-rhel-53/
I tried this update and it works.
Make ext3 file system
/root# fdisk /dev/sdb1
/root# mkfs.ext3 -b 4096 /dev/sdb1