服务器安装了
PHP7
Nginx,占用80端口
Mysql
安装采用官网提供的安装方法.
选择 CentOS 7
GitLab对硬件的要求不是很高,很显然,越好的硬件,越能支撑起更多的项目的和用户.
Ubuntu
Debian
CentOS
Red Hat Enterprise Linux (please use the CentOS packages and instructions)
Scientific Linux (please use the CentOS packages and instructions)
Oracle Linux (please use the CentOS packages and instructions)
OS X
Arch Linux
Fedora
Gentoo
FreeBSD
比如Windows,并不支持.
如果你安装postfix发送邮件,请选择“网站设置”中。而不是使用后缀也可以使用sendmail配置自定义SMTP服务器配置为SMTP服务器。
修改配置文件 <code>vi /etc/postfix/main.cf</code>
修改的部分为
启动服务 <code>sudo systemctl start postfix</code>,成功.
<code>yum install firewalld</code>
<code>systemctl unmask firewalld</code>
<code>curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash</code>
执行上面的命令,会一直 time out ,所以我们要换成国内的源.
<code>vim /etc/yum.repos.d/gitlab-ce.repo</code>
注意,如果对应配置文件下有文件<code>gitlab_gitlab-ce.repo</code>,重命名一下,不然会默认加载这个导致上面的文件不起作用.
查看目前的yum进程,并杀死
上面执行完了,是这样的展示结果
<code>sudo gitlab-ctl reconfigure</code>
接下来会自动配置文件权限,安装数据库….
提示!安装的时间会很长!!!
根据我们服务器监控记录,配置过程花了5个小时!
目前的状态是完成了安装包的安装,但是还没有启用配置文件,所以依赖还都没有装。
所以非常不建议直接运行<code>sudo gitlab-ctl reconfigure</code>,不能再踩一次坑!QAQ
基本我们要调的东西都在<code>/etc/gitlab/gitlab.rb</code>里面,所以这个文件一定要仔细看好。
因为我们本机已经用了LNMP做了环境,所以可以直接采用Mysql作为我们的数据库,而不用<code>postgresql</code>,减少服务器的负担。
企业版才支持使用mysql
QAQ
创建vhost下的配置文件,指向GitLab文件夹
上面的命令是通过<code>gitlab-ctl</code>安装的,那么通过<code>gitlab-ctl</code>命令一样也能做别事情~
<code>gitlab-ctl</code>
这样就知道了我们的服务怎么使用了~
这个命令查看我们的gitlab在运行过程中有没有问题.
<code>gitlab-ctl tail</code>
GitLab对服务器的要求比较高,文档上说4核8G,我的1核512M的小服务器在安装多次后卡死多次。我决定暂时先放放。。。以后再做这个。。。
<a href="https://about.gitlab.com/gitlab-com/">https://about.gitlab.com/gitlab-com/</a>
<a href="http://www.chhua.com/web-note4929">http://www.chhua.com/web-note4929</a>
<a href="https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/">https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/</a>
<a href="https://about.gitlab.com/downloads/">https://about.gitlab.com/downloads/</a>
<a href="https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/database.md#database-settings">https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/settings/database.md#database-settings</a>