Installation and uninstallation of gitlab-ce under Ubuntu 20.04 error


One, update the apt source

command:

sudo apt update

Two, install dependencies

command:

sudo apt-get install curl openssh-server ca-certificates postfix   ## Postfix Configuration 选择 No configuration 就好

Three, install wget

command:

apt-get install wget

Fourth, download the gitlab-ce software package

The gitlab-ce package address of Ubuntu 20.04 is https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu/pool/focal/main/g/gitlab-ce/, here is 13.2.3 as an example

sudo wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu/pool/focal/main/g/gitlab-ce/gitlab-ce_13.2.3-ce.0_amd64.deb

Five, install the software

sudo dpkg -i gitlab-ce_13.2.3-ce.0_amd64.deb

Six, modify the external url

Modify the external url in the gitlab configuration file /etc/gitlab/gitlab.rb to change to your own ip address or domain name

sudo vi /etc/gitlab/gitlab.rb
external_url 'http://192.168.1.176:8989'  ## 本机的局域网ip地址为192.168.1.176

Seven, reconfigure gitlab

sudo gitlab-ctl reconfigure  ## 此过程可能需要较长时间

Eight, restart gitlab

sudo gitlab-ctl restart

Nine, visit test


使用浏览器访问页面http://192.168.1.176:8989,本机的局域网ip地址为http://192.168.1.176,推荐使用Chrome浏览器

The first time you log in, you need to change the password, and the login interface after the change
Insert picture description here

Ten uninstall Gitlab completely

# 停止gitlab
sudo gitlab-ctl stop

# 查看进程
ps -e | grep gitlab

# 删除所有包含gitlab的文件及目录
sudo find / -name gitlab | xargs rm -rf

# 卸载
sudo apt-get remove gitlab-ce

# 检查还有没有卸载的gitlab相关软件
sudo dpkg --get-selections | grep gitlab
sudo gitlab-ce deinstall

# 再执行
sudo apt-get --purge remove gitlab-ce

Eleventh error report

Memory The
official recommendation is that the memory should not be less than 4G, otherwise every push and commit will make you unhappy. 8G memory can stably support 1,000 concurrent numbers, so at least choose 8G or more of memory to build your version of the server.
**Gitlab access prompt 502 error:**
the reason:

The memory of the machine is too small, the memory is too small, the memory is too small. The important thing is said three times. The feedback on the Internet is that the minimum 2G memory is required. I got a cloud machine and tried it. The total 4G memory can barely be configured and practical...

After gitlab starts and runs, it consumes a lot of memory, especially when doing processing such as submitting updates.

When this error occurs, you can check the memory situation:

free -m 

Take a look at the usage of used and free. If free keeps decreasing, it means that gitlab is starting up, consuming memory, and it has not been started yet! At this time, the visit will prompt 502 Whoops, GitLab is taking too much time to respond.

At this time, don't modify the port, start it, etc. The previous attempts are invalid!

We need to wait for a while and visit again, that's it! Of course, this is only one of the 502 errors, and it does not mean that all of them are waiting to be processed in this way.

Guess you like

Origin blog.csdn.net/qq_43030934/article/details/113309171