安装gitlab
添加源
[root@zabbix_server yum.repos.d]# cat gitlab.repo [gitlab] name=gitlab baseurl=https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/yum/el7/ enabled=1 gpgcheck=0 #gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[root@zabbix_server yum.repos.d]# yum -y install gitlab-ce-14.9.5
[root@zabbix_server ~]# vim /etc/gitlab/gitlab.rb
关闭以下参数
prometheus['enable'] = false
prometheus['monitor_kubernetes'] = false
prometheus_monitoring['enable'] = false
alertmanager['enable'] = false
node_exporter['enable'] = false
redis_exporter['enable'] = false
postgres_exporter['enable'] = false
gitlab_exporter['enable'] = false
grafana['enable'] = false
Running handlers: Running handlers complete Chef Infra Client finished, 602/1616 resources updated in 02 minutes 46 seconds Notes: Default admin account has been configured with following details: Username: root Password: You didn't opt-in to print initial root password to STDOUT. Password stored to /etc/gitlab/initial_root_password. This file will be cleaned up in first reconfigure run after 24 hours. NOTE: Because these credentials might be present in your log files in plain text, it is highly recommended to reset the password following https://docs.gitlab.com/ee/security/reset_user_password.html#reset-your-root-password. gitlab Reconfigured!
[root@zabbix_server ~]# gitlab-ctl status
run: gitaly: (pid 3673) 136s; run: log: (pid 2758) 274s run: gitlab-kas: (pid 3617) 139s; run: log: (pid 3017) 262s run: gitlab-workhorse: (pid 3631) 139s; run: log: (pid 3145) 219s run: logrotate: (pid 2687) 288s; run: log: (pid 2715) 285s run: nginx: (pid 3174) 214s; run: log: (pid 3203) 211s run: postgresql: (pid 2880) 269s; run: log: (pid 2959) 266s run: puma: (pid 3082) 232s; run: log: (pid 3089) 231s run: redis: (pid 2718) 281s; run: log: (pid 2726) 280s run: sidekiq: (pid 3100) 226s; run: log: (pid 3108) 225s
修改页面语言
关闭注册功能
新建群组
创建仓库
设置SSH Key
[root@zabbix_server .ssh]# cat /root/.ssh/id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDT44jSgVeg6yX0lCN8uylZhTGGPyWMX97SEJHGMEW1HR3mgOZAHcZAINRw1AEOC0kp52JRUQ0oTT7vTb03JvT/alVaWb2jzQGcpvEAArRT7+6WKwxX+gSdGVmNzQdvFCb7TFxJig1joQGKEIGlD3ec2Ps4BxWwQ+hPkXXK8NyAkAsFP1KUDb2z+foeM/5chyM0TKzmIpq1f/yLIEKJ0Eu709TvBX6hLoeZJACkF9uru/c0agqa5dZjYaOYofOWv1Ji3rtx/rUF+00xaCQqhU2zq4NHHyppTLiSrfoKMi58y0VBHTsK9vet7v6Of1+3DOQ+XT2F2X0yraKk26jPg51v root@zabbix_server
推送代码
# git config --global user.name "Administrator"
# git config --global user.email "admin@example.com"
# git remote add origin http://192.168.61.139/root/pord.git
[root@local gitlab_html]# git push -u origin --all Username for 'http://192.168.61.139': root Password for 'http://root@192.168.61.139': Counting objects: 1641, done. Delta compression using up to 4 threads. Compressing objects: 100% (1581/1581), done. Writing objects: 100% (1641/1641), 18.38 MiB | 7.69 MiB/s, done. Total 1641 (delta 476), reused 0 (delta 0) remote: Resolving deltas: 100% (476/476), done. remote: remote: To create a merge request for master, visit: remote: http://192.168.61.139/root/pord/-/merge_requests/new?merge_request%5Bsource_branch%5D=master remote: To http://192.168.61.139/root/pord.git * [new branch] master -> master 分支 master 设置为跟踪来自 origin 的远程分支 master。
[root@jenkins local]# java -version openjdk version "11.0.19" 2023-04-18 LTS OpenJDK Runtime Environment (Red_Hat-11.0.19.0.7-1.el7_9) (build 11.0.19+7-LTS) OpenJDK 64-Bit Server VM (Red_Hat-11.0.19.0.7-1.el7_9) (build 11.0.19+7-LTS, mixed mode, sharing)
[root@jenkins local]# rpm -ivh jenkins-2.361.4-1.1.noarch.rpm 警告:jenkins-2.361.4-1.1.noarch.rpm: 头V4 RSA/SHA512 Signature, 密钥 ID 45f2c3d5: NOKEY 准备中... ################################# [100%] 正在升级/安装... 1:jenkins-2.361.4-1.1 ################################# [100%]
[root@jenkins local]# systemctl restart jenkins.service [root@jenkins local]# systemctl status jenkins.service ● jenkins.service - Jenkins Continuous Integration Server Loaded: loaded (/usr/lib/systemd/system/jenkins.service; disabled; vendor preset: disabled Active: active (running) since 二 2023-07-04 17:18:42 CST; 40s ago Main PID: 14811 (java) CGroup: /system.slice/jenkins.service └─14811 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war -- 7月 04 17:17:35 jenkins jenkins[14811]: Jenkins initial setup is required. An admin user has 7月 04 17:17:35 jenkins jenkins[14811]: Please use the following password to proceed to insta 7月 04 17:17:35 jenkins jenkins[14811]: 818018da58314584947f913991070dd5 7月 04 17:17:35 jenkins jenkins[14811]: This may also be found at: /var/lib/jenkins/secrets/i 7月 04 17:17:35 jenkins jenkins[14811]: ***************************************************** 7月 04 17:17:35 jenkins jenkins[14811]: ***************************************************** 7月 04 17:17:35 jenkins jenkins[14811]: ***************************************************** 7月 04 17:18:42 jenkins jenkins[14811]: 2023-07-04 09:18:42.370+0000 [id=31] INFO 7月 04 17:18:42 jenkins jenkins[14811]: 2023-07-04 09:18:42.389+0000 [id=22] INFO 7月 04 17:18:42 jenkins systemd[1]: Started Jenkins Continuous Integration Server. Hint: Some lines were ellipsized, use -l to show in full. [root@jenkins local]# systemctl enable jenkins.service Created symlink from /etc/systemd/system/multi-user.target.wants/jenkins.service to /usr/lib/ [root@jenkins local]#
访问jenkins
ip+8080
[root@jenkins local]# cat /var/lib/jenkins/secrets/initialAdminPassword 818018da58314584947f913991070dd5 [root@jenkins local]#
等待安装
实例配置
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了