centos7安装gitlab
关闭selinux
或者设置防火墙允许80端口访问
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
setenforce 0
关闭防火墙systemctl disable firewalld.service
systemctl stop firewalld.service
或者设置防火墙允许80端口访问
firewall-cmd --zone=public --add-port=80/tcp --permanent
firewall-cmd --zone=public --add-port=80/udp --permanent
firewall-cmd --reload
下载gitlab源curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
安装gitlabyum install gitlab-ce-12.4.2-ce.0.el7.x86_64
优化gitlabvim /etc/gitlab/gitlab.rb
external_url ‘http://192.168.11.247‘
#我没有搭建dns,直接填ip
unicorn[‘worker_timeout‘] = 60 unicorn[‘worker_processes‘] = 2 #官方建议cpu核数加1 unicorn[‘worker_memory_limit_min‘] = "200 * 1 << 20" unicorn[‘worker_memory_limit_max‘] = "300 * 1 << 20" postgresql[‘shared_buffers‘] = "256MB" postgresql[‘max_worker_processes‘] = 8
启动gitlab
校验: gitlab-ctl reconfigure
启动: gitlab-ctl start
访问gitlab