Showing posts from August, 2018

Install Debian on Old Mac Mini (late 2009)

This article is part of the series on installing various Linux distribution on Old Mac Mini. In this post, we are going to install Debian on our old Mac Mini (late 2009) version.  Installing Debian on Mac Mini presents no major issue. We might need to reboot the machine to get the wifi to work occasionally, but most of the time the wifi works well without any issue. This is the second best Linux distribution that we have tried. Since we have been trying various Gnome desktop environment, this time we will use KDE Plasma desktop environment with Debian. There is one minor issue, KDE Plasma seems eat up CPU and memory resources. You might want to try Gnome instead. Preparing USB We downloaded Debian for KDE iso image. There are many type of Debian images. We use the 2.89GB version of Debian for KDE. Once we downloaded the image we burn the iso image to USB using Etcher. For those who need a tutorial for burning image to USB please refer to the Ubuntu tutorial . Installi

Introduction to Docker - Day 4

On day 4, we will learn how to manage and clean up containers. Then we will learn how to create common folder to be use in docker container. Docker Container Management Listed below are many command that can be used to manage containers. For some function, there are more than one command/method to perform the task. To list down all container that are active using the command: docker container ls To list down all container including non-active containers, use the command docker container ls -a To stop an active container docker container stop <container_name> docker container kill <container_name> docker stop <container_name> docker kill <container_name> To remove container docker container rm <container_name> docker rm <container_name> To remove all inactive container docker rm $(docker ps -aq) docker container prune Sharing Folder with Containers We can create a common folder to be used as data du

Introduction to Docker - Day 3

On Day 3, we will learn more about running docker app and various options.  Running Docker Image To run a docker image, the basic syntax is as follows: docker run <image_name>  Basic syntax is only able to run hello-world properly. For other apps, we need additional options. To run a docker image with optional container name use the syntax: docker run --name <container_name> <image_name> Example: docker run --name someName hello-world Run Interactive Docker App To run an interactive app we use the following command: docker run -i -t --name <container_name> <image_name> <command_in_app> -i is for interactive session -t is to create a tty for user interaction Usually we use -it we can append additional command to be executed in the app. The command should be appended after the image name Example: docker run -it --name myubuntu ubuntu We perform any task such just like a virtual machine

Setup Network Device on Ubuntu 18.04

To setup a network device on Ubuntu server 18.04, we need to use new network setup application netplan. Netplan allow us to configure new network adapter. We encounter network setup issue when we need to add a second network adapter in VirtualBox for networking with host. Using Ip Link Before we use netplan, we can use the following command to show all device:  ip link show To temporary enable the device we can use the command below: (please replace eth0 with the network device that you want to configure): sudo ip link set eth0 up Use the following command to enable dhcp client. sudo dhclient eth0 Using Netplan To enable the network adapter permanently, we need to configure netplan. Use the following command to open the configuration file: sudo nano /etc/netplan/50-cloud-init.yaml On the configuration file, we add additional network device as follows. Please note that enp0s2 is the current default device and enp0s4 is the new device. Please also make su

Using SSH with VritualBox Guest OS

If we installed a sever such as Ubuntu server on VirtuaBox, we will not be able to ssh into the server since the network are isolated from each other. To establish connection with VirtualBox guest OS, we need to create a separate network and a 2nd adapter for host only connection. Before we create a second adapter on the ubuntu server, we need to create a separate network for the host-only adapter.   Create Host Network in VirtualBox Open VirtualBox, select File >> Host Network Manager... Click on Create to create a host network. A host network known as vboxnet0 is created with a separate subnet and a dhcp server. We can create one network for each server or we can use the same network between different server so that they talk to each other. Next, we can setup a 2nd network adapter on the virtual machine. On the virtual machine, we can see that the first network adapter is setup as NAT device so that it can communicate with the internet.     On

Comparing Virtual Machine on Mac

On Mac OS X, we have few choice of virtual machine to choose from. For free version, we have VirtualBox and Parallel desktop Lite. For paid version, we have WMWare Player and Parallel Desktop.  For free version of VirtualBox and Parallel Desktop Lite, the features are quite similar although there are some differences. Almost all Linux distribution can be run on VirtualBox whereas only some version of Linux Distribution can be run on Parallel Desktop Lite.  One of the disadvantage of Parallel Desktop Lite is that the guest OS could not tunnel into host VPN connection. However, Parallel Desktop (paid version) got no problem connecting with host VPN connection. VirtualBox also does not have a problem using host VPN connection.  Both VirtualBox and Parallel Desktop Lite handles network differently. On Parallel Desktop Lite, the default network setup is shared network.  Host can ping to the guest OS and vice versa. This make ssh connection must easier between host and guest OS.

Setup CentOS Network from Command Line

For CentOS minimal install, the network device is disabled by default. To turn on the device, we use network manager command line tools First we need to check for if the network device exist: nmcli d Once we confirm that the device is present, use another tool to activate the network. Use the command below to activate the network. nmtui Select " Edit a connection ". Select the network device and choose Edit... . Most of the setting are default, just make sure that " Automatically connect " is checked. Select OK when done. On the main screen, select Activate a connection . Once the connection is activated, we are good to go. We can check the network connection using the command below: nmcli connection show ***

Introduction to Docker - Day 2

For second day of Introduction to Docker, we will learn how to run the docker test app with name option. After that, we discuss about pulling an actual docker application and we will learn the naming convention of docker image. Run with Name Option We start by running hello-world app without any option. Run the test app as follows: docker run hello-world List the container: docker container ls -a The result should be as follows: We then remove the container using the ID or the name cranky_brahmagupta . This name is created randomly by the system if we failed to supply a name. Now, we remove the container as follows: docker rm cranky_brahmagupta To run the container and supply a name, we use the option --name follow by a single space and the custom name. See example below: docker run --name simple hello-world List the container docker container ls -a The result is as follows: Please note that the name of the container will be the name that

Configure Unattended Upgrades on Raspberry Pi

If we were to run Raspberry Pi headless (without attached monitor), it would be nice if we can perform unattended system upgrades. In Debain/Ubuntu class of software, we can perform unattended upgrades using the software package unattended-upgrades.  To install the software, use the command below:  sudo apt-get install unattended-upgrades # Following are additional software required # we only need mailutils or bsd-mailx, choose 1 sudo apt-get install mailutils sudo apt-get install bsd-mailx sudo apt-get install update-notifier-common Next, we need to edit the configuration files: sudo nano /etc/apt/apt.conf.d/50unattended-upgrades The configuration should be similar as below: Unattended-Upgrade::Origins-Pattern { // Codename based matching: // This will follow the migration of a release through different // archives (e.g. from testing to stable and later oldstable). // "o=Debian,n=jessie"; // "o=Debian,n=jessie-update

Introduction to Docker - Day 1

This is a basic introduction to Docker for Mac. Before we starts to understand Docker, we must know about virtual machine. Readers for this blog is familiar with VirtualBox and Parallel. Recently, we are testing various new Linux distribution via virtual machine. So far we have installed more than 10 different flavor of Linux distribution. It takes up more than 80GB of hard disk space.  Since, a lot of them are different flavor of Debian/Ubuntu distribution, there are a lot of repetitive installation. We are not going to show the standard layered chart. If you preferred the official layered chart, please check out the tutorial from docker. The chart below is an example of what happened to by Macbook Pro. Linux App Linux App Linux App Linux App Linux App Linux App Antergos FreeBSD Manjaro Ubuntu Elementary MX Linux App App VirtualBox Parallel Mac OS X Macbook Pro Hardware If we use Docker, then we can dispense with installing different flavor of Linux. We can still have di