If you install Postfix to send email please select ‘Internet Site’ during setup. Instead of using Postfix you can also use Sendmail or configure a custom SMTP server and configure it as an SMTP server.
On Centos 6 and 7, the commands below will also open HTTP and SSH access in the system firewall.
If you are not comfortable installing the repository through a piped script, you can find the entire script here and select and download the package manually and install using gitlab/gitlab-ce
On your first visit, you’ll be redirected to a password reset screen to provide the password for the initial administrator account. Enter your desired password and you’ll be redirected back to the login screen.
The default account’s username is root. Provide the password you created earlier and login. After login you can change the username if you wish.
# Remove private_token from the request URI # In: /foo?private_token=unfiltered&authenticity_token=unfiltered&rss_token=unfiltered&... # Out: /foo?private_token=[FILTERED]&authenticity_token=unfiltered&rss_token=unfiltered&... map$request_uri$temp_request_uri_1 { default$request_uri; ~(?i)^(?<start>.*)(?<temp>[\?&]private[\-_]token)=[^&]*(?<rest>.*)$ "$start$temp=[FILTERED]$rest"; } # Remove authenticity_token from the request URI # In: /foo?private_token=[FILTERED]&authenticity_token=unfiltered&rss_token=unfiltered&... # Out: /foo?private_token=[FILTERED]&authenticity_token=[FILTERED]&rss_token=unfiltered&... map$temp_request_uri_1$temp_request_uri_2 { default$temp_request_uri_1; ~(?i)^(?<start>.*)(?<temp>[\?&]authenticity[\-_]token)=[^&]*(?<rest>.*)$ "$start$temp=[FILTERED]$rest"; } # Remove rss_token from the request URI # In: /foo?private_token=[FILTERED]&authenticity_token=[FILTERED]&rss_token=unfiltered&... # Out: /foo?private_token=[FILTERED]&authenticity_token=[FILTERED]&rss_token=[FILTERED]&... map$temp_request_uri_2$filtered_request_uri { default$temp_request_uri_2; ~(?i)^(?<start>.*)(?<temp>[\?&]rss[\-_]token)=[^&]*(?<rest>.*)$ "$start$temp=[FILTERED]$rest"; } # A version of the referer without the query string map$http_referer$filtered_http_referer { default$http_referer; ~^(?<temp>.*)\? $temp; } }
gitlab preinstall: Automatically backing up only the GitLab SQL database (excluding everything else!) Dumping database ... Dumping PostgreSQL database gitlabhq_production ... pg_dump: [archiver (db)] connection to database "gitlabhq_production" failed: could not connect to server: 没有那个文件或目录 Is the server running locally and accepting connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"? Backup failed [FAILED] gitlab preinstall: gitlab preinstall: Backup failed! If you want to skip this backup, run the following command and gitlab preinstall: try again: gitlab preinstall: gitlab preinstall: sudo touch /etc/gitlab/skip-auto-migrations gitlab preinstall: error: %pre(gitlab-ce-8.15.2-ce.0.el6.x86_64) scriptlet failed, exit status 1 Error in PREIN scriptlet in rpm package gitlab-ce-8.15.2-ce.0.el6.x86_64 error: install: %pre scriptlet failed (2), skipping gitlab-ce-8.15.2-ce.0.el6 gitlab-ce-8.11.5-ce.0.el6.x86_64 was supposed to be removed but is not! Verifying : gitlab-ce-8.11.5-ce.0.el6.x86_64 1/2 Verifying : gitlab-ce-8.15.2-ce.0.el6.x86_64 2/2
... gitlab: Thank you for installing GitLab! gitlab: To configure and start GitLab, RUN THE FOLLOWING COMMAND:
sudo gitlab-ctl reconfigure
gitlab: GitLab should be reachable at http://114.55.148.71:8081 gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file gitlab: And running reconfigure again. gitlab: gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme gitlab: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md gitlab:
gitlab: GitLab now ships with a newer version of PostgreSQL (9.6.1), and will be used gitlab: as the default in the next major relase. To upgrade, RUN THE FOLLOWING COMMANDS:
sudo gitlab-ctl pg-upgrade
gitlab: For more details, please see: gitlab: https://docs.gitlab.com/omnibus/settings/database.html#upgrade-packaged-postgresql-server gitlab: 清理 : gitlab-ce-8.11.5-ce.0.el6.x86_64 2/2 Found /etc/gitlab/skip-auto-migrations, exiting... Verifying : gitlab-ce-8.15.2-ce.0.el6.x86_64 1/2 Verifying : gitlab-ce-8.11.5-ce.0.el6.x86_64 2/2
chown -R root:root /usr/local/nginx/proxy_temp # 编辑 nginx.conf sudo vi /usr/local/nginx/conf/nginx.conf # 在第一行添加 user root;
webhooks 错误
错误显示不允许发送本地请求
1
Url is blocked: Requests to the local network are not allowed
解决方法,在设置中设置允许本地连接即可
admin => Settings => Outbound requests
服务无法启动
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[root@localhost gitlab]# gitlab-ctl status fail: alertmanager: runsv not running fail: gitaly: runsv not running fail: gitlab-monitor: runsv not running fail: gitlab-workhorse: runsv not running fail: logrotate: runsv not running fail: nginx: runsv not running fail: node-exporter: runsv not running fail: postgres-exporter: runsv not running fail: postgresql: runsv not running fail: prometheus: runsv not running fail: redis: runsv not running fail: redis-exporter: runsv not running fail: sidekiq: runsv not running fail: unicorn: runsv not running