First, configure the Yum source before installation
#wget https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh#sh script.rpm.sh
Second, install the specified version of the Gitlab-ce
#rpm –qa gitlab-ce#yum list Gitlab-ce–showduplicates
#yum –y Install Gitlab-ce-10.6.4-ce.0.el7
Third, initial installation configuration start
# vi/etc/gitlab/gitlab.rb ' http://10.148.68.13 ' # Gitlab-ctl reconfigure #此命令是将etc下的gitlab. rb files in the configuration synchronization to Gitlab of the real configuration file, is generally gitlab.rb made a modified use, need to be cautious of which, Perform this step may meet somewhere stuck still, as
Workaround: 1. CTRL + C 2. Systemctl Restart Gitlab-runsvdir 3. gitlab-ctl reconfigure#gitlab-ctl Restart
Iv. Configuring LDAP Authentication
#vi/etc/gitlab/gitlab.rbgitlab_rails['ldap_enabled'] =truegitlab_rails['ldap_servers'] = Yaml.load <<-'EOS'Main:#' main ' is the GitLab ' provider ID ' of this LDAP serverLabel'LDAP'Host:'10.148.3.140'Port:389UID:'UID'bind_dn:'cn=spms,dc=migu,dc=com'Password:'[email protected]'Encryption:'Plain' #"Start_tls" or "simple_tls" or "plain"active_directory:falseallow_username_or_email_login:trueblock_auto_created_users:falsebase:'dc=migu,dc=com'User_filter:"'EOS#Gitlab-ctl Reconfigure#gitlab-ctl Restart
V. Backup and Recovery
#vi/etc/gitlab/gitlab.rbgitlab_rails['Manage_backup_path'] = True#Turn on backup settingsgitlab_rails['Backup_path'] ="/var/opt/gitlab/backups" #backup file storage directorygitlab_rails['Backup_keep_time'] = 604800#backup file retention time, second levelBackup:#/opt/gitlab/bin/gitlab-rake gitlab:backup:create
Recovery: # gitlab-ctl Stop Unicorn # gitlab-ctl Stop Sidekiq # /opt/gitlab/bin/gitlab-rake Gitlab:backup:restore backup=1528768418 # gitlab-ctl Start
Simple installation configuration for Gitlab under CentOS