Installing vim-rails on OpenSuse 11.2

Posted 3 months ago

Get vim-rails either download the rails.vim from vim.org or clone vim-rails from github.com. Follow the instructions on the vim.org site or in the README on GitHub, installing the files into the appropriate VIM folder, probably ~/.vim/.

Note that I had the following VIM packages installed:
  • vim-enhanced
  • vim-base

Before you try anything further!

Additionally I needed to install vim-data. Afterwards you will find a plethora of scripts in /usr/share/vim/current/syntax, I initially had tried installing some of these for example xhtml.vim from vim.org and experienced much grief. Eventually I realized I just needed to install the Suse package mentioned above.

Once I start to become a vim-rails ninja I might post another blog on my findings, good and bad habits.

Posted in , ,  | Tags ,  | no comments

Long Overdue Freedom

Posted 3 months ago

During the 4 hour drive back to Canton from Lansing, Michigan from the Great Lakes Ruby Bash I had a realization. Its been long past due, I couldn't even bring myself to guessing how long its been since I last booted to it. Its a waste of time, space and hurting my morals.

Step 1- Staring off positive...

Something good to drink

Step 2 - A good song and it makes sense...you'll see

Something good to listen to

Step 3 - NTFS hrm wonder what that could be?

Looks like we have a problem here

Step 4 - Ah, who cares!

All better

It should be noted that I am so confident in my actions that I didn't even take the time to look through the files to see if I wanted anything on the file system...obviously its nothing important otherwise it would be on a journaled file system!

As reward for my accomplishment, I decided to subscribe to a Twitter account.

Posted in , ,  | Tags , , ,  | no comments

Linux High Availability Part 1

Posted 7 months ago

 I have been itching to dive into high availability clusters for quite some time now. As a network administrator uptime is a crucial part of my field. My goal in this series of blogs is to share my experience with setting up a high availability cluster using Linux systems.

Debriefing:

I will set up two virtual machines using VirtualBox. The two machines will both run Debian 5.0.2 i386 and will be on their own private network 192.168.2.0/24. The two nodes will together provide a high availability web and database service via Apache2 and MySQL using HA. With clustering an important factor is keeping data synchronized, that will be handled by DRDB.

 

Getting Up To Speed:

At this point I have setup my two virtual machines, Bravo and Echo, yes very original. I am using iptables on the host machine to masquerade the packets that need to go out to the Internet for the virtual machines. I have installed HA and drbd8 via the Debian packaging system. I configured HA using the Installing Heartbeat (Newbie) screencast tutorial. Similarly I configured a very simple setup of DRBD following the documentation. Now then, lets get into the details of my progress so far.

Networking Woes:

Ok, so the networking part of this mission was a slight barrier. I recall in the past I struggled to get multiple virtual machines to communicate with each other with VirtualBox. This time I seem to have planted that issue right on its ass, and I'm going to explain just how I did it.

In order to get virtual machines to network we need to change the guest operating systems from "NAT" to "Host Interface" in the "Network" settings. If only it were this simple! Well we actually need a "TAP" interface for the guest operating system to use. Lets hop into the trenches shall we?

First we need to let the kernel know wish to act like a router, forwarding packets:

Note this can also be set in /etc/sysctl.conf then it will not have to be set at every boot.
echo 1 > /proc/sys/net/ipv4/ip_forward

Next we need to create our TAP interfaces:

The interface names are arbitrary but it is important that the same name is used when assigning them to each virtual machine.
tunctl -t tap0 -u username
tunctl -t tap1 -u username
ifconfig tap0 up
ifconfig tap1 up

Now lets create a bridge interface and add our TAP interfaces:

The IP assigned is arbitrary but do make note of it
brctl addbr br0
brctl addif br0 tap0
brctl addif br0 tap1
ifconfig br0 up
ifconfig br0 192.168.2.1

Now assign each one of the TAP interfaces to each virtual machine and start them up. Assign an IP address to each virtual machine that is in the same network as the bridge interface on the host system. The virtual machines should be able to ping each other as well as the host system. Notice that they can not get out to the Internet though. For this we will need some help from iptables:

Beware that using MASQUERADE target is not technically proper with static IP addresses, however its the only way I can get NAT to work properly in this situation. The rule below should not be considered a permanent solution, I don't plan on leaving it that way at least.
iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -j MASQUERADE

Now the virtual machines should be able to ping each other, and also make it out to the Internet, assuming that other barriers do not exist like firewalls etc.

I will end part 1 at this point. I will catch up on configuring HA and DRBD in part 2 and hopefully at that point also have some more information to share, for now its off to bed and preparing for Monday.

So long

 

Posted in , ,  | no comments

Dell Inspiron Zino HD Where Is Linux

Posted 7 months ago

Although I was extraordinarily excited about Dell's Zino HD I was quickly let down to find out Linux is NOT offered as an operating system choice.

At the base model (even adding some some features) the price point is great in my opinion. The base model of the Inspiron Zino HD can be had for just a little more than $200. I had read rumors that Linux was offered on the Zino HD, after attempting to customize one of the models I found there was no Linux option available. After a few days I called Dell and spoke to sales representative who assured me the Zino HD was not available with Linux. The rep was quick to push me toward another Inspiron for around $500 that came with Linux. At this point I explained that my interest was more involved with purchasing a unit that does NOT come with Windows, than a unit that is offered with Linux, even if a discount is not granted.

