Open waterloo3122 opened 5 years ago
vim /etc/gitlab/gitlab.rb
change as follows
external_url 'https://gitlab.ceph-in.tk'
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.ceph-in.tk.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.ceph-in.tk.key"
nginx['ssl_dhparam'] = "/etc/gitlab/ssl/dhparams"
gitlab_rails[‘time_zone’] = 'Asia/Shanghai'
gitlab-ctl reconfigure
vi /var/opt/gitlab/nginx/conf/gitlab-http.conf
add the following line
rewrite ^(.*)$ https://$host$1 permanent;
below
server_name gitlab.ceph-in.tk
then
gitlab-ctl restart
gitlab_rails['gitlab_email_enabled'] = true gitlab_rails['gitlab_email_from'] = 'xxx@xxx.com' gitlab_rails['gitlab_email_display_name'] = 'xxxx gitlab' gitlab_rails['gitlab_email_reply_to'] = 'xxx@xxxx.com' gitlab_rails['gitlab_email_subject_suffix'] = 'xxxx gitlab'
gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.ym.163.com" gitlab_rails['smtp_port'] = 994 gitlab_rails['smtp_user_name'] = "xxx@xxx.com" gitlab_rails['smtp_password'] = "xxxxxxxx~" gitlab_rails['smtp_domain'] = "smtp.ym.163.com" gitlab_rails['smtp_authentication'] = "login" gitlab_rails['smtp_enable_starttls_auto'] = true gitlab_rails['smtp_tls'] = true
check this link below https://manuals.gfi.com/en/kerio/connect/content/server-configuration/ssl-certificates/adding-trusted-root-certificates-to-the-server-1605.html
Install the ca-certificates package:
yum install ca-certificates
Enable the dynamic CA configuration feature
update-ca-trust force-enable
Add it as a new file to /etc/pki/ca-trust/source/anchors/:
cp your-gitlab.crt /etc/pki/ca-trust/source/anchors/
Use command
update-ca-trust extract
systemctl restart jenkins
yum install groovy
https://blog.csdn.net/ouyang_peng/article/details/84066417
external_url 'https://gitlab.xxx.com'
unicorn['worker_timeout'] = 60
unicorn['worker_processes'] = 2
unicorn['worker_memory_limit_min'] = "200 * 1 << 20"
unicorn['worker_memory_limit_max'] = "300 * 1 << 20"
sidekiq['concurrency'] = 2
postgresql['shared_buffers'] = "256MB"
postgresql['max_worker_processes'] = 2
nginx['redirect_http_to_https'] = true
nginx['ssl_certificate'] = "/etc/gitlab/ssl/gitlab.xxx.com.crt"
nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/gitlab.xxx.com.key"
vim /etc/gitlab/gitlab.rb
gitlab_rails['ldap_enabled'] = true
gitlab_rails['prevent_ldap_sign_in'] = false
###! **remember to close this block with 'EOS' below**
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
main: # 'main' is the GitLab 'provider ID' of this LDAP server
label: 'LDAP'
host: '192.168.1.102'
port: 389
uid: 'uid'
bind_dn: d=admin,ou=People,dc=mofanglicai,dc=com,dc=cn'
password: '11111111'
encryption: 'start_tls' # "start_tls" or "simple_tls" or "plain"
verify_certificates: false
smartcard_auth: false
active_directory: true
allow_username_or_email_login: false
lowercase_usernames: false
block_auto_created_users: false
base: 'ou=People,dc=mofanglicai,dc=com,dc=cn'
user_filter: ''
## EE only
group_base: ''
admin_group: ''
sync_ssh_keys: false
#secondary: # 'secondary' is the GitLab 'provider ID' of second LDAP server
# label: 'LDAP'
# host: '_your_ldap_server'
# port: 389
# uid: 'sAMAccountName'
# bind_dn: '_the_full_dn_of_the_user_you_will_bind_with'
# password: '_the_password_of_the_bind_user'
# encryption: 'plain' # "start_tls" or "simple_tls" or "plain"
# verify_certificates: true
# smartcard_auth: false
# active_directory: true
# allow_username_or_email_login: false
# lowercase_usernames: false
# block_auto_created_users: false
# base: ''
# user_filter: ''
# ## EE only
# group_base: ''
# admin_group: ''
# sync_ssh_keys: false
EOS
install via docker