[toc]
gitlab阿里云搭建
1. 阿里云购买(略)
2. gitlab搭建
2.1 环境依赖搭建
yum -y install policycoreutils openssh-server openssh-clients postfixyum install policycoreutils-pythonsystemctl enable sshd && sudo systemctl start sshdsystemctl 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 = ipv4inet_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是你的公网IPexternal_url 'http://123.123.123.123:8280'#大概在1456行nginx['listen_port'] = 8280
2.5 重新启动
gitlab-ctl reconfiguregitlab-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!