官术网_书友最值得收藏!

  • GitLab Cookbook
  • Jeroen van Baarsen
  • 444字
  • 2021-08-05 16:55:03

Using the Omnibus package

The people from GitLab have created an Omnibus package for the major Linux distributions (Ubuntu, Debian, and CentOS). These packages are an easy way of installing your GitLab installation, as they have all the dependencies packaged with them.

For this recipe, we are going to use the Ubuntu version of the Omnibus package.

Getting ready

Before we start installing, you need to have a server installed with a Ubuntu 12.04 64-bit system, and have SSH access to the server.

How to do it…

Here is how you can install GitLab using Omnibus:

  1. Download the package, change the X.Y.Z portion to the version you want to download. At the time of writing, 7.3.2 is the latest version:
    wget https://downloads-packages.s3.amazonaws.com/ubuntu-12.04/gitlab_X.Y.Z-omnibus.5.1.0.ci-1_amd64.deb
    
  2. Install the OpenSSH server:
    sudo apt-get install openssh-server
    
  3. Install Postfix:
    sudo apt-get install postfix
    
  4. Postfix will ask you what kind of installation you want; choose the Internet Site option.
  5. Enter the fully qualified domain name for the domain you want GitLab to send e-mails from (that is, gitlab.example.com).
  6. Install the Omnibus package, and replace the X.Y.Z part with your version:
    sudo dpkg -i gitlab_7.3.2-omnibus.5.1.0.ci-1_amd64.deb
    
  7. Now, we will configure your GitLab instance by running the following command:
    sudo gitlab-ctl reconfigure
    
  8. Check to see whether all the services are running using the following command:
    sudo gitlab-ctl status
    

    The output should look like the following screenshot:

You can now log in with the username root and password 5iveL!fe.

How it works…

We have just installed GitLab via the Omnibus installer. Omnibus is a way to package your application and install all the dependencies that are required to run it.

GitLab makes good use of this capability. As you only have to install a mail server and an OpenSSH server, all the other parts are automatically installed for you.

GitLab will auto configure itself with the recommended settings. If you want to change your configuration, you have to first create the configuration file. You can do this as follows:

$ sudo mkdir -p /etc/gitlab
$ sudo touch /etc/gitlab/gitlab.rb
$ sudo chmod 600 /etc/gitlab/gitlab.rb

The settings that you are most likely to change are the ones that are in the gitlab.yml file (https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/gitlab.yml.example).

You need to make a small translation change in order to make this work, so let's say you want to change the port that GitLab is running on; normally, you would change the port value in the GitLab file, but now you have to add an entry to /etc/gitlab/gitlab.rb.

So, for the port, the entry in gitlab.yml would look like the following code:

production: &base
  gitlab:
    port: 80

In the gitlab.rb file, you need to create the following entry: gitlab_rails['port'] = 80.

主站蜘蛛池模板: 澄江县| 孙吴县| 南阳市| 锡林郭勒盟| 大理市| 龙江县| 桐柏县| 柳江县| 札达县| 博爱县| 仙游县| 视频| 桑植县| 梁山县| 黄石市| 新余市| 繁峙县| 岢岚县| 阳原县| 泊头市| 交城县| 兰坪| 苗栗县| 贞丰县| 阿城市| 福鼎市| 武夷山市| 武定县| 光泽县| 杭州市| 淅川县| 科尔| 类乌齐县| 曲麻莱县| 赤城县| 弋阳县| 黄陵县| 济源市| 彩票| 新泰市| 许昌市|