Linux

Ispconfig Jailkit php, composer, mysql, drush, composer, node, ruby, compass

Install components

Install Composer

sudo apt-get install composer

Install Node.js and NPM

sudo apt install nodejs

Install Ruby and Gem

sudo apt install ruby-full

Install Compass

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

[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

[drush]
comment = drush (drupal command line)
executables = /usr/local/bin/drush
includesections = php, mysql-client, uidbasics, netbasics
directories = /etc/ssl/certs, /usr/share/ca-certificates

[composer]
comment = composer
executables = /usr/local/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

If user and site is created already

jk_init -c /etc/jailkit/jk_init.ini -f -k -j /var/www/clients/client1/web1 php node mysql-client drush 

Go to system -> server config with ( php git composer node ruby compass )

Read More!

Install Virtual Machine Manager(libvirt) in Manjaro

STEP 1: Launch Terminal and enter the following command to install KVM and necessary dependencies.

sudo pacman -S virt-manager qemu vde2 ebtables dnsmasq bridge-utils openbsd-netcat
STEP 2: The next two steps are very important and often ignored by many users. Make sure to complete it else, you will get error “adduser: The group `libvirtd’ does not exist” when you run the Virtual Machine Manager after installation is complete!

Enable the service by entering the below command:

sudo systemctl enable libvirtd.service
STEP 3: Start the service using below command:

sudo systemctl start libvirtd.service

sudo groupadd --system libvirt
sudo usermod -a -G libvirt $(whoami)
newgrp libvirt
//Verify that user is added to libvirt group.
id $(whoami)

Open the file /etc/libvirt/libvirtd.conf for editing.

sudo vim /etc/libvirt/libvirtd.conf
Set the UNIX domain socket group ownership to libvirt, (around line 100)
unix_sock_group = "libvirt"
Set the UNIX socket permissions for the R/W socket (around line 102)

unix_sock_rw_perms = "0770"
Restart libvirt daemon after making the change.

sudo systemctl restart libvirtd.service
Read More!

Rewrite Express Engine Urls

<IfModule mod_rewrite.c>

# Enable Rewrite Engine
# ------------------------------
RewriteEngine On
RewriteBase /

# Redirect index.php Requests
# ------------------------------
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{THE_REQUEST} !/system/.*
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,L]

# Standard ExpressionEngine Rewrite
# ------------------------------
RewriteCond $1 !\.(css|js|gif|jpe?g|png) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]

</IfModule>
Read More!

Execute bash script from URL on Linux command line

source <(curl -s https://senormedia.com/bash.sh)
bash <(curl -s https://senormedia.com/bash.sh)

Install with curl as well pass arguments

curl -s https://senormedia.com/bash.sh | bash -s arg1 arg2
Flag "-s" makes shell read from stdin.
bash <(wget -qO- https://senormedia.com/bash.sh)
wget -O - https://senormedia.com/bash.sh| bash
Read More!

Install firmware Linux Debian Buster or Stretch

Go to link https://www.debian.org/releases/stable/armel/ch06s04.html.en

extract zip

open terminal in folder or cd into directory of firmware tar

sudo dpkg -i *.deb

basically, what this does is fills in the rest of the name in place of the * character. You may encounter an error saying dependencies not met, if you see this then you can run

sudo apt-get install -f
Read More!

Need Help With Code?