sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get install openssh-server postfix
wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.7.1-omnibus.5.4.1.ci-1_amd64.deb
sudo dpkg -i gitlab_7.7.1-omnibus.5.4.1.ci-1_amd64.deb
sudo gitlab-ctl reconfigure
(Had to run twice - reported error first time)
sudo nano /etc/gitlab/gitlab.rb
Change these options in the file:
nginx['enable'] = false
web_server['external_users'] = ['www-data']
sudo gitlab-ctl reconfigure
sudo apt-get install apache2
sudo apt-get install subversion libcurl3 libcurl4-openssl-dev apache2-dev
sudo svn checkout https://web.srvrs.co.uk/svn/apache-yubikey/trunk
cd trunk
sudo su
- make sure to become root for this bitmake
make install
- Create
mod_authn_yubikey.load
sudo nano /etc/apache2/mods-available/mod_authn_yubikey.load
Add this to file:
LoadFile /usr/lib/x86_64-linux-gnu/libcurl.so.4
LoadModule authn_yubikey_module /usr/lib/apache2/modules/mod_authn_yubikey.so
Create Symbolic Link
sudo ln -s /etc/apache2/mods-available/mod_authn_yubikey.load /etc/apache2/mods-enabled/mod_authn_yubikey.load
- Create
mod_authn_yubikey.conf
sudo nano /etc/apache2/mods-available/mod_authn_yubikey.conf
Add this to file:
AuthYkRequireSecure Off
Create Symbolic Link
sudo ln -s /etc/apache2/mods-available/mod_authn_yubikey.conf /etc/apache2/mods-enabled/mod_authn_yubikey.conf
sudo touch /var/lib/apache2/ykTmpDb
sudo chown www-data:www-data /var/lib/apache2/ykTmpDb
- Make Directory for Certificates
sudo mkdir /etc/apache2/certs
- Generate Certificates
sudo openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -out /etc/apache2/certs/server.crt -keyout /etc/apache2/certs/server.key
- Install Apache SSL Module
sudo a2enmod ssl
- Restart Apache
sudo service apache2 restart
cd /etc/ssl/certs/
sudo wget http://email4all.org/crls/ThirdTreeMediaCA.pem
- link the Certificate Authority to its hash
sudo ln -s ThirdTreeMediaCA.pem `openssl x509 -hash -noout -in ThirdTreeMediaCA.pem`.0
- Add certificate to certificate file - become root (sudo su)
cat ThirdTreeMediaCA.pem >> ca-certificates.crt
- to test:
curl -v https://yubico-verify.media4aw.net:57004/index.php\?id\=1025&otp=dfhbgggudigultthlgbhldhkuvcducjrnldlukvinnnt
sudo nano /etc/hosts
- Add IP Address's of server into the top of the file:
172.16.0.201 gitlab.macserver
172.16.0.201 macserver
sudo nano /etc/apache2/sites-available/gitlab.conf
Add content to file from gitlab.conf
sudo nano /etc/apache2/auth_yubikey.inc
Add content to file from auth_yubikey.inc
sudo mkdir /opt/gitlab/public/
sudo a2ensite gitlab.conf
sudo a2enmod rewrite proxy proxy_http
sudo service apache2 restart