激情久久久_欧美视频区_成人av免费_不卡视频一二三区_欧美精品在欧美一区二区少妇_欧美一区二区三区的

服務(wù)器之家:專注于服務(wù)器技術(shù)及軟件下載分享
分類導(dǎo)航

Linux|Centos|Ubuntu|系統(tǒng)進(jìn)程|Fedora|注冊(cè)表|Bios|Solaris|Windows7|Windows10|Windows11|windows server|

服務(wù)器之家 - 服務(wù)器系統(tǒng) - Centos - CentOS系統(tǒng)中GitLab客戶端的安裝教程

CentOS系統(tǒng)中GitLab客戶端的安裝教程

2019-09-02 17:30Linux運(yùn)維筆記 Centos

這篇文章主要介紹了CentOS系統(tǒng)中GitLab客戶端的安裝教程,要安裝Ruby環(huán)境作為依賴,同時(shí)以MySQL為例講解了數(shù)據(jù)庫的協(xié)同,需要的朋友可以參考下

添加epel倉庫
 

復(fù)制代碼
代碼如下:

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參考 

復(fù)制代碼
代碼如下:

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

 

安裝依賴包
 

復(fù)制代碼
代碼如下:

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安裝
 

復(fù)制代碼
代碼如下:

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 ..

 

添加到環(huán)境變量
 

復(fù)制代碼
代碼如下:

vi /etc/profile
export PATH=/usr/local/ruby/bin:$PATH
. /etc/profile

 

安裝Bundler Gem
 

復(fù)制代碼
代碼如下:

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

 

為GitLab創(chuàng)建一個(gè)git用戶
 

復(fù)制代碼
代碼如下:

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

 

GitLab shell安裝
 

復(fù)制代碼
代碼如下:

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.zzvips.net/@' config.yml
sed -i 's@/usr/bin/redis-cli@/usr/local/redis/bin/redis-cli@' config.yml
./bin/install

 

數(shù)據(jù)庫/MySQL
 

復(fù)制代碼
代碼如下:

$ mysql -uroot -p
mysql> create database gitlabhq_production;
mysql> quit;

 

redis.sock路徑指定
 

復(fù)制代碼
代碼如下:

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 's@localhost@git.zzvips.net@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@zzvips.net"
git config --global core.autocrlf input
cp config/resque.yml.example config/resque.yml

 

GitLab數(shù)據(jù)庫配置
 

復(fù)制代碼
代碼如下:

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安裝
 

復(fù)制代碼
代碼如下:

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安裝
 

復(fù)制代碼
代碼如下:

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"
 

復(fù)制代碼
代碼如下:

restorecon -Rv /home/git/.ssh

 

初始化數(shù)據(jù)庫和激活高級(jí)功能
 

復(fù)制代碼
代碼如下:

git init
bundle exec rake gitlab:setup RAILS_ENV=production #yes
login.........root
password......5iveL!fe

 

GitLab初始化腳本
 

復(fù)制代碼
代碼如下:

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用戶

 

檢查應(yīng)用狀態(tài)
 

復(fù)制代碼
代碼如下:

cd /home/git/gitlab/
bundle exec rake gitlab:env:info RAILS_ENV=production
Compile assets
bundle exec rake assets:precompile RAILS_ENV=production

 

GitLab啟動(dòng)
 

復(fù)制代碼
代碼如下:

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.zzvips.net.conf https://gitlab.com/gitlab-org/gitlab-ce/raw/master/lib/support/nginx/gitlab-ssl
vi git.zzvips.net.conf #修改一下配置項(xiàng)
root /home/git/gitlab/public;
server_name
access_log
error_log
ssl_certificate gitlab.crt;
ssl_certificate_key gitlab.key;

 

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

復(fù)制代碼
代碼如下:

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
 

復(fù)制代碼
代碼如下:

service nginx restart

 

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

延伸 · 閱讀

