Tuesday 2 December 2008

mengenai contents

/var/sadm/install/contents

File ini menyimpan package yang kita install di solaris, jika kita hendak membuat mesin cloning yang memiliki package level sama, maka bisa melakukan copy file ini ke mesin baru tersebut. Dengan asumsi mesin baru ini akan dibuat sama level packagenya dengan mesin reference.

Untuk melakukan test terhadap file contents ini bisa dilakukan dengan mereboot(shutdown -i6 -g0 -y), jika server berhasil up berarti contents nya lengkap.

Dapat command baru screen

Pastikan screen terinstall di sun solaris/linux anda:
#which screen
/usr/local/bin/screen

Setelah itu tinggal ketik:
#screen
dan
lakukan aktifitas anda, jika anda ingin keluar :
ctrl + a and z

Lalu jika anda ingin kembali bekerja:

login ke mesin anda dan ketik

#screen -r

maka anda masih mendapatkan sesi anda tanpa terinterupt.

Wednesday 23 July 2008

.profile

When you are making a user, then you will have a .profile, you can export your environment setting here, your path, so it make easy so you dont have to run full path command, just run the alias you set

Monday 7 July 2008

How to make solaris 10 using dhcp client

1.if in /etc/hosts you already have ip static configured for this host, please comment it.
2. touch empty file /etc/dhcp.interfacename example : touch /etc/dhcp.bge0
3. touch empty file /etc/hostname.interfacename example : touch /etc/hostname.bge0
4. reboot the system

How to do jumpstart

1. clean all unnecessary log and config files from the server we want to clone
2. make backup for the /etc/inittab
3. uncomment all the process of application in /etc/inittab
4. enter single mode (init s)
5. login using serial console cable
6. flarcreate -n hostname -c -S -x /oradata hostname_images.flar
7. restore inittab
8. reboot the system
9. transfer the image files to jumpstart server
to be Continue

Friday 9 May 2008

Small tools

You can compare two files using command diff and sdiff:
example: diff file1 file2 or sdiff file1 file2

head --> to see the top content of the file

head filename.txt
head -10 filename.txt ---> to see the first 10 lines

tail filename.txt --> to see the last line

tail -10 --- > to see the last 10 lines

tail -f --> to see files/log, when it keep updating

Monday 28 April 2008

Check Sun Environment

How to check environment of machine SUN :

df -k = checking disk space and partition info
top = to see the most heavy process
sar 1 5 = to see the cpu idle rate
prstat = to see the memory usage
netstat -an |grep port_number = to check listening/open port of certain port_number
ps -ef|grep process_name = to check if a process is up

How to SCP

How to scp.
Example : copy file from host1 to host2

In host1 :
scp filename host2:/tmp

This will copy the file in host1 to host2 i /tmp directory

Sunday 27 April 2008

How to Install Package

How to Install Package

1.gunzip the package
gunzip package_name.tar.gz
2.Untar
tar -xvf package_name.tar
3. Install Package
enter the package the newly created package directory
cd package_name
pkgadd -d . pkgname

Please note that, do not use this command for interest banking(ribawi), neglected music application,nuclear installation, zodiac, fortune teller, porn purpose

Friday 25 April 2008

Instant UNIX

cat = for reading a text file
vi = to edit the text file or configuration file
type = to find the command path
pwd = checking which directory are you now
cd .. = going one level up
mkdir foldername = creating a folder/directory
cp file1 file2 = copy file1 to file2
rm file1 = remove file1
rm -r foldername = remove folder with its content


Please dont use this command for bad purposes, such as Interest Banking Application, and for all evil action.

Learning UNIX Fast

Basic command:
bash = enter bash shell, easy for autocomplete by typing tab
ls -lrt = List all files
cd = change directory