MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Archive for the ‘Oracle Linux’ Category

Set up Gnome for Oracle

with 6 comments

Back in September, I showed how to setup Oracle Database 11g XE on Fedora. It was straightforward more or less, but tonight I ran into a problem while working with the Oracle Stop Database menu option. When I selected it form the menu, I got the user must be in the DBA OS group to stop the database.

Since the database started automatically on boot and shutdown when closing the operating system, I missed this nuance in the setup. The screen shot for the error is:

Oracle Database 11g XE automatically creates an oracle user with a dba group. While the mclaughlinm user was in the wheel group and an authorized sudoer, the mclaughlinm user needed to also be in the dba group. That’s more tricky in Fedora 15 and 16 because they’ve removed the System menu and the options that let you install and modify users.

Here are the steps to add your user to the dba group. Open a terminal session, and launch the User Manager application with the following command:

system-config-users

You have to enter the root password to get this to work. Then, it launches the User Manager application. Click on the target user, and click the Properties button.

The User Manager application launches the User Properties dialog. Click on the Groups tab.

Scroll in the groups list to the dba group. Click the checkbox for the dba group and the OK button.

Now, you’ll be able to navigate to through the menu to Stop Database to shutdown and Start Database to restart the Oracle database.

Hope this helps a few folks.

Written by maclochlainn

December 3rd, 2011 at 11:15 pm

Oracle Linux & VMWare Tools

without comments

Wow, I’ve been busy since OOW2011. This is the first post since I left for San Francisco. My Android phone got blown out by a forced upgrade and would only charge when actively connected across the USB to the computer. At the conference, my laptop was sidelined as a charger.

Anyway, I’m back working on virtual environments again. I found a couple slight variation installing VMWare Tools on Oracle Unbreakable Linux. Here are the post installation steps that I encountered, and the IP addresses are based on how VMWare configured DHCP, which is qualified in this older post.

  1. Navigate to the VMWare Menu, choose Virtual Machine and in the drop down menu Install VMWare Tools. This will mount a virtual CD in the Oracle Unbreakable Linux virtual machine and it launches the following dialog box:

  1. Open a terminal session by right clicking anywhere in the desktop, and then choose Open in Terminal from the context menu. You can then run the VMWare Toolkit by following these instructions:
cd /media/VMware\ Tools
cp VMwareTools-8.4.7-416484.tar.gz /tmp
cd /tmp
gunzip VMwareTools-8.4.7-416484.tar.gz
tar -xvf VMwareTools-8.4.7-416484.tar
cd vmware-tools-distrib
sudo ./vmware-install.pl

The last step requires that you reply to a set of prompts. If you’d like to accept the default at one time, you can use the following command:

sudo ./vmware-install.pl --default

You should most likely encounter an error like the following, which it appears you can ignore. If I find anything to the contrary, the post will be updated with findings.

(EE) Failed to load module "vmwgfx" (module does not exist, 0)
(EE) vmware: Please ignore the above warnings about not being able to load module/driver vmwgfx
(EE) open /dev/fb0: No such device
  1. In the terminal session you should configure three files to make sure your networking works. I found that the dialogs failed to set one key element, so it’s simply easier to do this manually. Rather than using sudo, you should open a root shell by doing:
su - root

Enter your user’s password:

Password:

You should use vi to edit and save the resolv.conf file with appropriate domain, search, and nameserver values. The values below work for VMWare when the gateway IP address is 172.16.123.2.

# Generated by NetworkManager
domain localdomain
search localdomain
nameserver 172.16.123.2

Using vi, edit the /etc/sysconfig/network file to include an appropriate gateway IP address, like so:

NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=172.16.123.2

The last file to fix is /etc/sysconfig/network-scripts/ifcfg-eth0 file. This is the file that isn’t completely configured by the GUI component (it fails set the ONBOOT value to yes).

DEVICE=eth0
HWADDR=00:0c:29:31:ef:46
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=dhcp
TYPE=Ethernet
DNS1=172.16.123.2
USERCTL=no
PEERDNS=yes
IPV6INIT=no

You reset networking with the following command:

/etc/rc.d/init.d/network restart

As always, I hope this helps a few folks.

Written by maclochlainn

October 19th, 2011 at 11:49 pm

Posted in Oracle Linux,VMWare

Adding user to sudoers

with one comment

Somebody asked why adding a user to the wheel group in Oracle Enterprise Linux didn’t enable them as a sudoer, as qualified in my earlier Fedora post. The reason is that you also need to modify the /etc/sudoers file to specify users allowed that privilege (and the file differs from it’s Fedora cousin). If you have the root user privileges, you can do the following:

  1. Change to the root user account with su, and provide the password when prompted. The syntax is:
su - root
  1. You can find the line you need to change with this command:
cat /etc/sudoers | grep %wheel

You should see the following two lines. If you want authorized sudoers to provide a password (recommended), then modify the first line by removing the # comment. If you don’t want authorized sudoers to provide a password, modify the second line by removing the # comment. Open the /etc/sudoers file with vi or gedit if you’d like a GUI editor.

# %wheel     ALL=(ALL)      ALL
# %wheel     ALL=(ALL)      NOPASSWD: ALL

Hope this helps, I’m off to Oracle Open World 2011 tomorrow.

Quick update for Fedora 20, you su to root and add your user to the sudoers list with the following syntax:

usermod someusername -a -G wheel

By the way, don’t forget to log off and then back on to the account.

Written by maclochlainn

October 1st, 2011 at 8:22 pm

Posted in Linux,Oracle Linux