GitLab CE Omnibus installation in Ubuntu 16.04

GitLab CE Omnibus installation in Ubuntu 16.04

Install and configure the necessary dependencies

Select “local only” in this step, we will configure the SMTP in the following step.

sudo apt-get install curl openssh-server ca-certificates postfix

Add the GitLab package server and install the package

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install gitlab-ce

Configure and start GitLab

In order for GitLab to display correct repository clone links to your users it needs to know the URL under which it is reached by your users, e.g. http://gitlab.example.com. Add or edit the following line in /etc/gitlab/gitlab.rb:

external_url “http://achernar.ece.tamu.edu”

SMTP settings

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "smtp.gmail.com"
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = "my.email@gmail.com"
gitlab_rails['smtp_password'] = "my-gmail-password"
gitlab_rails['smtp_domain'] = "smtp.gmail.com"
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_tls'] = false
gitlab_rails['smtp_openssl_verify_mode'] = none

Storing Git data in an alternative directory

By default, omnibus-gitlab stores the Git repository data under /var/opt/gitlab/git-data. The repositories are stored in a subfolder repositories. You can change the location of the git-data parent directory by adding the following line to /etc/gitlab/gitlab.rb.

git_data_dirs({"default" => "/mnt/nas/git-data"})

update these configuration by this command:

sudo gitlab-ctl reconfigure

You can also use this command to check if gitlab is installed correctly.

sudo gitlab-ctl status

The output should be like this:

run: gitlab-workhorse: (pid 11740) 82439s; run: log: (pid 11635) 82453s
run: logrotate: (pid 1481) 3248s; run: log: (pid 11659) 82449s
run: nginx: (pid 13931) 80894s; run: log: (pid 11643) 82451s
run: postgresql: (pid 11488) 82478s; run: log: (pid 11487) 82478s
run: redis: (pid 11401) 82484s; run: log: (pid 11400) 82484s
run: sidekiq: (pid 19645) 16362s; run: log: (pid 11625) 82455s
run: unicorn: (pid 19684) 16351s; run: log: (pid 11594) 82457s

Browse to the hostname and login

On your first visit, you'll be redirected to a password reset screen to provide the password for the initial administrator account. Enter your desired password and you'll be redirected back to the login screen.

The default account's username is root. Provide the password you created earlier and login. After login you can change the username if you wish.

转载于:https://www.cnblogs.com/shibalang/p/6477170.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值