http://gitlab.d.com:8081/
[TOC]
# centos安裝gitlab簡單記錄
去官網鏡像下載gitlab安裝包,這里我選的是gitlab_10.5.4.rpm,直接yum安裝
```bash
yum install gitlab_10.5.4.rpm -y
vim /etc/gitlab/gitlab.rm
#增加訪問網址,修改nginx監聽端口
external_url = "http://gitlab.d.com"
nginx['listen_port'] = 8081
#說明:gitlab.rm相當于全局配置,修改后,執行下gitlab-ctl reconfigure將配置同步到各個服務中去
gitlab-ctl reconfigure
#修改hosts文件
127.0.0.1 gitlab.d.com
#關閉防火墻,或者開放8081端口
iptables -I INPUT -p tcp --dport 8081 -j ACCEPT
#然后使用瀏覽器訪問測試
http://gitlab.d.com:8081
#設置root管理員密碼
輸入新密碼
#使用新密碼登錄
輸入root與新密碼,即可登錄!
```
# 創建項目測試
1. 本地生成公鑰,復制內容粘貼到ssh公鑰位置
2. 創建項目
3. 本地使用git clone/add/commit/push
# 相關問題
## 服務器上安裝完畢,外部訪問添加hosts即可
192.168.0.154(服務器IP) gitlab.d.com
## 502錯誤
安裝完成后,頁面出現502
1. 服務器上是否已經有網站環境了,檢查是否80端口占用問題
2. gitlab對內存是有要求的,官方推薦至少4G,我自己服務器只有1G,跑不起來。我給虛擬機分配了2G,可以跑,但是稍顯卡頓,不過可以接受~
>
> We strongly recommend the Omnibus package installation since it is quicker to install, easier to upgrade, and it contains features to enhance reliability not found in other methods. We also strongly recommend at least 4GB of free memory to run GitLab.
>
> 來自 https://about.gitlab.com/installation/?_blank
## 其他常見命令
```
gitlab-ctl stop/start/restart/status
[root@localhost lypeng]# gitlab-ctl status
run: gitaly: (pid 698) 1500s; run: log: (pid 697) 1500s
run: gitlab-monitor: (pid 693) 1500s; run: log: (pid 692) 1500s
run: gitlab-workhorse: (pid 695) 1500s; run: log: (pid 694) 1500s
run: logrotate: (pid 702) 1500s; run: log: (pid 696) 1500s
run: nginx: (pid 691) 1500s; run: log: (pid 690) 1500s
run: node-exporter: (pid 729) 1499s; run: log: (pid 700) 1500s
run: postgres-exporter: (pid 707) 1499s; run: log: (pid 706) 1499s
run: postgresql: (pid 705) 1499s; run: log: (pid 704) 1499s
run: prometheus: (pid 731) 1499s; run: log: (pid 726) 1499s
run: redis: (pid 712) 1499s; run: log: (pid 711) 1499s
run: redis-exporter: (pid 710) 1499s; run: log: (pid 703) 1499s
run: sidekiq: (pid 709) 1499s; run: log: (pid 708) 1499s
run: unicorn: (pid 730) 1499s; run: log: (pid 701) 1500s
```
# 附圖片
- 前言
- Interview
- 01-cookie與session
- 04-mysql索引
- 05-memcache與redis
- 06-高并發
- 07-主從同步
- 08-myisam與inondb
- 09-框架區別
- 10-php7新特性
- 11-設計模式
- 12-MySQL優化
- 13-php自動加載機制
- 14-MongoDB命令
- 15-Python爬蟲之scrapy框架
- 16-php運行原理
- 17-單點登錄
- Linux
- linux常見命令
- awk
- sed
- bash-shell
- vim學習教程
- PHP
- php運行機制
- php執行效率
- word2pdf
- php預覽Word
- wechat_wafter2
- Python
- python
- win-bat
- svn操作命令
- git常用操作命令
- git_install
- gitlab安裝
- nextcloud
- docker