Chrome 28 and newer for CentOS 6

Officially Google no longer support Chrome for CentOS 6 (ref). The recommendation (for now) is to either switch to Firefox or Chromium. I decided to go with the second option.

Obtain the YUM repository settings here: chromium-el6 repo.

First uninstall Google Chrome

# sudo yum remove google-chrome

To install:

# sudo wget http://people.centos.org/hughesjr/chromium/6/chromium-el6.repo -O /etc/yum.repos.d/chromium-el6.repo
# sudo yum install chromium

Do not launch Chromium immediately, if you want your Chrome settings to transfer over do the following:

# mv ~/.config/google-chrome ~/.config/chromium

(Alternatively you can copy cp -a or link ln -s)

If you want the Google Chrome PDF and/or Flash plugins (I did), then the extra step(s) are required:

# cd /tmp
# wget https://raw.github.com/hughesjr/chromium_el_builder/master/chrome_libpdf_copy.sh
# sh chrome_libpdf_copy.sh
# cd /tmp
# wget https://raw.github.com/hughesjr/chromium_el_builder/master/chrome_pepperflash_copy.sh
# sh chrome_pepperflash_copy.sh

I am not happy with Google’s lack of support but I have become dependent on Chrome sync across all my computers and devices. I hope that Google changes/updates their process or that RHEL7 releases soon.

Reference: http://lists.centos.org/pipermail/centos/2013-June/135238.html

Yum Groups

The Fedora 18 installer does not allow single package installations, instead it prefers to install by package groups. You can also install groups after completing installation. This is especially useful since you can only select one Desktop Environment at installation. Alternatively, to have faster installations, select as few groups as possible and then only install the ones you need later.

This is just a quick note on how yum can install by groups instead of by individual packages.

To see all of the available groups run:

$ yum groups list

Example (abbreviated) output:

Available Environment Groups:
   GNOME Desktop
   KDE Plasma Workspaces
   Xfce Desktop
Available Groups:
   Authoring and Publishing
   Books and Guides
   Development Tools

Note: Quotes below are not needed when the group name is a single word, however if the group name has spaces make sure you use quotes.

Pick a group above, example Authoring and Publishing.
To see what packages the group includes, run:

$ yum groups info 'Authoring and Publishing'

To install the entire group, run:

$ sudo yum groups install 'Authoring and Publishing'

To remove the group, run:

$ sudo yum groups remove 'Authoring and Publishing'

Note: Generally removing a group is not recommended, you may remove dependencies which may make your system unusable.

Improve Fonts in Chrome in CentOS 6

I am currently running the latest version of Firefox (8.0) and Google Chrome (15.0.874.121) in CentOS 6 64-bit using the Gnome 2.28 desktop.

Both work fine, however Firefox renders fonts significantly better than Chrome.

The Fix: The following steps fix the problem.

1. Open the file .fonts.conf in your home directory, if it does not exist create it:

$ touch ~/.fonts.conf

2. Add the following contents to the file:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
        <match target="font">
                <edit name="autohint" mode="assign">
                        <bool>true</bool>
                </edit>
        </match>
</fontconfig>

3. Log out completely from Gnome (reboot not required).

Before and After

Downside to Enterprise Linux

(Note: For the purpose of this post CentOS is equivalent to RHEL)

It has been about 2 and 1/2 years since I built a dedicated server and chose CentOS instead of Fedora. Since I installed CentOS 5.1 I have used the upgrade process 4 times with no problems bringing me to version 5.5 with practically no re-installation, re-configuration or troubleshooting upgrade issues. This is the goal of enterprise linux. A long term stable solution with no major changes to preserve compatibility with every piece of software that was provided since it was released (in this case April 2007). In the time I’ve been on CentOS I’ve upgrade/replaced Fedora at least 5 times on other machines. Each time learning the changes to software, languages, security and many other components.

I’m very pleased with CentOS knowing that after the next yum update all my software will keep working. And everything is 100% secure.

However the exact reason enterprise linux is so great is also the exact reason why it can be a major pain. Once a main component is locked down, Red Hat will not provide updates unless needed for security or stability.

