Archive

Posts Tagged ‘solaris’

re-ip on solaris server howto – change ip netmask defaultrouter gateway

May 18th, 2012 No comments

To change ip/netmask/defaultrouter/gateway on solaris 10 or solaris 9 server permanently, you need care for files below:

/etc/hosts -> /etc/inet/hosts
/etc/hostname.<tags of your interface>
/etc/inet/netmasks
/etc/defaultrouter

Let’s assume that the new ip address is 101.139.1.151, new netmask is 255.255.254.0, new gateway is 101.139.1.254, new broadcast address is 101.139.1.255, here goes the steps:
1)change /etc/hosts(or /etc/inet/hosts which of them are the same file)
101.139.1.151 <tag for your server’s ip address>

2)change defaultrouter in /etc/defaultrouter:
101.139.1.254 /etc/defaultrouter

3)change /etc/hostname.<tags of your interface>(this step may not needed):

4)change netmask in /etc/inet/netmasks:
You’ll need first calculate network address from the given ipaddress(101.139.1.151) and netmask address(255.255.254.0). You can calculate it by hand(refer to this article http://www.doxer.org/learn-linux/basic-knowledge-for-netmask-hexadecimal-decimal-binary-netmask-cidr-calculator/), but I would prefer to use ipcalc:
[root@doxer~]# ipcalc -pnbm 101.139.1.151 255.255.254.0
NETMASK=255.255.254.0
PREFIX=23
BROADCAST=101.139.1.255
NETWORK=101.139.0.0

So from the output, you’d know that the network address is 101.139.0.0. Then add a line to /etc/inet/netmasks with format <network address> <netmask address>:
101.139.0.0 255.255.254.0

PS:
If you need change ip/netmask using ifconfig temporarily on solaris, use the following command:
ifconfig qfe1 101.139.1.151 netmask 255.255.254.0 broadcast + up

5)Now reboot your server and then use ifconfig -a and netstat -rnv to confirm everything is working as expected.

PS:
If you encounter errors below when booting solaris, then there may be some problem with network configuration on your host. Consider going to single user mode and change networking configuration detailed in this article.

Setting /dev/arp arp_cleanup_interval to 60000
Setting /dev/ip ip_forward_directed_broadcasts to 0
Setting /dev/ip ip_forward_src_routed to 0
Setting /dev/ip ip_ignore_redirect to 1
Setting /dev/ip ip_respond_to_address_mask_broadcast to 0
Setting /dev/ip ip_respond_to_echo_broadcast to 0
Setting /dev/ip ip_respond_to_timestamp to 0
Setting /dev/ip ip_respond_to_timestamp_broadcast to 0
Setting /dev/ip ip_send_redirects to 0
Setting /dev/ip ip_strict_dst_multihoming to 1
Setting /dev/ip ip_def_ttl to 255
Setting /dev/tcp tcp_conn_req_max_q0 to 4096
Setting /dev/tcp tcp_conn_req_max_q to 1024
Setting /dev/tcp tcp_smallest_anon_port to 32768
Setting /dev/tcp tcp_largest_anon_port to 65535
Setting /dev/udp udp_smallest_anon_port to 32768
Setting /dev/udp udp_largest_anon_port to 65535
Setting /dev/tcp tcp_smallest_nonpriv_port to 1024
Setting /dev/udp udp_smallest_nonpriv_port to 1024
Setting /dev/ip ip_ire_arp_interval to 60000
Setting /dev/tcp tcp_extra_priv_ports_add to 6112
Setting /dev/tcp tcp_rev_src_routes to 0

Categories: Networking Security, Unix Tags:

method to start stop SUNWwbsvr webservd Sun webserver

April 28th, 2012 No comments

Here’s steps to start Sun webserver:

cd /apps/SUNWwbsvr/<https-tag-of-your-hostname>

./start

Here’s steps to stop Sun webserver:

cd /apps/SUNWwbsvr/<https-tag-of-your-hostname>

./stop

To check whether start/stop/restart completes:

ps -ef | grep SUNWwbsvr

Categories: IT Architecture, Unix Tags: ,

