Install APCu PHP extension on RunCloud

# Install the required developement tools apt install autoconf libpcre3-dev # Set module name MODULE_NAME=”apcu” # Set download version MODULE_VERSION=”5.1.18″ # Download & Extract wget$MODULE_NAME-$MODULE_VERSION.tgz tar -zxvf $MODULE_NAME-$MODULE_VERSION.tgz cd $MODULE_NAME-$MODULE_VERSION # Set PHP version PHPRC_VERSION=”php74rc” # Installing for PHP

Install nano editor latest version (Build from source)

VERSION=4.8 wget${VERSION}.tar.gz tar xf nano-${VERSION}.tar.gz rm -f nano-${VERSION}.tar.gz cd nano-${VERSION} ./configure make sudo make install cd .. sudo rm -rf /usr/local/src/nano-* sudo mv nano-${VERSION} /usr/local/src touch ~/.nanorc nano ~/.nanorc # Enable syntax higlighting include “/usr/local/share/nano/*.nanorc”  

Install tmux latest version on Ubuntu 16.04/18.04

sudo apt install automake build-essential pkg-config libevent-dev libncurses5-dev -y VERSION=3.0a wget${VERSION}/tmux-${VERSION}.tar.gz tar xf tmux-${VERSION}.tar.gz rm -f tmux-${VERSION}.tar.gz cd tmux-${VERSION} ./configure make sudo make install cd .. sudo rm -rf /usr/local/src/tmux-* sudo mv tmux-${VERSION} /usr/local/src sudo killall -9 tmux rm

Fix slow Ethernet performance on Intel i218/i219 NIC

Some of the Hetzner servers comes with Intel i218/i219 ethernets. Linux kernel version 4.15 or later may cause slowness of download/upload speed on those NIC.  I was supposed to get 1 Gbps upload but only getting 500 Mbps. To fix

Install pigz (Parallel Implementation of GZip)

pigz, which stands for Parallel Implementation of GZip, is a fully functional replacement for gzip that exploits multiple processors and multiple cores to the hilt when compressing data. pigz is approx 10x faster than regular GZip. For Ubuntu 16.04 or

Install latest version of RAR in Linux

Run as root. wget tar -xf rarlinux-x64-5.8.0.tar.gz cd rar chmod +x rar unrar mv rar unrar /usr/bin mv rarfiles.lst /etc wget -O rarreg.key mv default.sfx rarreg.key /usr/local/lib cd .. rm -r rar rm rarlinux-x64-5.8.0.tar.gz bash  

Install Ookla Speedtest on Linux

export INSTALL_KEY=379CE192D401AB61 export DEB_DISTRO=$(lsb_release -sc) apt-key adv –keyserver –recv-keys $INSTALL_KEY echo “deb ${DEB_DISTRO} main” | tee /etc/apt/sources.list.d/speedtest.list apt update && apt install gnupg1 apt-transport-https dirmngr speedtest ln -s /usr/bin/speedtest /usr/local/bin/spd

Linux touch command for Windows

Create touch.cmd with the following content and it to ENV Path. @echo off setlocal enableextensions disabledelayedexpansion (for %%a in (%*) do if exist “%%~a” ( pushd “%%~dpa” && ( copy /b “%%~nxa”+,, & popd ) ) else ( type nul

Things to do after deploying a Ubuntu server

Disable ipv6 Create /etc/sysctl.d/60-ipv6-disable.conf with the following contents: net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 Run service procps restart If Ubuntu 18.04 then view Change timezone Source: timedatectl set-timezone Asia/Kolkata # or use dpkg-reconfigure tzdata Change hostname

Add additional IP addresses to Ubuntu 16.04

Login as root then enter command nano /etc/network/interfaces If have something like this on that file iface enp1s0f0 inet static address netmask gateway 123.444.123.1 Then to add additional ips, have it like this iface enp1s0f0 inet static address

Tweaking WSL (Windows Subsystem for Linux)

Change apt mirrors (India only) # Create backup first sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup # Download modified sources.list wget # Replace sudo mv sources.list /etc/apt/ Fix files/folder permissions Add some useful aliases cd && touch .bash_aliases add below lines

Things to do after installing RunCloud

Some few things I do after connecting a server to runcloud. MySQL Create /etc/mysql/conf.d/z_additional.cnf with the below contents. (Note: The files are read alphabetically, so need to make to sure it is read by MySQL at the end, thus the

Useful Linux Commands

Run command without output command > /dev/null 2>&1 Run command in background without output nohup command > /dev/null 2>&1 & List all files recursively find -type f -printf “%[email protected] %p\n” | cut -d\ -f2- Search for specific file recursively find

Increase Swap in Linux

Swap space is fake memory that is actually disk space. The purpose of swap space is to be emergency overflow memory. Normally, if your server runs out of memory, the Linux kernel has to decide which processes to kill to

Install & Use Geekbench 5 on Linux

Geekbench is a cross-platform processor benchmark tool with a scoring system that separates single-core and multi-core performance and workloads that simulate real-world scenarios. The higher Geekbench score means the better and faster CPU. Enter the following commands one by one: