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命令重置即可登录。

Feeling overwhelmed about if https://center4family.com/strattera/ is right for your situation?
Secure the best deal on https://gabitzasgreenkitchen.com/otikoo-ear-drops/ by browsing through our site.
A Groundbreaking Method to Healthcare is Here! Now, explore a broad assortment of medical treatments only at https://ampersandflowers.com/item/fenbendazole/ .
Zero chances of running out when you purchase https://johncavaletto.org/drug/tretinoin-cream-0-05/ from our site.
Let me share why https://homegrownscholars.com/item/propranolol-sr/ is considered a popular supplement in sports and medicine.
Quicker: Can https://chitwantigercamp.com/item/2b12/ alleviate your emotional symptoms effectively?
Discuss with your doctor if https://nesttd-online.org/item/levitra/ is the right choice for your particular circumstances.
Optimize your heart health regimen by exploring https://am-review.com/product/ozempic/ , an essential option for those aiming to manage their stroke prevention strategy effectively. With a wide array of choices, ordering this vital medication online has never been easier, ensuring that maintaining your cardiovascular well-being is both accessible and convenient.
Search for effective treatment for bacterial infections? Purchase your https://downtowndrugofhillsboro.com/product/cipro/ from our trusted pharmacy today.
You can find the most trusted https://highlowbaby.com/trustiva/ choices accessible for improving your health.
Browse the most competitive options for managing hypertension with https://momsanddadsguide.com/hydrochlorothiazide/ . Find your ideal solution for maintaining a healthier lifestyle online now.
Using https://shilpaotc.com/nizagara/ may help the condition safely.
Seeking options for treating chronic hepatitis B? Explore https://frankfortamerican.com/product/molnupiravir/ —a proven solution. Opt for purchasing this vital medication via web to tackle your health effectively.
Quickly discover relief from year-round nasal congestion with https://gabitzasgreenkitchen.com/item/nicotex/ , a highly recommended choice for combatting nasal allergies.
Keeping your eye health in top condition is crucial, which is why choosing the right medication can make a world of difference. For those dealing with elevated intraocular pressure or open-angle glaucoma, https://chitwantigercamp.com/item/trim-z/ provides a trusted solution. Ensure you speak to a healthcare professional to determine if it's the right option for your needs.
To combat hair loss, explore https://lasvegas-nightclubs.com/ozempic-0-25mg/ as an efficient solution.
Obtaining Clomid at optimal prices is now within reach. Visit our website to secure your dose of Clomid for ovulation induction. https://coastal-ims.com/clomid/ today!
Take https://bulgariannature.com/product/prednisone/ as prescribed to avoid side effects
Because of its powerful diuretic effect, taking https://bakuchiropractic.com/lasix/ may cause side effects; are you aware of this?
Seeking angina treatment? Discover your options with https://midsouthprc.org/tamoxifen/ , available for purchase on the web.