An objective for my server was for web development. The state of web as defined in 2007 when RHEL was created is coming close to obsolete. CentOS 5 includes PHP version 5.1.6. However PHP 5.2, which was released before RHEL 5, has become the default standard requirements for many PHP applications. I was updating some code to utilize JSON when I realized I would have to deviate from standard updates to install PHP 5.2 on CentOS. (This wasn’t too bad)

Another objective was a file server and backups. I’ve been playing with DropBox (*) as means of an off-site backup solution. What makes it great is it’s support for Linux! Even text-based linux which is what my server is. However the first requirement is Python 2.5. CentOS uses 2.4, and you can’t do a major update of Python in a CentOS/Fedora install without breaking many things since this is a critical component. You can do a parellel install for Python 2.5 but this is a bit annoying to maintain as you have 2 versions of python installed. (I have yet to get Dropbox working well on my server)

I also have been writing C++ software using boost. I recently realized the asio library was standard in boost 1.37 and later. I was locked to 1.33 in CentOS 5. No big deal since, the boost package was not critical for me in CentOS and it could be easily replaced. So I decided to recompile a newer Fedora boost src.rpm. However I would see errors like this:

error: unpacking of archive failed on file /home/mirandam/rpmbuild/SOURCES/boost-1.41.0-iostreams-zlib.patch;4c7880e5: cpio: MD5 sum mismatch

The above error is simply because Fedora 12 changed the RPM compression algorithm used and rendered older versions of RPM incompatible with newer packages. I don’t dare meddle with RPM as it is a core component, so I ended up compiling an older Fedora 11 version of boost 1.37 src.rpm which did the job.

Overall I’m still happy with my setup, but slowly I’m spending a great deal of time patching different pieces as my needs have slowly evolved. Interestingly Red Hat recently announced extended support lasting up to 10 years. That seems way too long considering the state of software (although everyone still uses Windows XP – now 9 years old).

I’m getting a little antsy running 3 year old software. The good news is that RHEL 6 is in beta, which means that soon after release the totally free CentOS 6 will follow as well. Which I’m eagerly waiting for, because all my issues will be addressed … at least for the time being.

(*) Affiliate link – I highly recommend Dropbox.

CentOS 5.5 Released

The CentOS team just announced the release of CentOS 5.5.

The wiki has the Release Notes. Most major changes can be found in the RHEL 5.5 release information (which CentOS is based).

Running
yum update
should update your system. Keep in mind the recent post-release updates should be syncing with the CentOS mirror soon.

As always, relatively smooth sailing with CentOS!

CentOS 5.4 Released

Well CentOS is officially released. Now the mailing list whining can be stopped … until at least 5.5!

For new installs grab an ISO. For upgrades (which is generally safe), just run:

# yum update

Or if you want to be very careful:

# yum clean all
# yum update glibc\*
# yum update yum\* rpm\* python\*
# yum clean all
# yum update
# shutdown -r now

Just read the Release Notes for more specifics, or the RHEL 5.4 Docs.

Please note that CentOS does not have a perfectly fixed release schedule. It is typically 6-8 weeks after RHEL is released. People wanting updates can follow CentOS (Karanbir Singh) on Twitter.

(As a quick note, yesterday Fedora 12 Beta was released.)

All-In-One Configuration Tools

As I mentioned previously, I run many sites on my web server. Yesterday I decided to clean up some sites that their owners had neglected or not used. One such site was running Apache Tomcat Java Server, which I did not care to leave running.

Now I, like many users of commercial hosting plans, pay for cPanel/WHM which includes a myriad of options/configurations/settings to do almost everything on the server. Back in 2007, I had used the cPanel Addon to install Tomcat. It was an incredibly easy “1-click Install”. I never checked, but I just assumed it worked. Similarly I thought it would be just as easy to uninstall Tomcat. I clicked “Uninstall” and all went well and I didn’t see any immediate problems. Or so I thought …

Last night the Apache Webserver failed. I did not realize till this morning (6 hours later). After some digging I found that it was because Apache could not find some Tomcat/Java module. So much for a proper uninstall. I did not have time to debug the issue, so what did I do? I simply re-installed Tomcat. I just could not afford any more downtime! … I know, I know: Shame on me!

