CentOs 7 Install / Uninstall GitLab

Installation gitlab
1. Install and configure the necessary dependency
on CentOS 7 (and RedHat / Oracle / Scientific Linux 7) , the following command will open HTTP and SSH access to the system firewall.

sudo yum install -y curl policycoreutils-python openssh-server
sudo systemctl enable sshd
sudo systemctl start sshd

sudo firewall-cmd --permanent --add-service=http
sudo systemctl reload firewalld

Next, install Postfix email notifications. If you want to send e-mail using other solutions, please skip this step and configure an external SMTP server after installation GitLab. (Not e-mail, then you can skip this step)

2. Add GitLab package repository and install packages

(If you want to manually install can be downloaded to the following address, home faster Austria

https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/)

gitlab into gitlab-ce and gitlab-ee, we want to install ce Community Edition
gitlab-ce is the Community Edition, free of
gitlab-ee Enterprise Edition, a fee

Add GitLab package repository.

curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash

Next, install GitLab package. The `http: // gitlab.example.com` change the URL you want to access your GitLab instance. Will automatically install the URL of the configuration and start GitLab. After you install the HTTPS requires additional configuration.

sudo EXTERNAL_URL="http://gitlab.example.com" yum install -y gitlab-ee

3. Browse to the host name and sign in
the first visit, you will be redirected to the password reset screen. Provide initial administrator account password, you will be redirected back to the login screen. Log in using the default root account user name.

-------------------------------------------------------------------

4. problems during installation process
performed to sudo EXTERNAL_URL = "http://gitlab.example.com" when yum install -y gitlab-ee this step is very likely to be stuck.
solution:

1, it does not matter trips to the bathroom more later (10 minutes)
2. Press CTRL + C forced end
3, run: the sudo systemctl the restart gitlab-runsvdir
. 4, is performed again: sudo gitlab-ctl reconfigure

If you access the Times, 502 error
solution:

A possibility
that unicorn tomcat port services and conflicts, unicorn use at a port should be fine
vi /etc/gitlab/gitlab.rb
unicorn [ 'Port'] = 9090

Then gitlab-ctl reconfigure reboot configuration, and then wait a little longer, while visiting, so GitLab server can run normal.


Installation / postfix start time error:
[Plain] Copy Plain View
[root @ ~] # postfix systemctl Start  
the Job for postfix.service Because at The failed The Control Process the Exited with error code See "systemctl Status postfix.service" and "journalctl -. xe "for details. 
solution:

[plain] view plain copy
modify /etc/postfix/main.cf provided  
  
inet_protocols = IPv4  
inet_interfaces All =  

-------------------------------------------------------------------

5.GitLab commonly used commands

sudo gitlab-ctl start # start all gitlab components;
sudo gitlab-ctl STOP # Stop all gitlab components;
sudo gitlab-ctl restart # restart all gitlab components;
sudo gitlab-ctl Status # check the service status;
sudo gitlab-ctl reconfigure # start services;
sudo vim /etc/gitlab/gitlab.rb # modify the default configuration file;
gitlab-RAKE gitlab: Sanitize the check to true --trace # = check gitlab;
sudo gitlab-tail # ctl view the log;
------ -------------------------------------------------- -----------

Completely uninstall GitLab
a stop gitlab
    sudo gitlab-ctl STOP
II unload gitlab (this attention, to see gitlab-ce version or versions gitlab-ee, do not write wrong)
    sudo -e RPM gitlab-ce

Third, the process of viewing gitlab

    ps -ef | grep gitlab
     kill the first daemon (runsvdir -P / opt / gitlab / Service log)
     the kill -9 4473
     again to see if there is a process gitlab

Fourth, delete files gitlab

        find / -name * gitlab * | xargs rm -rf delete all files and directories contain the gitlab

        find / -name gitlab |xargs rm -rf 

        Automatic backup at the root of the configuration file is deleted gitlab-ctl uninstall (ls / root / gitlab * to see if there have also deleted)

Through the above steps you can completely uninstall gitlab

original link: https: //blog.csdn.net/huhuhuemail/article/details/80519433 

Guess you like

Origin blog.csdn.net/xiaomojun/article/details/87193352