Thursday, September 15, 2016

enable ipv6 on solaris10 afterthefact

 effing oracle.  
   
 you have this:  
 # ifconfig inet6 interface plumb up  
   
 which in my case is:  
 # ifconfig inet6 igb0 plumb up  
   
 and it spits out:  
 ifconfig: igb0: bad address (try again later)  
   
 no. your doc writers are jerks. here's what it should look like:  
   
 root@host:~$ ifconfig igb0 inet6 plumb  
 root@host:~$ ifconfig igb0 inet6 token ::10/64  
   
 root@host:~$ svcadm enable svc:/network/routing/ndp:default  
   
 root@host:~$ pkill -HUP in.ndpd  
   
 root@host:~$ ifconfig -a6  
   
 igb0: flags=2000840<RUNNING,MULTICAST,IPv6> mtu 1500 index 2  
     inet6 fe80::210:e0ff:fe0c:ea9a/10  
     ether 0:10:e0:c:ea:9a  
   
 make it permanent.  
   
 root@host:~$ vi /etc/hostname6.igb0  
 hostname  
 addif fe80:0000:0000:210:e0ff:fe0c:ea9a/10 up  
   
 * note: : is a series of :0000:  
   
 oracle, eat a bug. eat a lot.  

Thursday, August 18, 2016

let's restart solaris 10 sshd

 To check if the service is online or offline:   
 # svcs -v ssh   
 online - 12:23:17 115 svc:/network/ssh:default   
   
 To stop the service:   
 #svcadm disable network/ssh   
   
 To start the service:   
 #svcadm enable network/ssh   
   
 To restart the service:   
 # svcadm restart network/ssh  

Friday, August 12, 2016

manual jre 8u102 installation on sol10 sparc

 gzip -dc jdk-8u102-solaris-sparcv9.tar.gz | tar xf -  
   
 mv /opt/jdk1.8.0_102 /usr/jdk/instances/jdk1.8.0  
   
 cd /usr/jdk  
   
 # ls -la  
 lrwxrwxrwx  1 root   other     7 Jun 8 14:37 j2sdk1.4.2_26 -> ../j2se  
 lrwxrwxrwx  1 root   other     18 Aug 11 11:55 jdk1.5.0_85 -> instances/jdk1.5.0  
 lrwxrwxrwx  1 root   other     18 Aug 11 15:38 jdk1.6.0_121 -> instances/jdk1.6.0  
 lrwxrwxrwx  1 root   other     12 Aug 11 15:38 latest -> jdk1.6.0_121  
   
 # ln -s instances/jdk1.8.0 jdk1.8_102  
   
 # mv latest latest.orig  
 # ln -s jdk1.8_102 latest  
   
 # cd /usr  
   
 # ls -la |grep java  
 lrwxrwxrwx  1 root   other     16 Aug 11 15:38 java -> jdk/jdk1.6.0_121  
   
 # mv java java.orig  
 # ln -s jdk/jdk1.8_102 java  

Tuesday, August 9, 2016

ufs to zfs on solaris10

 grumble my second drive i've dedicated to solaris zones   
 has run out of inodes cause it it ufs and not zfs. okay.  
   
 # nano -w /etc/vfstab  
   
 remove second drive definition; e.g. c2t3C76E3E06C7010BCd0  
   
 # umount /zones  
 # format -e  
   
 format  
 select the second drive. go home.  
   
 # zpool list  
 # zpool create zones c2t3C76E3E06C7010BCd0  
 # zpool status  
 # mount |grep zones  
 # cd /zones  
 # df -k  
   
   zones        1147797504   21 1147797432   1%  /zones  
   
 that looks like 1T yeah?  
   
 # dd if=/dev/zero bs=128k count=40000 of=/zones/bigfile  
   
 40000+0 records in  
 40000+0 records out  
   
 # ls -la  
 total 9250396  
 drwxr-xr-x  2 root   root      3 Aug 8 10:13 .  
 drwxr-xr-x 25 root   root     512 Aug 3 17:08 ..  
 -rw-r--r--  1 root   root   5242880000 Aug 8 10:13 bigfile  
   
 # zpool list  
 NAME  SIZE ALLOC  FREE  CAP HEALTH ALTROOT  
 zones 1.09T 4.88G 1.08T   0% ONLINE -  
   
 yay.  

unzip a lot of zipped files in solaris

 for i in *.zip ; do unzip $i ; done  

Monday, August 8, 2016

add patches sol10

 #!/usr/bin/bash  
 dir=$(pwd)  
 pkgs=`ls $dir`  
   
 for i in $pkgs  
  do  
  pkgadd -d $i  
 done  
   

let's make ssh like telnet

 let's make ssh like telnet  
   
 me@here:~$ ssh root@there  
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  
 @  WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!       @  
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  
 IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!  
 Someone could be eavesdropping on you right now (man-in-the-middle attack)!  
 It is also possible that the RSA host key has just been changed.  
 The fingerprint for the RSA key sent by the remote host is  
 51:e3:4a:61:06:6b:52:04:c1:69:4f:36:47:4e:d6:dc.  
 Please contact your system administrator.  
 Add correct host key in known_hosts to get rid of this message.  
   
 i am the effing systems administrator. and yeah, i reinstalled the host.  
   
 # vi ~/.ssh/config  
   
 Host *  
   StrictHostKeyChecking no  
   UserKnownHostsFile=/dev/null  
     
 and now i'm pretty much flying blind. weeeee