ORACLENERD twitter/oraclenerd view chet justice's profile on LinkedIn feed oraclenerd t-shirts Unemployment Clock:

  Ubuntu and Cisco VPN
As a consultant I often have to VPN into a client's network and do some work. Up until today, I wasn't aware of a Cisco client for Ubuntu (9.10), so I would fire up my Windows Vista Ultimate VM, install Cisco and log in.

Only Windows Vista Ultimate doesn't play very nicely with the older versions of the Cisco VPN client (pre 5.0). Naturally (stop laughing), I found my old version of Windows XP, booted it up, installed Cisco and connected. Fun huh? It's amazing how resourceful we can be sometimes...

I had to deal with this because I "lost" my Windows image today. By lost I mean I couldn't recover it. I'm still not sure what happened, but it was some kind of invalid or incomplete multibyte or wide character error. The image just disappeared. I tried changing my LANG variable to en_US, but that didn't seem to do any good. I'm not really sure what happened.

Anyway, I found vpnc and began to try and connect. That's no easy task for the likes of me (as you well know).

Just running vpnc, I was prompted for the following:
chet@cdj-laptop:~$ vpnc
Enter IPSec gateway address: vpn.oraclenerd.com
Enter IPSec ID for vpn.oraclenerd.com: something
Enter IPSec secret for something@vpn.oraclenerd.com:
Enter username for vpn.oraclenerd.com: chet
Enter password for chet@vpn.oraclenerd.com:
vpnc: unknown host `vpn.oraclenerd.com'
I guessed at the first 2, username and password are no brainers...even for me.

So I looked at the help file.

OK.

gateway? that's vpn.oraclenerd.com
id? defined as your group name. I opened up the connection properties of the Cisco client and found the group name, NERDVPN

and then in the help file there are 2 options for the group password, one in clear text and one obfuscated...but it said "config file only"
  (configfile only option) 
your group password (cleartext)
conf-variable: IPSec secret

(configfile only option)
your group password (obfuscated)
conf-variable: IPSec obfuscated secret
So I created a file .vpnconfig and put it in the root directory (I was just testing). Here are the contents:
IPSec gateway vpn.oraclenerd.com
IPSec ID NERDVPN
IPSec obfuscated secret ASDFLKJUW3ROUOIUALKJQAEWROIR3379273AFJI;LKQJ3E
Xauth username chet
Then I ran
root@cdj-laptop:/home/chet# vpnc /.vpnconfig
Enter password for chet@vpn.oraclenerd.com:
VPNC started in background (pid: 3702)...
Voila! I'm connected. Time to do some work.

Note that I did this as root. I'm still figuring out the security aspects of Linux so I'll leave that part up to you. I'd rather not advise you to
chmod ugo+rwx / -R
many of you would be very angry with me for suggesting such a thing...

Labels: , ,

 
  OEL, VirtualBox and Shared Folders
Inspired by Jake's difficulty with getting Virtual Box's Shared Folders to work with Oracle Enterprise Linux (OEL), I'm writing it up...I'm sure he's not the only one with problems.

Most awesomely, he had members of the Sun VirtualBox team commenting on his post.

It's funny, I just got this working a couple of weeks ago. I would typically go his route, get the guest machine working and then download the software from there. Since I have limited space, I tend to create smaller VMs, usually around 10GB or 15GB for database servers. These are sandboxes, a way for me to learn certain aspects of the database (as well as installation).

So here we go. I'm assuming you have your VM running. First, go to Devices:



Next, choose Shared Folders



You should then see this window



Click on the little icon in the top right corner



You'll then be asked to choose a directory (on your host machine)



I chose /opt/software



Name it something you'll remember, like "software" and check the "Make Permanent" check box:



Back to the Shared Folder screen and it should look like this



Go ahead and select "Ok"

Now, open up a terminal and login as root:
[oracle@localhost ~]$ su root
Password:
[root@localhost oracle]# /sbin/lsmod | grep vbox*
vboxvfs 47776 0
vboxadd 70144 5 vboxvfs
I'm just checking to see if the VirtualBox shared folder module was loaded into memory. Sometimes it's not and I found the solution here. Never in a million years would I have thought to check to see if the module was loaded into memory. In fact, I have no idea what a module is.

If you do the lsmod | grep vbox* trick and find that vboxvfs is not loaded into memory, follow the steps included on the link. OK, I won't make you do that.
[root@localhost oracle]# /sbin/modprobe vboxvfs
That should load it. If you get a "file not found" type of error (I can't remember the exact error), you'll probably need to reload the guest additions. If you used the "x11" switch, don't use it this time.

Finally, you can do this
[root@localhost oracle]# ls /mnt
software
[root@localhost oracle]# mount -t vboxsf software /mnt/software
[root@localhost oracle]# cd /mnt/software
[root@localhost software]# ls -l
total 12
drwxr-xr-x 1 root root 4096 Dec 7 17:21 method_r
drwxr-xr-x 1 root root 4096 Dec 7 17:19 oracle
drwxr-xr-x 1 root root 4096 Nov 24 12:34 other
And voila! You now have shared folders.

One last point, if you try to add this to your mount file, it won't work, watching OEL boot-up, it seems the VirtualBox components are loaded after any drives are mounted. I'm sure there is a way to change this...but it's outside my realm.

Labels: , , ,

 
  OpenOffice Writer: AutoComplete?
Now that I'm using Ubuntu, I'm also using OpenOffice.

However, I like Google Docs quite a bit so I've used OpenOffice sparingly.

I've had trouble with Google Docs though; the Download as Word bastardizes the document. Looks great as a pdf, not so much as a Word document. The reason for creating a Word document is for recruiters, they all seem to have some sort of application that parses the Word document and fills in your employment history and such. This would be a great place for XML and some sort of standard wouldn't it?

Anyway, in OpenOffice Writer, I type in:
November 2009
which Writer immediately turns into
11/01/09
No! Stop it!
I tried turning AutoComplete off:
Tools --> AutoCorrect
and disabling everything I can find...try again. Same result.

Reading this thread, I begin to wonder if it's like Excel...you know, you enter a date and it automatically puts it into the default date format.

Sure enough, right click on the column, select "Character" and voila! No more transformation.

Labels: , ,

 
  /etc/fstab help!
Most of you know I'm a Linux n00b. I have no apologies for that...at least I'm trying right?

I unsucessfully attempted to install Oracle on Jaunty Jackalope (9.04) so I decided to use VirtualBox and Oracle Enterprise Linux. I'd successfully created a Windows Vista Ultimate virtual machine, off to try my second.




I chose fixed size storage:


Then select the folder where I wanted it to reside:


Location and size:


And the summary:


And received this:


At first, I began to search for problems with VirtualBox. I tried created a smaller disk, 2.0 GB, and it worked. So I knew I had a space issue (well, I think I knew).

So, fdisk to view the available partitions (as root):
root@cdj-laptop:/# fdisk -l
root@cdj-laptop:/#
So I did it as myself:
chet@cdj-laptop:/# fdisk -l
chet@cdj-laptop:/#
Using sudo:
chet@cdj-laptop:/# sudo fdisk -l
root@cdj-laptop:/#
So I installed GParted, and tried using that Partition Editor to see what was available:


WTF?

So I've tried search on "ubuntu fdisk nothing" and get nothing. So I'm asking you fine folks...either help me out or point me to the manual (RTFM!). Links are helpful. Answers are the most helpful. Something. I don't want to reinstall again but will if I have to.

Probably helpful to everyone is the contents of my /etc/fstab file as well:


Thank you and have a nice day.

Labels:

 
  Ubuntu: The Jaunty Jackalope
I think I'm manic or something. Perhaps it was just saying it out loud finally. Or maybe it was just that time of...well, you know where I was going with that.

Though it is 2 AM EST...still can't sleep.

So I finally made the jump from Windows to Linux. I had been using the dual boot option since January. We (read: I) had to get a new computer because my 7 year old Dell 4300 wasn't quite cutting it anymore. Last year I bought I nice Dell XPS with 3 GB of memory...I could use that one. So I went searching for a laptop for wifey. I now "own" the XPS so I can actually run Oracle and other such memory intensive software.

At COLLABORATE 09, I didn't use Windows at all. Ubuntu seemed to boot quicker and I wanted to be cool at the conference. :)

The last couple of weeks I finally got around to removing Windows completely. Since I purchased Vista Ultimate, I wanted to keep some of the cool Media Center functionality (that I never use) because I paid for. I'm convinced now there is a Linux derivative. If I needed it, I could just run it in VirtualBox or some other virtual machine right? Right.

When I first booted up Windows Vista Ultimate, I checked memory consumption and it was a tad over 1 GB. Really? I haven't even installed my virus stuff yet (avast!). Thankfully I got 3 GB of it.

What's the point of all this?


And here's a snapshot of the resources consumed:



Eight percent? Nice. Now I just have to figure out how to install Oracle (the Database) and all is right in the world.

Labels:

 
  Oracle XE on Ubuntu Intrepid Ibex - Part II
Last night I tried to install Oracle XE on my new Ubuntu Intrepid Ibex installation (Machine 3), but it failed due to lack of swap memory. Thankfully, cdman was reading and offered up this page in the Ubuntu documentation.

I followed the instructions there, only adding 1024 instead of 512 Mb. Reboot. Rerun the package installer (still not command line...) and voila!

From oraclenerd

Following those instructions, opened up a terminal:
chet@ubuntu:/etc$ sudo init.d/oracle-xe configure

Oracle Database 10g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 10g Express
Edition. The following questions will determine whether the database should
be starting upon system boot, the ports it will use, and the passwords that
will be used for database accounts. Press to accept the defaults.
Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application Express [8080]:8080

Specify a port that will be used for the database listener [1521]:1521

Specify a password to be used for database accounts. Note that the same
password will be used for SYS and SYSTEM. Oracle recommends the use of
different passwords for each database account. This can be done after
initial configuration:
Confirm the password:

Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:n

Starting Oracle Net Listener...Done
Configuring Database...Done
Starting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.
To access the Database Home Page go to "http://127.0.0.1:8080/apex"
That took about 10 minutes because it's an old underpowered machine, but I'm not worried about that now.

Open up SQL*Plus (via GUI...like I said, I'll get there) and login as sys:
SQL> conn / as sysdba
ERROR:
ORA-01031: insufficient privileges
Wait, I'm not logged in as root. OK, try again:
SQL> conn sys/testing as sysdba
Connected.
Nice. Once I can figure out how to launch SQL*Plus (cdman, no hints!) from the command line I should be able to use the "conn / as sysdba" syntax by using sudo. So I'm in.
SQL> SELECT * FROM DUAL;

DUM
---
X

SQL> CREATE USER cjustice IDENTIFIED BY testing
2 DEFAULT TABLESPACE users
3 QUOTA UNLIMITED ON users;

User created.

SQL> GRANT DBA TO cjustice;

Grant succeeded.

SQL> conn cjustice/testing
Connected.
SQL> CREATE TABLE t
2 AS
3 SELECT 'BOLLOCKS' t, rownum id
4 FROM dual
5 CONNECT BY LEVEL <= 1000;

Table created.
A couple of quick tasks and all seems to be well.

Let's check out the website:

From oraclenerd
WTF?

Probably something in the etc/hosts file that I need to update. I'll leave that for Part III.

Labels: , , ,

 
  Oracle XE on Ubuntu Intrepid Ibex - Part I
No, I didn't read any guides on how to do this or anything, I just downloaded the .deb file and tried to install via the GUI tools (I'll get to the command line stuff eventually). I just wanted to see if it was possible out of the box with no intervention whatsoever.

From oraclenerd

I have no doubt I can do this on Machine 4, I'll try that as soon as I can figure out how to remote into that computer (It's a laptop and I prefer the 20 inch monitor...and I'm lazy).

Labels: , , ,

 
  Ubuntu Installation Update
I finally managed to seriously try a non-windows OS recently.

To update, I have installed it on 4 machines at home. They are all still in dual-boot mode as I haven't completely figured out how to get rid of Windows without screwing everything up, but 2 of the 4 now default to Ubuntu. It's progress right?

Machine 1:
Dual Xeon Pentium 3 Processor with a speed of 1.6 Mhz (is that right?), 512 MB Ram. It's an old Dell Dimension 530 workstation that I bought on EBay. After installation I quickly realized that the graphics card (Diamond FireGL2) was incompatible. Joy. So I'm currently debating whether to get a newer, compatible graphics card.

Machine 2:
IBM Thinkpad (can't retrieve the specs at the moment). 256 MB Ram. This is my son's computer (he's 6) and the initial inspiration. It was old, had the remnants of corporate security on it, and was a perfect test subject for my trials.

I still haven't been able to get the internal wireless card working (Intersil Prism 2.5), but I did have an old Linksys PCI card lying around, so there is internet access. Tonight I was trying to diagnose the reason for no sound and apparently messed something else up in the process (hopefully I'll learn something from all of this). The latest error on restart was of the GDM variety, though I can't recall it specifically.

Machine 3:
Dell Inspiron 4300. P3, 1.8 Mhz. 512 MB Ram.
This has been my work-horse for the past 7 years. Over the last 2 or 3 though, I've used it mainly to work remotely. In the beginning, I had JDeveloper (9 I believe) and Oracle 9i Server running on it at the same time. That was painful. Overall it seems to run just fine with Ubuntu. Though I probably won't be doing any performance testing (Oracle) with it soon.

From oraclenerd

Machine 4:
Dell XPS, T5350 (I think) Dual Core Processor. 3 GB Ram.
This is my main "work" computer and has Windows Vista installed on it. I installed Ubuntu (dual, default is still Windows as it's shared) last week. Downloaded JDeveloper 11i (.bin file) and managed to install it successfully (w00t!). Next up I want to install Oracle 11g Server using this post as a guide (thanks Mr. Norris).

Performance on this machine rocks. Vista out of the box took up 1 GB of Ram. Ubuntu is running at about 400 MB. I have had no problems on this machine and look forward to learning more here...

From oraclenerd

And if you've got any resources you can link up for me, please do.

Labels: , ,

 
  Fun With Linux
I write this from my first successful Linux installation, Ubuntu Intrepid Ibex. It started innocently enough after reading this tweet.
Is a bad that I uninstalled Internet Explorer from all my family members pcs in the last 2 weeks and replace d it with firefox.
It's fairly innocuous, but it got me thinking about installing some flavor of Linux on my son's old laptop running XP Pro. Maybe it was the sneaky factor?

So last Saturday I went to Wal-Mart and bought an 8 GB San Cruzer flash drive, downloaded the ISO image from ubuntu.com, unzipped it and put the files on the flash drive. Plugged in the flash drive to my son's computer and waited like 20 minutes for it to boot up. It's an old laptop with 256 MB Ram, and I'm not sure what the processor is...but it's slow.

When it finally did come up, I tried clicking on the Install icon on the desktop and it just sat there...for hours...and hours. Finally coming up with some gnome applet error. By the way, the scenery is quite nice:

From oraclenerd


So I sat there for the next 24 hours trying to figure this thing out. Finally, I just installed it from the wubi.exe file supplied in the ISO via Windows. Weird thing about that is it went out to the 'tubes to get the files when it had them right there. Oh well.

Installation went swimmingly. Had Ubuntu running just fine, a bit better than Windows ran on that machine. The update manager told me I needed had updates so I started that process. As I sat around I started to look around (very dangerous). I'm not much of an OS guru, I know enough to get by and that's it. So I'm looking at the files that I left on the system and decided to start removing them. Windows folder? Bah, don't need that. Trash. NTDETECT.com? Trash. boot.ini? Trash. The only folder I did leave was Ubuntu and Documents and Settings (for the saved files). After the update manager completed I needed to restart, so I did.

Can't Load Operating System or some such nonsense. What? I just installed Ubuntu! Effing Linux! Can't these people get it straight? No wonder no one uses it!

Naturally, I'm an idiot.

Had it running on Sunday night and Monday when it came time for my son to get on the computer (after school), it was broken. I received a few irate IMs from the wifey in that regard. Ugh.

Found the XP recovery disk that night and tried to update the boot.ini and NTDETECT files (among others) to no avail. Began re-installation of Windows. Joy. Maybe I learned my lesson this time?

I decided to install Ubuntu on my old machine at home too. That was cut short because I had a very old Graphics card (Diamond FireGL2) that didn't work with Ubuntu. Perhaps I should get a newer graphics card?

In the meantime, I decided to install it on a 3rd machine, my other old box. This has been my mainstay for the last 7 years (yikes). Dell 4300, Pentium IV, 512 MB Ram. There are two disks on this machine, the first of which has 2 partitions, one for the OS and one for Data.

I successfully install it, reboot and am then prompted with a GRUB prompt? WTF? I can't remember the details as it all seemed to happen so quickly. Messing around there I played with the HIDE/UNHIDE commands, MAKEACTIVE, etc. Reboot. Error Loading Operating System. WTF? Come on!

XP Recovery Disk to the rescue. Getting to the command line I quickly noticed F:\WINDOWS. F? How'd that happen? Oh wait...HIDE...MAKEACTIVE...great. Spent the next few hours trying to replace the boot.ini file, but it wasn't recognizing the partition so it didn't matter. I finally just decided to delete the OS partition and re-install Windows.

Finally, finally, here I am. Ubuntu installed on son's computer, check. Ubuntu installed on my (first) old computer, check (still need graphics card). Ubuntu installed on my (second) old computer, check.

I decided not to delete any windows system files this time.

Next up, I need to figure out how, on restart, to have Ubuntu the default in OS selection.

Labels: , , ,

 


Guest Authors

How To

Popular

Previous Posts

Code Projects

Archives
August 2007 / September 2007 / October 2007 / November 2007 / December 2007 / January 2008 / February 2008 / March 2008 / April 2008 / May 2008 / June 2008 / July 2008 / August 2008 / September 2008 / October 2008 / November 2008 / December 2008 / January 2009 / February 2009 / March 2009 / April 2009 / May 2009 / June 2009 / July 2009 / August 2009 / September 2009 / October 2009 / November 2009 / December 2009 / January 2010 / February 2010 / March 2010 /


Aggregated by OraNA