Anthony Lopez

“I’d rather see a sermon than hear one any day;”

Installing oracle 9 on rhel 5

Posted by lopeza on January 15, 2009

I had to install Oracle on a RHEL 5 and after some troubles all works good.  Be sure to review all links and verify all paths on your specific system before creating the links.

The following are the steps that I used.

  1. Add oracle user and some other stuff
    # groupadd dba
    # useradd -g dba oracle
    # cd /opt
    # mkdir oracle
    # chown oracle:dba oracle
    # cd /opt
    # ln -s path/to/jre1.6.0_11
    (Edit the Disk1/install/linux/oraparam.ini and modify JRE_LOCATION
    variable and set path to our JRE installation from Step 2.
    JRE_LOCATION=/opt/jre1.6.0_11)
  2. Kernel settings – Edit the /etc/sysctl.conf and add following lines (I decided to leave default values and did not modify any of these.  These have to be verified)
    kernel.sem = 250 32000 100 128
    kernel.shmmax = 2147483648
    kernel.shmmni = 128
    kernel.shmall = 2097152
    kernel.msgmnb = 65536
    kernel.msgmni = 2878
    fs.file-max = 65536
    net.ipv4.ip_local_port_range = 1024 65000

Note: You need execute “sysctl -p” or reboot system to apply above settings.

  1. create access list for oracle to use xwindows
    # xhost +local: oracle (with no space inbetween oracle)
  2. Check for required packages:
    rpm -q compat-db compat-gcc-34 compat-gcc-34-c++ compat-libgcc-296 compat-libstdc++-296 compat-libstdc++-33 gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers libgcc make libXp
  3. Set environment – add these to /home/oracle/.bash_profile
    ORACLE_BASE=/opt/oracle
    ORACLE_HOME=$ORACLE_BASE/920
    ORACLE_SID=ORCL
    LD_LIBRARY_PATH=$ORACLE_HOME/lib
    PATH=$PATH:$ORACLE_HOME/binexport ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH
  4. First Workaround
    su -
    cd /usr/lib
    ln -s libstdc++-3-libc6.2-2-2.10.0.so libstdc++-libc6.1-1.so.2
  5. Download and Install:
    rpm -ivh http://oss.oracle.com/projects/compat-oracle/dist/files/RedHat/compat-libcwait-2.1-1.i386.rpm
    rpm -ivh http://oss.oracle.com/projects/compat-oracle/dist/files/RedHat/compat-oracle-rhel4-1.0-5.i386.rpm -nodeps
  6. Second Workaround
    su -
    cd /usr/bin
    ln -s gcc34 gcc32
  7. Third Workaround
    su -
    cd /usr/lib
    ln -s libgdbm.so.2.0.0 libdb.so.2
  8. Run installer
    ./runInstaller
  9. When NETCA/DBCA will fail
  10. Fourth Workaround
    I suggest to apply 9.2.0.8 patchset before.
    cd $ORACLE_HOME
    rm JRE
    ln -s $ORACLE_BASE/jre/1.3.1 JRE
    cd JRE/bin
    ln -s java jre
    cd i386/native_threads/
    ln -s java jre

Posted in Oracle, RHCE | Leave a Comment »

Colombia Travels

Posted by lopeza on January 13, 2009

12/17/2008 – 12/29/2008

Arrived in Bogota and after realizing a being told to pick up our luggage for our transfer to Manizales we almost missed our flight. It seems that the staff at JFK (Avianca) tells everyone that and when you arrive in Bogota it’s clearly not the case.

Landing at Manizales was a pretty exciting experience. Since its a mountainous region the plane had to maneuver in ways I have never experienced.  We landed on a high part of the mountain and from the plane we could see all the different elevations of the land clearly and the way the roairportpickupads are built to meander through the landscape.

After settling in at the hotel we walked around and visited the mall nearest to the hotel called Cable Plaza. I had a traditional Colombian meal called lomo de res which was steak over a patty made of mashed sweet plantain.

cablemall

Later that night we headed to a lounge called Carataplan that played all types of music. I got first hand experience in Vallenato and Cumbia which is the folk music of Colombia. Vallenato literally means born in the valley and an accordion is a key instrument. Aguardiente the alcoholic drink of choice was the main item on the table the entire evening.

Tylenol and lots of water made recovery from the lounge the evening before a lot easier. Woke up at 9am and headed over to “El Centro” which is the main area of the town.  Manizales was built around El Centro, meaning the center, but as Manizales grew the area is longer geographically in the center of the town.

lacatedraldemanizalesI visited La Catedral (The Cathedral) which has a tower or pico (peak) that has views over all of Manizales. The tour gave a brief history of La Catedral and how it endured los tres incendios (three fires). The climb up the 102 meter tower was a maze of small chamber stair cases. Some of the staircases have been replaced with modern aluminum structures to ensure the safety of tourists. When we reached the top there was a tiny 1.5 foot fenced in ledge wrapped around the tower. The views were amazing.

