GITLAB(gitlab)安裝和使用
[root@localhost github]# yum -y install curl policycoreutils-python openssh-server # 安裝依賴
[root@localhost opt]# yum -y install lrzsz 方便文件上傳和下載
使用rz和re的命令即可
[root@localhost opt]# rpm -ivh gitlab-ce-10.2.2-ce.0.el7.x86_64.rpm
[root@localhost opt]# vim /etc/gitlab/gitlab.rb
[root@localhost opt]# gitlab-ctl reconfigure
通過瀏覽器輸入IP地址進行訪問
gitlab‐workhorse: 輕量級的反向代理服務器logrotate:日志文件管理工具
postgresql:數據庫redis:緩存數據庫
sidekiq:用於在后台執行隊列任務(異步執行)。(Ruby)unicorn:An HTTP server for Rack applications,GitLab Rails應用是托管在這個服務器上面的。(Ruby Web Server,主要使用Ruby編寫)
創建組
創建項目
接上圖
[root@localhost ~]# cd git_data/
[root@localhost git_data]# ls
a.txt b.txt c.txt
[root@localhost git_data]# git remote rename origin old-origin
[root@localhost git_data]# git remote
old-origin
[root@localhost git_data]# git remote add origin git@192.168.171.146:gitlabnsh/gitdata.git
[root@localhost git_data]# git remote
old-origin
origin
[root@localhost git_data]# git push -u origin --all
Counting objects: 3, done.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 207 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@192.168.171.146:gitlabnsh/gitdata.git
- [new branch] master -> master
Branch master set up to track remote branch master from origin.
[root@localhost git_data]# git push -u origin --tags
Everything up-to-date
之后刷新頁面如下圖發現推送成功!!!
創建用戶