resolved pca 403 forbidden server error on solaris

April 28th, 2012 No comments

Today when I was patching a solaris 5.9 host, error occurred with error message as follows after entering MOS(my oracle support) user/password:

122300 56 < 63 RS- 22 SunOS 5.9: Kernel Patch
Looking for 122300-63 (2/52)
Trying Oracle
Please enter My Oracle Support Account User: [email protected]
Please enter My Oracle Support Account Password:
Trying https://getupdates.oracle.com/ (zip) (1/1)
Failed (Error 403: Forbidden)
Failed (patch not found)

Then I went to http://support.oracle.com and searched patch 122300-63. The patching info page says I’ll need “Vintage Solaris download access/privilege” to download this patch, but obviously none of my CSI had this Vintage Solaris download access/privilege.

As this account issue may take some time to resolve, so I choose cluster patch or you may say patchset method to do the patching on solaris 9. Here’s the steps we need to do cluster patching on solaris 5.9:

  • 1.download latest cluster patching package that satisfies your host here http://wesunsolve.net/bundles
  • 2.unzip the package and have a read of Recommended.README file comes with the package
  • 3.ensure there’s enough free space on /, /var(better >4Gb)
  • 4. Now run ./install_patchset or ./install_cluster(you can add -nosave parameter if  you have limited free space on /, /var, but you will not be able to backout individual patches if the need arises)
  • 5.For more installation messages refer to the installation logfile:    /var/sadm/install_data/<patchset-name>_log
  • 6.reboot your machine to make all patches applied to your host.

NB:

If you have raid 1(mirror) on your solaris system, you can try first patch submirror and then apply to all system if server runs well after booting up. You can refer to the following for more infomation:

http://www.doxer.org/learn-linux/solaris-patching-trick-%E2%80%93-first-patch-submirror-then-sync-between-mirrors/

 

solaris svm breaking need boot from mirror

April 11th, 2012 No comments

If solaris’s svm has broken, and that broken one is for rootdisk, then the system will fail to boot up. We can now try boot from mirror disk rather than SVM. If the mirror is in good condition, then your system will boot up and after it’s up, we can do something to repair the broken solaris svm.

Here goes the steps to boot solaris from mirror disk without svm:

1.Prepare a cd/dvd with solaris of your host’s version.

2.goto ok mode

3.ok> boot cdrom -s ( Or boot net -s)

4.mount the root slice on /a

5.Take backup of /a/etc/vfstab and /a/etc/system files.

6.Modify the entries of the vfstab files and system files of /etc

7.Edit the /a/etc/system file, and remove the “rootdev” line shown below:

# vi /a/etc/system
*rootdev:/pseudo/md@0:0,0,blk #yours may be different
——> Do not comment the line. Remove it.

8.In the /etc/vfstab file, replace the lines for the system file system
metadevices with their underlying partitions.

For example, change lines from:

/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no -

to:

/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no -

ONLY change the lines for root (/) and the file systems which were affected. All other metadevices, may stay ‘as is’, in this file.

9.Unmount and check the root file system.

# cd /
# umount /a
# fsck /dev/rdsk/c0t0d0s0

10.#/usr/sbin/installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/cXtXdXs0

[

If you are using a cd/dvd or net which is having advance version of the Solaris OS to
the Solaris OS on the disk to boot to single user, then install the bootblk using the following command.

#/a/usr/sbin/installboot /a/usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/cXtXdXs0

]

11.init 0

12.Boot from the mirror disk.
Ok boot disk0

PS:

You can find more info if you search for “Unable to boot from a DiskSuite-controlled system disk” in google.

Categories: Storage, Unix Tags: ,

obu firmware patching for sun T2000/T5120/T5220 servers OBP patching

August 17th, 2011 No comments

Don’t know why there’s some formatting errors with this article, you can download the PDF version here: obu firmware patching for sun T2000-T5120-T5220 servers OBP patching

You can download Sun_System_Firmware-6_7_11-Sun_Fire_T2000 from support.oracle.com or here(For SunFireT2000)

Categories: Servers Tags: