Tag Archives: Debian Jessie

Pydio 7 with PHP7 and SSL on Debian Jessie

Add the dotdeb repository to get latest PHP 7.

# wget -O- https://www.dotdeb.org/dotdeb.gpg | apt-key add -

Create /etc/apt/sources.list.d/dotdeb.list and add the following:

deb http://packages.dotdeb.org jessie all

Once that is done run the following commands:

# apt-get update
# apt install mysql-server php7.0 php7.0-fpm php7.0-mysql php7.0-curl php7.0-json php7.0-gd php7.0-intl php7.0-mbstring php7.0-xml php7.0-zip php7.0-exif php7.0-apcu
apt-get install libapache2-mod-php

Disable apache support for php5:
# a2dismod php5

Enable apache support for php7:

# a2enmod php7.0

Add the Pydio repository.

Create /etc/apt/sources.list.d/pydio.list and add the following:

# Pydio Community repositories
deb https://download.pydio.com/pub/linux/debian/ jessie-backports main

then:

# wget -qO - https://download.pydio.com/pub/linux/debian/key/pubkey | apt-key add -

# apt-get install apt-transport-https
# apt-get update

# apt-get install pydio
# apt-get install pydio-all

In /etc/php/7.0/apache2/php.ini change:

output_buffering = 4096

to:

output_buffering = off

Create self-signed certificates for Pydio over ssl

# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/pydio-selfsigned.key -out /etc/ssl/certs/pydio-selfsigned.crt
# openssl x509 -in /etc/ssl/certs/pydio-selfsigned.crt -out /etc/ssl/certs/pydio-selfsigned.pem -outform PEM

Enable ssl on apache:

# a2enmod ssl

In the /etc/apalche2/sites-enabled directory:

# rm 000-default.conf
# ln -s ../sites-available/default-ssl.conf default-ssl.conf

In default-ssl.conf change the follwing line from:

SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem

To:

SSLCertificateFile /etc/ssl/certs/pydio-selfsigned.pem

Also change the following line from:

SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

To:

SSLCertificateKeyFile /etc/ssl/private/pydio-selfsigned.key

Restart apache and pydio

Installing xrdp 9.3 and xorgxrdp 2.3 on Debian Jessie (or Stretch)

This how-to is based on the install instructions from XRDP’s github pages for installing on Debian 8.

Install xrdp’s dependencies:

$ sudo apt-get install git autoconf libtool pkg-config gcc g++ make libssl-dev libpam0g-dev libjpeg-dev libx11-dev libxfixes-dev libxrandr-dev flex bison libxml2-dev intltool xsltproc xutils-dev python-libxml2 g++ xutils libfuse-dev libmp3lame-dev nasm libpixman-1-dev xserver-xorg-dev

Get the xrdp and xorgxrdp sources:

$ mkdir -p GIT-sources/neutrinolabs
$ cd GIT-sources/neutrinolabs
$ wget https://github.com/neutrinolabs/xrdp/releases/download/v0.9.3/xrdp-0.9.3.tar.gz
$ wget https://github.com/neutrinolabs/xorgxrdp/releases/download/v0.2.3/xorgxrdp-0.2.3.tar.gz

Building and installing xrdp:

$ cd GIT-sources/neutrinolabs
$ tar xvfz xrdp-0.9.3.tar.gz
$ cd xrdp-0.9.3
$ ./bootstrap
$ ./configure --enable-fuse --enable-mp3lame --enable-pixman --enable-sound
$ make -j2
$ sudo make install
$ sudo ln -s /usr/local/sbin/xrdp{,-sesman} /usr/sbin

Building and installing xorgxrdp:

$ cd GIT-sources/neutrinolabs
$ tar xvfz xorgxrdp-0.2.3.tar.gz
$ cd xorgxrdp-0.2.3
$ ./bootstrap
$ ./configure
$ make -j2
$ sudo make install

Generate keys:

$ sudo xrdp-keygen xrdp auto 2048

Building the pulseaudio modules:

$ cd ~
$ mkdir -p Release-sources/pulseaudio
$ cd Release-sources/pulseaudio
$ sudo apt-get install dpkg-dev
$ sudo apt-get source pulseaudio
$ sudo apt-get build-dep pulseaudio

Change the permisions on the pulseaudio directory to your user:

$ sudo chown -R [USER]:[GROUP] pulseaudio-10.0
$ cd pulseaudio-10.0
$ ./configure

In change directory to “~/GIT-sources/neutrinolabs/xrdp-0.9.3/sesman/chansrv/pulse”

$ cd ~/GIT-sources/neutrinolabs/xrdp-0.9.3/sesman/chansrv/pulse

Edit the Makefile with your favorite editor and point it to the sources for pulseaudio by changing:

PULSE_DIR = /tmp/pulseaudio-10.0

to:

PULSE_DIR = ../../../../../../Release-sources/pulseaudio/pulseaudio-10.0

then:

$ make -j2

If the build is successful , copy the 2 modules to /usr/lib/pulse-10.0/modules.

$ sudo cp module-xrdp*.so /usr/lib/pulse-10.0/modules

Check the /usr/lib/pulse-10.0/modules directory:

$ ls -al /usr/lib/pulse-10.0/modules

If necessary, fix the ownership and permissions on the two modules:

$ cd /usr/lib/pulse-10.0/modules
$ sudo chown root:root module-xrdp-s*.so
$ sudo chmod 644 module-xrdp-s*.so

The modules are named module-xrdp-sink.so and module-xrdp-source.so

Enable the services:

$ sudo systemctl enable xrdp.service
$ sudo systemctl enable xrdp-sesman.service

Fixes for possible issues:

To run it as terminal server (also useful for Guacamole) add allowed_users=anybody to /etc/X11/Xwrapper.config to allow anybody to start X

To fix the thinclient_drives share error when connected via RDP to the client:

$ sudo umount thinclient_drives

logout and re-login via rdp