Run Linux apps on Windows or OS X with Lina

This month a California-based startup plans to release an application that will allow Windows, Mac, and Linux users to run Linux binaries without any modifications.  Lina is a Linux virtual machine that allows users to run applications with the native look of their host operating system.  It also lets you install applications with a mouse-click, no need to compile software from source code.

The idea is that developers will be able to create programs for one platform, and they’ll be able to run on three different operating systems.  This could both expand the market for open source Linux applications, and cut down work for developers.  Lina will be free for open source developers, while a licensing fee will apply to commercial developers.

Lina is still a work in progress, with no support for GTK+ or USB peripherals yet.  The virtual machine takes up less than 40MB when installed.

Cool!

Yum on RHEL4

First off, apologies for not have posting anything in the last few weeks.  I just got back from Manila, Philippines to visit my ill grandfather (read: father).  He made it, but is still weak.  I love you lolo!

Anyway, I personally run Red Hat Enterprise Linux 4 at work for any *nix tasks, and in this post I’ll show you how to install Yum for easier management.

According to Linux@DUKE: Yum is an automatic updater and package installer/remover for rpm systems. It automatically computes dependencies and figures out what things should occur to install packages. It makes it easier to maintain groups of machines without having to manually update each one using rpm.

So, without further adieu:

1.  Download yum-2.0.8-1.noarch.rpm from:

http://linux.duke.edu/projects/yum/download/2.0/yum-2.0.8-1.noarch.rpm

2. Install it with the following command:

rpm –i yum-2.0.8-1.noarch.rpm

3.  Configure your yum.conf [in /etc/yum.conf] like so:

[main]
cachedir=/var/cache/yum
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1

#base]
#ame=Red Hat Linux $releasever – $basearch – Base
#aseurl=http://mirror.dulug.duke.edu/pub/yum-repository/redhat

/$releasever/$basearch/
[base]
name=CentOS-$releasever – Base
baseurl=http://mirror.centos.org/centos/4.4/os/i386/
gpgcheck=1

[updates]
name=Red Hat Linux $releasever – Updates
baseurl=http://mirror.centos.org/centos/4.4/os/i386/
gpgcheck=1

4.  Download the GPG key for CentOS RPM packages with:

wget http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-4

5.  Import the key like:

rpm –import RPM-GPG-KEY-CentOS-4

6.  Run yum -y update, sit back, relax, and enjoy watching your system being updated.

That’s it!  Now you can use yum to install anything you wish.  Ciao!

Auto backup solution for your MySQL databases

I use MySQL as my database server, and thankfully, it’s been reliable and easy to use.  A qualm I have, however, is that it doesn’t include a daily backup feature, unlike Microsoft SQL Server.

The good thing is that the open source community has seen this problem and created a solution for it: AutoMySQLBackup.  (You can download it from here.)

According to the website on SourceForge.net:

A script to take daily, weekly and monthly backups of your MySQL databases using mysqldump. Features – Backup mutiple databases – Single backup file or to a seperate file for each DB – Compress backup files – Backup remote servers – E-mail logs – More..

Here are the quick-and-dirty set up steps (courtesy of debianhelp.co.uk):

1.  Download automysqlbackup.sh and place it into your /etc/cron.daily directory like so: cp /path-to-automysqlbackup/automysqlbackup.sh /etc/cron.daily/.

2.  Edit (at least) the following lines via vim automysqlbackup.sh:
USERNAME=dbuser
PASSWORD=password
DBNAMES=”DB1 DB2 DB3″

3.  Make the file executable by typing: chmod u+rwx automysqlbackup.sh.

4.  Create the following directory by typing: mkdir ./backups.

5.  That’s it!  You can either run the script via the command line: ./automysqlbackup.sh, or let it run its course since we’ve now put it in /etc/cron.daily; make sure the cron service is running, though.  ;0)

Peace. \m/

Fix for undeletable user-defined Squirrelmail folder

I run my own mail server and use Squirrelmail to facilitate webmail access using HTTPS.  I encountered problems trying to delete a folder that I created as part of a test to find out if things were working correctly:

ERROR : Could not delete “Archive” 
Given: Invalid mailbox name

SquirrelMail is a Webmail application started by Nathan and Luke Ehresman and written in the PHP scripting language. It can be installed on almost all web servers so long as PHP is present and the web server has access to an IMAP and SMTP server

After some digging around, I found that after modifying a setting via ./conf.pl I was able to delete the folder.  If you’re experiencing the same thing, do the following:

1.   Open a terminal window.

2.   Navigate to Squirrelmail’s root dir, which in my case is /usr/share/squirrelmail.

3.   Navigate to the config/ folder then type: ./conf.pl.

4.   Select option 3 then 1 and enter none.

5.   Save your changes and exit.

It may not work on all situations, and some have said that in version 1.4.0, you may need to set/pick your IMAP server (I use Dovecot), like so:

1.   Open terminal window (again).

2.   Navigate to the config/ folder then type: ./conf.pl.

3.  From the menu options, select D, then save and exit.

If you still have problems after performing these steps, modify your php.ini config file to report more verbosely by changing the following lines:

display_errors = on
error_reporting = E_ALL

After saving the modifications you just made, restart your web server via (I run FC6 so) service httpd restart, then watch your Apache error_log for more info. 

That’s it.  Hopefully, this helps you from having to do the legwork.  Take care.  =0)