Jailkit for Debian Stretch (add PHP, Drush, Composer, NodeJS, NPM, Ruby, Gem, Compass)
The jail gets created when you add the first ssh user or jailed cronjob to a new website.
A website can only be under one jail; shell users are assigned to a website, and you can add multiple shell users under one sites (so all users would have the same commands in their jail environment). If you add a second website under Sites > Websites > Add new Website, that will get a separate jail environment.
Before we begin make sure you follow the – The Perfect Server – Debian 10 installation
If you followed (The Perfect Server – Debian 10 ) in ispconfig documentation you should have php already installed.
sudo apt-get install composer
Install Node.js and NPM
sudo apt install nodejs
Install Ruby and Gem
sudo apt install ruby-full
sudo gem install compass
After you have installed the required libraries we need to update the commands in the jailkit init file.
sudo nano /etc/jailkit/jk_init.ini
Add the following lines at the end if they don’t already exist.
[php] comment = the php interpreter and libraries executables = /usr/bin/php,/usr/bin/php5.6,/usr/bin/php7.0,/usr/bin/php7.1 directories = /usr/lib/php, /usr/share/php, /usr/share/php5, /etc/php, /usr/share/php-geshi, /usr/share/zoneinfo, /etc/snmp, /usr/share/snmp includesections = env [env] comment = environment variables executables = /usr/bin/env [mysql-client] comment = mysql client executables = /usr/bin/mysql, /usr/bin/mysqldump paths = /usr/lib/libmysqlclient.so [composer] comment = composer executables = /usr/bin/composer includesections = php, uidbasics, netbasics [node] comment = NodeJS executables = /usr/bin/npm, /usr/bin/node, /usr/bin/nodejs directories = /usr/lib/node_modules [ruby] comment = Ruby executable = /usr/bin/ruby, /usr/bin/gem, /usr/bin/gem2.3 directories = /usr/lib/ruby, /usr/lib/x86_64-linux-gnu/ruby, /var/lib/gems, /usr/share/rubygems-integration [compass] comment = Compass executables = /usr/bin/compass includesections = ruby directories = /usr/share/compass
For the final step, update the system -> server config with ( php git composer node ruby compass )
Create a new ( site -> add new website ) and all ssh commands should be available. If you experience any issues please let me know in the comments below.