系統(tǒng)之家 - 系統(tǒng)光盤下載網(wǎng)站!

當(dāng)前位置:系統(tǒng)之家 > 系統(tǒng)教程 > CentOS系統(tǒng)安裝GitLab

CentOS系統(tǒng)安裝GitLab的步驟(2)

時(shí)間:2015-03-25 17:21:14 作者:qipeng 來(lái)源:系統(tǒng)之家 1. 掃描二維碼隨時(shí)看資訊 2. 請(qǐng)使用手機(jī)瀏覽器訪問(wèn): https://m.xitongzhijia.net/xtjc/20150325/42793.html 手機(jī)查看 評(píng)論

  5、建立gitlab數(shù)據(jù)庫(kù)并授權(quán)

  # Login to MySQL

  mysql -u root -p

  # Create a user for GitLab. (change $password to a real password)

  mysql》 CREATE USER ‘gitlab’@‘localhost’ IDENTIFIED BY ‘gitlab’;

  # Create the GitLab production database

  mysql》 CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;

  # Grant the GitLab user necessary permissopns on the table.

  mysql》 GRANT SELECT, LOCK TABLES, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO ‘gitlab’@‘localhost’;

  # Quit the database session

  mysql》 \q

  6、克隆gitlab源

  # Clone GitLab repository

  cd /home/git

  sudo -u git -H git clone https://github.com/gitlabhq/gitlabhq.git gitlab

  # Go to gitlab dir

  cd /home/git/gitlab

  # Checkout to stable release

  sudo -u git -H git checkout 5-1-stable

  Configure it

  cd /home/git/gitlab

  # Copy the example GitLab config

  sudo -u git -H cp config/gitlab.yml.example config/gitlab.yml

  # Make sure to change “localhost” to the fully-qualified domain name of your

  # host serving GitLab where necessary

  sudo -u git -H vim config/gitlab.yml

  # Make sure GitLab can write to the log/ and tmp/ directories

  sudo chown -R git log/

  sudo chown -R git tmp/

  sudo chmod -R u+rwX log/

  sudo chmod -R u+rwX tmp/

  # Create directory for satellites

  sudo -u git -H mkdir /home/git/gitlab-satellites

  # Create directories for sockets/pids and make sure GitLab can write to them

  sudo -u git -H mkdir tmp/pids/

  sudo -u git -H mkdir tmp/sockets/

  sudo chmod -R u+rwX tmp/pids/

  sudo chmod -R u+rwX tmp/sockets/

  # Create public/uploads directory otherwise backup will fail

  sudo -u git -H mkdir public/uploads

  sudo chmod -R u+rwX public/uploads

  # Copy the example Puma config

  sudo -u git -H cp config/puma.rb.example config/puma.rb

  # Configure Git global settings for git user, useful when editing via web

  # Edit user.email according to what is set in gitlab.yml

  sudo -u git -H git config --global user.name “GitLab”

  sudo -u git -H git config --global user.email “gitlab@localhost”

  上面就是CentOS安裝配置GitLab的方法介紹了,在安裝GitLab前需要配置GitLab環(huán)境,需安裝安裝epel與基礎(chǔ)依賴庫(kù)及軟件,再配置GitLab數(shù)據(jù)庫(kù)。

標(biāo)簽 CentOS

發(fā)表評(píng)論

0

沒(méi)有更多評(píng)論了

評(píng)論就這些咯,讓大家也知道你的獨(dú)特見(jiàn)解

立即評(píng)論

以上留言僅代表用戶個(gè)人觀點(diǎn),不代表系統(tǒng)之家立場(chǎng)

其他版本軟件

熱門教程

人氣教程排行

Linux系統(tǒng)推薦

掃碼關(guān)注
掃碼關(guān)注

掃碼關(guān)注 官方交流群 軟件收錄