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是什么? 是一个用 ...
随机推荐
- Matlab图像处理函数:regionprops
本篇文章为转载,仅为方便学术讨论所用,不用于商业用途.由于时间较久,原作者以及原始链接暂时无法找到,如有侵权以及其他任何事宜欢迎跟我联系,如有侵扰,在此提前表示歉意.----------------- ...
- lua 可变参数
问题:对可变参数传递的时候,采用如下方案: local cellData = {MsgText = msgText,Param = ...,CallBackFunc = callBackFunc,Ca ...
- hibernate学习(3)——api详解对象(2)
1. Transaction 事务 事务的操作: 开启事务 beginTransaction() 获得事务 getTransaction() 提交事务:commit() 回滚事务:rollback ...
- Web Api 中Get 和 Post 请求的多种情况分析
转自:http://www.cnblogs.com/babycool/p/3922738.html 来看看对于一般前台页面发起的get和post请求,我们在Web API中要如何来处理. 这里我使用J ...
- Markdown资源 markd
markdown是将某些格式的文本,翻译成HTML的一个库,非常精妙! https://www.npmjs.com/package/markedhttps://github.com/adam-p/ma ...
- CentOS修改mysql 用户root的密码并允许远程登录
第一步:用帐号登录mysql[root@CentOs5 ~]# mysql -u root -p 第二步:改变用户数据库mysql> use mysql 第三步:修改密码,记得密码要用passw ...
- MyBatis操作指南-配置结果映射一对一,一对多,多对多(基于注解)
- 字节流和字符流(InputStream类和OutputStream类)
java流包括字节流和字符流,字节流通过I/O设备以字节数据的方式读入,而字符流则是通过字节流读入数据转换成字符"流"的形式由用户驱使. InputStream是所有字节输入流的父 ...
- discuz 二次开发
discuz 框架也算是比较流行的社区论坛框架,discuz 的基础架构采用世界上最流行的 web 编程组合 PHP + MySQL 实现,是一个经过完善设计,适用于各种服务器环境的高效论坛系统解决方 ...
- 《30天自制操作系统》13_day_学习笔记
harib10a: 简化字符串的显示:我们发现字符串显示三条语句总是重复出现,并且总是一起出现的.接下来我们把它归纳到一个函数中,这样便于使用. x,y--位置的坐标 c--字符颜色 (col ...