精彩推薦
  • CentosCentos 7開啟網(wǎng)卡自動(dòng)獲取IP的詳細(xì)方法

    Centos 7開啟網(wǎng)卡自動(dòng)獲取IP的詳細(xì)方法

    本篇文章主要介紹了Centos 7開啟網(wǎng)卡自動(dòng)獲取IP的詳細(xì)方法,小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧...

    凌鋒8972021-12-29
  • CentosCentOS下Uptime命令詳解

    CentOS下Uptime命令詳解

    在Linux下,我們可以使用uptime命令,而且此命令不必使用root權(quán)限。uptime命令在系統(tǒng)中已經(jīng)默認(rèn)安裝了。今天小編為大家?guī)淼氖荂entOS下Uptime命令詳解;希望...

    CentOS之家11482019-06-19
  • CentosCentOS7設(shè)置日期和時(shí)間方法以及基本概念介紹

    CentOS7設(shè)置日期和時(shí)間方法以及基本概念介紹

    這篇文章主要介紹了CentOS7設(shè)置日期和時(shí)間方法以及基本概念介紹,本文講解使用CentOS7中的新命令timedatectl設(shè)置日期時(shí)間方法,需要的朋友可以參考下 ...

    CentOS之家6522019-09-19
  • Centoscentos 安裝與操作方法

    centos 安裝與操作方法

    這篇文章主要介紹了centos 安裝與操作方法,需要的朋友可以參考下...

    centos之家5272019-07-11
  • CentosCentOS 6.6實(shí)現(xiàn)永久修改DNS地址的方法

    CentOS 6.6實(shí)現(xiàn)永久修改DNS地址的方法

    這篇文章主要介紹了CentOS 6.6實(shí)現(xiàn)永久修改DNS地址的方法,涉及針對(duì)CentOS配置文件的相關(guān)設(shè)置技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下 ...

    Linux社區(qū)4472020-08-21
  • CentosCentos7運(yùn)用/dev/shm進(jìn)行網(wǎng)站優(yōu)化

    Centos7運(yùn)用/dev/shm進(jìn)行網(wǎng)站優(yōu)化

    這篇文章主要介紹了LINUX中Centos7運(yùn)用/dev/shm進(jìn)行網(wǎng)站優(yōu)化相關(guān)知識(shí)點(diǎn),對(duì)此有興趣的朋友參考學(xué)習(xí)下。...

    彬菌9912022-03-02
  • CentosCentOS6.5下Redis安裝與配置詳細(xì)步驟

    CentOS6.5下Redis安裝與配置詳細(xì)步驟

    本篇文章主要介紹了CentOS6.5下Redis安裝與配置詳細(xì)步驟,詳細(xì)介紹redis單機(jī)單實(shí)例安裝與配置,服務(wù)及開機(jī)自啟動(dòng)。有興趣的可以了解一下。...

    飛流11452021-12-24
  • Centoscentos不小心刪除/root目錄該如何解決?

    centos不小心刪除/root目錄該如何解決?

    一些朋友最近在問小編centos不小心刪除/root目錄該如何解決?今天小編就為大家分享centos不小心刪除/root目錄解決辦法;希望對(duì)大家會(huì)有幫助,有需要的朋友...

    腳本之家8022019-05-29
Weibo Article 1 Weibo Article 2 Weibo Article 3 Weibo Article 4 Weibo Article 5 Weibo Article 6 Weibo Article 7 Weibo Article 8 Weibo Article 9 Weibo Article 10 Weibo Article 11 Weibo Article 12 Weibo Article 13 Weibo Article 14 Weibo Article 15 Weibo Article 16 Weibo Article 17 Weibo Article 18 Weibo Article 19 Weibo Article 20 Weibo Article 21 Weibo Article 22 Weibo Article 23 Weibo Article 24 Weibo Article 25
主站蜘蛛池模板: 中文字幕在线看第二 | 婷婷精品国产一区二区三区日韩 | 一级国产免费 | 亚洲成人免费网站 | 免费视频a| 国产精品av久久久久久网址 | 欧美一级黄带 | 在线一级片 | 精品国产乱码一区二区三区四区 | 九九热精品在线 | 萌白酱福利视频在线网站 | 日韩黄a| 精品一区二区在线观看视频 | 欧美日韩国产中文字幕 | 中文字幕在线看第二 | 激情网站免费观看 | 亚洲一区二区三区在线播放 | 午夜久久电影 | 欧美一级免费视频 | 欧美性生活xxxxx | 91快色| 国产精品99久久久久久大便 | 日本黄色大片免费 | 国产精选久久久 | 韩国精品一区二区三区四区五区 | 亚洲性一区 | 史上最强炼体老祖动漫在线观看 | 一级成人毛片 | 蜜桃免费在线 | 国产成人午夜高潮毛片 | 国产色爱综合网 | 精品一区视频 | 久久久成人动漫 | 欧美成人区 | 精品二区在线观看 | 91av视频大全| 九色激情网 | 国产精品视频六区 | 国产九色视频在线观看 | 国产乱淫av | 欧美视频国产精品 |