Sys-Admin Information’s

Share Knowledge, Distribute Knowledge, Capture & Modify Knowledge, Create Knowledge

Author Archive

Set hostname without reboot

without comments

bash> uname -a
SunOS Trojan 5.9 Generic_118558-33 sun4u sparc SUNW,Netra-T12

replace old “hostname” with new “hostname” in file /etc/hosts, /etc/nodename, /etc/hostname.”ethernet_port_name”, /etc/net/ticlts/hosts, /etc/net/ticotsord/hosts, /etc/net/ticots/hosts

bash> vi /etc/hosts
bash> vi /etc/nodename
bash> vi /etc/hostname.bge0
bash> vi /etc/net/ticlts/hosts
bash> vi /etc/net/ticotsord/hosts
bash> vi /etc/net/ticots/hosts

and then execute command :

hostname "new hostname"
bash> hostname worm
bash> . /.profile

Written by Gun nee

April 28th, 2008 at 2:00 pm

Posted in Solaris, Tips & Tricks

Setting NTP Server & Client in Solaris 10 (update)

without comments

Setting NTP ( Network Time Protocol) on Solaris 10

Configuring an NTP Server
1. Edit file ntp.conf

bash> cp /etc/inet/ntp.server /etc/inet/ntp.conf
bash> vi /etc/inet/ntp.conf

Add server address for ntp server

server 1.id.pool.ntp.org
server 1.asia.pool.ntp.org
server 3.asia.pool.ntp.org
broadcast 224.0.1.1 ttl 4
 
enable auth monitor
driftfile /var/ntp/ntp.drift
statsdir /var/ntp/ntpstats/
filegen peerstats file peerstats type day enable
filegen loopstats file loopstats type day enable
filegen clockstats file clockstats type day enable
 
keys /etc/inet/ntp.keys
trustedkey 0
requestkey 0
controlkey 0

Save your change configuration

2. Refresh daemon NTP

bash> touch /var/ntp/ntp.drift
bash> svcadm enable svc:/network/ntp

Configuring an NTP Client
1. Edit file ntp.conf

bash> cp /etc/inet/ntp.client /etc/inet/ntp.conf
bash> touch /var/ntp/ntp.drift
bash> vi /etc/inet/ntp.conf
    server 10.10.10.1 prefer # IP NTP Server  Primary
    server 10.10.10.2         # IP NTP Server Secondary
    driftfile /var/ntp/ntp.drift

2. Refresh daemon NTP

bash> svcadm enable svc:/network/ntp
bash> svcadm refresh svc:/network/ntp
bash> svcadm restart svc:/network/ntp

You can use “ntpq -p” to monitor ntpd’s performance.

Written by Gun nee

February 27th, 2008 at 1:34 pm

Posted in SMF, Solaris

Tagged with

Assign External Disk With Softpartition

without comments

For the example, i will assign disk 1 Terra byte to existing disk

Note :
The disk will be allocation to :
/ora/datafile7 500 MB
/ora/datafile8 200 MB
/ora/datafile9 150 MB
/datasqlload 150 MB

first, how to knowing new disk added in system?
# format > old_disk.txt
for the crosscheck disk existing with new disk, save list disk existing to file

after team storage has allocated disk,now we have task to assign disk in system
look HBA connected with :
# luxadm -e port
# luxadm -e forcelip [name device connected in HBA] *only device connected
# devfsadm -C
# format

check the added disk, compare with the file old_disk.txt.
sometime disk sequence which have been added not successive.

Read the rest of this entry »

Written by Gun nee

January 28th, 2008 at 12:34 pm

Posted in SVM, Solaris

Ssh in Solaris

with 4 comments

This post is about service ssh in solaris 9 or 10

Solaris 9
Disable service ssh ?

bash>  /etc/init.d/sshd stop
bash> /etc/rc3.d/S89sshd stop

Enable service ssh ?

bash> /etc/init.d/sshd start
bash> /etc/rc3.d/S89sshd start

Refresh service ssh ?

bash> kill -HUP `cat /var/run/sshd.pid`

Solaris 10
First you can check service ssh with command

bash> svcs | grep ssh
online         Jan_21   svc:/network/ssh:default

If status ssh offline, you can make online with command:

bash> svcadm enable -t network/ssh:default
bash> /lib/svc/method/sshd start

Disable service ssh ?

bash> svcadm disable -t network/ssh:default

Restart service ssh ?

bash> svcadm restart network/ssh:default
bash> /lib/svc/method/sshd restart

Refresh service ssh ?

bash> svcadm refresh network/ssh:default

For a root enable connect to host via ssh service

bash> vi /etc/ssh/sshd_config
[....]
# Valid options are yes, without-password, no.
PermitRootLogin no
[....]

Replace no with yes, after that save the edited configuration.
Don’t forget for the restart service ssh, after edit configuration.

Written by Gun nee

January 28th, 2008 at 11:42 am

Posted in SMF, Solaris

Tagged with