标签:postfix 停止 osi smt pen stat gdc settings 服务器
Gitlab安装yum install -y curl policycoreutils-python openssh-server
systemctl enable sshd
systemctl start sshd
firewall-cmd --permanent --add-service=http
systemctl reload firewalld
yum install postfix
systemctl enable postfix
systemctl start postfix
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash
EXTERNAL_URL="https://gitlab.example.com" yum install -y gitlab-ce
vi /etc/gitlab/gitlab.rb 修改 EXTERNAL_URL=“http://IP:port”
git clone https://gitlab.com/xhang/gitlab.git
cat gitlab/VERSION
git diff 12.0.6-stable 12.0.6-stable-zh > ../12.0.6.diff
yum install patch -y #安装patch工具
patch -d/opt/gitlab/embedded/service/gitlab-rails -p1 < 10.7.diff
gitlab-ctl reconfigure #重载配置
gitlab-ctl start #启动gitlab
gitlab-ctl start # 启动所有 gitlab 组件;
gitlab-ctl stop # 停止所有 gitlab 组件;
gitlab-ctl restart # 重启所有 gitlab 组件;
gitlab-ctl status # 查看服务状态;
vim /etc/gitlab/gitlab.rb # 修改gitlab配置文件;
gitlab-ctl reconfigure # 重新编译gitlab的配置;
gitlab-rake gitlab:check SANITIZE=true --trace # 检查gitlab;
gitlab-ctl check-config #检查在gitlab中是否有任何配置。在指定版本中删除的rb
gitlab-ctl deploy-page #安装部署页面
gitlab-ctl diff-config #将用户配置与包可用配置进行比较
gitlab-ctl remove-accounts #删除所有用户和组
gitlab-ctl upgrade #升级
gitlab-ctl service-list #查看所有服务
gitlab-ctl tail # 查看日志;
gitlab-ctl tail nginx/gitlab_access.log
gitlab-ctl help # 查看相关的帮助
gitlab-ctl once #如果GitLab服务停止了就启动服务,如果已启动就不做任何操作
vim /var/opt/gitlab/nginx/conf/gitlab-http.conf
#外网访问的端口,如果服务器已经有服务器占用了80,那么这里可以改成其它
listen *:8888;
server_name gitlab.test.domain.com;
set $http_host_with_default "gitlab.test.domain.com:8888";
#外部访问url(经过编译后,自动将这个配置编译到nginx配置,nginx就无需配置了)
external_url ‘http://gitlab.test.domain.com:8888‘
#默认值就是8080。如果端口被占用,可将8080修改为其它(例如:9090)
unicorn[‘port‘] = 8080
gitlab_rails[‘smtp_enable‘] = true
gitlab_rails[‘smtp_address‘] = “smtp.exmail.qq.com”
gitlab_rails[‘smtp_port‘] = 25
gitlab_rails[‘smtp_user_name‘] = “adminstrator@domain.com“
gitlab_rails[‘smtp_password‘] = "smtp password"
gitlab_rails[‘smtp_authentication‘]= “plain"
gitlab_rails[‘smtp_enable_starttls_auto‘]= true
gitlab_rails[‘gitlab_email_from‘]= ‘adminstrator@domain.com‘
gitlab_rails[‘gitlab_email_reply_to‘]= ‘noreply@domain.com‘
#修改过ssh端口,gitlab中项目的的ssh地址,会在前面加上协议头和端口号
“ssh://git@gitlab.domain.com:55725/huangdc/test.git”
gitlab_rails[‘gitlab_shell_ssh_port‘] = 55725
cd /opt/gitlab/embedded/service/gitlab-rails/config
vim gitlab.yml
gitlab:
## Web server settings (note: host is the FQDN, do not include http://)
#host: 192.168.13.42
#port: 9988
host: gitlab.test.com
port: 80
https: false
#使配置生效
gitlab-ctl reconfigure
#重新启动GitLab
gitlab-ctl restart
标签:postfix 停止 osi smt pen stat gdc settings 服务器
原文地址:https://blog.51cto.com/xiaoma90/2433673