Showing posts with label Red Hat. Show all posts
Showing posts with label Red Hat. Show all posts

Thursday, March 22, 2012

Quick Configurations Make For Trouble

I'm a few days behind in my studies for the RHCSA. I've scheduled the exam which has the added effect of pressure to be done within a certain time frame even though, I can of course, reschedule. Who wants to do that though!

For labbing I enabled X11 over SSH and am running GUI tools like virt-manager and system-config-firewall (iptables shell commands changed with RHEL 6 and I'm working on gotten it all sorted out) while not at home. Even at home though, I connect via VNC from my Mac Pro to the VM server.


The VM server built with Scientific Linux 6 and Tigervnc (quasi Xvnc)  is their default VNC server from their SL repo. So, it is what I went with to get things up quickly.

[root@shuttlehosti ~]# yum search vnc server
...
tigervnc-server.x86_64 : A TigerVNC server
...
[root@shuttlehosti ~]# yum install tigervnc-server.x86_64
Done.

Ok, I installed, configured it under my user account, according to this post from server-world.info. Then checked to see if it was persistent through reboots and it wasn't. That's fine. I only wanted my user account to be able to have access, I wrote a super simple bash script and dropped it in my .bashrc file.

[root@shuttlehosti ~]# less /home/kim/vnc-start.sh

#!/bin/bash

vncserver :1 -geometry 1280x1024 -depth 24
/home/kim/vnc-start.sh (END)

...
[root@shuttlehosti ~]# less /home/kim/.bashrc

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions
/home/kim/vnc-start.sh
/home/kim/.bashrc (END)

Each time I log in to the machine it launches the vnc service for display :1 and fails out if display :1 is already open. Great until I have more time to focus on shell scripting. 

Yesterday, I started having issues with the VNC server and my connection attempts were getting refused. I would log out or reboot and try the connection and get be refused. Ok, disable IPtables, SELinux and try it again. Still nothing. Even running "vncserver -kill :1" didn't stop the process or allow me to log in.

So, whats the vnc process up to?  I do a

[root@shuttlehosti ~]#ps -efH | grep vnc
qemu      7458     1  0 Mar08 ?        00:01:28   /usr/libexec/qemu-kvm ...

 There are three processes just like that. Hmm 3 VMs up and running. Which means each VM  takes up a single vnc display when up and running. Curious. I checked out the VNC command options and came up with:

[kim@shuttlehosti ~]$ vncserver -list

TigerVNC server sessions:

X DISPLAY #     PROCESS ID
:2              5931
:1              4007
:3              4206
[kim@shuttlehosti ~]$

The processes correspond to the VM processes noted in the ps command. Jeez. Ok, I shutdown the VMs, kill off the vnc process if any are left, relaunch the vnc process under my user account, and it works like a charm.

The moral of the story? Don't rush through Linux technologies when you need to " to get things up quickly."

So, RHCSA studies can resume. After the exam I would like to figure out how to write a shell script to check for the next available vnc display and to open a IPtables port to allow for connection.

Tuesday, February 28, 2012

Switching Gears.

I finished a one term class today, 12 weeks early. I planned it that way and with the leap year, I actually finished 1 day early. Ha. The LAMP / Eucalyptus class is still moving along, although we're covering Open Stack and not Eucalyptus anymore.

It seems the professor (A Sr. Systems Engineer at The Aerospace Corp.) was a part of a group who had deployed Eucalyptus and found that when the resources were maxed out, VMs would just get dropped (disappear). Openstack by contrast does not allow new VMs to be deployed once all available resources are spoken for by other VMs. So, we are moving forward with Openstack.

With my (short term) class completed (Linux Administration), it marks a shift in focus to my next certification. Originally, I was thinking that would be the Comptia Security+, but that will be put off till I receive the exam voucher, later this year (no reason to waste money!). Then, I was thinking the ITIL V3 would be good, but now I'm thinking I will move the ITIL to April and work on the Redhat RHCSA in March. I'm pretty enthralled with Linux right now. I'm also reading Classic Shell Scripting: Hidden Commands that Unlock the Power of Unix.
Links to Amazon's site.


 So, tonight we (me and the mouse in my pocket) start reading Mich Jang's Red Hat Linux Certification Study Guide, I've laid out the month long schedule for the exam and scheduled it for April 6th. Here's the month's calendar.


I'm looking forward to the next few months with the exams, classes and what not. This is the reason I got into IT in the first place!