GitLab is an open-source application developed using Ruby on Rails. Similar to Github, GitLab can browse source code, manage defects, and comment, making GitLab ideal for internal teams. The official website only provides installation instructions for the Debian/Ubuntu system. If you need to install the tool in CentOS, refer to this article: Installation.
First show the results after the installation is complete.
Centos gitlab installation results
Install GitLab on Ubuntu 12.04
GitLab 5.3 upgrade considerations
Deploy GitLab on CentOS (self-managed Git project repository)
Install GitLab 6.0.2 on RHEL6/CentOS6/ScientificLinux6
Before getting started
Before you begin, see the official on-demand document: https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/requirements.md, which describes requirements for systems, software and hardware. Understanding this in detail can avoid many weird problems.
Installation Steps Overview
- Basic Operating System (CentOS 6.4 Minimal, 6.5 after upgrade)
- Ruby (Version: 2.0.0p353)
- Create a project running user (create a git account to facilitate permission management)
- GitLab Shell (Version: 1.8.0)
- Database (mysql and PostgreSQL are supported. mysql is used here. Version: 5.1.17)
- GitLab (Version: 6.3.1)
- Web Server (nginx and apache are supported. nginx is used here. Version: 1.0.15)
- Firewall (iptables)
1. Install the Operating System
This is relatively simple. After the installation is complete, remember to configure the network so that it can be automatically connected at startup. Then you need to upgrade the system and install some corresponding software and dependency packages.
Tips: if you cannot connect to a foreign network, there are often network errors or errors such as couldn 'tnot resolve host. We recommend that you change the dns server to 8.8.8.8.8 and 8.8.4.4.
A. Upgrade the operating system and install wget
$ sudo yum -y update$ sudo yum -y install wget
The system version is 6.5 after the upgrade is completed.
Note: different from the English document, I will first upgrade the system and install wget. Otherwise, the following operations will prompt you to find the wget command.
B. Add an EPEL installation source.
EPEL, Extra Packages for Enterprise Linux, is a software warehouse that has many frequently used software and is specially designed for RHEL. It is a good supplement to the RHEL standard yum source, it is completely free to use and maintained by the Fedora Project. Therefore, if you are using RHEL, CentOS, Scientific, and other RHEL linux systems, you can use the EPEL yum source with peace of mind.
Download and install the GPG key
$ sudo wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 https://www.fedoraproject.org/static/0608B895.txt$ sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Check whether the installation is successful
$ sudo rpm -qa gpg*
Install epel-release-6-8.noarch package
$ sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Tip: do not care about x86_64, which can be used on i686 machines.
C. Add PUIAS installation Source
PUIAS Linux is a complete operating system for desktops and servers. It is created by compiling the source code package of Red Hat Enterprise Linux. In addition to these upstream software packages, the project also provides some other software repositories: "Addons" contains general non-paid additional software packages in Red Hat releases, "Computational" provides software specifically for scientific computing, and "Unsupported" generates a variety of testing software packages. The publication was maintained by the Institute of Advanced Studies at Princeton University.
Create/etc/yum. repos. d/PUIAS_6_computational.repo and add the following content:
[PUIAS_6_computational]name=PUIAS computational Base $releasever - $basearchmirrorlist=http://puias.math.ias.edu/data/puias/computational/$releasever/$basearch/mirrorlist#baseurl=http://puias.math.ias.edu/data/puias/computational/$releasever/$basearchgpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puias
Download and install the GPG key
$ sudo wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-puias http://springdale.math.ias.edu/data/puias/6/x86_64/os/RPM-GPG-KEY-puias$ sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-puias
Check whether the installation is successful
$ sudo rpm -qa gpg*
Tips: After the EPEL and PUIAS sources are installed, check:
$ sudo yum repolist
D. Dependency packages and tools required for GitLab Installation
$ su -$ yum -y groupinstall 'Development Tools'$ yum -y install vim-enhanced readline readline-devel ncurses-devel gdbm-devel glibc-devel tcl-devel openssl-devel curl-devel expat-devel db4-devel byacc sqlite-devel gcc-c++ libyaml libyaml-devel libffi libffi-devel libxml2 libxml2-devel libxslt libxslt-devel libicu libicu-devel system-config-firewall-tui python-devel redis sudo wget crontabs logwatch logrotate perl-Time-HiRes git
RHEL prompt
If some packages cannot be installed, such as eg. gdbm-devel, libffi-devel and libicu-devel, add the rhel6 installation source.
$ yum-config-manager --enable rhel-6-server-optional-rpms
E. Configure redis
Configure redis to start at startup:
$ sudo chkconfig redis on$ sudo service redis start
F. Configure the email server
Note: I have not configured this process. Please refer to the English document.
For more details, please continue to read the highlights on the next page: