-
Notifications
You must be signed in to change notification settings - Fork 112
5.0 Install tests
CentOS 6.4 x86_64 minimal install
packages: git packages-epel: yum install http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Variables: GL_HOSTNAME=$HOSTNAME RUBY_VERSION="1.9.3-p392" MYSQL_ROOT_PW=$(cat /dev/urandom | tr -cd [:alnum:] | head -c ${1:-16}) GL_GIT_BRANCH="5-0-stable"
patch gcc-c++ readline-devel zlib-devel libffi-devel openssl-devel make autoconf automake libtool bison libxml2-devel libxslt-devel
Instructions from https://rvm.io
curl -L get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
rvm pkg install libyaml
command rvm install $RUBY_VERSION --with-libyaml-dir=/usr/local/rvm/usr rvm use $RUBY_VERSION
gem install bundler
adduser --system --create-home --comment 'GitLab' git
su - git -c "git clone https://github.com/gitlabhq/gitlab-shell.git"
su - git -c "cp gitlab-shell/config.yml.example gitlab-shell/config.yml" TODO: edit
su - git -c "rvm use 1.9.3-p392;gitlab-shell/bin/install"
yum -y install redis
service redis start
chkconfig redis on
yum install -y mysql-server
chkconfig mysqld on
service mysqld start
echo "CREATE DATABASE IF NOT EXISTS gitlabhq_production DEFAULT CHARACTER SET 'utf8' COLLATE 'utf8_unicode_ci';" | mysql -u root
echo "UPDATE mysql.user SET Password=PASSWORD('$MYSQL_ROOT_PW') WHERE User='root'; FLUSH PRIVILEGES;" | mysql -u root
TODO: GitLab-user
su - git -c "git clone https://github.com/gitlabhq/gitlabhq.git gitlab"
su - git -c "cd gitlab;git checkout $GL_GIT_BRANCH"
cd /home/git/gitlab
su git -c "cp config/gitlab.yml.example config/gitlab.yml"
sed -i "s/ host: localhost/ host: $GL_HOSTNAME/g" config/gitlab.yml
sed -i "s/from: gitlab@localhost/from: gitlab@$GL_HOSTNAME/g" config/gitlab.yml TODO: Add variables for email_from and support_email
#su git -c "mkdir /home/git/gitlab-satellites"
#sudo -u git -H mkdir tmp/pids/ #sudo chmod -R u+rwX tmp/pids/
su git -c "cp config/unicorn.rb.example config/unicorn.rb"
su git -c "cp config/database.yml.mysql config/database.yml"
sed -i "s/secure password/$MYSQL_ROOT_PW/g" config/database.yml
yum -y install libicu-devel gem install charlock_holmes --version '0.6.9'
yum -y install mysql-devel su git -c "bundle install --deployment --without development test postgres"
su git -c "bundle exec rake gitlab:setup RAILS_ENV=production" DOIT: Stop: Do you want to continue (yes/no)? yes