https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/
https://packages.gitlab.com/gitlab/gitlab-ce
此处以 gitlab-ce-14.3.0为例
[root@ebs-139265 opt]# sudo yum install -y curl policycoreutils-python openssh-server perl
[root@ebs-139265 opt]# sudo systemctl enable sshd
[root@ebs-139265 opt]# sudo systemctl start sshd
### 没开防火墙的可以不用执行以下命令
[root@ebs-139265 opt]# sudo firewall-cmd --permanent --add-service=http
[root@ebs-139265 opt]# sudo firewall-cmd --permanent --add-service=https
[root@ebs-139265 opt]# sudo systemctl reload firewalld
[root@ebs-139265 opt]# sudo yum install -y curl policycoreutils-python openssh-server perl
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.ustc.edu.cn
* epel: mirror.nyist.edu.cn
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Package curl-7.29.0-59.el7_9.1.x86_64 already installed and latest version
Package 4:perl-5.16.3-299.el7_9.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package openssh-server.x86_64 0:7.4p1-22.el7_9 will be updated
---> Package openssh-server.x86_64 0:7.4p1-23.el7_9 will be an update
--> Processing Dependency: openssh = 7.4p1-23.el7_9 for package: openssh-server-7.4p1-23.el7_9.x86_64
---> Package policycoreutils-python.x86_64 0:2.5-34.el7 will be installed
--> Processing Dependency: setools-libs >= 3.3.8-4 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libsemanage-python >= 2.5-14 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: audit-libs-python >= 2.1.3-4 for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: python-IPy for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.4)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1(VERS_1.2)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libcgroup for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libapol.so.4(VERS_4.0)(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: checkpolicy for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libqpol.so.1()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Processing Dependency: libapol.so.4()(64bit) for package: policycoreutils-python-2.5-34.el7.x86_64
--> Running transaction check
---> Package audit-libs-python.x86_64 0:2.8.5-4.el7 will be installed
---> Package checkpolicy.x86_64 0:2.5-8.el7 will be installed
---> Package libcgroup.x86_64 0:0.41-21.el7 will be installed
---> Package libsemanage-python.x86_64 0:2.5-14.el7 will be installed
---> Package openssh.x86_64 0:7.4p1-22.el7_9 will be updated
--> Processing Dependency: openssh = 7.4p1-22.el7_9 for package: openssh-clients-7.4p1-22.el7_9.x86_64
---> Package openssh.x86_64 0:7.4p1-23.el7_9 will be an update
---> Package python-IPy.noarch 0:0.75-6.el7 will be installed
---> Package setools-libs.x86_64 0:3.3.8-4.el7 will be installed
--> Running transaction check
---> Package openssh-clients.x86_64 0:7.4p1-22.el7_9 will be updated
---> Package openssh-clients.x86_64 0:7.4p1-23.el7_9 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================================================================================================
Package Arch Version Repository Size
==================================================================================================================================================================================================================================
Installing:
policycoreutils-python x86_64 2.5-34.el7 base 457 k
Updating:
openssh-server x86_64 7.4p1-23.el7_9 updates 459 k
Installing for dependencies:
audit-libs-python x86_64 2.8.5-4.el7 base 76 k
checkpolicy x86_64 2.5-8.el7 base 295 k
libcgroup x86_64 0.41-21.el7 base 66 k
libsemanage-python x86_64 2.5-14.el7 base 113 k
python-IPy noarch 0.75-6.el7 base 32 k
setools-libs x86_64 3.3.8-4.el7 base 620 k
Updating for dependencies:
openssh x86_64 7.4p1-23.el7_9 updates 510 k
openssh-clients x86_64 7.4p1-23.el7_9 updates 655 k
Transaction Summary
==================================================================================================================================================================================================================================
Install 1 Package (+6 Dependent packages)
Upgrade 1 Package (+2 Dependent packages)
Total download size: 3.2 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/10): libcgroup-0.41-21.el7.x86_64.rpm | 66 kB 00:00:01
(2/10): checkpolicy-2.5-8.el7.x86_64.rpm | 295 kB 00:00:01
(3/10): audit-libs-python-2.8.5-4.el7.x86_64.rpm | 76 kB 00:00:01
(4/10): libsemanage-python-2.5-14.el7.x86_64.rpm | 113 kB 00:00:01
(5/10): openssh-server-7.4p1-23.el7_9.x86_64.rpm | 459 kB 00:00:00
(6/10): python-IPy-0.75-6.el7.noarch.rpm | 32 kB 00:00:00
(7/10): policycoreutils-python-2.5-34.el7.x86_64.rpm | 457 kB 00:00:00
(8/10): openssh-7.4p1-23.el7_9.x86_64.rpm | 510 kB 00:00:01
(9/10): setools-libs-3.3.8-4.el7.x86_64.rpm | 620 kB 00:00:00
(10/10): openssh-clients-7.4p1-23.el7_9.x86_64.rpm | 655 kB 00:00:00
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.7 MB/s | 3.2 MB 00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : openssh-7.4p1-23.el7_9.x86_64 1/13
Installing : setools-libs-3.3.8-4.el7.x86_64 2/13
Installing : libcgroup-0.41-21.el7.x86_64 3/13
Installing : audit-libs-python-2.8.5-4.el7.x86_64 4/13
Installing : python-IPy-0.75-6.el7.noarch 5/13
Installing : libsemanage-python-2.5-14.el7.x86_64 6/13
Installing : checkpolicy-2.5-8.el7.x86_64 7/13
Installing : policycoreutils-python-2.5-34.el7.x86_64 8/13
Updating : openssh-clients-7.4p1-23.el7_9.x86_64 9/13
Updating : openssh-server-7.4p1-23.el7_9.x86_64 10/13
Cleanup : openssh-server-7.4p1-22.el7_9.x86_64 11/13
Cleanup : openssh-clients-7.4p1-22.el7_9.x86_64 12/13
Cleanup : openssh-7.4p1-22.el7_9.x86_64 13/13
Verifying : checkpolicy-2.5-8.el7.x86_64 1/13
Verifying : openssh-7.4p1-23.el7_9.x86_64 2/13
Verifying : libsemanage-python-2.5-14.el7.x86_64 3/13
Verifying : python-IPy-0.75-6.el7.noarch 4/13
Verifying : openssh-clients-7.4p1-23.el7_9.x86_64 5/13
Verifying : openssh-server-7.4p1-23.el7_9.x86_64 6/13
Verifying : policycoreutils-python-2.5-34.el7.x86_64 7/13
Verifying : audit-libs-python-2.8.5-4.el7.x86_64 8/13
Verifying : libcgroup-0.41-21.el7.x86_64 9/13
Verifying : setools-libs-3.3.8-4.el7.x86_64 10/13
Verifying : openssh-server-7.4p1-22.el7_9.x86_64 11/13
Verifying : openssh-clients-7.4p1-22.el7_9.x86_64 12/13
Verifying : openssh-7.4p1-22.el7_9.x86_64 13/13
Installed:
policycoreutils-python.x86_64 0:2.5-34.el7
Dependency Installed:
audit-libs-python.x86_64 0:2.8.5-4.el7 checkpolicy.x86_64 0:2.5-8.el7 libcgroup.x86_64 0:0.41-21.el7 libsemanage-python.x86_64 0:2.5-14.el7 python-IPy.noarch 0:0.75-6.el7 setools-libs.x86_64 0:3.3.8-4.el7
Updated:
openssh-server.x86_64 0:7.4p1-23.el7_9
Dependency Updated:
openssh.x86_64 0:7.4p1-23.el7_9 openssh-clients.x86_64 0:7.4p1-23.el7_9
Complete!
[root@ebs-139265 opt]# sudo systemctl enable sshd
[root@ebs-139265 opt]# sudo systemctl start sshd
[root@ebs-139265 opt]#
[root@ebs-139265 opt]# rpm -ivh gitlab-ce-14.3.0-ce.0.el7.x86_64.rpm
warning: gitlab-ce-14.3.0-ce.0.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID f27eab47: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:gitlab-ce-14.3.0-ce.0.el7 ################################# [100%]
It looks like GitLab has not been configured yet; skipping the upgrade script.
*. *.
*** ***
***** *****
.****** *******
******** ********
,,,,,,,,,***********,,,,,,,,,
,,,,,,,,,,,*********,,,,,,,,,,,
.,,,,,,,,,,,*******,,,,,,,,,,,,
,,,,,,,,,*****,,,,,,,,,.
,,,,,,,****,,,,,,
.,,,***,,,,
,*,.
_______ __ __ __
/ ____(_) /_/ / ____ _/ /_
/ / __/ / __/ / / __ `/ __ \
/ /_/ / / /_/ /___/ /_/ / /_/ /
\____/_/\__/_____/\__,_/_.___/
Thank you for installing GitLab!
GitLab was unable to detect a valid hostname for your instance.
Please configure a URL for your GitLab instance by setting `external_url`
configuration in /etc/gitlab/gitlab.rb file.
Then, you can start your GitLab instance by running the following command:
sudo gitlab-ctl reconfigure
For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
Help us improve the installation experience, let us know how we did with a 1 minute survey:
https://gitlab.fra1.qualtrics.com/jfe/form/SV_6kVqZANThUQ1bZb?installation=omnibus&release=14-3
[root@ebs-139265 opt]#
/opt/gitlab
/etc/gitlab/gitlab.rb
https://docs.gitlab.com/omnibus/settings/configuration.html
## 默认系统自启动 不需要执行命令
gitlab-ctl start #启动全部服务
gitlab-ctl restart#重启全部服务
gitlab-ctl stop #停止全部服务
gitlab-ctl restart nginx #重启单个服务,如重启nginx
gitlab-ctl status #查看服务状态
gitlab-ctl reconfigure #使配置文件生效
gitlab-ctl show-config #验证配置文件
gitlab-ctl uninstall #删除gitlab(保留数据)
gitlab-ctl cleanse #删除所有数据,从新开始
gitlab-ctl tail <service name>查看服务的日志
gitlab-ctl tail nginx #如查看gitlab下nginx日志
gitlab-rails console #进入控制台
gitlab-ctl help #查看gitlab帮助信息
tail -f /var/log/gitlab/gitlab-rails/production.log #查看日志
http://211.149.160.12:9999
账号:root
密码:默认情况下,Linux 软件包安装会自动为初始管理员用户账号 (root) 生成密码,并将其存储到 /etc/gitlab/initial_root_password 至少 24 小时。出于安全原因,24 小时后,此文件会被第一次 gitlab-ctl reconfigure 自动删除。