9久久伊人精品综合,亚洲一区精品视频在线,成 人免费va视频,国产一区二区三区黄网,99国产精品永久免费视频,亚洲毛片多多影院,精品久久久无码人妻中文字幕,无码国产欧美一区二区三区不卡
學習啦>學習電腦>操作系統>Linux教程>

CentOS系統怎么安裝GitLab客戶端

時間: 春健736 分享

  在CentOS安裝GitLab的方法非常的簡單吧,但過濾感覺還是蠻多的,下面學習啦小編就來給各位朋友詳細介紹一下CentOS系統安裝GitLab客戶端步驟。

  CentOS系統安裝GitLab客戶端步驟

  一、安裝環境

  基礎操作系統(CentOS 6.5 Minimal)

  Ruby (版本: 2.0.0p353+)

  創建項目運行用戶(創建git賬號,方便權限管理)

  GitLab Shell(版本:1.8.1)

  數據庫 ,采用PostgreSQL (可以支持mysql和PostgreSQL)

  GitLab(版本:6-3-stable)

  Web服務器,采用nginx (可支持nginx和apache )

  防火墻,開放相關端口(iptables)

  二、升級更新系統

  yum groupinstall "Development Tools" -y

  yum update -y

  yum install wget vim -y

  添加epel倉庫

  代碼如下:

  cat > /etc/yum.repos.d/epel.repo << EOF

  [epel]

  name=Extra Packages for Enterprise Linux 6 - $basearch

  #baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch

  mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch

  failovermethod=priority

  enabled=1

  gpgcheck=0

  EOF

  添加PUIAS Computational參考

  代碼如下:

  cat > /etc/yum.repos.d/PUIAS_6_computational.repo << EOF

  [PUIAS_6_computational]

  name=PUIAS computational Base $releasever - $basearch

  mirrorlist=http://puias.math.ias.edu/data/puias/computational/$releasever/$basearch/mirrorlist

  #baseurl=http://puias.math.ias.edu/data/puias/computational/$releasever/$basearch

  enabled=1

  gpgcheck=0

  EOF

  安裝依賴包

  代碼如下:

  yum -y install vim-enhanced readline readline-devel ncurses-devel \

  gdbm-devel glibc-devel tcl-devel openssl-devel curl-devel expat-devel \

  db4-devel byacc sqlite-devel gcc-c++ libyaml libyaml-devel libffi \

  libffi-devel libxml2 libxml2-devel libxslt libxslt-devel libicu libicu-devel \

  system-config-firewall-tui python-devel crontabs logwatch \

  logrotate perl-Time-HiRes git

  Ruby安裝

  代碼如下:

  cd lnmp/src

  wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz

  tar xzf ruby-2.1.5.tar.gz

  cd ruby-2.1.5

  ./configure --prefix=/usr/local/ruby

  make && make install

  cd ..

  添加到環境變量

  代碼如下:

  vi /etc/profile

  export PATH=/usr/local/ruby/bin:$PATH

  . /etc/profile

  安裝Bundler Gem

  代碼如下:

  gem install bundler --no-ri --no-rdoc

  為GitLab創建一個git用戶

  代碼如下:

  adduser --system --shell /bin/bash --comment 'GitLab' --create-home --home-dir /home/git/ git

  su - git

  GitLab shell安裝

  代碼如下:

  git clone https://github.com/gitlabhq/gitlab-shell.git

  cd gitlab-shell

  git checkout v1.8.0

  cp config.yml.example config.yml

  sed -i 's@http://localhost/@http://git.bitsCN.com/@' config.yml

  sed -i 's@/usr/bin/redis-cli@/usr/local/redis/bin/redis-cli@' config.yml

  ./bin/install

  數據庫/MySQL

  代碼如下:

  $ mysql -uroot -p

  mysql> create database gitlabhq_production;

  mysql> quit;

  redis.sock路徑指定

  代碼如下:

  su -

  service redis-server stop

  mkdir /var/run/redis;chown -R redis.redis /var/run/redis

  vi /usr/local/redis/etc/redis.conf

  unixsocket /var/run/redis/redis.sock

  service redis-server start

  ls -l /var/run/redis/redis.sock

  GitLab

  su - git

  wget https://github.com/gitlabhq/gitlabhq/archive/v7.4.5.tar.gz

  tar xzvf v7.4.5.tar.gz

  mv gitlabhq-7.4.5 gitlab

  cd gitlab

  cp config/gitlab.yml.example config/gitlab.yml

  sed -i 'sgit.bitsCN.com@g' config/gitlab.yml

  chown -R git log/

  chown -R git tmp/

  chmod -R u+rwX log/

  chmod -R u+rwX tmp/

  mkdir /home/git/gitlab-satellites

  mkdir tmp/pids/

  mkdir tmp/sockets/

  chmod -R u+rwX tmp/pids/

  chmod -R u+rwX tmp/sockets/

  mkdir public/uploads

  chmod -R u+rwX public/uploads

  cp config/unicorn.rb.example config/unicorn.rb

  git config --global user.name "GitLab"

  git config --global user.email "gitlab@bitsCN.com"

  git config --global core.autocrlf input

  cp config/resque.yml.example config/resque.yml

  GitLab數據庫配置

  代碼如下:

  cp config/database.yml{.mysql,}

  cat config/database.yml

  production:

  adapter: mysql2

  encoding: utf8

  collation: utf8_general_ci

  reconnect: false

  database: gitlabhq_production

  pool: 10

  username: root

  password: "password"

  # host: localhost

  # socket: /tmp/mysql.sock

  chmod o-rwx config/database.yml

  Gems安裝

  代碼如下:

  su -

  gem install charlock_holmes --version '0.6.9.4'

  exit

  cd /home/git/gitlab/

  bundle install --deployment --without development test postgres puma aws postgres

  GitLab shell安裝

  代碼如下:

  bundle exec rake gitlab:shell:install[v2.1.0] REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production

  vi /home/git/gitlab-shell/config.yml

  修改正確路徑,如redis-cli,路徑改成bin: "/usr/local/bin/redis-cli"

  代碼如下:

  restorecon -Rv /home/git/.ssh

  初始化數據庫和激活高級功能

  代碼如下:

  git init

  bundle exec rake gitlab:setup RAILS_ENV=production #yes

  login.........root

  password......5iveL!fe

  GitLab初始化腳本

  代碼如下:

  su -

  wget -O /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/master/init/sysvinit/centos/gitlab-unicorn

  chmod +x /etc/init.d/gitlab

  chkconfig --add gitlab

  chkconfig gitlab on

  exit #切回git用戶

  檢查應用狀態

  代碼如下:

  cd /home/git/gitlab/

  bundle exec rake gitlab:env:info RAILS_ENV=production

  Compile assets

  bundle exec rake assets:precompile RAILS_ENV=production

  GitLab啟動

  代碼如下:

  su -

  service gitlab start

  Nginx配置

  usermod -a -G git www

  chmod 770 /home/git

  mkdir /usr/local/nginx/conf/vhost

  cd /usr/local/nginx/conf/vhost

  wget -O git.bitsCN.com.conf https://gitlab.com/gitlab-org/gitlab-ce/raw/master/lib/support/nginx/gitlab-ssl

  vi git.bitsCN.com.conf #修改一下配置項

  root /home/git/gitlab/public;

  server_name

  access_log

  error_log

  ssl_certificate gitlab.crt;

  ssl_certificate_key gitlab.key;

  ps:證書生成方法如下(正式環境建議將生成公鑰用第三方簽名使瀏覽器能識別):

  代碼如下:

  cd /usr/local/nginx/conf

  openssl genrsa -out gitlab.key 2048

  openssl req -new -x509 -days 36500 -key gitlab.key -out gitlab.crt -subj "/C=CN/ST=Shanghai/L=Shanghai/O=LinuxEye Ltd./OU=LinuxEye"

  重啟nginx

  代碼如下:

  service nginx restart

  訪問:https://git.bitsCN.com,用戶名/密碼:root/5iveL!fe

