关于gitlab:gitlab在阿里云的安装

6次阅读

共计 1118 个字符,预计需要花费 3 分钟才能阅读完成。

[toc]


gitlab 阿里云搭建

1. 阿里云购买(略)

2. gitlab 搭建

2.1 环境依赖搭建

yum -y install policycoreutils openssh-server openssh-clients postfix
yum install  policycoreutils-python
systemctl enable sshd && sudo systemctl start sshd
systemctl enable postfix && systemctl start postfix

如果 postfix 启动失败报警如下:

Job for postfix.service failed because the control process exited with error code. See "systemctl status postfix.service" and "journalctl -xe" for details.

须要批改配置,而后重试:

vim /etc/postfix/main.cf
#批改内容如下:inet_protocols = ipv4
inet_interfaces = all

2.2 敞开防火墙或者防火墙减少白名单

systemctl stop firewalld.service

2.3 下载软件并装置

wget --content-disposition https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-15.4.3-ce.0.el7.x86_64.rpm/download.rpm 

# 从这里能够找到响应的包来抉择:https://packages.gitlab.com/gitlab/gitlab-ce/

2.4 批改配置

# 大概在 33 行 留神 123.123.123.123 是你的公网 IP
external_url 'http://123.123.123.123:8280'
#大概在 1456 行
nginx['listen_port'] = 8280

2.5 重新启动

gitlab-ctl reconfigure
gitlab-ctl restart

2.6 拜访页面:如上

http://123.123.123.123:8280

输出账号密码:root/xxx

默认明码存储在 /etc/gitlab/initial_root_password,有效期 24 小时;连忙登陆批改。

3 卸载

3.1 进行

gitlab-ctl stop

进行后马上~ 马上啊! 我 1 核 4G 的零碎 cpu 就下来了~~~

3.2 卸载

而后卸载:

rpm -e gitlab-ce

杀掉 runsvdir 这个过程,省略号最多的这个!

3.3 清理

find / -name gitlab | xargs rm -rf

一段时间后 OK!

正文完
 0