1.Linux必要配置
yum install lokkit //安装lokkit
yum install curl openssh-server openssh-clients postfix cronie -y //安装ssh等相关
service postfix start //启动postfix 这里如果启动报错
启动postfix出错,查看centos中的postfix日志
more /var/log/maillog
postfix: fatal: parameter inet_interfaces: no local interface found for ::1
vi/etc/postfix/main.cf
发现配置为:
inet_interfaces = localhost
inet_protocols = all
改成:
inet_interfaces = all
inet_protocols = all
重新启动
service postfix start
###########################################报错分割线
chkconfig postfix on //配置防火墙相关
lokkit -s http -s ssh
2.添加Gitlab仓库,并安装
curl -sS http://packages.gitlab.cc/install/gitlab-ce/script.rpm.sh | sudo bash //这里安装会有些报错没关系
sudo yum install gitlab-ce
打开 vim /etc/gitlab/gitlab.rb
修改external_url为gitlab机子的ip+要使用的端口 如:http://192.168.56.101:8888
找到并修改nginx['listen_port'] = 8888 端口自定义看你那边自己的端口
重新配置gitlab并重启输入下面2个命令
gitlab-ctl reconfigure //重启配置
gitlab-ctl restart//重启服务
到了这里开始测试下 ip地址端口号 能打开页面不
//如果打不开页面 netstat -tlun查看端口
打开vim /etc/sysconfig/iptables
找到后设置开发端口
//注 这里一段类似下面代码的东西 复制一份 改个端口保存即可
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8888 -j ACCEPT
重启防火墙
service iptables restart
然后重启去打开
完成
用户为root
密码自己 设置~
https://blog.csdn.net/weixin_40400084/article/details/81448156 GitLab的邮箱配置