Renewing Secure Certificates in Oracle Application Server

After having to do this several times in the past few weeks I have updated my directions on managing secure certificates in OAS to include importing a renewed OAS certificate.

application administration, oas, oracle application server, sysadmin, system administration, oracle

DNS Report

After having some DNS problems of his own, Casey over at MaisonBisson.com points out a great DNS examination tool.

DNSReport.com is nice tool for verifying your sites DNS records. It’s nothing fancy, but similar to Internet Traffic Report could be indispensable for troubleshooting website problems.

dns, internet, network, network administration, troubleshooting, networking

How Big Is That UNIX Directory?

Need to know how much space a directory and its contents are taking up on your UNIX system? Here’s what I use:

du -ks directory

The du command is used to summarize disk usage. Without any flags will show you the usage in blocks for every directory and subdirectory specified. Since the number of blocks varies by operating system we add the -k option to specify that we want the output in kilobytes. In many operating systems you could also use -h for a “human-readable” output with abbreviations like B for bytes, K for kilobytes, M for megabytes and so on.

The -s option lets us gather only the sum of the directory specified. Without the -s flag we would get output on every subdirectory as well as the specified directory.

$ du -k stuff
408560 stuff/patch
104 stuff/scripts
408688 stuff

One other thing that is useful for finding the biggest files and directories where there are a lot to sift through is to use a wildcard to size up multiple directories, then pipe the output of du to the sort command like this:

