THIS PAGE IS A DRAFT

This page helps with web development under Debian. It lists and recommends tools which could be used, describes how to set them up and how to properly configure and use them.

It aims to help with software development under Debian in general, with development of cross-platform (Debian compatible) software and to provide up to date step-by-step guides for optimal convenience, efficiency and security even for beginners. It is a continuously improving guide which also indexes, evaluates and aggregates tools and information scattered across the web.

Debian is about 100% free software. About using FOSS, developing FOSS and developing with FOSS. This page aims to help people with the right choices and options, useful information and up-to-date step-by-step guides. Eventually all parts of the software development stacks should be free software with open governance by communities of developers. These stacks (including everything from IDE to software distribution tools) should be efficient/convenient, up-to-date, secure, performant, easy to learn/use and cross-platform (for GNU/Linux support, maximum audience/availability and time-efficiency).

It is recommended to have the latest Debian stable with KDE installed as described in SetupGuides/SecurePersonalComputer. Every guide on this page should not assume anything else than that to be pre-configured or pre-installed or any commands to be run by the user beforehand. All guides should be as simple and precise as possible and are made for development with the frameworks listed in the first section.

The ultimate goal of this page is becoming a setup-GUI that is using wiki-text and allows even newcomers to get started developing useful, linux-compatible, modern FOSS very quickly using only FOSS under Debian.

Cross-platform-/Universal-/Web-app frameworks


Debian development

KDE development


Sandboxing and software distribution

Documentation

Issue management

Email

You might want to set up a new email for your developer-email. Use ProtonMail. You can configure all your mails to land in a single inbox.

Git+SSH

Configure your IDE and GitLab to use SSH keys.

ssh-keygen -o -t rsa -C "e@mail" -b 4096
copy contents of: kate ~/.ssh/id_rsa.pub
Run: eval $(ssh-agent)
ssh-add or ssh-add name if your key is not named id_rsa and located under ~/.ssh
Go to https://gitlab.com/profile/keys and add the key by pasting in the public key you copied to clipboard earlier.

#SSH
-A INPUT -p tcp -s 35.231.145.151 --dport 22 -j ACCEPT
-A INPUT -p tcp -s 35.231.145.151 --sport 22 -j ACCEPT
-A INPUT -p tcp -s gitlab.com --dport 22 -j ACCEPT
-A INPUT -p tcp -s gitlab.com --sport 22 -j ACCEPT

#SSH
-A OUTPUT -p tcp -d 35.231.145.151 --dport 22 -j ACCEPT
-A OUTPUT -p tcp -d 35.231.145.151 --sport 22 -j ACCEPT
-A OUTPUT -p tcp -d gitlab.com --dport 22 -j ACCEPT
-A OUTPUT -p tcp -d gitlab.com --sport 22 -j ACCEPT

Then run: sudo iptables-restore < /etc/iptables/rules.v4

IDE

The best modern IDEs are likely ?PhpStorm and Visual Studio Code (Codium). ?PhpStorm is proprietary, closed-source and costs money. VSCode (VSCodium) is FOSS but largely run by Microsoft.
For developing with Qt you use QtCreator as IDE. For C/C++ development you could use KDevelop.
Also see: ProgrammingApplication.

Eclipse

tar zxf eclipse-inst-linux64.tar.gz
sudo tar zxf eclipse-inst-linux64.tar.gz
cd eclipse-installer
./eclipse-inst