看過“CentOS系統怎么安裝GitLab客戶端”的人還看了:

1.CentOS 6.6系統怎么安裝

2.如何在CentOS系統中安裝搭建

3.怎么安裝Ubuntu操作系統

4.如何用u盤安裝linux系統

5.用U盤怎么安裝Linux系統

6.服務器上怎么安裝linux系統

916647 主站蜘蛛池模板: 国产二区三区不卡免费| 国产精品人妻熟女男人的天堂| 国产高清在线不卡一区| 久久一亚色院精品全部免费| 亚洲精品韩国一区二区| 日韩精品专区在线影观看| 女人与牲口性恔配视频免费| 人人人澡人人肉久久精品| 午夜激情福利一区二区| 亚洲日韩性欧美中文字幕| 99亚洲男女激情在线观看| 亚洲国产精品一二三四五| 天堂在线精品亚洲综合网| 亚洲 欧美 唯美 国产 伦 综合| 无码人妻精品一区二| 性饥渴少妇AV无码毛片| 四虎国产精品永久入口| 色吊丝中文字幕在线观看| 亚洲一区在线观看青青蜜臀| 亚洲超碰97无码中文字幕| 国产成人亚洲无码淙合青草| 无码人妻一区二区三区AV| 国产精品久久精品| 久久亚洲中文字幕伊人久久大| 日韩中文字幕有码av| 国产精品综合在线免费看| 国产视频有码字幕一区二区| 国产一区二区三区的视频| 免费可以在线看a∨网站| 国产日产免费高清欧美一区| 男人的天堂av一二三区| 韩国精品一区二区三区| 国产成人精彩在线视频50| 国产一区二区不卡在线| 久久人与动人物a级毛片| 亚洲精品一区二区三区蜜臀| 国产国产人免费人成免费| 亚洲国产成人无码av在线播放| 亚洲欧美电影在线一区二区| 亚洲人成网站在线播放2019| 国产午夜精品久久精品电影|