Author Archive
Set hostname without reboot
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
Setting NTP Server & Client in Solaris 10 (update)
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.
Assign External Disk With Softpartition
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.
Ssh in Solaris
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.