ubuntu下gitlab安装配置

前端之家收集整理的这篇文章主要介绍了ubuntu下gitlab安装配置前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

网址:https://www.gitlab.com.cn/installation/#ubuntu

root@alex-virtual-machine:/home/alex# apt-get install curl openssh-server ca-certificates postfix

1. Install and configure the necessary dependencies

If you install Postfix to send email please select 'Internet Site' during setup. Instead of using Postfix you can also use Sendmail orconfigure a custom SMTP serverandconfigure it as an SMTP server.

On CentOS,the commands below will also open HTTP and SSH access in the system firewall.

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

2. Add the GitLab package server and install the package

curl -sS http://packages.gitlab.cc/install/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install gitlab-ce

If you are not comfortable installing the repository through a piped script,you can find theentire script hereandselect and download the package manuallyand install using

dpkg -i gitlab-ce-XXX.deb

3. Configure and start GitLab

sudo gitlab-ctl reconfigure

4. 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 isroot. Provide the password you created earlier and login. After login you can change the username if you wish.

修改配置文件

vim /etc/gitlab/gitlab.rb

,按照该方式,我安装了一个确实没问题,只不过是英文版。没有经过汉化。
2,默认安装登录需要重置root密码。可以自己单独设置一个复杂密码后登录
3,gitlab本身采用80端口,如安装前服务器有启用80,安装完访问会报错。需更改gitlab的默认端口。
修改vim/etc/gitlab/gitlab.rb:

 
  1. external_url 'http://localhost:90'

4,unicorn本身采用8080端口,如安装前服务器有启用8080,安装完访问会报错。需更改unicorn的默认端口。
修改 /etc/gitlab/gitlab.rb:

 
  1. unicorn['listen'] = '127.0.0.1'
  2. unicorn['port'] = 3000

默认登录账号为root

密码访问时会让你设置登录密码

登录后的仓库界面如下:

猜你在找的Ubuntu相关文章