This incident is like many commonly seen in the Linux world: An all-in-one graphical configuration tool can do wonders, but somewhere due to interaction between components it can causes all sorts of unforeseen problems. The root problem here is that it is incredibly difficult to know all the intricacies and nuances for administrating multiple software systems. Add to that the occasional need to manually edit config files, and you create an unmanageable mess.

Do you remember linuxconf? … Back in the day (pre-2002) Red Hat included a configuration tool called linuxconf which could manage multiple system options using a variety of graphical and non-graphical interfaces. While this worked wonders for novices performing simple tasks (mounting disk partitions, adding users, setting network addresses), it caused all sorts of issues for more complex services (web server, mail server, samba). Unfortunately at that time, there were very few complete comprehensive tools for configuring complex servers. Users who got burned using linuxconf, eventually learned that the only guaranteed way to setup things was to read man pages and documentation, and then editing config files manually.

Redhat did eventually abandon linuxconf with RH8.0. And while many users did complain, ultimately it was a smart decision. Software projects cannot be held accountable if some 3rd-party tool mangled their config files. Even more importantly, how can someone be certain the tool made the change they requested without looking at the config output? You can’t.

Sadly even though I expected cPanel to do its job (considering it is not free), I should have been more careful on a live production server. While I’m not saying that every single “all-in-one” tool is a failure, I am saying that trusting any tool without validation is a very poor choice.

My Early Linux History

There was another useless post on Slashdot asking what did you first do with Linux?. I thought it would be interesting to recollect that experience. Sorry for the detail, my memory produces lots of random tidbits.

I was fortunate enough to attend an engineering school with the latest technologies that were available in the market. Which basically means we had Sun Ultra Workstations, running Solaris Operating System using CDE. So for me “Unix = Sun”. That was 1997 and I was incredibly impressed. I never even knew of Linux till 1998, when one incredibly over achieving colleague mentioned he was going to use an old 386 to run Linux. I immediately thought he meant “unix”, so my first question was: “Don’t you need a more powerful computer?”. Keep in mind the Pentium MMX was the state of the art consumer desktop at the time. And that’s when I first heard it on a bus, in the winter, heading to the engineering campus: “Linux can run on anything! Even really old hardware!”. So began my interest.

Later in 1999 when my programming classes got more involved, I was finding that Borland C++ 5.0 on Windows NT 4.0 was not sufficient compared to GCC on Sun. A co-worker of my brother suggested Linux but warned me that I need to be very careful to make sure I check the video card support under the X-server (XFree86 at the time). Ironically that warning still holds true to this day! Luckily my Matrox Mystique 4MB was in the “supported list”!

In the late 1990’s you could find the most popular linux, RedHat, on shelves at your local Best Buy retailer. I had seen version 6.0 on sale, but by the time I got around to purchasing it, sure enough version 6.1 was there. As I recall it was only 1 CD and 1 CD full of source code (I think I still have those CD’s somewhere). By the time I figured out how to repartition my hard-drive and actually get linux to work (I think the 3rd installation I got it right), I was told version 6.2 was available! This (sometimes annoying) trend still persists today as well.

Due to my experience with CDE on Sun, I immediately thought KDE was the same thing. So I just started using Gnome. Everything was foreign, but since it was so much easier than Solaris, I liked it a lot. Not long after I became comfortable with Redhat, I heard that Pogo Linux was giving away free linux CD’s. This was great since finding someone to make me a copy was impossible and copying at school a big pain. I got copies of Caldera, TurboLinux, Mandrake, and maybe others? I don’t really remember all the versions I tried from them. The only one that stood out was Mandrake and I loved it for its cool selection of software and included niceties (especially “color gcc” – which made cryptic C errors fun again!). Unfortunately all those little additions came with their price. I found Mandrake incredibly unstable compared to RedHat (it could have been my inexperience) so I switched back. I stuck with RedHat till Fedora, but that’s another story altogether.

So that’s my brief exposure to Linux from 1999 to 2001. It was all caused by a requirement to use gcc for school work but ended with a lot of random discoveries. I never saw it in day-to-day activities – so instead I went and found it myself.

What was your first linux experience?