After La Catedral tour I walked around La Plaza de Bolivar where I found many or too many Nativity scenes. I had to shake off a few pan handlers and street sales people.  The trick is to be firm and if you can use the proper phrases and accent they would leave you alone after the first attempt.  If you sound like a foreigner then they just keep coming back. What I found to work is “No gracias hermano” and keep walking. If you get the accent just right they may just thing you are Colombian and they won’t get anything from you anyway.

Since taxi’s are really cheap here I took one everywhere but I also wanted to try the public bus system.  After figuring out which one to take I got on and paid $1,200 pesos which today is about $.60 US. The buses didn’t have bells like in the US nor did the people yell parada (next stop) like they do in other hispanic countries.  On the bus ride I found a Citibank which will allow you to withdraw money with a flat 3% charge if you are a Citi customer.

Later that evening a friend that’s getting married hired a band which while playing in the street walked up to the house to serenade his fiance. It is said that this is a custom in the Colombian culture.  Friends and family were all present and after the band played the gathering continued with wine and cumbia music.

Since the night prior was pretty light I decided to visit the neighborhoods local gym. The cost was $15,000 pesos ($7.50 US) for a day pass. We had lunch at a small cafe that served a delicious meal called ajiaco which is a typical dish in Colombia consisting of a broth, cillantro, chicken or beef, and a piece of corn on the cobb.

Later on my wife went to get a manicure and pedicure in preparation for being in the wedding party and I am at the hotel relaxing and writing about my experience.

weddingroom

The wedding was very beautiful and the reception was amazing.  Located at “El Recinto del Pensamiento” or the place for thoughts, we had great views of the mountains and natural landscape.  The reception hall was a huge structure, built by hand, and made out of bamboo.

parquedelcafeThe next day the out of town wedding guests were treated to a day trip to “El Parque del Cafe” or the Coffee Park, where we spent half the day learning about the coffee process and the second have experiencing the amusement rides.  After that we went to Los Terminales or Hot springs.  These were swimming pools with natural hot water from the hot springs in the mountains.

Travel day from Manizales to Cartagena.
When we arrived at the Avianca airport terminal we were told that our bags were over the 20kg per person limit and that we had to pay for additional weight.  I was upset because after a few conversations with the sales person we were told explicitly that since we are flying international we am allowed 2 bags of 50lbs each.  After telling that to the manager and after disproving his claim that it was written on our receipt of purchase, he still wanted to charge me for the overage. I decided to call Avianca sales group to complain and ask that they have the manager waive the fee.  Since I was not planning on missing my flights my fallback was to pay the fee on my AMEX and dispute the charge.  I believe that once the manager realized that I was not settling to pay he decided to waive the fee.

Got to Las Americas and our room was not going to be ready until about 1 hour after we arrived.  So we decided to walk around and check out the hotel’s amenities.  For dinner we went out of the hotel and found a small restaurant on the beach.  The steak and fish was actually impressive considering the beach style restaurant.

The next few days and nights were spent on the beach and at night walking the town looking for cool places to eat and dance.  At the beach we were harrased for hours by the local beach vendors.  I managed to figure out some good techniques to ignore and to get them out from in front of you easily.  In the evening we went to what many in Cartagena call the most popular discotec or club, Mr. Babilla.  As usual full and half bottles of liquor is preferred, but since it was only myself and my wife I ordered a single coctails of rum and coke.  The music was mostly vallenato, regeton, merengue, and house, with a slight hint of salsa.  I would have liked a bit more salsa.

The next day we spent the entire day at the pool and went to el centro historico in the evening for desert at crepes and waffles.  Visited the supermarket to buy some coffee and some supplies for our day trip to Las Islas de Rosario and playa blanca the following day.

On the boat ride to Las Islas de Rosario and Playa Blanca we saw panoramic views of many islands that have luxurios resorts.  We visited an aquarium that was built on the shore of the island utilizing the existing water and environment.  It was a change from your typical use man built aquariums.  For lunch we had fresh tilapia, patacones, and coconut rice.  The green/blue waters were beautiful.  At playa blanca we met the owners of D and E hamocks.  The ran a business that will allow you to rent a tent or hammock and stay at Playa Blanca.  You can also eat at with them or at the local restaurants.  Most all of the fish is fresh and usually brought in from the ocean that day.  If you are backpacking this is definitely a place to stay for a day or two.  No electricity but there are bathrooms and shower stations are available.  You must travel by boat to and from cartagena.  The day trip was amazing.
Later that night we went to a restaurant at El Centro Historico that had a live band.  Juan carlos, a gentleman that we met at Playa Blanca, accepted our invitation to dinner and before we even had our appetizers we moved a few tables and started dancing.  Me with my wife and Juan Carlos with women at another table.  Soon enough the entire restaurant was over by use taking turns at the dance floor.  It was an awesome way to spend the last evening of the trip.  On the way to the taxi we heard loud music coming from this little bar called “Donde Fidel”.   Coincidently salsa was their main music genre so I was going to have a drink and may a few last dances.  Speaking with the DJ he claimed that the bar had every salsa song ever created and after looking at the books of music listings I am really close to believing him.