$ du -ks ./* | sort -n
0 ./sdtvolcheck727
8 ./mpztaWqc
8 ./speckeysd.lock
304 ./dtdbcache_:0
408688 ./stuff

With sort we use the -n option to order things by arithmetic value rather than alphabetic value (making 8 come before 304) so we see the largest things at the bottom.

Try it out. As always check the man pages for more info.

Easy Linux CommandsFor more tips like this check out my book Easy Linux Commands, only $19.95 from Rampant TechPress.

unix, solaris, linux, sysadmin, system administration, storage, storage administration

Getting Started with the Sun Fire T2000

SunFireT2000After receiving my try-and-buy Sun Fire T2000 over a week ago it’s finally up and running. While we have yet to hit it with much of a load, here are some thoughts on the out-of-box experience:

Before even powering up there are a couple interesting observations about the system. The first is the lack of power button, switch, or key. In fact there is only one button on the system and that is an indicator button which just flashes an LED on both the front and back of the system to make it easier to locate (a nice feature, by the way.) You’ll quickly find the hot-swappable dual power supply and fan compartment. The adventurous will find and the big button on top of the system which allows you to gain access to RAM and other non-hot-swappable components.

All of these compartments and components are accessible without the need for tools. The hard drives are on hot-swappable sleds which pop out the front of the box. The hard drives are small (2.5″ I believe) allowing room for 4 bays in the front and still affording enough space for ventilation. I was somewhat surprised to find laptop-style drives in a Sun server, but I guess I can’t come up with any reason not to.

After giving the hardware a good once-over it was time to get the T2000 up and running. I have to say Sun came up a little short on the out-of-box experience at this point. I’m comfortable with, even partial to the absence of on-board video on a server, and Sun has chosen to include serial via RJ-45 on the T2000. Sun was on the right track including two cables appropriately shielded for use with this port, but neglected to include an adapter to go to the 9 pin serial we all have on the back of our PCs.

After rummaging around for the proper adapter to hook the T2000 to an old laptop we plugged it in. The system is surprisingly (read obnoxiously) loud, but hey, it’s a server not a desktop. After a few minutes of the regular hardware diagnostics stuff the system came up to an sc> prompt.

This is where those who are not familiar with Sun’s newer hardware will come to a complete stop. The only documentation included with the system is the Sun Fire T2000 Server Getting Started Guide and that does little more than tell you what the different lights mean and where you can find more documentation online. If you get online and grab the Sun Fire T2000 Server Installation Guide this will walk you through dealing with the SC serial management port. In my opinion Sun should have included this one in hard copy with the system as well.

After a couple more steps things start to feel familiar and the rest of the setup is much like the Solaris 7, 8, and 9 installs I’m used to. With just a few extra steps here you can (and I’d recommend) configure the SC Network Management port which will allow you the same functionality as the SC Serial Management port without the need for the serial cable and adapter. You will need an extra network drop and IP address to use network management, but then you’ll be able to telnet to it for administrative functions. Of course in a production environment you’d want this behind a firewall or on a private subnet.

Other than that the system seems quick. Our next step is to get Oracle on the system and throw some queries at it. I’ll share more as soon as we get some results.

UPDATE: I have now had the chance to test drive some Oracle jobs on this system. Check out my findings here.

database, database administration, database administrator, dba, dbms, rdbms, solaris, sun, sunfire, sysadmin, system administration, systems administration, t2000, try and buy, unix, oracle

Secure Certificate Management in Oracle Application Server

Here’s my cliff notes directions for managing secure certificates using Oracle Wallet Manager. These directions were written for Oracle Application Server 10g(9.0.4) and my not work right with other versions. As always, don’t do it if you don’t understand it.

NOTE: When you generate a certificate request within a wallet you must then import the certificate into the EXACT SAME WALLET! So it is important to not forget the path, or password to the wallet, but also a copy can be made of the wallet by copying the ewallet.p12 and cwallet.sso files from the path where you saved the wallet to another directory.

Generate a certificate request:

  1. On the system you want to display the wallet manager on run
    xhost +serverhostname.
  2. ssh to the system the cert is for.
  3. Export the display to somewhere you can view it
    DISPLAY=localhostname:0.0; export DISPLAY
  4. Start Oracle Wallet Manager from $ORACLE_HOME/bin (should be in the path)
    owm
  5. Select New from the Wallet menu.
  6. Answer No to creating the default location.
  7. Give the wallet a secure password and select OK.
  8. Answer Yes to create a certificate request.
  9. Enter the following information to generate the request. If you’re not sure about some of this info, check with someone at your site who has done cert requests before. It is important that it is all accurate.

  10. Common Name: The fully qualified domain name (e.g. gimli.plymouth.edu)
    Organizational Unit: Typically a department name (e.g. Information Technology Services)
    Organization Name: Your organizations official name (e.g. Plymouth State University)
    Locality/City: Plymouth
    State/Provence: New Hampshire
    Country: United States
    Key Size: (1024 is OK, 2048 is better)

  11. Click OK once these values are all correct.
  12. Click OK in the “Please submit” dialogue.
  13. Select Auto Login from the Wallet menu.
  14. Select Save from the Wallet menu and save the wallet to a safe, non-public directory on your server (being careful not to overwrite another wallet.)
  15. Click on the certificate request in the wallet tree then select Export Certificate Request from the Operations menu and export the request to a file.
  16. Send the certificate request file to the certificate authority to obtain a user certificate.

Importing a Certificate:

  1. Follow the instructions above to connect to the server and export the display.
  2. Transfer the certificate you received from your certificate authority to the server.
  3. Open Oracle Wallet Manager and open the wallet the cert request was created from.
  4. Select Import User Certificate from the Operations menu. DO NOT import the certificate as a trusted certificate.
  5. Select Import Certificate From File and then select the file containing the certificate.
  6. If you are prompted to import the CA certificate, select Yes and follow these steps to get the CA cert:
    1. On a Windows box, rename the certificate to have a .cer extention (which should change the icon.)
    2. Double click on the certificate and select the Certification Path tab.
    3. Select the highest level of the certification path (e.g. Thawte Premium Server CA) and click View Certificate.
    4. Select the Details tab and click Copy to File…
    5. Follow the directions on screen to export the CA certificate as a Base-64 Certificate.
    6. Once exported, copy the CA certificate to the host the wallet is on.
    7. In the Import Trusted Certificate dialogue box, choose Select a file that contains the certificate and click OK.
    8. Select the CA Cert file you have just uploaded and click OK.
  7. The certificate should now have the word Ready next to it. That indicates the certificate is ready to use.
  8. Confirm that Auto Login is checked in the Wallet menu.
  9. Save the wallet by choosing Save from the Wallet menu.
  10. Exit the wallet manager.

From here you’ll have to follow the instructions in the Oracle HTTP Server Administration Guide to complete the SSL setup.

Importing a Renewed Certificate

These directions are for when your certificate authority has renewed your cert based on your previous request.

  1. Follow the instructions above to connect to the server and export the display.
  2. Transfer the certificate you received from your certificate authority to the server.
  3. Open Oracle Wallet Manager and open the wallet the cert request was created from.
  4. Click on the existing certificate, select Remove User Certificate from the Operations menu and click Yes to confirm.
  5. Click on the certificate (now in [Requested] status) from the wallet and select Import User Certificate from the Operations menu.
  6. Select Import Certificate From File and then select the file containing the certificate.
  7. The certificate should now have the word Ready next to it. That indicates the certificate is ready to use.
  8. Confirm that Auto Login is checked in the Wallet menu.
  9. Save the wallet by choosing Save from the Wallet menu.
  10. Exit the wallet manager.

oracle, oracle application server, oas, application administration, system administration, sysadmin