« May 2008
SunMonTueWedThuFriSat
    
1
2
3
4
5
6
7
8
9
10
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
       
Today
XML

Tom Haynes

loghyr.com
excfb.com

Blogs to Gander At

Navigation

Editing

AllMarks

Referers

Today's Page Hits: 1055

Powered by Roller Weblogger.

statcounter.com

clustrmaps.com

Locations of visitors to this page

technorati.com

www.alesti.org

Add to Alesti RSS Reader

South Park as I was 10 years ago

South Park Fantasy

South Park today

South Park Reality

I have more hair and it isn't so grey. :->

10 years ago, really

Toon Tom

Today, literally

Tom Today

Site notes

This page validates as XHTML 1.0, and will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device. It was created using techniques detailed at glish.com/css/.

« Are the intermal Sun... | Main | My Belkin 54G died... »
20070124 Wednesday January 24, 2007
Old desktop is now fully committed to Solaris

I got a new DVD drive for mrx, my old desktop - it supports dual-layers. So I burned a Nevada b56 DVD, zapped the WinXP partition and installed Solaris to the hilt. I've been off of its WinXP partition for a week and wasn't missing anything.

So I have the base bits installed - I didn't do the Solaris Developer's Express install. But I want to now get the Sun Studio 11 bits installed. I don't want to grab them off of the web and install them when they are just sitting there. So, how do I get them?

# cd /media/SOL_11_X86
# ls -la DeveloperTools
total 30
dr-xr-xr-x   4 root     root        2048 Jan 18 23:50 .
dr-xr-xr-x   2 root     sys         4096 Jan 18 23:48 ..
dr-xr-xr-x   2 root     root        2048 Dec 12 18:21 NetBeans
-r--r--r--   1 root     root        1046 Dec 18 18:20 README
dr-xr-xr-x   3 root     root        2048 Dec 11 02:36 SunStudio
-r-xr-xr-x   1 root     root         645 Dec 18 16:07 install_devtools.sh
-r-xr-xr-x   1 root     root        2207 Dec 15 12:47 main.sh

Is it as simple as running this install script? Yep, easy to find out if we consult the README.

Whoops, looks like you can't do this from a telnet window:

# ./install_devtools.sh
Error: Can't open display:

Can we fake it out?

# /media/SOL_11_X86/DeveloperTools/main.sh
***********************
***  Sun Studio 11  ***
***********************
Installing Sun Studio 11  (16..20 minutes)

I don't care if it is pretty or not. I do care that I be able to do this on a headless box.

Hmm, while that is going on, I need to also do some light housekeeping. Before I started this, I modified the sshd to accept root logins. Now I want to add some accounts and have them show up in /home. Now, you really can't create directories in /home. Well you can, but it is a pain. So, instead, lets tell the automounter that we want it to do this for us:

# cp auto_home auto_home.stock
# diff auto_home auto_home.stock
29,30c29
< #+auto_home
< *     localhost:/export/home/&
---
> +auto_home
# svcadm restart autofs

Now, I normally have useradd(1M) create the directory for me, but I think that won't work in this case. Pretty simple to do:

# mkdir /export/home/tdh
# useradd -u 1066 -g 10 -c "Tom Haynes" -d /home/tdh tdh
# ls -la /home/tdh
total 3
drwxr-xr-x   2 root     root         512 Jan 24 01:49 .
dr-xr-xr-x   2 root     root           2 Jan 24 01:48 ..
# chown tdh:staff /export/home/tdh
# ls -la /home/tdh
total 3
drwxr-xr-x   2 tdh      staff        512 Jan 24 01:49 .
dr-xr-xr-x   2 root     root           2 Jan 24 01:48 ..

Make sure to give the account a password:

# passwd tdh
New Password:
Re-enter new Password:
passwd: password successfully changed for tdh

And we test that we can login:

[tdh@adept ~]> ssh mrx
Password:
Last login: Wed Jan 24 01:52:09 2007 from adept.internal.
Sun Microsystems Inc.   SunOS 5.11      snv_56  October 2007
$ pwd
/home/tdh
$ df -h .
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c0d0s7         12G    12M    12G     1%    /export/home

