邢栋博客

邢栋博客,Action博客,记录工作和生活中的点点滴滴

centos7下安装gitlab问题总结
=====问题1 执行 systemctl start  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 
myhostname = mail.flycoder.cn
mydomain = flycoder.cn
myorigin = $mydomain
inet_interfaces = localhost // all表示接受来自所有网络的请求
mydestination = $myhostname, localhost.$mydomain, localhost  //指定发给本地邮件的域名
inet_protocols = ipv4
centos7下安装gitlab并修改访问端口
centos7下安装gitlab并修改访问端口

官网安装说明
https://about.gitlab.com/install/#centos-7

1.=======================
sudo yum install -y curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd
sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld

2.=======================
sudo yum install postfix
sudo systemctl enable postfix
sudo systemctl start postfix

3.=======================
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
yum install -y gitlab-ee
gitlab-ctl reconfigure //如果没有启动gitlab再执行,我的没有启动

ps:这个时候就可以通过服务器的地址直接访问了,第一次进入需要修改密码,用户名root


4.=======启动/暂停/重启=======
gitlab-ctl start
gitlab-ctl stop
gitlab-ctl restart


5.=========修改端口=============

vim /etc/gitlab/gitlab.rb
external_url 'http://我的服务器地址:8081'
nginx['listen_port'] = 8081

vim /var/opt/gitlab/nginx/conf/gitlab-http.conf
listen *:8081;
server_name localhost;
if ($http_host = "") {
set $http_host_with_default "localhost:8081";
}
然后执行
gitlab-ctl restart 

优惠券
广告位-淘宝
最新微语