Skip to content

workstation

Some general installation directions. This presumes the machine is going to contain the klopt software.

checklist

First, if this is a crash you still have the chance to save stuff here is a checklist.

  • save mysql database, postgres, mongo
  • save apache2 configuration, for instance the certificates !
  • save the public and private key pair. These are used for bitbucket etc...
  • save /etc in a tar.gz file, it's small and it's a great reference in setup
  • ...

Best way still i think is to throw away all the biggest chunks and just save all the rest when it is small enough !!.

basic

apt-get install vim tree chromium mplayer screen install xfonts-terminus git

Though that last one seems to be installed already. It is a nice font on the eyes and it supports the check-mark used in git-bash-prompt

Note: on debian 8.0 I could not login to the chrome installed like this, and it worked with the version downloaded from google.

git-bash-prompt

Whenever you get sluggish behavior, git-bash-prompt could very well be the problem when your repositories become to big!

visit

Installation as it is advised on the website :

git clone
cd ~
git clone https://github.com/magicmonty/bash-git-prompt.git .bash-git-prompt

And edit .bashrc to source the file gitprompt.sh, so add :

start
source ~/.bash-git-prompt/gitprompt.sh

updatedb

Since /etc/updatedb.conf contains an exception for /media :

updatedb
PRUNEPATHS="/tmp /var/spool /media"

It won't search the CnMemory disk, so if you want that ? (yes!) remove the /media and then re-run

updatedb

coding

dev tools
apt-get install g++ gdb git subversion scons ant valgrind default-jdk

This site says openjdk rather than oracle : visit

Only an opinion ?, well i keep with it since it installs easier until i am convinced otherwise.

zfs

zfs
1
2
3
4
5
6
7
apt-get install lsb-release
wget http://archive.zfsonlinux.org/debian/pool/main/z/zfsonlinux/zfsonlinux_6_all.deb
dpkg -i zfsonlinux_6_all.deb
apt-get update
apt-get install debian-zfs
modprobe zfs
zpool  import bigsafe

mysql

mysql
1
2
3
4
apt-get install mysql phpmyadmin
cp -r backup/mysql/work /var/lib/mysql
chown -R mysql.mysql /var/lib/mysql/work
systemctl restart mysql.service

Virtualbox setup

visit

Reinstall the machines quick by creating new VMs and hooking the disks into them.

klopt.org

obsolete !
mysql script doc :
apt-get install mysql-server libmysqlclient-dev python-dev
sudo apt-get install python-pip
sudo pip install mysql-python markdown

apt-get install libjson-c-dev
apt-get install apache2 libapache2-mod-wsgi

apt-get install libmongo-client-dev mongodb
apt-get install libghc-curl-dev libicu-dev
apt-get install libssl-dev libpng12-dev


cd ~/.ssh
ssh-keygen -t rsa
copy pub key to bitbucket : https://bitbucket.org/account/user/keesklopt/ssh-keys/
mkdir ~/projects
cd ~/projects
git clone git@bitbucket.org:keesklopt/grid.git
git clone git@bitbucket.org:keesklopt/klopt.web

su
cd /var/www/html
ln -s /home/kees/projects/klopt.web .

bag

Reinstalling the bag database is done with a script that must probably be edited : It is best done step by step or you will miss error messages.

bag
1
2
3
4
git clone git@bitbucket.org:keesklopt/bag.git
cd bag
vim bag.sh
./bag.sh

If you don't have mongodb stuff installed it won't work.

apache2 ssl

First set the servername in apache2.conf to get rid of the servername warning :

ssl
ServerName power

Copy the certificate to /etc/ssl/certs and the key to /etc/ssl/private,

key access
chmod 600 /etc/ssl/private/www_sslcertificaten_nl.key

edit /etc/apache2/sites-available/default-ssl and point the certificate setting to these files :

apache
1
2
3
4
5
SSLCertificateFile     /etc/ssl/certs/www_sslcertificaten_nl.pem
SSLCertificateKeyFile /etc/ssl/private/www_sslcertificaten_nl.key

SSLCACertificatePath /etc/ssl/certs/
SSLCACertificateFile /etc/ssl/certs/ca-bundle.crt

That last one has to be generated from the certificate plus all root and intermediate files : see visit

Actual command used :

construct chain
cat www_sslcertificaten_nl.pem COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt > ca-bundle.crt

Enable the ssl module and the site :

restart
1
2
3
4
5
a2enmod ssl
a2ensite default-ssl

apache2ctl stop
apache2ctl start

klopt.web

Add this near the end of the Virtualhost section in default-ssl.conf :

apache
# added for /klopt.web

     DocumentRoot /var/www/html/klopt.web
     WSGIScriptReloading On

     Alias /klopt.web /var/www/html/klopt.web

     <Directory /var/www/html/klopt.web>
         Order deny,allow
         Allow from all
     </Directory>

     # added for /ws webserice
     WSGIScriptAlias /ws /var/www/html/klopt.web/ws.wsgi

shellinabox

sauce / Longer version :

shellinabox
https://scottlinux.com/2010/12/15/shellinabox-with-apache-authentication-over-https-443/

Add this line to "set some default values" in /etc/init.d/shellinabox

arguments
SHELLINABOX_ARGS="--localhost-only"
proxy
a2enmod proxy
a2enmod prox_http

Add this to default-ssl.conf, just after the virtualhost section and before ifmodule ends

ProxyPass
1
2
3
<Location /shell>
    ProxyPass http://localhost:4200/
</Location>