Showing posts with label slackware. Show all posts
Showing posts with label slackware. Show all posts

Monday, December 2, 2013

Gitlab Install, Slackware 13.37 or 14.1

Gitlab install, Slackware 13.37, 14.1
Install Redis
Download and compile from source
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make

copy files
cd src
sudo cp redis-server /usr/local/bin/
sudo cp redis-cli /usr/local/bin/
edit initial script
editor /etc/rc.d/rc.local

or make initial script

Git (Under 1.7.10)
Download and compile from source
cd /tmp
curl --progress https://git-core.googlecode.com/files/git-1.8.4.1.tar.gz | tar xz
cd git-1.8.4.1/
make prefix=/usr/local all

Install into /usr/local/bin
sudo make prefix=/usr/local install
When editing config/gitlab.yml (Step 6), change the git bin_path to /usr/local/bin/git

Ruby
mkdir /tmp/ruby && cd /tmp/ruby
curl --progress ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p353.tar.gz | tar xz
cd ruby-2.0.0-p353
./configure --prefix=/usr/local/
make && make install

Check installed path
login agin
which ruby
ruby -v

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

System User
useradd --system --shell /bin/bash --comment 'GitLab' --create-home --home /home/git/ git
check shadow file
cat /etc/shadow |grep git
git:*:::::::
if it shows git:!::::::: change to git:*:::::::

Git-Shell (v 1.7.9)
su git
git clone https://github.com/gitlabhq/gitlab-shell.git
cd gitlab-shell
git checkout v1.7.9
cp config.yml.example config.yml
edit config.yml
./bin/install

Database (MySQL/MariaDB)
CREATE USER 'gitlab'@'localhost' IDENTIFIED BY 'supersecret';
CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
GRANT SELECT, LOCK TABLES, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `gitlabhq_production`.* TO 'gitlab'@'localhost'

Gitlab (v6.3)
su - git
Clone GitLab repository
git clone https://github.com/gitlabhq/gitlabhq.git gitlab
Go to gitlab directory
cd /home/git/gitlab
Checkout to stable release
git checkout 6-3-stable
Setup files
cp config/gitlab.yml.example config/gitlab.yml
chown -R git log/
chown -R git tmp/
chmod -R u+rwX  log/
chmod -R u+rwX  tmp/
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@your_domain_name"
git config --global core.autocrlf input

cp database.yml.mysql database.yml
chmod o-rwx config/database.yml
gem install charlock_holmes --version '0.6.9.4'
bundle install --deployment --without development test postgres puma aws
bundle exec rake gitlab:setup RAILS_ENV=production