Ubuntu Pocket Guide & Reference – FREE!

It seems Keir Thomas has released a nice little book “Ubuntu Pocket Guide and Reference” which can be purchased for under 10 clams. However, he has also released the PDF version free to the world.

I really like Ubuntu and not just because it’s one of the easiest distros to make everything work (I.E. non-free video drivers etc)…..it truly is a very nice distro in all ways. (especially for the new users)

So if you’re new to Linux and are trying out Ubuntu, head over and grab the free PDF. If you like it….buy it. While Linux kernels are free, we still need to support the guys writing about it. 🙂

Main links of note:

Ubuntu – http://www.ubuntu.com/
Ubuntu Guides – https://help.ubuntu.com/
Ubuntu Community Forums – http://ubuntuforums.org/

HTH.

Verizon Wireless Broadband – RHEL 5.x / CentOS 5.x

I’m using the UM175 model so your mileage may vary.

Note: Red Hat officially supports various DELL branded EVDO modems by default in 5.x (see release notes)

Insert the UM175 and make sure the system detects it.

Example:
shell>dmesg
usb 5-1: USB disconnect, address 3
usb 5-1: new full speed USB device using uhci_hcd and address 4
usb 5-1: configuration #1 chosen from 1 choice
cdc_acm 5-1:1.0: ttyACM0: USB ACM device <—— Note the cdc_acm driver was loaded for it and the device is under ttyACM0 (/dev/ttyACM0)

Unfortunately, I couldn’t figure out how to use NetworkManager under RHEL 5.3 (yet) so I reverted back to the standard “network” service instead.

Example: (You DO NOT need to do this if you’re NOT using NetworkManager)
shell> sudo /sbin/service NetworkManager stop
shell> sudo /sbin/chkconfig –level 2345 NetworkManager off
shell> sudo /sbin/chkconfig –level 2345 network on
shell> sudo /sbin/service network start

Then use the “system-config-network” utility (Under – SystemAdministrationNetwork )

1. Select the “Hardware” tab and click “New”

2. Select “Modem” as the hardware type.
Note: The above info from dmesg shows “ttyACM0”, this will NOT be listed in the “Modem Device” selection (at least under mine it wasn’t), so simply erase what’s there and type in “/dev/ttyACM0” (no quotes). I left everything else the same and clicked “OK”.

3. Select the “Devices” tab and click “New” this will start a Wizard.
* Select “Modem” and click Forward.
* Fill in “Phone Number” with “#777” (no quotes)
* Fill in “Provider Name” with whatever (I put Verizon)
* Fill in “Login Name” with “AREACODEYOURWIRELESS#@vzw3g.com” (no quotes)
* Fill in “Password” with “vzw” (no quotes)
* Click Forward and leave the defaults (DNS etc.)

4. Activate your new configuration (this will restart the network controls etc)

You may want/need to set various options under the ppp configuration (like auto start etc).

You should now be able to connect. Until someone posts how to get the NetworkManager working, you may want to create a shortcut of the “Network” applet on your Panel/Desktop. 🙂

Note: There are various ways to skin this cat. I just posted the easiest way I could for the general “Desktop” usage. ;0)

Cacti on Fedora 10 – Part 1

— Cacti on Fedora 10 —

One thing I’ve noticed about the Ubuntu community, is they have some really great
guides for configuring server packages. However, I like Fedora…….I guess it’s the hat or something.
While there is a Fedora Doc site, it’s lacking guides for most things that are in
the Fedora repos.

I’m planning on joining the Fedora team and submitting such docs in the future. I figured
this would be a great place to test some of my guide ideas.

I’m using a cross between the docs at the cacti site and my own trial and errors.
This will be a multi-part HOWTO. The first write up, will walk you through everything
needed to get cacti up and running on Fedora 10 from scratch.

—————–

0. I’m assuming you have Fedora 10 already installed and ready to go. 🙂

—————–

1. Installing Cacti and all the requirements: (mysql server, apache, etc.)
# You can simply copy and paste. If you’re not in the sudoers file yet, either add yourself or switch to root.

sudo yum install -y mysql mysql-server httpd mod_ssl php php-snmp php-mysql net-snmp net-snmp-utils rrdtool cacti