Back to the install of the Sun Studio 11:

# /media/SOL_11_X86/DeveloperTools/main.sh
***********************
***  Sun Studio 11  ***
***********************
Installing Sun Studio 11  (16..20 minutes)
   .............
Installing 5 Sun Studio 11 patches  (9 minutes)
    120759-08    120762-03    121016-04    121018-07    121616-03
Updating Sun Studio 11 with fixed binaries.
Installing Sun Studio 11 /usr symlinks and GNOME desktop file
Sun Studio 11 installation complete.

**********************
***  NetBeans 5.5  ***
**********************
Installing NetBeans IDE 5.5 and NetBeans Enterprise Pack 5.5 (1 minute)
Installing Sun Java System Application Server 9 Update 1  (2 minutes)
Installing NetBeans GNOME desktop file
Netbeans 5.5 installation complete.

All done.  This window will exit in 20 seconds.

Great, now I need some tools like sudo and vim. I can get these off of either sunfreeware.com or blastware.org, but I'll stick to the Sun Software Companion CD. Since there isn't one out for Nevada yet, I'll use the Solaris 10 one. I've got the CD somewhere, but besides testing installs, I really can't be bothered anymore to do use physical images.

Instead, I use the loopback to load the iso and install from there:

# lofiadm -a /home/tdh/sol-10-ccd-GA-x86-iso.iso
/dev/lofi/1
# mkdir -p /isos/mnt/companion
# mount -F hsfs -o ro /dev/lofi/1 /isos/mnt/companion
# cd /isos/mnt/companion
# ./installer

And by the way, this installer happens to be smart enough to know that the machine is headless.

Once that is done, I'm going to want to setup sudo and then call it quits for the night. (Okay, actually I want to automate all of this such that I never, ever have to worry about it. I also want to install SUNWonbld, the closed bits, and the latest source drop to the public. That can all happen later.)

# /opt/sfw/sbin/visudo

And change this:

# Same thing without a password
# %wheel        ALL=(ALL)       NOPASSWD: ALL

to this:

# Same thing without a password
%staff  ALL=(ALL)       NOPASSWD: ALL

And now make sure to get the setuid bit set correctly.

# chmod +s /opt/sfw/bin/sudo

And test:

[tdh@adept ~]> scp .tcshrc mrx:/home/tdh
Password:
.tcshrc                                                                                                100% 5417     5.3KB/s   00:00
[tdh@adept ~]> ssh mrx
Password:
Last login: Wed Jan 24 02:36:08 2007 from adept.internal.
Sun Microsystems Inc.   SunOS 5.11      snv_56  October 2007
[tdh@mrx ~]> sudo w
  2:36am  up  1:03,  2 users,  load average: 0.05, 0.57, 0.68
User     tty           login@  idle   JCPU   PCPU  what
root     pts/2         1:35am        17:11         tcsh
tdh      pts/3         2:36am                      w

Note that I also changed my shell from sh to tcsh in the background. I test a very simple command to make sure sudo works.


Originally posted on Kool Aid Served Daily
Copyright (C) 2007, Kool Aid Served Daily

Trackback URL: http://blogs.sun.com/tdh/entry/old_desktop_is_now_fully
Comments:

Telnet? It comes with SSH built-in, use that and disable Telnet. Maybe you just meant "terminal window" and not Telnet. Anyway... All you need is a remote workstation with X (if windows, get PuTTY for SSH, turn on X-tunneling and install and Xming) and you can run graphical stuff tunneled through SSH effortlessly.

Posted by Kimmo on January 24, 2007 at 06:24 AM CST #

Kimmo,

Yes, I meant "terminal window". But the point applies, there can be situations where I don't even have an SSH window established. Or I can't run X.

The install script should not assume that I can run X - especially with the amount of headless boxes in use in labs.

Later,
Tom

Posted by Tom Haynes on January 24, 2007 at 09:05 PM CST #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed
Copyright (C) 2007, Kool Aid Served Daily