Archive for category Linux/Unix

SCALE 8x

Being my first Linux conference, overall I had a really good time. Seeing and talking to a lot of famous Open Source figures was pretty kool.

I only managed to see four different talks.
My favorite talk was Jono Bacon’s talk on the evolution of the Free Software/Open Source movement to what now will be fun and rapid development using a new development approach. Essentially, Cononical has developed a Python software development framework called Quickly (reminds me of Ruby on Rails, though I haven’t hacked much on it to even compare its similarities) That makes it real easy to package (.deb only) and publish.

BSD for Linux users:
This talk was mainly focused on the difference and advantages of using the BSD’ s (NetBSD, FreeBSD, OpenBSD) compared to Linux. Now more then I ever, I’m thinking of delaying a DNS BIND server on my local network running on OpenBSD.

Basic Introduction to KDE:
As the name implies, it was definitely, an introduction to KDE 4. Although I prefer using Gnome, the

Python for non programmers:
Also, as the name implies, this was a definite introduction to Python. Although I’m not big on Python, I definitely felt like an advance Python hacker by being on this talk.

Even though I only attended the Saturday event, I really enjoyed SCALE. It definitely felt like a community conference and it didn’t felt corporate what so ever.

mod_ruby and eRuby

I finally had some time to install mod_ruby and eRuby on my server.

Prerequisites:
httpd-devel ruby ruby-devel eruby
yum install httpd-devel ruby ruby-devel eruby

Installing mod_ruby was pretty confusing, as module default compilation is intended for Apache 1.3

If you’re running Apache 2.0 or higher, I managed to successfully compiled mod_ruby as the following:
./configure.rb –with-apr-includes=/usr/include/apr-1
make
make install

After the install, then its a matter of just adding the custom ruby http conf file to httpd conf.d directory.

SAMPLE:

AddType text/html .rhtml
LoadModule ruby_module modules/mod_ruby.so


RubyRequire apache/ruby-run
#RubyRequire apache/ruby-debug

RubyRequire apache/eruby-run
#RubyRequire apache/eruby-debug

# Execute *.rbx files as Ruby scripts

Options ExecCGI
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
#RubyHandler Apache::RubyDebug.instance

# Handle *.rhtml files as eRuby files

SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
RubyHandler Apache::ERubyDebug.instance


Now I can embed Ruby code on standard html pages serving and running natively using Apache and eRuby. :-)
Hence, perlninja.pl

References:
http://www.modruby.net/en/
http://www.ptwit.ac.th/seksan/blog/?p=59

I’m LPIC-1 Certified

A month after my initial planning, I finally manage to pass both LPIC-1 exams.

Computer upgrades

I finally upgraded the hard drives on my MacBook, Mac Mini (Server), and my main desktop Mac Mini.

Macbook (Leopard)
For some strange reason, I wasn’t able to clone my existing Leopard system to the new 500 GB as the clone process failed about 10% – 15% completion. So I just backed up all my files and installed Snow Leopard from scratch.

Mac Mini (Leopard)
Unlike with my MacBook, cloning the existing Leopard system to the new hard drive worked flawlessly on my desktop Mac Mini.
After that, upgrading to Snow Leopard worked like a charm.

Mac Mini (CentOS)
Upgrading the RAM on the Mini to 2 GB was simple, the hard drive upgrade was a completely different story. First, I wasn’t able to find any open source program that would allow me to clone to an attach mass storage USB drive. Unless I didn’t read the documentation properly, both CloneZilla and FOG only allow the clone output image to be saved on a network system and not locally, even if its a different hard drive.

Little that I knew. dd was everything I needed to clone the hard drive.
commands I used:

dd if=/dev/sda of=/dev/sdb

After the dd copy was finished, I rebotted to the new hard drive only to find out that /dev/sda5 , /dev/sda6 and /dev/sda7 were not copied properly to the new hard drive. So I had to reboot into rescue mode using the original CentOS install DVD and ran the following commands:
dd if=/dev/sda5 of=/dev/sdb5
dd if=/dev/sda6 of=/dev/sdb6
dd if=/dev/sda7 of=/dev/sdb7

