Sunny Days – Day 3

I found a first flaw. Well, not with the T2000 – maybe later ;) But in the Try&Buy program, there’s one minor or major flaw – depending on how you look at it. When dealing with new systems my motto is that if you didn’t break it, you didn’t get to know it. That means: if you haven’t crashed a system and tried to rebuild it, you haven’t been into the system deep enough. There’s nothing to teach you more about any system than trying to rebuild a broken one. With the Try&Buy program, however, you better not break your Sun. It’ll cost you dearly in terms of days lost evaluating. So maybe Sun should offer you two systems once you tell them that you’re a novice user. Ok, I know that this isn’t feasible and would be really a lot to ask. Still, it would make me a lot bolder when trying “new” things. I’d have a system to fall back to. Well, it’s no perfect world so I have to make do with one Sun (and I’m still perfectly happy with that one). I just wanted to explain why I do one step at a time instead of rushing into the game.

Cosmetics
After adding users one of the tasks on my todo list was to get rid of all those little messages displayed to me on startup. The T2000 is a real stickler when it comes to name resolution issues. So it kept complaining about its hostname not being known in the domain. Easy fix: let the DNS server know about “my” Sun and its names. Adding the entries to the list of hosts my DNS server knows about removed some but not all of the messages. Especially sendmail kept on bitching about not being able to verify its fully qualified hostname. I just shut it up by editing /etc/hosts where I added the fully qualified hostnames for the four interfaces. I will have a closer look into this later, if time permits.

An aside: If you are an experienced Sun admin, you’ll for sure read things here that’ll make you wince. Well, I’m neither an experienced Sun admin nor do I pretend to be one. So if you read things here that are more complicated than they need to be or which are even plain wrong: please leave a comment and tell me how to do better. Your input is much appreciated and will not only help me but also all the other guys like me when they have their first contact with a Sun and happen to stumble over this site. Thanks a lot.

Running Apache
As one might expect, after adding users to the system my first interest was to get the Web server up and running. Initially I was a little confused for there were two directories, /etc/apache and /etc/apache2 available. But as it turned out, running apache was a matter of issuing three simple commands:

cd /etc/apache2
cp httpd.conf-example httpd.conf
svcadm enable apache2

The provided config itself proved to be not as sophisticated as one might be used to when coming from a SUSE system for example, but it worked right out of the box. Also, the default configuration uses a lot of path names different from what you may be familiar with. But that’s nothing that can’t be fixed or adapted to one’s needs. What was stunning, however, was the fact that there’s no PHP pre-installed on the box. I’d have expected Sun to preload this as well because one of the major areas of usage for a Sun is to act as a web server. And the vast majority of sites nowadays is using PHP in one way or another.

But ok, next stop will be trying to make PHP work on the box. From what I’ve read on the net, this seems like a major task so I’m not quite sure whether I’ll be able to finish it in one day. Guess I could but I’ve got other work waiting, too.

Starting MySQL
Before installing PHP, however, I decided to activate MySQL. Since most of the apps I intend to move over to the Sun rely on MySQL databases anyway, this seemed like a sensible thing to do. Again, the site of Mel Leter Jr. proved to be very useful in that task. I did everything as he describes in his guide and had MySQL up and running in almost no time.

# /usr/sfw/bin/mysql_install_db
# groupadd mysql
# useradd -g mysql mysql
# chgrp -R mysql /var/mysql
# chmod -R 770 /var/mysql
# installf SUNWmysqlr /var/mysql d 770 root mysql

While this looks pretty normal at a first glance, some explanation maybe is in order. The most puzzling command for most folks new to the Solaris OS may be the last line. The command installf basically tells the OS that we’ve modified the attributes of path /var/mysql so it won’t complain about that later. Actually, it’s not strictly necessary to create the mysql user and group and change the owner of /var/mysql to run MySQL. But because it’s good style to do so, I followed the suggestion from Mel’s guide. Next I copied one of the already supplied example configurations over to /var/mysql and started the MySQL daemon manually:

# cp /usr/sfw/share/mysql/mysql-medium.conf /var/mysql/my.cnf
# /usr/sfw/sbin/mysqld_safe –user=mysql &

I could have used any other of the available configurations for small, medium, large and huge and could have also copied them to /etc/my.cnf to be in sync with a standard Linux setup. I picked the medium one for although most of the applications I intend to run use MySQL, they don’t do so heavily. Setting the password for the MySQL superuser proved to be a bit problematic since there was a clash between the hostname stored in the user database of MySQL and the name as returned by the hostname command. I don’t know how this happened but using the MySQL command line later, the problem was easy enough to fix.
As a last step, I made the necessary links to have the MySQL daemon started automatically on system boot. Instead of using hard links as used in Mel’s guide I used symbolic links so changes to the original file would be trickling down automatically:

# ln -s /etc/sfw/mysql/mysql.server /etc/rc3.d/S99mysql
# ln -s /etc/sfw/mysql/mysql.server /etc/rc0.d/K00mysql
# ln -s /etc/sfw/mysql/mysql.server /etc/rc1.d/K00mysql
# ln -s /etc/sfw/mysql/mysql.server /etc/rc2.d/K00mysql
# ln -s /etc/sfw/mysql/mysql.server /etc/rcS.d/K00mysql

So far, everything is running nice and dandy. I hope it will continue that way.

Lessons learned

  • There’s no such thing like a perfect system
  • Google is your friend – at least when looking for clues
  • As always: don’t rush it. There are roadblocks where you don’t expect them
  • [ All posts about my experiences with the SunFire T2000 >>> ]

    This entry was posted in Hardware, Misc. Bookmark the permalink.

    4 Responses to Sunny Days – Day 3

    1. Rolf Kersten says:

      Hi Stefan.,

      have you considered using “Live Upgrade” to create status snapshots of your system disk?

      Typically Live Upgrade is used to upgrade a copy of your OS environment while you are working and then switch to the updated copy with one reboot. If something does not work as expected, you can always return to your original environment.

      So for your work, you would use Live Upgrade like this:
      - Copy your boot environment
      - Switch to Copy
      - Install and break things on Copy
      - If OK, work with Copy, use copy as Source for next Copy
      - If not OK, fall back to source

      Since you have two disks in your T2000, you always have a fall-back position.

      Documentation: docs.sun.com or google “live upgrade solaris 10″

      Best regards

      Rolf

    2. Thanks for the info, will give it s try tonight. Got some other, really pressing things to do atm.

    3. Hi Stefan,
      still progressing through your log – thanks for sharing your experience and your special point of view with the T2000-less :)
      Good news – you don’t need more than one Sun to break as many as you want. If you feel like giving zones a try, they’re an excellent playground for things like that.
      Have fun,
      Tatjana

    4. Actually playing with zones is on my todo list – but not just right now. First I’d like to get a better feeling for the T2000, see how it “behaves” ;) My current problem is that I’ve got to earn some real money, too. So my time with the T2000 is somewhat limited at the moment.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>