Search code examples
gitlabcentos6postfix-mta

How to install GitLab on CentOS 6 running WHM?


I am trying to install GitLab on my dedicated server with no luck.

Server info:

  • CENTOS 6.7 x86_64 standard
  • WHM 11.52.1 (build 2)

I tried this guide, but I keep getting the following error:

Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.mirror.ca.planethoster.net
 * epel: mirrors.mit.edu
 * extras: centos.mirror.iweb.ca
 * updates: centos.mirrors.atwab.net
Resolving Dependencies
--> Running transaction check
---> Package postfix.x86_64 2:2.6.6-6.el6_7.1 will be installed
--> Processing Dependency: mysql-libs for package: 2:postfix-2.6.6-6.el6_7.1.x86_64
--> Finished Dependency Resolution
Error: Package: 2:postfix-2.6.6-6.el6_7.1.x86_64 (updates)
           Requires: mysql-libs
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

When I run the following command:

sudo yum install postfix

I get the following error:

Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
epel/metalink                                                                                                                  |  12 kB     00:00     
 * base: centos.mirror.iweb.ca
 * epel: mirrors.mit.edu
 * extras: centos.mirrors.atwab.net
 * updates: centos.mirror.netelligent.ca
base                                                                                                                           | 3.7 kB     00:00     
epel                                                                                                                           | 4.3 kB     00:00     
epel/primary_db                                                                                                                | 5.8 MB     00:00     
extras                                                                                                                         | 3.4 kB     00:00     
updates                                                                                                                        | 3.4 kB     00:00     
updates/primary_db                                                                                                             | 2.6 MB     00:00     
virtualbox/signature                                                                                                           |  198 B     00:00     
virtualbox/signature                                                                                                           |  951 B     00:00 ... 
No package mysql-libs available.
Error: Nothing to do

When I run the following command:

sudo yum install mysql-libs


Solution

  • What I eventually did was skip the installation of postfix. I skipped it like so:

    sudo yum install --skip-broken curl openssh-server openssh-clients postfix cronie
    

    Then I edited the gitlab.rb config file using something like nano:

    nano /etc/gitlab/gitlab.rb
    

    and changed the external_url' and added to it a random unused port number:

    external_url 'http://example.com:8443/'
    

    then run

    sudo gitlab-ctl reconfigure
    

    for the change to take effect.

    Voila it works.