In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Environment centos7, memory at least 4G GitLab is quite memory-consuming.
GitHub installation reference: https://about.gitlab.com/install/
Component installation reference: https://docs.gitlab.com/ce/development/architecture.html
Installation
Configure Yum Feed
Use the domestic software mirror station, here use the open source software mirror station of Tsinghua University.
Cat / etc/yum.repos.d/tsinghua.repo
[gitlab-ce] name=Gitlab CE Repositorybaseurl= https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el$releasever/gpgcheck=0enabled=1
Installation
Installation related dependencies
Yum install curl policycoreutils-python openssh-server
Then update the package cache and install
Yum makecacheyum install gitlab-ce
When a fox avatar appears at the end of the installation, the installation is successful.
Startup configuration
Directory structure
/ opt/gitlab home directory
/ etc/gitlab/ configuration file directory
/ var/log/gitlab/ log directory
Modify configuration
Vim / etc/gitlab/gitlab.rb
External_url 'http://10.10.10.55' # if the nginx modifies the port, the external_url must also have the port gitlab_rails [' time_zone'] = 'Asia/Shanghai' # time zone unicorn [' worker_processes'] = 4 # according to the number of server CPU cores nginx ['listen_port'] = 80 # default Nginx port 80, where gitlab's existing Nginx service is used. Of course, you can also use the Nginx service installed by yourself.
After modifying the configuration, you need to reload the configuration:
Gitlab-ctl reconfigure
Gitlab startup: gitlab-ctl start
Gitlab View status: gitlab-ctl status
Run: alertmanager: (pid 28348) 10561s; run: log: (pid 16612) 18335srun: gitaly: (pid 28362) 10561s; run: log: (pid 16611) 18335srun: gitlab-exporter: (pid 28383) 10560s; run: log: (pid 16617) 18335srun: gitlab-workhorse: (pid 28398) 10560s; run: log: (pid 16604) 18335srun: grafana: (pid 28407) 10559s; run: log: (pid 16621) 18335srun: logrotate: (pid 9348) 3359s Run: log: (pid 16616) 18335srun: nginx: (pid 28426) 10559s; run: log: (pid 16613) 18335srun: node-exporter: (pid 28510) 10558s; run: log: (pid 16619) 18335srun: postgres-exporter: (pid 28516) 10558s; run: log: (pid 16618) 18335srun: postgresql: (pid 28523) 10557s; run: log: (pid 16615) 18335srun: prometheus: (pid 28532) 10557s; run: log: (pid 16599) 18335srun: redis: (pid 28550) 10556s Run: log: (pid 16596) 18335srun: redis-exporter: (pid 28554) 10556s; run: log: (pid 16605) 18335srun: sidekiq: (pid 28563) 10556s; run: log: (pid 16614) 18335srun: unicorn: (pid 28569) 10555s; run: log: (pid 16603) 18335s
Log in to Gitlab
Gitlab default user root, the first login prompt to change the password
Gitlab structure
After Gitlab starts, users and directories are created according to the configuration definition, and the components that depend by default are in the / var/opt/gitlab directory.
The main components of Gitlab are:
Nginx 、 postgresql 、 redis 、 unicorn 、 sidekiq . This can also be seen with the gitlab-ctl status command.
Nginx:web access Portal
Postgresql: database, or mysql
Redis: caching, distributing tasks
Sidekiq: background task, mainly responsible for sending email, the task comes from redis
Unicorn:gitlab main process
Gitlab-workhorse: reverse proxy server that handles requests independent of the main process unicorn
Gitaly: background service that handles all git calls made by Gitlab
Sinicization
1. Prepare the environment
Prepare to install the Chinese package directory.
Cd / opt/src/ download git clone https://gitlab.com/xhang/gitlab.git
two。 Check out clone to download the Chinese version of this patch
# cat / opt/src/gitlab/VERSION 12.3.5
3. Stop gitlab
Gitlab-ctl stop
4. View the installed version:
Head-1 / opt/gitlab/version-manifest.txtgitlab-ce 12.4.2
5. Get the Chinese package:
Cd / opt/src/gitlabgit diff origin/12.3.5-stable origin/12.3.5-stable-zh > / tmp/12.3.5.diff
6. Update the patch to gitlab:
# yum-y install patchcd / tmp/#patch-d / opt/gitlab/embedded/service/gitlab-rails-p1 < 12.3.5.diff
Perform the installation of patch if the following problems occur, just skip, that is, always enter to skip. This is because the fix pack has some newer patch files that are not available on gitlab.
Can't find file to patch at input line 5Perhaps you used the wrong-p or-- strip option?The text leading up to this was: | diff-- git a/app/assets/javascripts/awards_handler.js b/app/assets/javascripts/awards_handler.js | index 976d32a..7967edb 100644 |-a/app/assets/javascripts/awards_handler.js | + b/app/assets/javascripts/awards_handler.js
7. Reload the configuration and start Gitlab:
Gitlab-ctl reconfigure & gitlab-ctl start
Log in to Gitlab again.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.