clone solaris os to new hard disk

Posted on April 13, 2012

Below steps will show you how to clone solaris OS (root partition) to new hard disk.

Note:Here I assume you only have one partition on your disks which are c0t0d0s0(old disk) and c0t1d0s0

 

1.Power-off your Solaris machine (/sbin/init 5) ,and intert your new hard disk

2.Input “boot[......]

Read more

» Filed Under Backup | Leave a Comment

Fix do_ypcall: clnt_call: RPC: Timed out

Posted on March 29, 2012

Error “Fix do_ypcall: clnt_call: RPC: Timed out” normally means a local problem on your system or site network which cause local

NIS client can’t communicate with NIS server properly.

1.Check your system log messages to see if there are any network related errors,also you can check if your NIS[......]

Read more

» Filed Under Server | Leave a Comment

Enlarge swap space in linux

Posted on March 26, 2012

Swap space is very important in linux,if swap space is exhausted the system will crash,below will show to how to enlarge your swap space using file.

The same way you can add swap space if you have new disk installed.

 

1.Use dd command to create a file to act as swap space.(below examp[......]

Read more

» Filed Under Server | Leave a Comment

Fix Acroread high cpu usage in linux

Posted on March 23, 2012

I found there was several acroread process which occupy high cpu on our linux vnc servers.I try to upgrade acroreader to the latest version which didn’t work.

Now I found the reason is we are accessing internet behind company’s proxy server and we don’t configure the proxy setting for acroread,th[......]

Read more

» Filed Under Server | Leave a Comment

Copy disk drive using dd command in linux

Posted on March 12, 2012

We can use dd command to copy the whole disk or one partition in linux, thus we can backup data or for copy OS purpose.

Warning:Please make sure you are using the correct “if=” and “of=” parameters,or this will result in data lost

 

Copy whole disk using dd command

 

Below c[......]

Read more

» Filed Under Backup | Leave a Comment

postfix/qmgr status=deferred (delivery temporarily suspended: transport is unavailable)

Posted on February 22, 2012

I have a crontab job to check something every day and send me the results to me via email,but today  no email received,and I found below error messages in mail log files

postfix/qmgr status=deferred (delivery temporarily suspended: transport is unavailable)

Then I just try to restart p[......]

Read more

» Filed Under Server | Leave a Comment

linux chkconfig command example

Posted on February 21, 2012

Linux command chkconfig is used to updates and queries runlevel information for system services.
SYNOPSIS

chkconfig –list [name]
chkconfig –add name
chkconfig –del name
chkconfig [--level levels] name <on|off|reset>
chkconfig [--level levels] name

EXAMPLES:

1.Example to list all t[......]

Read more

» Filed Under Command | Leave a Comment

linux ssh automatic login without password prompt

Posted on February 20, 2012

If you need to use ssh to login another host every day,maybe you need to know how to use ssh automatic login to other host without password prompt,here we go

1.On the source host,run below command and hit ENTER 3 times to create rsa keys

user001@client[/home/user001]122% ssh-keygen -t rsa
Gener[......]

Read more

» Filed Under Server | 1 Comment

regular expression examples

Posted on February 17, 2012

Metacharacter regular expression examples

. (dot)

match any single character except line break characters \r and \n

bash-3.2$ cat file.txt
abc
acc
add
bash-3.2$ sed 's/a.c/relaced/' file.txt
relaced
relaced
add
bash-3.2$

[ ]

A bracket expression. Matches a single character that is contained within the brackets

user1@server1[/home/user1/examples]104% ls [a-c]*
a   b   c
user1@server1[/home/user1/examples]105% ls [0-9]*
1   2   3
user1@server1[/home/user1/examples]106% ls [a-c0-9]*
1   2   3   a   b   c
user1@server1[/home/user1/examples]107%

[^ ]

A br[......]

Read more

» Filed Under Shell | Leave a Comment

Linux sed command examples

Posted on February 17, 2012

 

Linux sed command is a powerful stream editor for filtering and transforming text.Below will show you several examples,after which you should can use sed to finish most basic tasks.

Below file will be used to do the tests in below examples

bash-3.2$ cat example.txt
This is the first line
This is the second line
#This is the 3rd line
 
This is the 5th line
bash-3.2$

 [......]

Read more

» Filed Under Command | Leave a Comment

keep looking »