All of Labdoo’s source code is released under GPL version 3 or later.
Installation in development mode
The recommended way of installation is to build a new server from scratch, inside a chroot environment. The following instructions have been verified to work on Ubuntu.
- Get a copy of the project from GitHub:
mkdir /var/chroot cd /var/chroot/ git clone https://github.com/Labdoo/Labdoo-2.0.git labdoo
- If you intend to build the master branch, skip the following step:
cd labdoo/ git checkout $NAME_OF_THE_BRANCH cd ../
- Modify and customize the settings:
cp labdoo/install/settings.sh labdoo/cfg.sh vim labdoo/cfg.sh # Make any necessary changes
- Install the project inside a chroot system:
time nohup nice labdoo/install/chroot.sh labdoo/cfg.sh & tail -f nohup.out less -r nohup.out
The above process can take some time, depending on bandwidth and your computer speed. On an Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz it takes about 12 minutes:
real 11m9.292s user 6m31.217s sys 0m59.728s
- Make sure to include the following lines in your /etc/hosts file (outside the chroot):
127.0.0.1 www.labdoo-dev.org localhost
- Start the Labdoo social network:
service chroot-lbd start
- And that’s it! You can now access your Labdoo installation by opening your web browser and opening the URL https://www.labdoo-dev.org/. Please use https protocol (instead of http) since currently the theme only works properly on https. (Notice that you will need to confirm the security exception on your browser the first time you access https://www.labdoo-dev.org/)
- If you need to stop Labdoo you can do:
service chroot-lbd stop
- If you need to start again Labdoo you can do:
service chroot-lbd start
Installation in production mode
A development Labdoo node can be converted into a production node by following the next steps:
- Drop (1) the server certificate, (2) the intermediate certificate (chain certificate) and (3) private key to the folders etc/ssl/certs and etc/ssl/private, respectively.
- Modify the file /etc/apache2/sites-enabled/lbd-ssl.conf so that SSLCertificateFile, SSLCertificateChainFile and SSLCertificateKeyFile point to the certificate, chain certificate and private key, respectively.
- Modify both /etc/apache2/sites-enabled/lbd-ssl.conf and /etc/apache2/sites-enabled/lbd.conf so that all URL and email address information points to www.labdoo.org and email@example.com (or to your chosen values for these parameters), respectively.
- If you want to disable the SSL password prompt upon restarting apache, add the following two lines
to the beginning of the file /usr/share/apache2/ask-for-passphrase:
echo $PASSPHRASE_LITERAL exit
- Modify /etc/hosts so that the localhost points to www.labdoo.org.
- Modify the file /var/www/lbd/sites/default/settings.php so that $base_url points to https://www.labdoo.org.
Installation in a docker container
This is almost the same as the installation above, except that instead of
nohup time nice labdoo/install/docker.sh labdoo/cfg.sh &
Then to stop and start Labdoo you do:
docker.io stop lbd and
docker.io start lbd.
Building with docker
Another way is to use the command
docker build to build an image
docker run to create a container from this image:
vim labdoo/install/settings.sh docker.io build --tag=labdoo labdoo/ docker.io run -d --name=lbd --hostname=example.org -p 80:80 -p 443:443 labdoo