On my second reboot to the new 500 GB hard drive, Linux was able to boot perfectly fine with all my original settings!!! Until… I opened up fdisk only to find out that I wasn’t able to add partition (I had over 400 GB of free space in the drive) because I wasnt able to modify my existing partition table that consisted of 3 primary partions and 1 extended partition that consisted of three logic partitions within it. So I just download the live GParted program and I was able to created the additional 400 GB logical drive from there.

On the third attempt to boot into the new 500 GB hard drive, Linux had to do filesystem check to /dev/sda7 which happened to be my /home partition. The fsck completely wiped out all of the contents that was in my home directory. Which wasn’t a big of a deal since I already had a full backup of all my files.

Conclusion
Overall upgrading the hard drive on a Mac Mini running CentOS was really painful, but I had the feeling that it could have been worse.

CentOS
GParted Live CD

-Alpha01

Goodbye Eclipse and hello vim

Apparently Apple doesn’t think its a good idea to ship vi with syntax highlighting turned on by default, giving how really easy it is to enable.

I simply had to edit the /usr/share/vim/vimrc file. Full instructions are in http://www.geekology.co.za/blog/2009/03/enable-syntax-highlighting-other-options-in-vim-mac-osx-leopard

It’s Official Part III

I’m a sysadmin once again.

I’m Linux Certified!!!

After 5 months of studying, I finally took the CompTIA Linux+ certification exam today. My study consisted of reading two books (Sybex CompTIA Linux+ and Linux+ 2005 in Depth), on-line tutorials, and a web based program called “TestOut Linux+ LabSim” that my school provides.

The exam is by and far the most difficult CompTIA certification exam that I’ve taken. Given that I scored 675 and the minimum passing score is 675! I probably would had gotten a better score if I’d studied sed, awk, and iptables more in depth. If I had taken this exam six months ago I would have failed it miserably. Now that I’m CompTIA Linux+ certfied professional, I’ll be putting the LPIC Level 1 on hold until I know I’m fully prepared for those set of exams.

Cheers!!!

OpenSSH

Well, instead of spending Saturday night wasting my time at the mall or at that place people call movie theaters, I got a chance to play around with OpenSSH more in depth.

I use ssh to log into my server practically every single day, but I really wasn’t aware all of its actual capabilities. After looking at the /etc/ssh/sshd_config file, I noticed there was an X11 forwarding option which was disabled by default. Given that I don’t have X-Windows installed on my server, I’ve decided to install ssh on my desktop computer so I can try it out.

Steps to enable X11 forwarding

  • Open /etc/ssh/ssh_config and comment out:
    # ForwardAgent yes
    # ForwardX11 yes
    # ForwardX11Trusted yes
  • Open /etc/sshd_config and (X11Forwarding yes) should already be commented out
  • Restart ssh server
  • sudo /etc/init.d/ssh restart

    That’s it!!!

  • Now log on into the remote machine using the -X option
  • ssh -X user@192.168.0.1

    type gnome-session
    Your X session should automatically start.

    I also logged in using OS X and it worked perfectly fine. Everything was kinda off sluggish to use, and I was doing everything completely on wireless so that probably made it even more slower. In conclusion who needs VNC when you could securely forward X11 session between *nix computers using ssh!!

    iPhone killer

    I can’t wait until I get my hands on an Android.

    Gusty Gibbon

    Even though I never upgrade right after a release of a new distribution, I’ve decided to upgrade my existing Feisty Fawn Ubuntu system. Everything seemed well until my computer restarted. From the restart, I got a Grub error, so had to boot from a Grub Super disk and manually install a new boot loader over the corrupt Grub that installed with Ubuntu. After a restart, and boot into the new 2.6.20 kernel that is used with Gusty, nothing happened. No prompt, No log-in screen. The only way to accessed the newly installed Gusty Gibbon was through booting into an older kernel.

    So I figured I must have done something wrong during the upgrade process. So I downloaded the iso image. To my surprised I have the same issue. This time the only way to accessed the system is though the rescue mode option!

    Installing Gusty on my laptop was just a waste of time. I’m not going to bother upgrading my desktop.

    (As of the time of this writing, I’m installing OpenSuSE 10.3 on my laptop)

    InspectorWordpress has prevented 0 attacks.