GitLabのFreeBSDへのインストールが,噂以上に難しかった件について(3)

GitLabのFreeBSDへのインストールが,噂以上に難しかった件について(2) - なぜか数学者にはワイン好きが多い
続けます!


Redis

なんと贅沢なシステムなんだ...爆速KVSのRedisもいるんだね.

pkg install redis

# Configure redis to use sockets
cp -pvi /usr/local/etc/redis.conf /usr/local/etc/redis.conf.orig
sed -e 's/^# unixsocket /unixsocket /' -e 's/^port .*/port 0/' /usr/local/etc/redis.conf.orig | tee /usr/local/etc/redis.conf

# Activate the changes to redis.conf
/usr/local/etc/rc.d/redis onestart
Starting redis.

# Add git to the redis group
pw usermod git -G redis

Redisはインストールが超簡単なので.ラクチン.

GitLab

GitLab本体のインストールだね.

# We'll install GitLab into home directory of the user "git"
cd /home/git

# Clone the Source

% git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 7-2-stable gitlab
Cloning into 'gitlab'...
remote: Counting objects: 90902, done.
remote: Compressing objects: 100% (23680/23680), done.
remote: Total 90902 (delta 68948), reused 86670 (delta 65895)
Receiving objects: 100% (90902/90902), 73.37 MiB | 344.00 KiB/s, done.
Resolving deltas: 100% (68948/68948), done.
Checking connectivity... done.


Configure It

# Go to GitLab installation folder
cd /home/git/gitlab

# Copy the example GitLab config
cp -vi config/gitlab.yml.example config/gitlab.yml
config/gitlab.yml.example -> config/gitlab.yml

# Update GitLab config file, follow the directions at top of file
emacs config/gitlab.yml

ホスト名
  #gitlab:
   192.168.1.3:

メールアドレス
    #email_from: example@example.com
    email_from: my@example.com

    # Email server smtp settings are in [a separate file](initializers/smtp_settings.rb.sample).

パス違い
    #bin_path: /usr/bin/git
    bin_path: /usr/local/bin/git         

# Set email server smtp configuration

cp -vi config/initializers/smtp_settings.rb.sample config/initializers/smtp_settings.rb
emacs config/initializers/smtp_settings.rb



# Make sure GitLab can write to the log/ and tmp/ directories
chown -R git log/
chown -R git tmp/
chmod -R u+rwX log/
chmod -R u+rwX tmp/

# Create directory for satellites
mkdir -v /home/git/gitlab-satellites
chmod -v u+rwx,g=rx,o-rwx /home/git/gitlab-satellites

# Make sure GitLab can write to the tmp/pids/ and tmp/sockets/ directories
chmod -v -R u+rwX tmp/pids/
chmod -v -R u+rwX tmp/sockets/


# Make sure GitLab can write to the public/uploads/ directory
chmod -v -R u+rwX  public/uploads

# Copy the example Unicorn config
cp -vi config/unicorn.rb.example config/unicorn.rb

# Enable cluster mode if you expect to have a high load instance
# Ex. change amount of workers to 3 for 2GB RAM server
# emacs config/unicorn.rb

# Copy the example Rack attack config
cp -vi config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb

# Configure Git global settings for git user, useful when editing via web
# Edit user.email according to what is set in gitlab.yml
git config --global user.name "GitLab"
git config --global user.email "my@example.com"
git config --global core.autocrlf input

# Configure Redis connection settings
cp -pvi config/resque.yml.example config/resque.yml

なんか細かい設定をメモし忘れてる気がする...また追記しますね.
ここまで!