Last active
December 16, 2015 13:19
-
-
Save runeleaf/5440642 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm | |
rpm -Uvh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
yum -y install rpm-build vim-enhanced httpd-devel httpd libcurl-devel 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 redis sudo mysql-server wget mysql-devel crontabs logwatch logrotate sendmail-cf qtwebkit qtwebkit-devel perl-Time-HiRes git python-devel python-pip libicu-devel postfix | |
wget http://redis.googlecode.com/files/redis-2.4.18.tar.gz | |
tar zxvf redis-2.4.18.tar.gz | |
cd redis-2.4.18 | |
make test | |
make && make install | |
cp redis.conf /etc/ | |
cd /etc/init.d | |
wget -O redis https://gist.github.com/runeleaf/5440645/raw/6605d91ef43f1a237979dce09e241cc643d7d68f/gistfile1.txt | |
chmod 755 | |
chkconfig --add redis | |
groupadd redis | |
useradd -s /sbin/nologin -M -g redis redis | |
vi /etc/redis.conf | |
daemonize yes | |
service redis start | |
vi /etc/my.cnf | |
[mysqld] | |
character-set-server=utf8 | |
[client] | |
default-character-set=utf8 | |
mysql_install_db | |
service mysqld start | |
useradd git | |
passwd git | |
su - git | |
cd /home/git | |
git clone https://github.com/gitlabhq/gitlab-shell.git | |
cd gitlab-shell | |
git co v1.5.0 | |
git co -b v1.5.0 | |
cp config.yml.example config.yml | |
./bin/install | |
mysql> create database gitlabhq_production; | |
cd /home/git | |
git clone https://github.com/gitlabhq/gitlabhq.git gitlab | |
cd gitlab | |
git co 5-1-stable | |
cp config/gitlab.yml.example config/gitlab.yml | |
mkdir /home/git/gitlab-satellites | |
cp config/database.yml.mysql config/database.yml | |
bundle install --deployment --without development test postgres --path vendor/bundle | |
bundle exec rake db:migrate RAILS_ENV=production | |
bundle exec rake gitlab:setup RAILS_ENV=production | |
bundle exec rake gitlab:env:info | |
# root | |
cd /etc/init.d | |
curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/5-1-stable/init.d/gitlab | |
#chmod 755 gitlab | |
#chkconfig --add gitlab | |
cd /home | |
chmod 710 git | |
chmod 700 git/.ssh | |
chmod 600 git/.ssh/authorized_keys | |
# unicorn | |
visudo | |
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin | |
curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/5-1-stable/init.d/gitlab | |
vim gitlab-shell/bin/gitlab-shell | |
#!/usr/local/bin/ruby | |
# passenger | |
cd /etc/nginx | |
mkdir sites-available sites-enabled | |
curl --output /etc/nginx/sites-available/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/5-1-stable/nginx/gitlab | |
#ln -s /etc/nginx/sites-available/gitlab /etc/nginx/sites-enabled/gitlab.conf | |
cd /etc/nginx/sites-enabled | |
vim gitlab.conf | |
service nginx start | |
# This repository does not have satellite とか画面に表示されていたら | |
RAILS_ENV=production bundle exec rake gitlab:satellites:create |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment