gitlab.png][1]
一、安装并配置必要的依赖关系
1、安装SSH协议
安装命令:sudo yum install -y curl policycoreutils-python openssh-server
安装成功会出现如下图所示:
2、设置SSH服务开机自启动
配置命令:sudo systemctl enable sshd
3、启动SSH服务
配置命令:sudo systemctl start sshd
4、安装防火墙
配置命令:sudo yum install firwalld systemd -y
5、启动防火墙
配置命令:service firewalld start![image.png]
6、添加HTTP服务到firewalld
配置命令:sudo firewall-cmd --permanent --add-service=http
其中pemmanent表示永久生效,若不加--permanent则系统下次启动后就会失效!
7、重启防火墙
配置命令:sudo systemctl reload firewalld
8、安装Postfix以发送邮件
配置命令:sudo yum install postfix
9、配置Postfix服务开机自启动
配置命令:sudo systemctl enable postfix
10、安装vim编辑器和wget下载器
安装命令:sudo yum install -y vim
安装命令:sudo yum install -y wget
二、添加GitLab镜像源并安装gitlab服务
1、添加gitlab镜像
配置命令:wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-14.3.2-ce.0.el7.x86_64.rpm
出现如下图所示表示下载完成,接下来就可以安装Gitlab了:
2、安装Gitlab
安装命令:rpm -i gitlab-ce-14.3.2-ce.0.el7.x86_64.rpm
安装过程需要一些时间,等待安装后,安装成功界面如下图所示:
3、修改gitlab配置文件指定服务器IP和自定义端口:
配置命令:vim /etc/gitlab/gitlab.rb
进入gitlab.rb文件后,查找内容(此内容通常在文件31行)external_url 'http://IP:Port',保存并退出
4、将端口添加到防火墙中
配置命令:firewall-cmd --zone=public --add-port=1000/tcp --permanent
5、重启防火墙
配置命令:sudo systemctl reload firewalld
6、重置gitlab
配置命令:gitlab-ctl reconfigure
重置过程需要一些时间等待,重置成功后,最后几行的信息如下图所示:
7、启动gitlab
启动命令:gitlab-ctl restart
出现如下图所示则表示启动成功:
8、访问GitLab页面
访问方式:IP地址+端口号
8.1 出现502页面,修复方法
方法:清理系统防火墙,重启系统防火墙;将内存扩大(因为gitlab非常吃内存)
8.2 出现422页面,修复方法
方法:先怀疑是邮箱配置里 stmp_domain的配置问题(/etc/gitlab/gitlab.rb文件),注释掉并刷新gitlab配置再重启(gitlab-ctl reconfigure gitlab-ctl restart)后,问题并没有解决
8.3 设置私用Gitlab密码
配置命令:gitlab-rails console -e production(根据版本的需要判断是否要加参数 -e)
查找root用户:user=User.where(id:1).first
修改root密码:user.password='密码'
保存root数据:user.save!
退出设置界面:quit
重启Gitlab:gitlab-ctl restart
再使用gitlab reconfigure命令重置即可登录。

Knowing the potential issues associated with https://frankfortamerican.com/prednisone/ allows you to manage your treatment effectively.
Allergic reactions sufferers can discover relief by purchasing https://ampersandflowers.com/product/bestina/ , a reliable solution.
Maximize your savings on essential eye care solutions; discover your opportunity for more affordable treatment options. https://am-review.com/drug/diclofenac-sr/ is your gateway to controlling costs smartly while ensuring quality eye health.
Manage gout effectively by considering https://highlowbaby.com/product/metaflam-easy-chews/ , an potent treatment.
Seeking relief from inflammation or arthritis? Discover how https://browsethebrookfields.com/bottled-cialis/ can help. Learn about your options today.
Vital advice on managing asthma with https://ampersandflowers.com/item/limcee/ is here
Discover the most cost-effective options for managing your health with https://bulgariannature.com/ozempic-without-dr-prescription/ . Whether you're in the market for this essential medication online, we offer a comprehensive selection of alternatives to meet your needs.
Considering the myriad options for baldness solutions, acquiring https://balloons-and-beyond.com/item/mintop-solution/ could be your most cost-effective choice.
Finding out the https://chitwantigercamp.com/product/estriol-cream/ can be an essential step. Explore options to cut costs on this vital treatment.
To alleviate one's pain and swelling, consider acquiring https://browsethebrookfields.com/trial-ed-pack/ through our website.
Frequently, https://airjamaicacharter.com/item/ozempic-0-5mg/ works for many with male health issues, so think about trying it.
Be aware that https://columbiainnastoria.com/lasix/ should only be taken under professional supervision.
Remember to try https://primerafootandankle.com/item/vidalista/ for safe results.
Now, find https://bulgariannature.com/generic-ozempic-in-canada/ by exploring our site. Secure your most advantageous offer immediately.
Keeping your antiviral medications up-to-date is essential. For those needing a doctor's approval refills, https://airjamaicacharter.com/item/best-price-ozempic/ could be your go-to resource.
When looking to secure heart health medications, consider options to https://instahookups.org/conjubrook/ online, offering a cost-effective solution without compromising on quality and efficacy.
Many individuals seek efficient remedies for bacterial infections. Whether you're dealing with skin conditions, respiratory infections, or STIs, https://ipalc.org/doxycycline/ can be an effective option.
Knowing the risks associated with https://glenwoodwine.com/product/buying-prednisone-online/ allows you to handle your treatment better.
Visit https://tnterra.org/drugs/amoxicillin/ to buy your antibiotics on the internet at fantastic prices.
Looking to address your symptoms? Acquire your medication safely and swiftly by ordering https://lasvegas-nightclubs.com/price-of-ozempic/ .