Still the response was the same.

If Dell does offer the Inspiron Zino HD with Linux or at least without Windows I will most certainly purchase a unit. Of course this assumes they will not only offer Linux on a high priced model. My guess is that Dell has some contract with Microsoft on the Inspiron Zino HD in relation to the new release of Windows 7.

Until then I'm off to find other low priced mini/multimedia computing solutions that are more open to the idea that not EVERYONE wants a Microsoft product.

Posted in ,  | Tags , , , ,  | 2 comments

Replacing Square Brackets With Sed

Posted 10 months ago

For me the following do not work:

sed 's/(\[|\])//g'
sed 's/[[]]//g'
The following do work:
sed 's/[][]//g'
sed -e 's/\[//g' -e 's/\]//g'

Example:

echo '[foobar]' | sed 's/[][]//g'
>foobar

echo '[foo]bar' | sed 's/[][]//g'
>foobar

The environment is Debian 4.0, GNU sed version 4.1.5.

Posted in ,  | Tags  | no comments

Setup Amavisd-new

Posted 10 months ago

I finally configured amavisd-new with my Postfix configuration. It is a simple setup using only ClamAV and Spamassassin. However I do want to implement DKIM through amavisd-new of course that requires a newer version of amavisd-new than is in the packaging system of the release of Ubuntu I am running.

Further I would like to switch my Linode to Debian over Ubuntu.

It is safe to expect some downtime soon likely tonight as a result of upgrading through two releases.

I will post a part 2 once the upgrade is complete and I implement DKIM with the details of what I did.

Posted in , , ,  | Tags , , , , , , , ,  | no comments

Microsoft Mail User Agents

Posted about 1 year ago

An excerpt from Mailing List Etiquette on FreeBSD.


Please use a standards-compliant Mail User Agent (MUA). A lot of badly formatted messages come from bad mailers or badly configured mailers. The following mailers are known to send out badly formatted messages without you finding out about them:

  • * cc:Mail
  • * Eudora� (older versions)
  • * exmh
  • * Microsoft� Exchange
  • * Microsoft Internet Mail
  • * Microsoft Outlook�
  • * Netscape� (older versions)

As you can see, the mailers in the Microsoft world are frequent offenders. If at all possible, use a UNIX� mailer. If you must use a mailer under Microsoft environments, make sure it is set up correctly. Try not to use MIME: a lot of people use mailers which do not get on very well with MIME.


I just find this hilarious. I mean what exactly defines user friendly? Software that has shiny buttons or that formats its data in a way that complies with standards and is compatible with other users *standard compliant* software?!

Sean

Posted in , ,  | no comments

Writing Cron Jobs With Rails Part 1

Posted about 1 year ago

I am working on a personal use Rails application that I use to create reminders using Cron...

There are a couple gems that are useful for dealing with Cron using Ruby. The first is rbcrontab which allows you to create crontab entries using Ruby. The other is trak3r-crontabr which actually maintains a crontab using Ruby. The latter of the two might be easier to use for those who do not understand Cron syntax but know Ruby well. I am leaning toward rbcrontab right now simply because I feel it may fit my needs better than trak3r-crontabr.

I'm not sure that I really need a full blown web interface or not. It would be nice but I think what I really need is just a mailer with templates. I don't know, once I figure out the details I will make a part 2.

Sean

Posted in , ,  | no comments

Configure Unknown Monitors Xorg

Posted about 1 year ago

I recently had to configure Xorg to run a 40" LCD monitor. The monitor did not seem to support EDID queries. To my understanding this is essentially a protocol that most monitors support to explain what modes they support and give general information about the monitor.

After a little Google searching and not finding anything on the model number of the unit which is 40LC45S. I eventually found this this modeline generator in this link. All you need to know are the resolution and refresh rate combination(s).

Sean

Posted in ,  | no comments

Eternal Postfix Battle

Posted about 1 year ago

My war with Postfix wages on. However I have resolved an issue that has been haunting my email server for quite some time now!

I constantly received a mail loop error when postmaster notifications were being sent to mail.skiblerspot.net. I knew it was something simple but never spent the time to track down what was missing. Perhaps I made the assumption that if Postfix knows to accept mail for skiblerspot.net it will automatically accept mail for mail.skiblerspot.net. This is an incorrect assumption and rightly so as this would be a terrible feature.

My problem was solved by simply changing:

mydestination = localhost, localhost.localdomain

to

mydestination = localhost, localhost.localdomain skiblerspot mail.skiblerspot.net

Adding skiblerspot was unnecessary to fix my immediate issue but I figured it doesn't hurt. Notice that I could have also added mail.skiblerspot.net to my virtual mail boxes database. I think in my case adding the hostname to mydestination is a better solution. Though if I were expecting mail for other users and wanted to create aliases for this domain I would then add it to virtual mail box database instead. Note that a domain should NEVER be in both places (mydestination and virtual mail box database).

 

This page notes on postfix configuration helped me realize my mistake.

Sean

Posted in , ,  | no comments