Archive for the ‘Tech :: Linux’ Category

How to quickly delete files from Subverseion

Monday, October 22nd, 2007

This is a modification of my quickly add files to Subversion post to allow you to delete files in SVN that have been locally deleted:

$ svn st | grep ^! | cut -b7- | xargs svn delete

Of course, you’ll need to commit the files:

$ svn commit

-Chris

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

How to remove .SVN directories

Monday, October 15th, 2007

Here’s a handy command for removing .SVN directories as you get ready to launch an application managed by Subversion:

$ find . -name .svn -print | xargs rm -rf {}

-Chris

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

How to quickly add new files to Subversion

Monday, October 15th, 2007

Quick tip: If you need to add files that are not currently in the repository to SVN, just run the following command from the directory:

$ svn st | grep ^? | cut -b7- | xargs svn add

Of course, you’ll need to commit the files:

$ svn commit

-Chris

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

How to count the number of files in a directory

Sunday, October 14th, 2007

I recently needed to count the number of files, not including directories, within a given directory. Additionally, I wanted to count recursively.

On FreeBSD or Linux, you can do this with the following commands:

$ find /path/to/dir -type f | wc -l

Pretty handy!

-Chris

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Update on Zimbra Connector for Outlook

Tuesday, October 9th, 2007

Jake has been testing our Zimbra 4.6.7 setup using the beta version of the Zimbra Connector for Outlook. We contacted Zimbra directly and were able to get access to the beta. In our tests, the functionality of the connector is good, but the stability is not. Jake is running Vista and Outlook 2007 and is reporting almost unusable stability of Outlook when using the Zimbra client. Hopefully these issues will be resolved soon and I think we’ll be set to use it in production.

Additionally, he tested the mobility features and found that they work well on his Windows Mobile smart-phone.

Zimbra the Release Candidate of Zimbra 5.0 (Network Edition) should be out soon — like, next week — so I look forward to seeing what changes have been implemented there.

Additionally, Jake is in discussions with Scalix about pricing, features and such so if the price is right we’ll be looking at that soon too. I also want to take a look at Open Exchange and will be doing so soon.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Zimbra First Impressions

Friday, October 5th, 2007

Today I installed Zimbra for the first time. Zimbra is an open-source, Linux-/UNIX-based collaboration and mail server suite, similar in features to Microsoft Exchange. It has native support for MAPI and is supposed to work great with Outlook. It also has advanced mobility features that put it on par with Exchange.

I spun up a Virtual Machine on our VMware server and loaded Ubuntu 6.06 Server. Once the base install was done, I removed the CD-ROM source from /etc/sources.list and ran:

# apt-get update

This made the package manager know it was to use FTP or HTTP to download packages. Next, I ran the following:

# wget http://files.zimbra.com/downloads/4.5.7_GA/zcs-NETWORK-4.5.7_GA_1319.UBUNTU6.tgz
# tar zxf zcs-NETWORK-4.5.7_GA_1319.UBUNTU6.tgz
# cd zcs
# sudo ./install.sh

This ran through the initial process and listed several packages that needed to be installed, so I installed them next and re-ran the installer:

# sudo apt-get install libidn11 curl fetchmail libpcre3 libgmp3c2 libxml2 libstdc++6 openssl perl libexpat1 libstdc++5
# sudo ./install.sh

This went through several very obvious questions as part of installation, including the administrator password. At one point near the end, it asked for my license file. I signed up for a free trial on Zimbra’s website, and that was emailed to me in the form of a XML file. I simply used SCP to move that up to the server, typed in the path to the file and it worked great.

I made one big mistake though: The password I provided for the admin account had a special character that must have thrown the setup program off. Although it reported the admin user was created, post-installation user account listings showed that other default users had been created but the admin user was nowhere to be found. Additionally, I couldn’t login to the admin using the admin username and password I provided. Bummer…

So, I spent the next two hours trying to figure out how to add a new admin. It wound up being a very simple command:

# zmprov ca testadmin@domain.com test123 zimbraIsAdminAccount TRUE

The key here is the “zimbraIsAdminAccount TRUE” attribute. Once I did that, I was able to login to the admin panel and everything worked out of the box as far as I can tell. I was able to point my domain’s MX record to the public IP of the server (I placed it behind a NAT) and before long I had setup another domain with a few user accounts and had mail flowing.

Had the admin password not screwed up, it would have been working about 20 minutes — which is amazing.

It seems to use a local LDAP server by default, but I did have the option to specify an LDAP server during the installation as well as clustering options that I didn’t touch, since this was a VM. Apparently it stores user account data in LDAP and mail schema information in a MySQL 5.0 database which was also installed. I’m not sure yet where it stores the data (email, etc.) but I think it’s on the raw file system as it should be.

The web interface is pretty cool with lots of AJAX. That said, it doesn’t work in Safari 3.x beta yet; I read they’re working on that. Since that is my primary browser, I was using Camino 1.5 instead.

Jake is going to be testing the MAPI connector and the mobility features and I’m sure he’ll report on that soon.

I’m going to move on to setting up a Scalix server next I believe. We’re looking for a good open-source, Outlook-supporting collaboration server that’s on par with Exchange server.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Ubuntu default install doesn’t have SSHd

Friday, October 5th, 2007

I’m installing Zimbra to test it out, so I spun up a Ubuntu virtual machine on our VMware server. Much to my surprise, the base install of Ubuntu 6.04 doesn’t have an SSH server turned on or even installed. Since Ubuntu uses the Debian package manager, it’s very easy to install; just annoying that you have to do it at all:

# sudo apt-get install openssh-server
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

How to Clone a Virtuozzo VPS

Friday, October 5th, 2007

This comes in handy. You can take an “image” of a VPS, and just not start it up (ever). Then later, when you need to spawn a new instance of it, just clone it again.

# vzmlocal -C old_VEID:new_VEID
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]