User Tools

Site Tools


os:linux:debian

This is an old revision of the document!


Debian server

Initial

env | grep LANG
export LANG=en_US.UTF-8
dpkg-reconfigure locales

nano /etc/hostname -> hostname
nano /etc/hosts -> 127.0.1.1 hostname.yourdomain.tld hostname
invoke-rc.d hostname.sh start
invoke-rc.d networking force-reload
invoke-rc.d network-manager force-reload


nano /etc/ssh/sshd_config -> permitrootlogin no

apt-get install ufw
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh 
ufw allow 22 
ufw enable

Docker && Gitlab && subdomain && ssl

# Install everything:
apt-get install apache2 docker docker-compose python-certbot python-certbot-apache
docker-compose.yml
web:
  image: 'gitlab/gitlab-ce:latest'
  restart: always
  hostname: 'gitlab.hostname.de'
  environment:
    GITLAB_OMNIBUS_CONFIG: |
      external_url 'https://gitlab.hostname.de:8443'
      # Add any other gitlab.rb configuration here, each on its own line
  ports:
    - '8443:8443'
    - '22:22'
  volumes:
    - '/srv/gitlab/config:/etc/gitlab'
    - '/srv/gitlab/logs:/var/log/gitlab'
    - '/srv/gitlab/data:/var/opt/gitlab'
# launch container:
docker-compose up
 
# install certificate and add subdomain
certbot --apache
certbot certonly --apache --expand -d hostname.de -d gitlab.hostname.de
 
# rework and copy certificate into gitlab data storage:
cd /etc/letsencrypt/live/hostname.de
cat cert.pem fullchain.crt > gitlab.hostname.de.crt  
cp privkey.pem gitlab.hostname.de.key  
mv gitlab.* /srv/gitlab/config/ssl
os/linux/debian.1512655737.txt.gz · Last modified: 2017/12/07 15:08 by ebaer

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki