Category Archives: Solaris

Speed up SSH Logins

Ever since some upgrade of my Ubuntu workstation it would took forever (10-15 seconds) to login to remote hosts using ssh. The solution is quite easy. Edit /etc/ssh/ssh_config and make sure you have set the following options:

    GSSAPIAuthentication no
    AddressFamily inet

Since I made these changes ssh logins again work in no time.

What I Really Hate About Windows

I don’t run Windows regularly. I use Mac OS X. I use Ubuntu. I use Solaris. But when I need to run Windows it will never, ever fail to remind me why I don’t run Windows. It’s as simple as that. If updates are available, Mac OS X will inform me. Ubuntu will inform me. And if I told it to do so, Solaris will inform me. But all of these systems will never fucking ever *reboot* my machine just because they *thought* it’d be necessary. And even if they did have a function like that, they’d sure as hell be intelligent enough to find out that there are tasks running and stop or at least postpone the reboot. Oh well, after all it’s Windows I’m ranting about here ;)
Continue reading

Building A 64-bit Resin On Solaris 10 Using SunStudio 12u1

This has been bothering me for quite some time. Resin is one of the best application servers I’ve come across. But to get the best performance out of it, you need to recompile it for your platform. While this is no problem on Linux it never quite worked out on Solaris for me when using SunStudio 12. But now I finally made it happen. Here’s how.
Continue reading

Porting For The Sun: The Zlib Problem (ld.so.1: exe: fatal: relocation error: R_AMD64_32:)

With the recent update of the Sun Studio 12 compiler set I started seeing errors like this when compiling for example MySQL from source:

ld.so.1: exe: fatal: relocation error: R_AMD64_32:

Turns out that it was Zlib 1.2.5 causing the problem.
Continue reading

Bash: Dynamic Variables

Every once in a while I need to use dynamic variables in shell scripts for doing things like

echo ${{$foo}_bar}

but unfortunately it won’t work like shown in the example above.
What will work however is this:
Continue reading

Resolved: “ld: fatal: file values-Xa.o: open failed: No such file or directory” when compiling on (Open)Solaris

Ah well. Compiling software on Solaris could be really easy if it weren’t for the small problems all the time. Today I was faced with

ld: fatal: file values-Xa.o: open failed: No such file or directory

when trying to compile Subversion 1.6.5 on OpenSolaris.

Solution:

pkg install SUNWarc

{openx:6}

No IonCube Loader for PHP 5.3.0 – for now ;)

This is what I received today after offering a Solaris build environment to the guys from IonCube so they could build a version of their loader for my preferred web server OS:

Continue reading

Enable SNMP on OpenSolaris

If you like to monitor your machines using SNMP and find yourself on a machine running OpenSolaris, chances are that there is

/usr/sfw/bin/snmpd

already installed. But there’s no service or init script to actually run it automatically. In that case, just install the necessary package from the OpenSolaris repostiory:

pkg install SUNWsmmgr

Continue reading

MySQL 5.4: Not for me, yet ;)

Since Sun bought MySQL, the pace of the releases has increased a lot. Ok, we’ll see whether this will continue, but still. So now it’s MySQL 5.4. Not only quite a big jump in the minor numbers but also some improvements, the community has asked MySQL to integrate for quite some time. Especially the code contributed by Google has finally made it into MySQL. One might ask “What took you so long?”. Still, even with those improvements, the new version isn’t for me. Why?

Continue reading

Unhold Sendmail Queue

It’s really so simple that I always forget it: To make

sendmail

resend all mails currently in the queue, issue

sendmail -q

{openx:6}

Really here for reference only.

Network Monitor ZenOSS 2.4beta3 available

zenoss_logo_webPace is going up over at ZenOSS. When I looked late at night yesterday, ZenOSS 2.3.296 (a.k.a. 2.4beta3) wasn’t available. It now is, including again some changes to my network monitoring package of choice.

Continue reading

How to compile Oracle support (Oci8) for PHP on Solaris

Ok, we all know that this should be a trivial task. And it really is. Just a few steps to complete:

  • Go to Oracle’s download page
  • Search for the real download link
  • Choose your favorite platform there
  • Click on desired file
  • Click ok on popup reminder that you have to agree to the Download Licence Agreement
  • Click “Accept Download Licence Agreement”
  • Click on desired file (again)
  • Press ok on Popup window telling you to register
  • Go to register page, fill in registration data
  • Click “Continue”
  • Read error message
  • Go back to registration and sign up for one of the mandatory newsletters
  • Go back to download site (You *did* bookmark it, did you?)
  • Click on desired file (again)
  • Click on desired file (again)
  • Find out that the download has already started in the background
  • Delete superfluous copies of the file you downloaded
  • unZIP (as we all know, ZIP *is* the packer of choice on *nix alike platforms)
  • Download OCI8 support from pecl.php.net
  • Unpack
  • Start configure
  • Learn that the Oracle Instant Client doesn’t contain the header files
  • Go back to Oracle Download Page (you’d *really* better bookmark that page, dude)
  • Click on … download … unzip
  • Try to configure Oci8 again (will fail anyway)
  • Go to unpacked Oracle SDK dir
  • Create ./lib directory
  • Move files from Base Client directory to newly created lib dir
  • Go back to Oci8
  • Try to configure (will work this time)
  • Make (will fail)
  • Patch Makefile for Oci8 (hint: Add library pathes for Oracle Client)
  • Configure (will fail, even if you patched correctly)
  • Go back to Oracle Client SDK lib dir
  • Create symlink for libclntsh.so
  • Go back to Oci8 dir
  • Make (will work, really)
  • Make install
Guys, that’s really like software installation should work in 2008. Not.

Mac and Solaris: Fix the “xterm-color” issue

Every time I connected to a Solaris machine from my Mac using ssh I ran into the dreaded “WARNING: terminal is not fully functional” problem. The reason is that the Mac sets its terminal type to “xterm-color” which isn’t known to Solaris. After fiddling with the termcap file with no success, I found the solution buried in the various tips on Phil’s site.
Just copy the xterm-color file provided by Phil (local copy) to the /usr/share/lib/terminfo/x/ directory. Done. Maybe you have to logout and login again to make it work, but that’s it.

What Java is right for you?

Intersting find today: If you’re running Solaris 10, you’re way better off using JDK 1.5.0_xx. Using JDK 1.6.0_x will result in unusual heavy loads and application crashes on Solaris 10.
However, if you’re running Linux, it’s exactly the other way round. On Linux, JDK 1.5.0_xx will consume a lot more memory than 1.6.0_x does. In fact JDK 1.5.0_xx will even consume more memory than allowed, resulting in … yep, you guessed it: heavy loads and application crashes.

Tuning the Sun: Fiddling with the TCP/IP stack

Well, it’s over one and a half years that I first posted some hints about tuning the performance of a Sun web server. Now it seems that I found what looks like the optimum settings for the machines I’m currently watching over:

tcp_conn_req_max_q               1024
tcp_conn_req_max_q0              10240
tcp_rexmit_interval_min          2000
tcp_ip_abort_interval            600000
tcp_ip_abort_cinterval           60000
tcp_keepalive_interval           3600000
tcp_time_wait_interval           30000
tcp_fin_wait_2_flush_interval    67500
tcp_smallest_anon_port           8192 

That’s mostly consistent with what Jens S. Vöckler writes on his site, just a bit more condensed.

Running Ubuntu 7.04 (Feisty Fawn) using Parallels on the Mac

As some Mac users may have already noticed, installing Feisty Fawn on the Mac using Paralles isn’t easy. But there’s a way to do it:

To give credit where credit is due, you can find an excellent tutorial here.

Quick hints:
Use “Custom options” when creating the Virtual Machine. Chose “Solaris/Other Solaris” as operating system, disable Sound and USB. When Ubuntu starts give live vga=790 as startup command. This should get you started, for the rest I suggest you read the turorial.

Need for Speed: PHP Drift

It’s no secret that PHP, while being one of the most favored programming languages on the Web, isn’t exactly a sprinter in terms of served requests per second. Thus most of the sites I know use some sort of PHP accelerator to boost their performance. Currently, there’s the choice between Zend Optimizer from the owners of PHP, eAccelerator (the artist formerly known as Turck MMCache), APC and lately Xcache.
I tested all of them over time and felt that now might be a good time for another round. Since the performance (if any) of Zend Optimizer kept underwhelming me and eAccelerator this time didn’t attract my interest, I ended up testing APC and Xcache only. Lots of work saved, so to say.
Tests were run on Solaris and Linux and both accelerators came out head to head with a slight advantage in speed for Xcache (less then 1% faster on average). However, the penalty is that Xcache (at least the current version) had some stability issues when run on Solaris and also seems to have problems when doing garbage collection. So I went for APC this time, which as I found out later also is what Sun uses in their CoolTools package. The systems are in production use now, we’ll se how it works out.

Running CoolTuner on localized Solaris

To optimize your Solaris 10 (Sparc) systems, Sun provides a nice tool called CoolTuner. However, installation of this tool will only work on default installations of Solaris 10 (Sparc) using the English language. To fix this, run the installer like this:

export LANG=”en_EN.UTF8″ ./cooltuner.shar

GCC’s internal defines displayed

While converting some tools to the Solaris platform, I stumbled across this little trick: In case you want to know what internal variables gcc defines on the current platform, just do

touch empty.c
gcc -c -E -dM empty.c

This will print a list of all the defines. Also works with g++.

Screen 4.0.2 for Solaris 10/Sparc

While looking for the screen utility I realized that it’s neither part of the GNU utilities provided by Sun nor can it be found on SunFreeware.com. Since I’m seldom right but never hesitant, I decided to build my own. Turns out that only one line in the source package has to be adapted. And since I needed to distribute it to more than one T2000 server, I also built a package that can be used with pkgadd.
I alreday submitted the package to SunFreeware.com but in the meantime you can grab it here: screen-4.0.2-sol10-sparc-local.gz