Technology Engineering

178inaba の技術ブログ

Raspberry Piでいろいろ。【その3 -> GitLabインストール】





  • SSH接続 OK
  • 起動ドライブをHDDにする OK
  • 無線でつなぐ OK
  • Swap領域設定 OK
  • パスワード変更 OK
  • パッケージ更新 OK
  • GitLabインストール



1. Install and configure the necessary dependencies


$ sudo apt-get install curl openssh-server ca-certificates postfix apt-transport-https
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ca-certificates is already the newest version.
curl is already the newest version.
openssh-server is already the newest version.
openssh-server set to manually installed.
The following extra packages will be installed:
  libcurl3-gnutls ssl-cert
Suggested packages:
  procmail postfix-mysql postfix-pgsql postfix-ldap postfix-pcre sasl2-bin dovecot-common postfix-cdb mail-reader ufw postfix-doc openssl-blacklist
The following NEW packages will be installed:
  apt-transport-https libcurl3-gnutls postfix ssl-cert
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,673 kB of archives.
After this operation, 3,845 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 jessie/main libcurl3-gnutls armhf 7.38.0-4+deb8u5 [225 kB]
Get:2 jessie/main apt-transport-https armhf [134 kB]
Get:3 jessie/main ssl-cert all 1.0.35 [20.9 kB]
Get:4 jessie/main postfix armhf 2.11.3-1 [1,293 kB]                                                                                 
Fetched 1,673 kB in 9s (185 kB/s)                                                                                                                                                
Preconfiguring packages ...
Selecting previously unselected package libcurl3-gnutls:armhf.
(Reading database ... 31272 files and directories currently installed.)
Preparing to unpack .../libcurl3-gnutls_7.38.0-4+deb8u5_armhf.deb ...
Unpacking libcurl3-gnutls:armhf (7.38.0-4+deb8u5) ...
Selecting previously unselected package apt-transport-https.
Preparing to unpack .../apt-transport-https_1. ...
Unpacking apt-transport-https ( ...
Selecting previously unselected package ssl-cert.
Preparing to unpack .../ssl-cert_1.0.35_all.deb ...
Unpacking ssl-cert (1.0.35) ...
Selecting previously unselected package postfix.
Preparing to unpack .../postfix_2.11.3-1_armhf.deb ...
Unpacking postfix (2.11.3-1) ...
Processing triggers for man-db ( ...
Processing triggers for systemd (215-17+deb8u5) ...
Setting up libcurl3-gnutls:armhf (7.38.0-4+deb8u5) ...
Setting up apt-transport-https ( ...
Setting up ssl-cert (1.0.35) ...
Setting up postfix (2.11.3-1) ...
Adding group `postfix' (GID 115) ...
Adding system user `postfix' (UID 109) ...
Adding new user `postfix' (UID 109) with group `postfix' ...
Not creating home directory `/var/spool/postfix'.
Creating /etc/postfix/
Adding tcp map entry to /etc/postfix/
Adding sqlite map entry to /etc/postfix/
Adding group `postdrop' (GID 116) ...
setting myhostname: raspberrypi
setting alias maps
setting alias database
changing /etc/mailname to gitlab.raspberrypi.local
setting myorigin
setting destinations: gitlab.raspberrypi.local, raspberrypi, localhost.localdomain, localhost
setting relayhost: 
setting mynetworks: [::ffff:]/104 [::1]/128
setting mailbox_size_limit: 0
setting recipient_delimiter: +
setting inet_interfaces: all
/etc/aliases does not exist, creating it.
WARNING: /etc/aliases exists, but does not have a root alias.

Postfix is now set up with a default configuration.  If you need to make 
changes, edit
/etc/postfix/ (and others) as needed.  To view Postfix configuration
values, see postconf(1).

After modifying, be sure to run '/etc/init.d/postfix reload'.

Running newaliases
Processing triggers for libc-bin (2.19-18+deb8u6) ...
Processing triggers for systemd (215-17+deb8u5) ...



ここは下記を参考にSMTPを使用するInternet Siteを選択。



$ curl | sudo apt-key add -
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1703  100  1703    0     0   1850      0 --:--:-- --:--:-- --:--:--  1849

2. Add the GitLab package server and install the package


$ sudo curl -sS | sudo bash
Detected operating system as raspbian/jessie.
Checking for curl...
Detected curl...
Running apt-get update... done.
Installing apt-transport-https... done.
Installing /etc/apt/sources.list.d/gitlab_raspberry-pi2.list...done.
Importing packagecloud gpg key... done.
Running apt-get update... done.

The repository is setup! You can now install packages.

$ sudo apt-get install gitlab-ce
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 263 MB of archives.
After this operation, 724 MB of additional disk space will be used.
Get:1 jessie/main gitlab-ce armhf 8.7.9+20160704103025-ce.1 [263 MB]
Fetched 263 MB in 2min 39s (1,653 kB/s)                                                                                                                                          
Selecting previously unselected package gitlab-ce.
(Reading database ... 31486 files and directories currently installed.)
Preparing to unpack .../gitlab-ce_8.7.9+20160704103025-ce.1_armhf.deb ...
Unpacking gitlab-ce (8.7.9+20160704103025-ce.1) ...
Setting up gitlab-ce (8.7.9+20160704103025-ce.1) ...
gitlab: Thank you for installing GitLab!
gitlab: To configure and start GitLab, RUN THE FOLLOWING COMMAND:

sudo gitlab-ctl reconfigure

gitlab: GitLab should be reachable at http://raspberrypi
gitlab: Otherwise configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
gitlab: And running reconfigure again.
gitlab: For a comprehensive list of configuration options please see the Omnibus GitLab readme
It looks like GitLab has not been configured yet; skipping the upgrade script.

3. Configure and start GitLab


$ sudo gitlab-ctl reconfigure
# 長いので出力は割愛。




f:id:i178inaba:20161214012746p:plain f:id:i178inaba:20161214013437p:plain

  • Username: root
  • Password: 先程設定したパスワード