include /etc/firejail/globals.local
noblacklist ${HOME}/yourprogrammingfolders/*
noblacklist ${HOME}/.gitconfig
noblacklist ${HOME}/.java
caps.drop all
netfilter
nogroups
nonewprivs
noroot
protocol unix,inet,inet6
seccomp
shell none
private-dev
# private-tmp
# noexec /tmp breaks 'Eclipse'
#noexec /tmp


You can run eclipse like this: firejail --profile=/etc/firejail/eclipse.profile /eclipse/locationofeclipse

KDevelop

Install from the package manager. sudo apt-get install kdevelop

PhpStorm

Installation

whitelist ${HOME}/.PhpStorm2018.2/

# Firejail profile for phpstorm
include /etc/firejail/snap.local
# Persistent global definitions
include /etc/firejail/globals.local

whitelist ${HOME}/Projects/SoftwareDevelopment/PhpStorm/
whitelist ${HOME}/snap
whitelist ${HOME}/.PhpStorm2018.2/
whitelist ${HOME}/.nvm/
whitelist ${HOME}/.ssh
noblacklist ${HOME}/.gitconfig
noblacklist ${HOME}/.java
noblacklist ${HOME}/.ssh
noblacklist /tmp/ssh-*
noblacklist /etc/ssh

include /etc/firejail/disable-common.inc
include /etc/firejail/disable-programs.inc
include /etc/firejail/disable-passwdmgr.inc
include /etc/firejail/whitelist-common.inc

caps.drop all
netfilter
nogroups
shell none

private-dev


Visual Studio Code (VSCodium)

VSCodium are binary releases of Visual Sudio Code without Microsoft branding, telemetry and licensing. Most likely this is the IDE you want to use.

# Firejail profile for VS Codium
# Persistent local customizations
include vscodium.local
# Persistent global definitions
include globals.local

noblacklist ${HOME}/.vscode-oss
noblacklist ${HOME}/.config/VSCodium/
whitelist ${HOME}/.vscode-oss
whitelist ${HOME}/.config/VSCodium/


#noblacklist ${HOME}/.bashrc
#whitelist ${HOME}/.bashrc

noblacklist ${HOME}/.ssh
noblacklist /tmp/ssh-*
noblacklist /etc/ssh
noblacklist ${HOME}/.nvm/
whitelist ${HOME}/.nvm/
whitelist ${HOME}/.ssh
whitelist ${HOME}/Projects/SoftwareDevelopment/VSCodium

include /etc/firejail/disable-common.inc
include /etc/firejail/disable-passwdmgr.inc
include /etc/firejail/disable-programs.inc

caps.drop all
#net none
#netfilter
#nodvd
nogroups
nonewprivs
noroot
nosound
#notv
#nou2f
#novideo
#protocol unix,inet,inet6,netlink
seccomp
shell none

#private-cache
private-dev
private-tmp

noexec /tmp

Debugging

{
    "type": "node",
    "request": "launch",
    "name": "Debug nuxt node",
    "runtimeVersion": "11.1.0", // enter the node version to use (which node displays the version number)
    "program": "${workspaceRoot}/server/index.js",
    //  "autoAttachChildProcesses": true
}

open the Firefox configuration page by entering about:debugging in the address bar and click on Enable debugging of add-ons. Add the following to nuxt.config.js:

module.exports = {
  configureWebpack: {
    devtool: 'source-map'
  }
}

Add the following to launch.json:

{
     "type": "firefox",
     "request": "attach",
     "name": "nuxtjs: firefox",
     "url": "http://localhost:3000",
     "webRoot": "${workspaceFolder}",
     "port": 6000,
     "pathMappings": [{ "url": "webpack:///", "path": "${webRoot}/" }]
},


Add iptables rules for the debug port. Open http://127.0.0.1:3000/ in that window.
Doesn't really work yet.

Other

There are also ?NetBeans, Aptana Studio and Android Studio but these are not really well-suited for modern web & cross-platform development and aren't convenient. Sublime, Atom, Brackets etc. are more source code editors than IDEs. Atom is made by ?GitHub which is now owned by Microsoft. Vim is FOSS but will never be used by many as it's not modern and convenient. For ?QtCreator see the section "Qt".

Browser

nogroups
shell none
private-dev
noexec ${HOME}
noexec /tmp

NPM

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
sudo kate ~/.bashrc and append the following lines:
export NVM_DIR="${XDG_CONFIG_HOME/:-$HOME/.}nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
command -v nvm # Close and reopen terminal; this should return "nvm"
nvm install node
nvm use node
export NODE_PATH=$NODE_PATH:`npm root -g` # This sets node's path; you need to set it again when you change your node version; you could also just run npm root -g to see where you installed node to. "nvm intentionally does not set NODE_PATH because [...]" ~https://stackoverflow.com/a/47734737

Frameworks

Qt

# Firejail profile for QtCreator
include qtcreator.local
# Persistent global definitions
include globals.local

whitelist ${HOME}/Projects/SoftwareDevelopment/QtCreator/
whitelist ${HOME}/.nvm/
whitelist ${HOME}/.ssh
whitelist /usr/share/qt5/*
whitelist /usr/lib/x86_64-linux-gnu/qt5/*
whitelist ${HOME}/.config/QtProject
whitelist ${HOME}/.local/share/data/QtProject/qtcreator
whitelist ${HOME}/.gitconfig

include /etc/firejail/disable-common.inc
include /etc/firejail/disable-passwdmgr.inc
include /etc/firejail/disable-programs.inc

caps.drop all
nogroups
nonewprivs
noroot
protocol unix,inet,inet6,netlink
seccomp
shell none

private-dev
private-tmp

noexec /tmp

Laravel

(Needs to be tested)

sudo wget https://github.com/laravel/laravel/archive/v5.5.28.zip
sha256sum v5.5.28.zip
unzip v5.5.28.zip
cd laravel-5.5.28/
sudo mkdir /var/www/html/laravel-5.5.28/vendor
sudo mkdir /var/www/html/laravel-5.5.28/vendor/symfony
sudo mkdir /var/www/html/laravel-5.5.28/vendor/symfony/thanks
chown -R www-data.www-data /var/www/html/laravel
sudo chmod -R 755 /var/www/html/laravel-5.5.28/
sudo su www-data
composer config
sudo chown -R username.username /var/www/html/laravel-5.5.28/
composer install
sudo chown -R www-data.www-data /var/www/html/laravel-5.5.28/
sudo chmod -R 755 /var/www/html/laravel-5.5.28/
sudo cp .env.example .env
sudo chown -R www-data.www-data .env
sudo php artisan key:generate
sudo service apache2 restart
sudo php artisan make:auth
php artisan migrate
sudo kate .env
sudo php artisan make:migration create_links_table --create=links
sudo php artisan migrate
php artisan serve
sudo mysqladmin -u root -p status
sudo mysql -u root
sudo php artisan migrate
sudo kate /var/www/html/laravel-5.5.28/app/Providers/AppServiceProvider.php
sudo php artisan migrate
php artisan tinker
sudo php artisan migrate
php artisan migrate:fresh
sudo php artisan make:model --factory Link
sudo kate /var/www/html/laravel-5.5.28/database/factories/LinkFactory.php
sudo php artisan make:seeder LinksTableSeeder
sudo kate /var/www/html/laravel-5.5.28/database/seeds/LinksTableSeeder.php
sudo kate /var/www/html/laravel-5.5.28/database/seeds/DatabaseSeeder.php
sudo php artisan migrate:fresh --seed
php artisan tinker
sudo kate /var/www/html/laravel-5.5.28/routes/web.php
sudo kate /var/www/html/laravel-5.5.28/resources/views/welcome.blade.php

Vue.js

cd project-directory
npm install vue-cli vue vue-resource
vue init webpack my-project
npm run start

HTML, CSS, SCSS, JavaScript

UI frameworks

Bootstrap

Vuetify

SCSS

css: [
    './assets/scss/main.scss'
]

Vuex

Nuxt.js

nvm use node
npm install -g @vue/cli
cd ~/Projects/SoftwareDevelopment/
npx create-nuxt-app PROJECTNAME

Webpack

Babel

Autoprefixer

Quasar

NTP

sudo apt-get install ntp
ntpq -p
Add firewall rules:
#OPENNTP 123
-A OUTPUT -p udp -m udp --dport 123 -j ACCEPT
-A OUTPUT -p udp -m udp --sport 123 -j ACCEPT
#OPENNTP 123
-A INPUT -p udp -m udp --dport 123 -j ACCEPT
-A INPUT -p udp -m udp --sport 123 -j ACCEPT

sudo dpkg-reconfigure tzdata
...

IDS, log-scanning, vulnerability-protection and server-management

postfix, lynis

Webmin

sudo kate /etc/apt/sources.list and add: deb https://download.webmin.com/download/repository sarge contrib

wget http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install webmin
sudo kate /etc/webmin/miniserv.conf
sudo service webmin restart

REST client (Insomnia)

echo "deb https://dl.bintray.com/getinsomnia/Insomnia /"     | sudo tee -a /etc/apt/sources.list.d/insomnia.list
wget --quiet -O - https://insomnia.rest/keys/debian-public.key.asc     | sudo apt-key add -
sudo apt-get update
sudo apt-get install insomnia
sudo kate ~/.config/firejail/insomnia.profile
could look like this:

include /etc/firejail/insomnia.local
include /etc/firejail/globals.local

include /etc/firejail/disable-common.inc
include /etc/firejail/disable-passwdmgr.inc
include /etc/firejail/disable-programs.inc

caps.drop all
netfilter
nogroups
noroot
seccomp
shell none

Designs

GIMP

Image manipulation software that's a FOSS alternative to Photoshop.

Inkscape

For vector graphics, FOSS alternative to ?CorelDraw and Adobe Illustrator.

Other tools

Tox

You can use it for screen sharing, instant messaging, voice calls, video calls, file sharing and groups.

Telegram

wget https://telegram.org/dl/desktop/linux
cd Downloads
sha256sum tsetup.1.4.3.tar.xz
tar xvf tsetup*.tar.xzcd
sudo mv Telegram/ /opt/
ln -sf /opt/Telegram/Telegram /usr/bin/telegram
sudo ln -sf /opt/Telegram/Telegram /usr/bin/telegram

VirtualBox

deb http://download.virtualbox.org/virtualbox/debian stretch contrib

FTP

SSL

See also


CategorySoftware