makewhatis

Random Linux Garble.

Zimbra Desktop Error: Failed to Execute Child Process “/opt/zimbra/zdesktop/linux/prism/zdclient”

Just installed zimbra to use with our zimbra mail here at work on linux Mint 10. Got this error as soon as I tried to launch.

There was an error launching the application
Details: Failed to execute child process “/opt/zimbra/zdesktop/linux/prism/zdclient” (no such file or directory)

A little scouring of the internet showed that this package is needed “ia32-libs”

A quick sudo apt-get ia32-libs and I was up and running.

LAMP Setup on Ubuntu/Linux Mint

One thing I used to search for is quick setup instructions for lamp setup on a server. So Im going to put out one more set of them. If you didnt know already, lamp is the acronym for linux apache mysql php and is the most common setup for web servers today.

First thing to do if this is a fresh slice/server is update.

  sudo apt-get update && apt-get upgrade

Now to install Apache, PHP 5.3, MySQL server, all in a few commands. Take not of the packages that are installed and their dependencies.

  sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server libapache2-mod-auth-mysql php5-mysql

This will install everything in sequence, prompting you at one point for the mysql root password. Create it and that should be about it.

Go ahead and restart apache

 sudo/etc/init.d/apache2 restart

.. and try to pull up the local page in a browser. http://localhost/. This will be pulling the files from the /var/www/ directory.

Now just start adding files and building some internet.

Get All Files From FTP Recursively to Another Linux Server

I just had to move about 50 sites off of rackspace cloud sites, onto a dedicated server. Thats a lot of files, about 48000 actually. There is no ssh access, only ftp with that service, so I had to get all of the files that way.

I am not a fan of normal ftp on the command line, and didnt really know how to do it. I ran across this on serverfault.com: http://serverfault.com/questions/25199/ which gave such a simple, but effective answer.

wget -m ftp://username:password@ip.of.old.host

**Keep in mind, this does not move all of your hidden files… i.e. .htaccess

Setting Up SSH Key Authentication Centos/Fedora

I have recently had to start dealing with a lot of servers, both at work and my side business. Logging into them all the time can be a pain, and managing passwords can be pretty terrible as well. SSH Keys are really convenient for this scenario.They are, for the most part, easy to setup. I have run into a few things, especially to do with permissions on when implementing them. Here is a simplified breakdown of how to set this up on a linux machine (Centos, Fedora, RHEL)

  1. Create directories on both your local machine, as well as the server. (assuming you are on linux or mac)

    mkdir ~/.ssh

  2. Generate your ssh key pair private/public

    ssh-keygen -t rsa

  3. Copy your public key to the server and put it into the authorized_keys file.

    scp id_rsa.pub user@serverip:~/.ssh/
    cat id_rsa.pub >> autorized_keys    (this will create the file if it has not been created, as well as append the value if it already exists with data.)

  4. Change permissions on .ssh directory as well as authorized_keys file.

    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/authorized_keys

Thats it! You should be good to go here. Go ahead and test the login.

The main problem I have encountered in the past is when logging in via ssh, it still prompting me for the password. This is usually due to permissions on the .ssh folder as well as the authorized_keys file.

Wireless Setup on the ASUS UL30V Series

I recently purchased an ASUS UL30V laptop, 13.3″ machine. For some oddball reason the wireless rate defaulted to 1mb/s, which makes for an awful online experience.

How did I find this? Took a minute to figure out what was going on with this, but looking closely at the output of the iwconfig command showed me “Bit Rate=54 Mb/s” for the wlan0 device.
A quick fix. Run:

iwconfig wlan0 rate 54M

This took care of the problem and cleared my connection. But wait…. when I reboot the rate resets to 1Mb/s again. The previous command was not persistent through a reboot, therefore I would have to run this command everytime I connect. Thank God for automation though. I added the following lines to my /etc/rc.local file.

ifconfig wlan0 up  
iwconfig wlan0 rate 54M

And wabam! Everytime I boot up this sweet little machine, I connect with normal speeds.

Installing Adobe Air on Fedora 13

I sat down to setup a new box with FC 13 on it tonight. Everything went really smooth until I wanted to install Adobe Air applications on there. I kept getting this big fat error:

[tom@tomhost Downloads]$ ./AdobeAIRInstaller.bin  
(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  

(setup:2351): Gtk-WARNING **: Unable to locate theme engine in module_path: "clearlooks",  
Gtk-Message: Failed to load module "pk-gtk-module": libpk-gtk-module.so: cannot open shared object file: No such file or directory  
Gtk-Message: Failed to load module "canberra-gtk-module": libcanberra-gtk-module.so: cannot open shared object file: No such file or directory

I finally found a series of guides that got me through it. The first one was this site, which got me most of the way.

Next one got me the rest:

After installing all of those dependencies I was able to run the AdobeAir executable and install.

Magento 1.4 Contact Form Error: Unable to Submit Your Request. Please, Try Again Later

After successfully setting up Magento on Centos 5.4, and installing the theme we developed for our client, I was still running into a problem with the contact form. Every time I submitted a contact request, I received this generic error:

Unable to submit your request. Please, try again later

First off, I had to check my server and make sure that postfix was running and installed correctly. I examined /etc/postfix/main.cf to make sure my settings were correct from my installation.

Since all the settings were correct, and I was able to send a mail from the command line, I then looked at my php configuration to make sure the mail() function was working correctly. In order to test the mail function I uploaded a simple mail script:

This script worked fine and mail was sent out successfully to me. This narrowed it down to an issue with Magento itself, and most likely the base theme that we had developed it from. A little research on the old Google, and I ran across this article at screencastworld.com

The Magento form was failing due to validation errors from /app/code/core/Mage/Contacts/controllers/IndexController.php. Magento was trying to validate the “hideit” field, which did not exist in our form.

if (Zend_Validate::is(trim($post['hideit']), 'NotEmpty')) {  
                    $error = true;  
                }

So I just had to go into my form and add this line right above the submit button:

That’s it, the form now works fine with that hidden field added. Weird problem and a bit of a headache to solve, but hopefully you ran across this article before it drove you too crazy.

Easy Mail Installation – Centos

To install a barebones, default installation of an email server using Postfix is pretty simple. There are, of course, many other setting that should be configured in order to secure the server. This is just to get it up and running and sending mail.

sudo yum install postfix

That’s about it for the installation, not too bad eh?

Now to start the service

[david@makewhatis~]$ sudo /etc/init.d/postfix start

lets test the mail server:

[david@makewhatis~]$ mail david@makewhatis.com  
Subject: This is a TEST  
I pressed enter and now this is the body. Now I will press enter and end the body with a period on the next line  
.  
Cc:

And that’s it!

For more detailed instructions on a mail server setup you can refer to

Backing Up MySQL Database to Rackspace Cloud Files on Centos 5.4

I just got done setting up automatic backups to Rackspace Cloud files for a MySQL db running on Centos 5.4. I followed this guide here which is directed at Ubuntu 9.10 users, but worked just fine on Centos. Only change I really had to make was installing via yum, as opposed to apt-get.

It went pretty smoothly, and my db is now being backed up once every hour, on the hour to my cloud files container. Sweet stuff.

I won’t regurgitate the code, so just visit this URL to get educated:   (just remember to pick up the latest version of python-cloudfiles, because the link in the article is a couple releases behind).