Monday, 30 April 2012

Procedure To Increase Swap File Under Linux

Type the following command to create 512MB swap file (1024 * 512MB = 524288 block size):

# dd if=/dev/zero of=/swapfile1 bs=1024 count=524288
  1. if=/dev/zero : Read from /dev/zero file. /dev/zero is a special file in that provides as many null characters to build storage file called /swapfile1.
  2. of=/swapfile1 : Read from /dev/zero write stoage file to /swapfile1.
  3. bs=1024 : Read and write 1024 BYTES bytes at a time.
  4. count=524288 : Copy only 523288 BLOCKS input blocks.
Type the following command to set up a Linux swap area in a file:
 
# mkswap /swapfile1

Setup correct file permission for security reasons, enter:
 
# chown root:root /swapfile1
 

# chmod 0600 /swapfile1

# swapon /swapfile1

To activate /swapfile1 after Linux system reboot, add entry to /etc/fstab file. Open this file using a text editor such as vi:
 
# vi /etc/fstab

Append the following line:
 
/swapfile1 swap swap defaults 0 0

Save and close the file. Next time Linux comes up after reboot, it enables the new swap file for you automatically.
Simply use the free command for Verify:

$ free -m

Wednesday, 7 March 2012

Learning about SS7 and SIGTRAN protocols...

SCTP - A TCP like protocol for reliable transportation between two signaling nodes
M3UA - Provides Network Routing between SS7 signaling nodes identified by Point Codes
SCCP - Provides Network Routing between SS7 signaling end points identified based on Global Titles (phone numbers can be used here)
TCAP - Manages end to end transactions between two nodes including time outs when peers don't respond
MAP - Presentation layer defining message formats and parameters for specific GSM / UMTS services e.g. Forward SMS
INAP/CAP - Similar to MAP except for IN or CAMEL services
IS-41 - Similar to MAP except an ANSI variant

Wednesday, 14 December 2011

Dump table and database to a file in MySQL

For DB Backup : -

mysqldump -d -h HOST -u USER -p PASSWORD DBNAME > dumpfile.sql

For Table Backup : -

mysqldump -d -h HOST -u USER -p PASSWORD DBNAME TABLENAME > table.sql

For Only Table Structure :-

mysqldump -d -h HOST -u USER -p PASSWORD DBNAME TABLENAME  –no-data > table.sql

You Can Restore Dump as Below : -

mysql > source /path/SQLfile

Thursday, 8 September 2011

How to enable swap on Red Hat Linux

Before formatting swap partition please disable that partition.To do that

step1:

#fdisk -l

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         535     4192965   82  Linux swap / Solaris
/dev/sda3             536       30401   239898645   83  Linux

step2:

#swapoff /dev/sda2 (your /etc/fstab entry for swap).

step3:

Create Swap signature on that partition.to do that,

#mkswap -v1 /dev/sda2

step3:

Enable swap partition,

#swapon /dev/sda2

step4:

Check the status of swap partition.

#swapon -s

Filename                Type        Size    Used    Priority
/dev/sda2                               partition    4192956    0    -2


Wednesday, 7 September 2011

Increasing upload size in PHP and MySQL

PHP.ini

You need to change the following bits of code in your PHP.ini file:
upload_max_filesize = 16M
max_execution_time = 120
max_input_time = 120
memory_limit = 64M
my.cnf

We're adding just one bit of code to the file:

max_allowed_packet=16M

Saturday, 3 September 2011

If you are looking to compress a file or folder

To create compress backup

tar -cvzf home.tar.gz home/

For extracting compressed backup

tar -xvzf home.tar.gz home/


Zip Files & Folder

To zip a Folder:

zip -9 -r <zip file> <folder name>

To zip a single file:

zip -9 <zip file> <filename>

About Me

Hi,

I am Dhiraj Rokade, Working as a System Administrator. Providing IT solutions such as customised system development, web design and development, SMS Gateway & VAS consultation.