How to install mercurial on centos

Mercurial is a free, distributed source control management tool. It efficiently handles projects of any size and offers an easy and intuitive interface. You can setup mercurial on a server just to keep your teams repository. It’s pretty easy to install it to your CentOS machine , or vm. You can just run the command:

yum install mercurial

 

and that’s all. I think that it’s easy to install it to other Linux distributions too. Now all you have to do is to add a group for the developers and a user for each of them to have access to the repositories.

If your team of developers use windows as their primary operating system Mercurial is the right choice for a scm. Mercurial just works on Windows. The definitive Mercurial book (written by Bryan O’Sullivan – a fellow Irishman) is concise, and exhaustive. Better yet, if you want that warm fuzzy feeling a GUI gives you, then look no further than TortoiseHg – a top quality tool. It’s good to learn Mercurial mainly on the command line. I wanted to understand how Mercurial worked, and how it is different from SVN.

Kolab install on Centos 6.3

I tried to install kolab on Centos 6.3 following this quick how to , that I found on kolab groupware community: http://www.kolab.org/howto/quick-howto-kolab-24-centos-62

I tried to follow these steps on Centos 6.3 and I found some problems during installation.  I googled a lot and I found some useful things:

The first two steps on the quick how to guide on Kolab.org are correct:

  • Install the epel-release package linked to from this page. At the time of this writing, this means executing:
# rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm
  • Install the kolab-2.4-community release package linked to from this page. At the time of this writing, this means executing:
# rpm -Uvh http://mirror.kolabsys.com/pub/redhat/kolab-2.4/el6/release/i386/kolab-2.4-community-release-6-1.el6.kolab_2.4.noarch.rpm

From now on there are some problems and up to here the quide was perfect, and I think that it was very useful.

When I followed the next step installing the Kolab Groupware:

# yum install kolab

I got some problems like:

Error: Package:  1:qt-mysql-4.6.2-24.3l6.i686 (@base/$releasever)
Requires: libmysqlclient_r.so.16(libmysqlclient_16)
Removing: mysql-libs-5.1.61-4.el6.i686
(@base/$releasever)
libmysqlclient_r.so.16(libmysqlclient_16)
Updated By : mysql-libs-5.5.24-1el6.kolab_2.4.i686
(kolab-2.4-development) Not found
Error: Package:  1:qt-mysql-4.6.2-24.3l6.i686 (@base/$releasever)
Requires: libmysqlclient_r.so.16
Removing: mysql-libs-5.1.61-4.el6.i686
(@base/$releasever)
libmysqlclient_r.so.16(libmysqlclient_16)
Updated By : mysql-libs-5.5.24-1el6.kolab_2.4.i686
(kolab-2.4-development) Not found

as one guy reffered to the mailing list of kolab.

the problem is that there is the package qt-mysql-4.6.2-20.el6.x86_64 that is must be removed. If you try to execute:

#rpm -e qt-mysql-4.6.2-20.el6.x86_64

you will got an error that akonadi depends on this package and cannot be removed. In my system I do not need this package, so I removed it by executing:

#yum remove akonadi.x86_64

Then I was able to remove the package qt-mysql-4.6.2-20.el6.x86_64.

#rpm -e qt-mysql-4.6.2-20.el6.x86_64

Now that this package was removed, there is no problem to install kolab with the command:

#yum install kolab

All the things were done more easily when I followed the advice of  Jeroen van Meeuwen here

The installation completed, now it’s time to try setup and configure it!

Good luck to everyone trying to install and deploy kolab!

Alias and Permanent Alias

First of all, for those that don’t know what an alias is, alias is a way to pair a command with a name of your choice. For example I use all the time the command ls passing arguments -lah. So I made an alias for this command with the name ll. From now on whenever use the ll command the shell knows to execute the ls -lah.

An alias lasts for a session. When the session ends the alias exprires.

So before telling you how to set alias and view aliases of the system, you must know how long an alias should exist.

If you want to get all the alias for the session you are just type

$alias

If you want to set an alias for the current session just type

$alias ll='ls -lah'

If you want to remove an alias for the current session just type

$unalias ll

If you want to add an alias permanently, you have to edit your bash file.

For linux mint this files is name bash.bashrc and is located under /etc directory.

The filename and directory varies on each linux distribution.

Aliases in Centos

You can add a permament alias in centos using the following simple steps:

1st step Create a file in /etc/profile.d/ directory

create a file with filename relative to the command you want to make an alias (this is just a mnemonic hint) inside the directory: /etc/profile.d/ as is shown in the following example:

vi /etc/profile.d/ldapsearch.sh

In this example I need to create an alias for ldapsearch, so I name my file ldapsearch.sh

2nd step Define the alias in the file

Insert in the alias’s definition file something like the following:

# Initialization script for bash and sh
# export AFS, if you are in AFS environment
alias ldapsearch='/usr/bin/ldapsearch -h ds.example.com -D uid=searchuser,dc=example,dc=com -w searchpass -x -b dc=example,dc=com -s sub -LLL'

3rd step Give the right permissions to the file

You have to run the following command, where ldapsearch.sh is an example

chmod 755 /etc/profile.d/ldapseach.sh

4th step Restart your session Or Source the file you created

Now you have to either restart your session, by exiting the terminal, and open a new one, or use the following command:

source /etc/profile.d/ldapsearch.sh

Now you are ready to create your own aliases, to make your terminal experience even better!