Colombia was great.  The lonely planet guide was a good resource but don’t forget that getting to know the local people is always the best way to understand their culture.

GOOD TRAVELS!

Posted in Travels | Leave a Comment »

Configuring Remote Desktop and port forwarding with Verizon Fios

Posted by lopeza on January 12, 2009

I got Verizon Fios today and it is a pain to configure the vendor provided router.  I finally figured out how to change the subnet from your default 192.168.1.x.  The other issue was getting RDP to work from outside the network without using a DMZ.  I found this helpful guide at http://devote.your.life.auricom.com/?p=26

Posted in General | Leave a Comment »

Samba server on RHEL 5.2 with Active Directory Authentication

Posted by lopeza on December 5, 2008

A quick and easy way.
There are probably hundreds of ways to configure so make sure to look around.

# yum install samba

Backup your original smb.conf file

# cp /etc/samba/smb.conf /etc/samba/smb.conf.orig

My smb.conf file which connects to an windows 2003 active directory

[global]
workgroup = YOURDOMAIN
netbios name = YOURHOSTNAME
server string = YOURHOSTNAME
security = ads
realm = YOURDOMAINFQDN
password server = YOURDOMAINCONTROLLER
encrypt passwords = yes

log file = /var/log/samba/%m.log
max log size = 1024
#log level = 1

name resolve order = wins hosts lmhosts bcast
client signing = Yes
server signing = Yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

local master = no
domain master = no
preferred master = dc01
wins server = dc01
dns proxy = no

#To add support for winbind, I added these lines to the global section:
winbind separator = +
winbind uid = 10000-20000
winbind gid = 10000-20000
winbind enum users = yes
winbind enum groups = yes
winbind use default domain = yes

#===Share Definitions ===
[public]
# Any authenticated user can view or download files from this share
path = /storage/public
browseable = yes
writeable = yes
guest ok = no
valid users = CLUBMOM+AD_USERSGROUP AD_USER
force group = CLUBMOM+AD_USERSGROUP
create mask = 0666
directory mask = 0777

[TESTSHARE]
# Any authenticated user can view or download files from this share
path = /PATH/TO/SHARE
browseable = yes
writeable = yes
guest ok = no
valid users = CLUBMOM+AD_USERSGROUP AS_USER
force group = CLUBMOM+AD_USERSGROUP
create mask = 0666
directory mask = 0777

Modify the /etc/nsswitch.conf file

passwd: files winbind
shadow: files
group: files winbind

Hostname lookup (to play it safe I added it directly into /etc/hosts)

192.168.x.xxx HOSTNAME.YOURDOMAIN HOSTNAME

Add the realm to /etc/krb5.conf
YOURDOMAIN = {
kdc = YOURDOMAIN.CONTROLLER
kdc = YOURSECONDDOMAIN.CONTROLLER
}

These next commands get you started

service smb restart
service winbind restart
net ads join -U Administrator
kinit Administrator@YOURDOMAIN
service smb restart
service winbind restart

Remember to restart smb and winbind every time you modify smb.conf.

Posted in RHCE | Tagged: , | Leave a Comment »

How do I determine whether the number of open files is exceeding the limit set in the kernel?

Posted by lopeza on December 2, 2008

First place I thought of looking is lsof, but quickly I realized that the result may not be accurate.

# lsof -n | wc -l
3233 

A better way to find the value would be to use

# cat /proc/sys/fs/file-nr | awk '{print $1-$2}'
3060

If you wanted to list and change your values

# cat /proc/sys/fs/file-max
767479
# echo "104854" > /proc/sys/fs/file-max

 

# cat /proc/sys/fs/file-nr
2550     0       767479
|	 |       |
|	 |       |
|        |       maximum open file descriptors
|        total free allocated file descriptors
total allocated file descriptors
(the number of file descriptors allocated since boot)

The number of open file descriptors is column 1 – column 2; (Note: we have read contradictory definitions of the second column in newsgroups. Some people say it is the number of used allocated file descriptors – just the opposite of what we’ve stated here. Luckily, we can prove that the second number is free descriptors. Just launch an xterm or any new process and watch the second number go down.)

Posted in RHCE | Leave a Comment »

Getting rid of the performance review.

Posted by lopeza on November 16, 2008

I was reading an article in the Wall Street Journal and thought this was interesting to post.  As review time comes around for many companies and employees are trying to figure out what will happen with regard to employement status, compensation, and goals this was an interesting topic to think about.

an excerpt from the full article.

“[Why to get rid of the performance review] Let’s start with an obvious reason: The mind-sets held by the two participants in a performance review work at cross-purposes. The boss wants to discuss where performance needs to be improved, while the subordinate is focused on such small issues as compensation, job progression and career advancement. The boss is thinking about missed opportunities, skill limitations and relationships that could use enhancing, while the subordinate wants to put a best foot forward believing he or she is negotiating pay. All of this puts the participants at odds, talking past each other. At best, the discussion accomplishes nothing. More likely, it creates tensions that carry over to their everyday relationships.”

full article

Posted in General | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.