Centos – change hostname

To permanent change your hostname you have to edit the /etc/sysconfig/network file and set the variable HOSTNAME to your needs.

vi /etc/sysconfig/network

give the value you want to HOSTNAME variable like the following example:

HOSTNAME=myhost1.example.com

now this change will take effect after a reboot. There is a way to avoid reboot. You have to run the following command:

echo "myhost1.example.com" > /proc/sys/kernel/hostname

and that’s all!!!

How to disable ipv6 networking – CentOS

There are some simple steps to follow, in order to disable ipv6 networking on CentOS. This simple guide is about CentOS 6.4, but I think that it will work on both a little older or next versions of this Operating System.

Step 1: add this rule in /etc/sysctl.conf : net.ipv6.conf.all.disable_ipv6 = 1

Step 2: add this rule in /etc/sysconfig/network: NETWORKING_IPV6=no

Step 3: add this setting for each nic X (X is the corresponding number for each nic) in /etc/sysconfig/network-scripts/ifcfg-ethX: IPV6INIT=”no”

Step 4: disable the ip6tables service : chkconfig ip6tables off

Step 5: reboot

See how nfs client is connected to nfs server

Find out the configuration with which the nfs client is connected to the nfs server.

 

Bouncing my head to my keyboard while trying to find out where is the bottleneck on an nfs client-server relationship, I found out how to see the configuration with which the nfs client is connect to the server:

 

nfsstat -m

 

And the output is:

/nfsshare from nexenta.nfs-servers.example.com:/volumes/datastore/dataset/
 Flags: rw,relatime,vers=4,rsize=32768,wsize=32768,namlen=255,hard,proto=tcp,port=0,timeo=600,retrans=2,sec=sys,clientaddr=10.0.2.21,minorversion=0,local_lock=none,addr=10.0.2.245

 

Knowing exactly how the client is connected to the server, you can find more easily where the problem is.

 

Using the nfsstat -m command, you get the information about all nfs mounts. The -m switch is present on centOS, but abscent on FreeBSD, in which I do also performance tests.

 

You can also find all this information and also all the information about all mounts ( not only nfs mounts) if you execute:

 

cat /proc/mounts

 

I am trying to get this info on FreeBSD,  if everyone knows everything about this, please post a comment. I also asked a question at http://unix.stackexchange.com/questions/91594/nfs-mount-properties-options-in-freebsd to help me find the solution.

Upgrade from Centos 6.3 to Centos 6.4

Supposing that you have a clear installation of a Centos 6.3 and you want to upgrade it to Centos 6.4, you have to do two steps to complete this process. The first step is to run a yum update command:

yum update

The second step is to remove the deprecated matahari, as proposed from Centos 6.4 Release Notes

To ensure that you have successfully upgraded to 6.4 run the command:

cat /etc/redhat-release

if Centos Relsease 6.4 (Final) is the content of the /etc/redhat-release file then you can continue to the next step:

yum erase matahari*

If it’s a clean installation, possibly there is no remains of matahari packages on the system.

How to install mercurial on centos

You can setup mercurial on a server just to keep your teams repository. It’s pretty easy to install it to your CentOS machine

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!