Archive for category Software

Create virtual host on a Debian Stretch server

After a Debian 9 server (Debian GNU/Linux 9 (stretch)) was installed, a web server with virtual host capability was needed.  At the first step, creating a conf file for the virtual host and enabling it and  then restarting the apache2 service were successful. However, the next step was not straightforward.  After files were copied to the root folder of the virtual host, error messages were persistent whenever which pages were visited.

The error message like” You don’t have permission to access <page name> on this server”. It was wired because the same virtual host conf file was fine on Ubuntu servers with old Linux version.

After googling the internet, the problem was nailed down. the new version of Apache2 increases the security of virtual hosts. One more directive is needed to make it work. In the virtual host conf file, need add “Require all granted”. A working version of an virtual host conf file is the following.

<VirtualHost *:80>

# Indexs + Directory Root.
DirectoryIndex index.html index.php
DocumentRoot {your virtual host root data folder}

<Directory />
  Options FollowSymLinks
  AllowOverride None

<Directory "{your virtual host root data folder}">
  Options Indexes FollowSymLinks MultiViews
  AllowOverride None
  Order allow,deny
  Allow from all
  # new directive needed in Apache 2.4.3 and beyond
  Require all granted

# Logfiles
ErrorLog {your virtual host root folder}/logs/error.log
CustomLog {your virtual host root folder}/logs/access.log combined


Tags: , , , ,

Ping external domain failed on Debian Stretch

After a debian stretch server was setup, pinging external domain always failed. That makes installing any packages / software impossible because it cannot access the server.

After a lengthy searching on Google, finally the problem was nailed down and solved easily. The cause of the problem is the Debian Network Manager. To solve this problem, please execute the following command line commands in a terminal.

apt-get remove --purge network-manager
nano /etc/resolv.conf

Add the following line to the resolv.conf file.


You should change the IP address based on your wireless network accordingly.

After the change, reboot your computer to a fresh start. Then execute the following commands.

apt-get update
apt-get install <your package name>


Tags: , ,

Turn on the web server service on macOS

Apache webserver is shipped with all macOS version. The newer macOS version no longer provides user interface to control the webserver. Geeks who know Linux can turn on and off the webserver easily through the command line client. The following article on Apple community provides a step by step tutorial to do this.

Setting up a local web server on macOS 10.13 “High Sierra”

After you follow the above article to turn on your webserver. You can find the all software is up to date and ready to use. The latest PHP version is 7.1.7.


Tags: , , , , ,

Ubuntu 16.04 TLS Development Environment

Ubuntu 16.04 TLS is a good, stable OS. After install the Ubuntu Desktop system, a set of applications should be installed to get a nice programming environment.

1 Web development applications
A while ago I wrote an article “Web Development Tools for Ubuntu OS“. It introduced Geany for editing, Workbench for SQL, Meld for file comparison, and Google Chrome for web testing. These applications are still hold true for Ubuntu 16.04 TLS.

2. R programming environment
First, install R base. Execute the following command in a terminal window (CTL + ALT + T) to add the source url to the APT source list.

sudo echo “deb xenial/” | sudo tee -a /etc/apt/sources.list
sudo apt-get update
sudo apt-get install r-base r-base-dev

Then, install RStudio. Use the “Ubuntu Software” to search for R Studio and install it. It is pretty straight forward.

After install R Studio, you can open it and check if it works.

3. Python programming environment

Install Spyder. Use the “Ubuntu Software” to search for “Spyder” and install it. It is pretty straight forward.


Tags: , , ,

Clean the boot partition of ubuntu OS

Every time you installed a new Linux kernel, it left a footprint in the grub_config, making the boot menu longer each time. Furthermore, it clogs the boot partition of the Ubuntu system. When the boot partition is full, you will get trouble to boot the machine properly. Does Ubuntu provide any easier way to clean them up or keep them from showing in the boot list?

The following information is from the internet and works for me perfectly.

Open terminal and check your current kernel:

uname -r 


Next, type the command below to view/list all installed kernels on your system.

dpkg --list | grep linux-image 

Find all the kernels that lower than your current kernel. When you know which kernel to remove, continue below to remove it. Run the commands below to remove the kernel you selected.

sudo apt-get purge linux-image-x.x.x.x-generic 

Finally, run the commands below to update grub2

sudo update-grub2 

Reboot your system.


Tags: , , ,