Server/GitLab

Aus Wiki StuRa HTW Dresden
Zur Navigation springen Zur Suche springen

GitLab ist eine OpenSource Software alternative zu Github.


Achtung

Dieser Artikel ist ein exemplarischer Artikel.

Es handelt sich hierbei nicht um die Instanz GitLab als Dienst für git vom StuRa. Der StuRa betriebt (derzeit) keinen derartigen Dienst. Das öffentliche Verwalten von Code findet bei Github statt.

TurnKey

https://www.turnkeylinux.org/gitlab

TurnKey 16

https://releases.turnkeylinux.org/turnkey-gitlab/16.0-buster-amd64/

TurnKey 16 Installation

Die automatische Initialisierung dauert eine gefühlte Ewigkeit!

nach 42 min (1 CPU (überwiegend ausgelastet), 4 GB Arbeitsspeicher (nicht ausgelastet), 16 GB Massenspeicher (nicht ausgelastet)) abgebrochen

nach dem Neustart

ssh root@141.56.51.321

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:qXaF3mKqLgYXCAmbywRTwuUB0vcWUzXPFJItpb0F5OA.
Please contact your system administrator.
Add correct host key in /home/stura/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /home/stura/.ssh/known_hosts:42
  remove with:
  ssh-keygen -f "/home/stura/.ssh/known_hosts" -R "141.56.51.321"
ECDSA host key for dev.dat.stu.htw.stura-dresden.de has changed and you have requested strict checking.
Host key verification failed.

ssh-keygen -f "/home/stura/.ssh/known_hosts" -R "141.56.51.321"

