1. Install Dependencies
yum -y install policycoreutils openssh-server openssh-clients postfix
2. Start Postfix and set auto-start upon startup
systemctl enable postfix && systemctl start postfix
3. Download and install gitlab
# Install wgetyum-y install wget # Install vimyum install vim-y # download the installation package wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm# install gitlabrpm-I gitlab-ce-10.0.0-ce.0.el7.x86_64.rpm # configure the access address Vim/etc/gitlab. RB # modify external_url 'HTTP: // ip: port' # address for accessing gitlab
4. Reset and start
# RESET "" (all the previously configured default values will be changed) "gitlab-CTL reconfigure # Start gitlab-CTL restart
5. Visit the gitlab Management page
Enter the previously configured address in the browser. If the address cannot be accessed, check whether the gitlab service is enabled on the firewall.
6. gitlab Maintenance
# Start gitlabgitlab-CTL start # Stop gitlabgitlab-CTL stop # restart gitlabgitlab-CTL restart # reset gitlab (you will change all the default values before configuration) gitlab-CTL reconfigure
7. Modify the root user password
- Run the following command under the root user:
gitlab-rails console production
irb(main):001:0> user = User.where(id: 1).first
irb(main):002:0> user.password=12345678
irb(main):003:0> user.password_confirmation=12345678
irb(main):004:0> user.save!
irb(main):005:0> quit
gitlab-ctl restart
- The account is changed to [Account: Root Password: 12345678]. Use the account password to log on.
Install gitlab code management server on centos7