# Almost everything will be done for you (so no need to follow the Cacti Manual 100%)
# However, it’s good to read and understand where all the core files are.
# So either visit the cacti site or check the docs under /usr/share/doc/cacti-0.8.7b/*

—————–

2. Setup the MySQL server:

# If you’ve just installed the MySQL server, you’ll need to configure the root account & password.
# If you already have a mysql server installed and configured simply skip the “mysql_secure_installation”.

sudo service mysqld start
sudo /usr/bin/mysql_secure_installation (answer all questions as needed/desired)
mysqladmin -u root -p create cacti
sudo mysql -p cacti < /usr/share/doc/cacti-0.8.7b/cacti.sql

# Open the mysql database and configure the cacti user privs/password etc.

mysql -u root -p mysql
mysql>GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'SOME-PASSWORD';
mysql>flush privileges;
mysql>exit

——————

3. Configure the cacti database configuration settings:.

Backup the default config.php (/usr/share/cacti/include/config.php), which actually links to “/etc/cacti/db.php”
Then edit “/etc/cacti/db.php” and specify the database type, name, host, user and password for your Cacti configuration.

sudo vi /etc/cacti/db.php

$database_type = “mysql”;
$database_default = “cacti”;
$database_hostname = “localhost”;
$database_username = “cactiuser”; <—- created via the cacti.sql script
$database_password = “cacti”; <—- change this to the above ‘SOME-PASSWORD’

—————–

4. Configure Cron to run the poller script:

# Make sure your /etc/cron.d/cacti looks like so. (you’ll need to remove the #)

*/5 * * * * cacti /usr/bin/php /usr/share/cacti/poller.php > /dev/null 2>&1

—————–

5. Start up mysql and apache:

# Start/Restart your MySQL and Apache servers.

sudo service mysqld start
sudo service httpd start

#Point your web browser to:

http://localhost/cacti/ or https://localhost/cacti/

Continue with the installation via the web browser, when you get to the page that locates “rrdtool” etc.
make sure everything is “FOUND” and has the correct path.
IMPORTANT – at the bottom of this same screen change the default “RRDTool Utility version” from 1.x to 1.2.x.
Click “Finish”

Log in the with a username/password of admin. You will be required to change this password immediately.

You can now start creating new devices per the Cacti users guides or poke around and figure it out.

—————–

6. Alter the cacti.conf file for access:

Note: Once you’ve got everything set up the way you want and are ready to access your new Cacti install from
else where, you’ll need edit the /etc/httpd/conf.d/cacti.conf file.
Simply alter the Allow statement as needed.

#
# Cacti: An rrd based graphing tool
#
Alias /cacti /usr/share/cacti
Order Deny,Allow
Deny from all
Allow from 127.0.0.1

—————–

7. Make sure mysqld and httpd are running on boot. 😉

sudo chkconfig httpd on
sudo chkconfig mysqld on

—————–

In part 2, I’ll walk you through examples of configuring various devices.

Take care.

DB

Vmware Workstation 6.5 and Linux (host) kernel update woes

Just another “quick tip” from the field.

Starting in Vmware Workstation 6.5 they removed the old (working) vmware-config.pl script.
If for some reason you need to force a reconfig/recompile of the vmmon modules etc.

Then simply run the following as root/sudo

vmware-modconfig --console --install-all

HTH

DB

Vmware – Linux Host / Linux Guest – Keyboard Mappings Issues

Quick Tips from the field.

If you’re running a Linux host with a Linux guest and are having issues with your keyboard keys being mapped wrong inside your VM. (Like my up arrow was remapped to “Print” etc)

Then you can try the following.
edit the following file: /etc/vmware/config

Add the following:
xkeymap.nokeycodeMap = true

save the file.

Make sure vmware isn’t running and restart the vmware services like….

#sudo /etc/init.d/vmware restart

Then launch vmware again.

HTH

RealVNC on RedHat Enterprise 5

This describes how to use the free versions of RealVNC to connect to your RedHat Enterpirse Linux 5 desktop from your Windows XP machine.  These instructions might work for RHEL4, CentOS, Windows Vista, and other flavors of Linux, but I haven’t tried them.  YMMV.