ssh root@141.56.51.321


 TurnKey Linux - First boot configuration
 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

                            ┌────────────────Initialize Hub services───────────────────┐
                            │                                                          │  
                            │ 1) TurnKey Backup and Migration: saves changes to files, │  
                            │    databases and package management to encrypted storage │  
                            │    which servers can be automatically restored from.     │  
                            │    https://www.turnkeylinux.org/tklbam                   │  
                            │                                                          │  
                            │ 2) TurnKey Domain Management and Dynamic DNS:            │  
                            │    https://www.turnkeylinux.org/dns                      │  
                            │                                                          │  
                            │ You can start using these services immediately if you    │  
                            │ initialize now. Or you can do this manually later (e.g., │  
                            │ from the command line / Webmin)                          │  
                            │                                                          │  
                            │ API Key: (see https://hub.turnkeylinux.org/profile)      │  
                            │ ┌──────────────────────────────────────────────────────┐ │  
                            │ │                                                      │ │  
                            │ └──────────────────────────────────────────────────────┘ │  
                            │                                                          │  
                            ├──────────────────────────────────────────────────────────┤  
                            │                 <Apply>         <Skip >                  │  
                            └──────────────────────────────────────────────────────────┘  
<Skip >
 TurnKey Linux - First boot configuration
 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

                            ┌───System Notifications and Critical Security Alerts──────┐
                            │                                                          │  
                            │ Enable local system notifications (root@localhost) to be │  
                            │ forwarded to your regular inbox. Notifications include   │  
                            │ security updates and system messages.                    │  
                            │                                                          │  
                            │ You will also be subscribed to receive critical security │  
                            │ and bug alerts through a low-traffic Security and News   │  
                            │ announcements newsletter. You can unsubscribe at any     │  
                            │ time.                                                    │  
                            │                                                          │  
                            │ https://www.turnkeylinux.org/security-alerts             │  
                            │                                                          │  
                            │ Email:                                                   │  
                            │ ┌──────────────────────────────────────────────────────┐ │  
                            │ │                                                      │ │  
                            │ └──────────────────────────────────────────────────────┘ │  
                            ├──────────────────────────────────────────────────────────┤  
                            │               <Enable>        < Skip >                   │  
                            └──────────────────────────────────────────────────────────┘  
< Skip >
 TurnKey GNU/Linux - First boot configuration
 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────



                            ┌────────────────────Security updates──────────────────────┐
                            │                                                          │  
                            │ By default, this system is configured to automatically   │  
                            │ install security updates on a daily basis:               │  
                            │                                                          │  
                            │ https://www.turnkeylinux.org/security-updates            │  
                            │                                                          │  
                            │ For maximum protection, we also recommend installing the │  
                            │ latest security updates right now.                       │  
                            │                                                          │  
                            │ This can take a few minutes. You need to be online.      │  
                            │                                                          │  
                            ├──────────────────────────────────────────────────────────┤  
                            │               <Install>        < Skip  >                 │  
                            └──────────────────────────────────────────────────────────┘  
<Install>

 TurnKey GNU/Linux Configuration Console
 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

                            GITLAB---STURA-HTW-DRESDEN
                            │                                                          │  
                            │ Web:       http://141.56.51.321                          │  
                            │            https://141.56.51.321                         │  
                            │ Web shell: https://141.56.51.321:12320                   │  
                            │ Webmin:    https://141.56.51.321:12321                   │  
                            │ SSH/SFTP:  root@141.56.51.321 (port 22)                  │  
                            │                                                          │  
                            │ TKLBAM (Backup and Migration):  NOT INITIALIZED          │  
                            │                                                          │  
                            │                                                          │  
                            │                                                          │  
                            │                                                          │  
                            │                                                          │  
                            │                                                          │  
                            │          TurnKey Backups and Cloud Deployment            │  
                            │              https://hub.turnkeylinux.org                │  
                            ├──────────────────────────────────────────────────────────┤  
                            │                     <Advanced Menu>                      │  
                            └──────────────────────────────────────────────────────────┘  
<Advanced Menu>


 TurnKey GNU/Linux Configuration Console
 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

                            ┌─────────────────────Advanced Menu────────────────────────┐
                            │                                                          │  
                            │ TurnKey GNU/Linux                                        │  
                            │ GITLAB---AUFGABENVERWALTUNG-INFRASTRUKTUR---STUD-HTW-DRE │  
                            │ SDEN Advanced Menu                                       │  
                            │ ┌──────────────────────────────────────────────────────┐ │  
                            │ │Networking       Configure appliance networking       │ │  
                            │ │Lets encrypt     Let's Encrypt free SSL certificates (│ │  
                            │ │Mail relaying    Enable mail relaying to a remote serv│ │  
                            │ │Proxy settings   Configure Proxy Settings             │ │  
                            │ │Region config    Region & time settings               │ │  
                            │ │System settings  Various global settings              │ │  
                            │ │Reboot           Reboot the appliance                 │ │  
                            │ │Shutdown         Shutdown the appliance               │ │  
                            │ │Quit             Quit the configuration console       │ │  
                            │ │                                                      │ │  
                            │ └──────────────────────────────────────────────────────┘ │  
                            ├──────────────────────────────────────────────────────────┤  
                            │               <Select>        < Back >                   │  
                            └──────────────────────────────────────────────────────────┘  
Reboot           Reboot the appliance
<Select>
 TurnKey GNU/Linux Configuration Console
 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────






                                           ┌────────────────────────────┐
                                           │                            │  
                                           │ Reboot the appliance?      │  
                                           │                            │  
                                           │                            │  
                                           │                            │  
                                           │                            │  
                                           ├────────────────────────────┤  
                                           │     < Yes >   < No  >      │  
                                           └────────────────────────────┘  
                                             
< Yes >
root@gitlab---stura-htw-dresden ~#

reboot

FreeBSD

FreeBSD Installation

Angeleitet von Installationsanleitung für die Installation aus dem Quellcode.

Die Installation wird auf einem FreeNAS 9.3-stable in einer Jail durchgeführt.

FreeBSD Abhängigkeiten

Installation der Packete erfolgt über pkg install

debian packages freebsd packages
build-essential gmake
zlib1g-dev lzlib
libyaml-dev libyaml
libssl-dev openssl
libgdbm-dev gdbm
libreadline-dev readline
libncurses5-dev ncurses
libffi-dev libffi
curl curl
openssh-server
redis-server redis
checkinstall
libxml2-dev libxml2
libxslt-dev libxslt
libcurl4-openssl-dev make config curl
libicu-dev icu
logrotate logrotate
python-docutils py27-docutils
pkg-config rubygem-pkg-config
cmake cmake
libkrb5-dev krb5
nodejs node

pkg install gmake lzlib libyaml openssl gdbm readline ncurses libffi curl redis libxml2 libxslt icu logrotate py27-docutils rubygem-pkg-config cmake krb5 node

Die Installation des Postfix servers findet nicht statt.

FreeBSD Ruby

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

FreeBSD System User

Linux

adduser --disabled-login --gecos 'GitLab' git

FreeBSD

$ adduser
Username: git
Full name: GitLab
Uid (Leave empty for default):
Login group [git]:
Login group is git. Invite git into other groups? []:
Login class [default]:
Shell (sh csh tcsh git-shell nologin) [sh]: nologin
Home directory [/home/git]:
Home directory permissions (Leave empty for default):
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password:
Enter password again:
Lock out the account after creation? [no]:
Username   : git                                                                
Password   : *****                                                              
Full Name  : GitLab                                                             
Uid        : 1001                                                               
Class      :                                                                    
Groups     : git                                                                
Home       : /home/git                                                          
Home Mode  :                                                                    
Shell      : /usr/sbin/nologin                                                  
Locked     : no                                                                 
OK? (yes/no): yes
adduser: INFO: Successfully added (git) to the user database.
Add another user? (yes/no): no

Weblink