gitlab安装与简单配置-创新互联
1、官网安装文档:https://about.gitlab.com/downloads/#centos7
创新互联专注于中大型企业的网站设计制作、网站制作和网站改版、网站营销服务,追求商业策划与数据分析、创意艺术与技术开发的融合,累计客户成百上千家,服务满意度达97%。帮助广大客户顺利对接上互联网浪潮,准确优选出符合自己需要的互联网运用,我们将一直专注成都品牌网站建设和互联网程序开发,在前进的路上,与客户一起成长!sudo yum install curl policycoreutils openssh-server openssh-clients sudo systemctl enable sshd sudo systemctl start sshd sudo yum install postfix sudo systemctl enable postfix sudo systemctl start postfix sudo firewall-cmd --permanent --add-service=http sudo systemctl reload firewalld2、配置官网镜像源
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash sudo yum install gitlab-ce由于国内特殊网络,使用官网镜像源较慢,在次提供国内镜像源
清华大学镜像源:https://mirror.tuna.tsinghua.edu.cn/help/gitlab-ce/
RHEL/CentOS 用户
新建 /etc/yum.repos.d/gitlab-ce.repo
,内容为
再执行
sudo yum makecache sudo yum install gitlab-ce安装完成后目录结构如下
[root@docker gitlab]# tree /opt/gitlab/ -L 1 /opt/gitlab/ ├── bin ├── dependency_licenses.json ├── embedded ├── etc ├── init ├── LICENSE ├── LICENSES ├── service ├── sv ├── var ├── version-manifest.json └── version-manifest.txt 8 directories, 4 files [root@docker gitlab]# tree /etc/gitlab/ -L 1 /etc/gitlab/ ├── gitlab.rb ├── gitlab-secrets.json └── trusted-certs主要集成了如下服务
# tree /opt/gitlab/sv/ -L 1 /opt/gitlab/sv/ ├── gitaly ├── gitlab-monitor ├── gitlab-workhorse ├── logrotate ├── nginx ├── node-exporter ├── postgres-exporter ├── postgresql ├── prometheus ├── redis ├── redis-exporter ├── sidekiq └── unicorn3、配置gitlab地址
# cat /etc/gitlab/gitlab.rb |grep ^external_url external_url 'http://192.168.99.101'默认url地址是http://{hostname}
4、重载配置并启动
gitlab-ctl reconfigure启动时确保80、8060、8080、9090、9100、9121、9168、9187这些端口没有占用,否则启动失败
5、查看启动状态
# gitlab-ctl status run: gitaly: (pid 5435) 2522s; run: log: (pid 4150) 3071s run: gitlab-monitor: (pid 5441) 2522s; run: log: (pid 4585) 3023s run: gitlab-workhorse: (pid 5445) 2522s; run: log: (pid 4203) 3065s run: logrotate: (pid 5456) 2521s; run: log: (pid 4305) 3053s run: nginx: (pid 5737) 2439s; run: log: (pid 4264) 3059s run: node-exporter: (pid 5471) 2520s; run: log: (pid 4415) 3041s run: postgres-exporter: (pid 5478) 2520s; run: log: (pid 4514) 3029s run: postgresql: (pid 5487) 2519s; run: log: (pid 3858) 3170s run: prometheus: (pid 5490) 2519s; run: log: (pid 4372) 3047s run: redis: (pid 5497) 2518s; run: log: (pid 3744) 3181s run: redis-exporter: (pid 5502) 2518s; run: log: (pid 4449) 3035s run: sidekiq: (pid 5804) 2371s; run: log: (pid 4104) 3077s run: unicorn: (pid 5540) 2515s; run: log: (pid 4049) 3083s6、gitlab启动、停止、重启等操作
[root@docker gitlab]# gitlab-ctl stop ok: down: gitaly: 0s, normally up ok: down: gitlab-monitor: 0s, normally up ok: down: gitlab-workhorse: 1s, normally up ok: down: logrotate: 0s, normally up ok: down: nginx: 1s, normally up ok: down: node-exporter: 0s, normally up ok: down: postgres-exporter: 0s, normally up ok: down: postgresql: 0s, normally up ok: down: prometheus: 0s, normally up ok: down: redis: 1s, normally up ok: down: redis-exporter: 0s, normally up ok: down: sidekiq: 0s, normally up ok: down: unicorn: 0s, normally up [root@docker gitlab]# gitlab-ctl start ok: run: gitaly: (pid 14482) 0s ok: run: gitlab-monitor: (pid 14488) 1s ok: run: gitlab-workhorse: (pid 14491) 0s ok: run: logrotate: (pid 14500) 0s ok: run: nginx: (pid 14506) 1s ok: run: node-exporter: (pid 14514) 0s ok: run: postgres-exporter: (pid 14520) 1s ok: run: postgresql: (pid 14526) 0s ok: run: prometheus: (pid 14534) 1s ok: run: redis: (pid 14544) 0s ok: run: redis-exporter: (pid 14548) 0s ok: run: sidekiq: (pid 14559) 1s ok: run: unicorn: (pid 14562) 0s [root@docker gitlab]# gitlab-ctl status run: gitaly: (pid 14482) 12s; run: log: (pid 4150) 3982s run: gitlab-monitor: (pid 14488) 12s; run: log: (pid 4585) 3934s run: gitlab-workhorse: (pid 14491) 11s; run: log: (pid 4203) 3976s run: logrotate: (pid 14500) 11s; run: log: (pid 4305) 3964s run: nginx: (pid 14506) 11s; run: log: (pid 4264) 3970s run: node-exporter: (pid 14514) 10s; run: log: (pid 4415) 3952s run: postgres-exporter: (pid 14520) 10s; run: log: (pid 4514) 3940s run: postgresql: (pid 14526) 9s; run: log: (pid 3858) 4081s run: prometheus: (pid 14534) 9s; run: log: (pid 4372) 3958s run: redis: (pid 14544) 8s; run: log: (pid 3744) 4092s run: redis-exporter: (pid 14548) 8s; run: log: (pid 4449) 3946s run: sidekiq: (pid 14559) 8s; run: log: (pid 4104) 3988s run: unicorn: (pid 14562) 7s; run: log: (pid 4049) 3994s [root@docker gitlab]# gitlab-ctl restart ok: run: gitaly: (pid 14624) 0s ok: run: gitlab-monitor: (pid 14630) 0s ok: run: gitlab-workhorse: (pid 14633) 1s ok: run: logrotate: (pid 14645) 0s ok: run: nginx: (pid 14651) 1s ok: run: node-exporter: (pid 14659) 0s ok: run: postgres-exporter: (pid 14665) 1s ok: run: postgresql: (pid 14674) 0s ok: run: prometheus: (pid 14684) 0s ok: run: redis: (pid 14695) 1s ok: run: redis-exporter: (pid 14699) 0s ok: run: sidekiq: (pid 14705) 1s ok: run: unicorn: (pid 14710) 0s [root@docker gitlab]#另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
当前题目:gitlab安装与简单配置-创新互联
分享地址:http://cdiso.cn/article/djhjgh.html