centos7 gitlab
yum -y update
chmod +x /etc/rc.d/rc.local vi /etc/selinux/config
SELINUX=disabled
reboot vi /etc/hosts 127.0.0.1 git.x2ce.com
Git
yum -y install git
git --version
#Make sure Git is version 2.7.4 or higher yum -y remove git
yum -y install gcc zlib-devel perl-CPAN gettext curl-devel expat-devel gettext-devel openssl-devel
cd /home
wget https://www.kernel.org/pub/software/scm/git/git-2.8.2.tar.gz
tar zxvf git-2.8..tar.gz
cd git-2.8.
./configure --prefix=/usr/local
make && make install git --version
rm /home/git-2.8.* -rf
Ruby
yum -y install ruby
ruby -v #The current supported Ruby version is 2.1.x. Ruby 2.2 and 2.3 are currently not supported. yum -y remove ruby
cd /home
wget https://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.8.tar.gz
tar zxvf ruby-2.1..tar.gz
cd ruby-2.1.
./configure --prefix=/usr/local/ruby --disable-install-rdoc
make && make install ruby -v rm /home/ruby-2.1.* -rf gem sources --remove https://rubygems.org/
gem sources -a https://ruby.taobao.org/
gem sources -l gem install bundler --no-ri --no-rdoc
Mysql
cd /home
wget http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
rpm -ivh mysql-community-release-el7-.noarch.rpm
yum -y install mysql-community-server
yum -y install mysql-community-devel service mysqld restart mysql -uroot
update mysql.user set password=PASSWORD('密码') where User='root';
flush privileges; CREATE USER 'gitlab'@'localhost' IDENTIFIED BY 'gitLabdsdew8772';
SET storage_engine=INNODB;
CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, CREATE TEMPORARY TABLES, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'gitlab'@'localhost'; mysql -ugitlab -pgitLabdsdew8772 -D gitlabhq_production
chown -R mysql:mysql /var/lib/mysql rm -rf /home/mysql*
adduser --system --shell /bin/bash --comment 'GitLab' --create-home --home-dir /home/git/ git chmod 777 /home/git
Redis
cd /home wget http://download.redis.io/redis-stable.tar.gz
tar zxvf redis-stable.tar.gz
cd redis-stable
make MALLOC=libc
make install mkdir /etc/redis/ sed 's/^port .*/port 0/' redis.conf.orig |tee /etc/redis/redis.conf echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf echo 'unixsocketperm 770' | sudo tee -a /etc/redis/redis.conf adduser redis usermod -aG redis git rm -rf redis-stable* vi /etc/redis/redis # chkconfig:
# Description: Redis is a persistent key-value database
PATH=/usr/local/bin:/sbin:/usr/bin:/bin
EXEC=/usr/local/bin/redis-server
REDIS_CLI=/usr/local/bin/redis-cli PIDFILE=/var/run/redis.pid
CONF="/etc/redis/redis.conf" USPATH=/var/run/redis/
USFILE=/var/run/redis/redis.sock case "$1" in
start)
if [ -f $PIDFILE ]
then
echo "$PIDFILE exists, process is already running or crashed"
else
if [ ! -d $USPATH ]
then
mkdir $USPATH
fi
echo "Starting Redis server..."
$EXEC $CONF
fi
if [ "$?"="" ]
then
while [ ! -x $USFILE ]
do
echo "Waiting for Redis to start ..."
sleep
done
chown -R redis:redis $USFILE
echo "Redis is running..."
fi
;;
post)
while [ ! -x $USFILE ]
do
echo "Waiting for Redis to start ..."
sleep
done
chown -R redis:redis $USFILE
echo "Redis is running..."
;;
stop)
if [ ! -f $PIDFILE ]
then
echo "$PIDFILE does not exist, process is not running"
else
PID=$(cat $PIDFILE)
echo "Stopping ..."
$REDIS_CLI -s $USFILE SHUTDOWN
while [ -x ${PIDFILE} ]
do
echo "Waiting for Redis to shutdown ..."
sleep
done
echo "Redis stopped"
fi
;;
restart|force-reload)
${} stop
${} start
;;
*)
echo "Usage: /etc/init.d/redis {start|stop|restart|force-reload}" >&
exit
esac chmod +x /etc/redis/redis vi /lib/systemd/system/redis-server.service [Unit]
Description=redis server service -s
After=network.target [Service]
ExecStart=/usr/bin/bash /etc/redis/redis start
ExecStartPost=/usr/bin/bash /etc/redis/redis post
ExecStop=/usr/bin/bash /etc/redis/redis stop
ExecReload=/usr/bin/bash /etc/redis/redis restart [Install]
WantedBy=multi-user.target chmod +x /lib/systemd/system/redis-server.service systemctl enable redis-server
NodeJs
cd /home yum -y install gcc make gcc-c++ openssl-devel wget wget https://nodejs.org/dist/v4.4.3/node-v4.4.3.tar.gz tar -zvxf node-v4.4.3.tar.gz cd node-v4.4.3 ./configure make && make install node -v rm -rf /home/node-v4.4.3*
Gitlab
yum -y install libicu-devel cmake gcc-c++
cd /home
wget https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.5.3.linux-amd64.tar.gz
ln -sf /usr/local/go/bin/{go,godoc,gofmt} /usr/local/bin/
rm -rf go1.5.3.linux-amd64.tar.gz
cd /home/git
sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 8-7-stable gitlab
cd /home/git/gitlab/
sudo -u git -H cp config/gitlab.yml.example config/gitlab.yml
sudo -u git -H vi config/gitlab.yml
sudo -u git -H cp config/secrets.yml.example config/secrets.yml
sudo -u git -H chmod config/secrets.yml
chown -R git log/
chown -R git tmp/
chmod -R u+rwX,go-w log/
chmod -R u+rwX tmp/
chmod -R u+rwX tmp/pids/
chmod -R u+rwX tmp/sockets/
sudo -u git -H mkdir public/uploads/
chmod public/uploads
chmod -R u+rwX builds/
chmod -R u+rwX shared/artifacts/
sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb
nproc
sudo -u git -H vi config/unicorn.rb
sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
sudo -u git -H git config --global core.autocrlf input
sudo -u git -H git config --global user.name "GitLab"
sudo -u git -H git config --global user.email "gitlab@text.com"
sudo -u git -H git config --global gc.auto
sudo -u git -H cp config/resque.yml.example config/resque.yml
sudo -u git -H vi config/resque.yml
sudo -u git cp config/database.yml.mysql config/database.yml
sudo -u git -H vi config/database.yml
sudo -u git -H chmod o-rwx config/database.yml
sudo -u git -H bundle install --deployment --without development test postgres aws
ln -s /usr/local/bin/git /usr/bin/git
sudo -u git -H bundle exec rake gitlab:shell:install REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production
sudo -u git -H vi /home/git/gitlab-shell/config.yml
sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
cd /home/git
sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-workhorse.git
cd gitlab-workhorse
sudo -u git -H git checkout v0.7.1
sudo -u git -H make
cd /home/git/gitlab/
vi /etc/rc.local
/home/git/gitlab/lib/support/init.d/gitlab start >> /home/logs/gitlab.log
cp lib/support/init.d/gitlab.default.example /etc/default/gitlab
cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
wget http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
rpm -ivh nginx-release-centos--.el7.ngx.noarch.rpm
yum install -y nginx
chkconfig nginx on
wget -O /etc/nginx/conf.d/gitlab.conf https://gitlab.com/gitlab-org/gitlab-ce/raw/master/lib/support/nginx/gitlab
vi /etc/nginx/conf.d/gitlab.conf
vi /etc/nginx/conf.d/
usermod -a -G git nginx
cd /home/git/gitlab/
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
centos7 gitlab的更多相关文章
- CentOS7——gitlab本地git仓库搭建 以及web hook配置
整个搭建用的都是各种默认设置,所以没有用到高深的的东西,比较简单,比较傻瓜式,这篇也仅仅是一个入门. 另外本文具有时效性,浏览本文请注意发表时间,为防止过时产生误导,本文尽量把 “如何得知应该这样做” ...
- Vmware安装CentOs7+gitlab(二)
在CentOS系统上安装所需的依赖:ssh,防火墙,postfix(用于邮件通知) ,wget,以下这些命令也会打开系统防火墙中的HTTP和SSH端口访问. 1.安装ssh和python sudo y ...
- Vmware安装CentOs7+gitlab(一)
本篇文章主要介绍了VMware安装Centos7超详细过程(图文),具有一定的参考价值,感兴趣的小伙伴们可以参考一下 1.软硬件准备 软件:推荐使用VMwear,我用的是VMwear 12 镜像:Ce ...
- CentOS7 GitLab 安装
1.安装依赖 $ yum -y install policycoreutils openssh-server openssh-clients postfix $ yum install policyc ...
- centos7 安装部署gitlab
Gitlab官网地址:https://about.gitlab.com/downloads/ Linux系统环境: Centos7 gitlab服务安装之前需要安装一些依赖包:yum install ...
- Jenkins+Git+Gitlab+Ansible实现持续集成自动化部署动态网站(二)--技术流ken
项目前言 在上一篇博客<Jenkins+Git+Gitlab+Ansible实现持续化集成一键部署静态网站(一)--技术流ken>中已经详细讲解了如何使用这四个工具来持续集成自动化部署一个 ...
- Git+Gitlab+Ansible剧本实现一键部署动态网站(二)--技术流ken
项目前言 之前已经写了一篇关于git和ansible的博客<Git+Gitlab+Ansible剧本实现一键部署Nginx--技术流ken>.关于git,gitliab,ansible在我 ...
- 【Gitlab+Jenkins+Ansible】构建自动化部署
说明: Gitlab.Jenkins.生产服务器.测试服务器上都需要安装Git. 一.安装Gitlab 1.主机配置 IP: 10.10.10.105 OS: CentOs7. Gitlab版本:gi ...
- GitLab企业级代码管理仓库
原文:https://www.cnblogs.com/wsnbba/p/10171052.html 使用GitHub或者码云等公共代码仓库 使用GitLab私有仓库 GitLab是什么? 是一个用 ...
随机推荐
- js中的回调函数的理解和使用方法
js中的回调函数的理解和使用方法 一. 回调函数的作用 js代码会至上而下一条线执行下去,但是有时候我们需要等到一个操作结束之后再进行下一个操作,这时候就需要用到回调函数. 二. 回调函数的解释 因为 ...
- 使用SharpSSH连接服务器报Algorithm negotiation fail解决办法
SharpSSH或JSCH使用diffie-hellman-group1-sha1和diffie-hellman-group-exchange-sha1密钥交换算法,而OpenSSH在6.7p1版本之 ...
- delete all untracked files
git clean -f git clean -fdx f file d directory x .gitignore
- P1967 货车运输 -60分
打了一个最大生成树+dfs,60分成功tle #include <bits/stdc++.h> using namespace std; const int maxn = 10005; c ...
- 模块加载----Webpack
一.配合gulp编译sass与压缩js 1.安装node.js 2.全局安装webpack 打开npm窗口执行 npm install webpack –g 3. 在项目中使用webpack 使用np ...
- 百度地图API-自定义图标覆盖物
地图覆盖物 Overlay:覆盖物的抽象基类,所有的覆盖物均继承此类的方法. Marker:标注表示地图上的点,可自定义标注的图标. Label:表示地图上的文本标注,您可以自定义标注的文本内容. P ...
- keepalived工作原理和配置说明 腾讯云VPC内通过keepalived搭建高可用主备集群
keepalived工作原理和配置说明 腾讯云VPC内通过keepalived搭建高可用主备集群 内网路由都用mac地址 一个mac地址绑定多个ip一个网卡只能一个mac地址,而且mac地址无法改,但 ...
- sdutoj 2624 Contest Print Server
http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2624 Contest Print Server ...
- C++之路进阶——codevs2451(互不侵犯)
2451 互不侵犯 2005年省队选拔赛四川 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 大师 Master 题目描述 Description 在N×N的棋盘里 ...
- BJFU 1068
描述 某次科研调查时得到了n个自然数,每个数均不超过1500000000(1.5*109).已知不相同的数不超过10000个,现在需要统计这些自然数各自出现的次数,并按照自然数从小到大的顺序输出统计结 ...