First download the latest free version for Linux to your RedHat machine from here:

http://www.realvnc.com/cgi-bin/download.cgi

Note:  Since you are on RedHat, make it easy on yourself and grab the RPM version.

Unzip/Untar the file to extract the RPM, then install it:

rpm -i vnc-4.*.*.*.rpm

Next, you will need to edit the script which launches RealVNC or else it will choke on the font paths.  So, as root, edit this file:

/usr/bin/vncserver

You should see a section in that file that looks like this:

# Add font path and color database stuff here, e.g.:## $cmd .= " -fp /usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/";# $cmd .= " -co /usr/lib/X11/rgb";#

To jump to it quickly, just search for the word ‘font’ in your editor.

Now, you want to uncomment and edit the two necessary lines so that it looks like this:

# Add font path and color database stuff here, e.g.:#$cmd .= " -fp /usr/share/X11/fonts/misc/,/usr/share/X11/fonts/75dpi/";$cmd .= " -co /usr/share/X11/rgb";#

Got it? Good.  Save that sucker and close it.

Don’t Run RealVNC As Root.

You need to be logged in as a non-root user when you fire up the VNC server, lest the application bomb out with errors.  So, once you have chosen the user you wish to be,  log in and edit this file:

/home/username/.vnc/xstartup

You will want to change the last line to use your GUI of choice (I prefer Gnome).

Change:

twm &

To:

gnome-session &

Save that sucker.  Got it? Good.

There is one last thing to do before any of this will work, and that is to open the necessary port in your firewall.  On your RedHat box, open the Firewall editor and add port 5901 to the list of allowed ports.

Fire It Up

Logged in as the non-root user you decided to run this as, enter the following at the command line:

#> vncserver :1

The first time you run this, you will be asked to create a password. Choose something you will remember by the time you get to your Windows machine to connect in a few minutes.

You should see a few notes about the server being started and the log file being created.  And with that, the vnc server is ready for connections from your Windows box.

Setting Up Windows

Now, you need to download and install the free RealVNC viewer to connect to your RedHat machine, which again is available here:

http://www.realvnc.com/cgi-bin/download.cgi

When installing, choose the Viewer option, not the Server option.  Once it’s installed, launch the application, and in the Server field, enter the IP or hostname of your RedHat server, followed by :1.  For example:

192.168.1.2:1

Click OK, and you should be asked to enter the password you created a few minutes ago.  Once you do, if all worked as planned, you should be looking at your RedHat desktop on your Windows machine.

Notes

Stopping RealVNC

Sometimes you may need to stop and restart VNC on the RedHat box.  To do this, log in at the command line and enter:

#> vncserver -kill :1

It should say something like “Killing process 5036”, letting you know it has been completed.

Getting A Better Resolution

If your Windows box has a monitor running at a resolution different than that of your Linux box, you may want to change the resolution at which RealVNC runs.  To do this, just add the desired resolution to the startup command like so:

#> vncserver -geometry 1440x900 :1

RHEL – Xen vs. KVM

Let me just say I’m a big VMware fan. And since they started giving out ESXi for free, I try to pass on the love as much as possible.

However, sticking to open source values is very important to me for many reasons, and I recently discovered Xen is going away in RedHat Enterprise Linux (RHEL). I kinda figured it would die out as soon as Citrix bought up Xen.

So I dug around after a few emails with another virt guy.

Red Hat’s official statement:

http://www.redhat.com/about/news/prarchive/2008/virtualization.html

I guess if you’re sticking with RHEL’s way of doing things, you had better give up on Xen and start working with KVM / Ovirt etc.

It seems Xen will continue to be supported through the 5.x series, as they have lots of customers using it. (hmmm…)

So I guess there will be a tool or some article for transitioning later on.

Ovirt – http://ovirt.org/
KVM – http://kvm.qumranet.com/kvmwiki/Front_Page
FreeIPA – http://www.freeipa.org

However, this is all in a beta area for now.

My thoughts would be to simply go with VMware Server or ESXi server for production and then start testing the KVM solutions for future configurations. That’s just my two cents.

HTH

clicky