Setting up some more Applications

Installing golang

#!/bin/bash -e
mkdir -p /opt/
cd       /opt/
rm -fr go golang

wget -c$GOBALL
tar zxf $GOBALL
rm      $GOBALL
mv     go golang

mkdir -p                   /opt/smkbin/
ln -nsf /opt/golang/bin/go /opt/smkbin/

Build Google Drive CLI tool

Note : Allow a few minutes. Nothing will be printed until this part is nearly done.

#!/bin/bash -e
export GOPATH=/tmp/gobuild

rm -fr     $GOPATH
go get -u

strip      $GOPROG
upx --lzma $GOPROG
mkdir -p           /opt/smkbin/
mv         $GOPROG /opt/smkbin/
rm -fr     $GOPATH

Build lego tool (supersedes certbot)

#!/bin/bash -e
export GOPATH=/tmp/gobuild

rm -fr     $GOPATH
mkdir -p   $GOPATH
cd         $GOPATH

git clone
cd lego
make build

strip      $GOPROG
upx --lzma $GOPROG
mv         $GOPROG /opt/smkbin/
rm -fr     $GOPATH


Some Xorg video drivers require a kernel feature known as nomodeset. If you learn that this is the case for your box, you can set this feature up as follows.

(a) Edit the /etc/default/grub

(b) Look for a line similar to the following

GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash resume=...”

(c) Insert the word nomodeset before the word quiet. Put a space between the two words. Save and exit.

(d) Execute the command update-grub.

Optional Step : Install TexLive

This step may take from several minutes up to an hour and will add several GB of files. However, if you would like a full-featured industrial-strength system, TexLive is a useful part of picture.

apt-get install texlive-full

Optional Step : Initial virtualization setup

Note : Only use in physical hardware or dedicated servers, Skip for a normal VPS.

#!/bin/bash -e
apt-get install \
    qemu-kvm qemu-system qemu-utils \
    bridge-utils \
    virtinst libvirt-daemon libvirt-daemon-system virt-manager

Optional Step : Install Palemoon

Skip this step for headless servers unless you plan to use VNC [and you want this web browser as well].

#!/bin/bash -e
apt-get install libdbus-glib-1-2
#!/bin/bash -e
cd /opt || exit 1
rm -fr  palemoon

wget -O palemoon.tar.xz\

tar Jxf palemoon.tar.xz
rm -fr  palemoon.tar.xz
ln -nsf ../palemoon/palemoon smkbin/

Run palemoon as an ordinary user.

Turn off “Always perform this check”.

User View -> Toolbars -> Customize to put Zoom controls, History and Bookmarks on the links toolbar.

Install extensions using the XPI files provided with this documentation file.

Install youtube-dl

#!/bin/bash -e
rm -fr     $TARGET
curl -L \ \
        -o $TARGET
chmod a+rx $TARGET

Restore /var/letse/.

If you have a saved copy of the directory tree "/var/letse", restore it to the current box. Otherwise, create the directory.

Generate dhparam.pem

Execute the following command and wait for it to finish. For a high-end box, use 4096 here instead of 2048. Don’t try to use 4096 on a low-end or medium-level box.

openssl dhparam -out dhparam.pem 2048 >& /tmp/dhparam.log

Subsequent to completion, check the output and confirm that no errors occurred.

cat /tmp/dhparam.log

Then :

mkdir -p       /etc/ssl/certs/
rm    -fr      /etc/ssl/certs/dhparam.pem
mv dhparam.pem /etc/ssl/certs/

Set up node, npm and yarn

#!/bin/bash -e
apt-get install curl software-properties-common
curl -sL | sudo bash -
apt-get update
apt-get install gcc g++ make nodejs

curl -sL $LINK/pubkey.gpg | sudo apt-key add -
echo "deb $LINK/ stable main" | \
    sudo tee /etc/apt/sources.list.d/yarn.list

apt-get update
apt-get -y install yarn

Fix joe setup

#!/bin/bash -e
cd /etc/skel && tar zxf $DOTJOE
cd /root     && tar zxf $DOTJOE

cd /home
for x in *
    cd /home/$x && tar zxf $DOTJOE && chown -R $x.$x .joe

Add more PHP feature

#!/bin/bash -e
apt-get install \
    libmcrypt-dev  \
    php-apcu       php-bcmath     php-cli        php-common     \
    php-curl       php-dev        php-fpm        php-gd         \
    php-imagick    php-intl       php-json       php-ldap       \
    php-mbstring   php-mysql      php-pear       php-readline   \
    php-redis      php-smbclient  php-soap       php-sqlite3    \
    php-xml        php-xmlrpc     php-zip

pecl channel-update
pecl install channel://