Beautiful Soup is a Python package for parsing HTML and XML documents and it resides within a Debian package named python-bs4. However, python-bs4 package is a default package on Debian Linux system for Python 2 version. Therefore, if your intention is to use Python3 as a default environment you will need to also install Python3 and its corresponding version of BS4 python3-bs4. Let's start by python3 installation:
# apt-get install -y vim python3
After a successful installation of python3 package make sure that python3 is set as default:
# update-alternatives --install /usr/bin/python python /usr/bin/python3.4 2
update-alternatives: using /usr/bin/python3.4 to provide /usr/bin/python (python) in auto mode
Confirm that python 3 is a default version:
# python --version
Python 3.4.2
All what remains is to install Beautiful Soup parsing HTML and XML package to match python version 3:
# apt-get install python3-bs4
All done. Test Beautiful Soup parsing HTML and XML with the following example script:
#!/usr/bin/env python3

from urllib.request import urlopen
from bs4 import BeautifulSoup

html = urlopen("http://www.gnu.org")
bsObj = BeautifulSoup(html.read());

print (bsObj.title)

Symptoms

: When using apt-get or some other GUI package management application to install a new package on Ubuntu or Debian Linux the following error message appears:
W:Failed to fetch cdrom://Ubuntu 14.04 LTS _Trusty Tahr_ - Release amd64 (20140416)/dists/trusty/main/binary-amd64/Packages
Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

apt-cacher-ng is an alternative to a more robust apt proxy servers available such as squid-deb-proxy. If you are running a small home or office network look no further. It may lack some of the more advanced features but it can be configured in no time, that is, you are ready to go within minutes after initial installation.

Server

Let's get started by configuring apt-cacher-ng server:
# apt-get install apt-cacher-ng
Enable to start apt-cacher-ng after reboot:
# systemctl enable apt-cacher-ng
and start apt-cacher-ng apt proxy:
# service apt-cacher-ng start

Symptoms:

Unable to run mail command from a command line:
# mail test
bash: mail: command not found

There are two steps to verify an authenticity of downloaded Debian ISO images from Debian mirrors:
  1. Firstly, we need to verify check-sum of the CD image content against its relevant checksums files whether it would be MD5SUMS or SHA512SUMS
  2. Secondly, we need to verify the actual checksums files for a correct signature using accompanied signatures such as MD5SUMS.sign or SHA512SUMS.sign
To get started, first download all relevant files including desired ISO images within a single directory. In this case we will validate the authenticity of debian net install CD image:
$ ls
MD5SUMS  MD5SUMS.sign  SHA512SUMS  SHA512SUMS.sign  debian-8.0.0-arm64-netinst.iso

Author:Tobin Harding
Task is to configure x86 bare metal machine as a docker host using Debian 8. You will need a network connection to the host to follow this guide. Also a connected keyboard and monitor.

Prerequisites

  1. Host machine. I will be using an optiplex 760 but any machine will do.
  2. Internet connection. I will be using the net install Debian 8 image.
  3. About half an hour.

About

The automated build docker Nginx image “linuxconfig/nginx” can be used as a basic testing environment for a static websites deployments.

Configuration

The image is build based on default Nginx webserver configuration running on Debian GNU/Linux. Nginx webserver run in foreground and listens on default port 80.

Usage

Create a directory and place your static website within.
$ mkdir html
$ echo "My Static Website" > html/index.html
OR
$ cp -r /path/to/your/static/website/* html/

The idea about starting your services under Supervisor's supervision is to be able to run multiple services under a single daemon. Depending on the Supervisor's configuration it will be able to start,stop or restart any given service as a child process. In this config we show how to runapache2 as supervised service ( useful for docker images etc. ) on Ubuntu/Debian Linux. First, install supervisor:
# apt-get install supervisor
Include apache2's supervisor configuration into /etc/supervisor/conf.d/. Supervisor will pick any configuration files from this directory where the only requirement is *.conf file extension. For example insert a following lines into a new file /etc/supervisor/conf.d/apache2.conf:
[program:apache2]
command=/usr/sbin/apache2ctl -DFOREGROUND

This article describes an upgrade procedure from Debian Wheezy to Debian Jessie. Debian Linux with a code name "Jessie" is the latest stable Debian release which succeeds previous stable version "Wheezy".

It is important to point out that nothing is bulletproof and proper failover procedure should be discussed before the upgrade takes place. The rule of thumb is, the less software is installed on your system the higher chance for a successful upgrade. Before you move on with the upgrade consider the following recommendations.

Relevant article:

Upgrade Recommendations

  • Remove unnecessary packages
  • Fully upgrade your current system
  • Make a data backup
  • Although there should not be a problem to perform update via SSH. If possible it is recommended to perform upgrade directly using console

Fully Upgrade current System

First, fully upgrade your current Wheezy Debian system:
# apt-get update
# apt-get upgrade
# apt-get dist-upgrade

Docker and its Docker.io debian pakcage is currently not available Debian Jessie thus:
 Package 'docker.io' has no installation candidate
The easiest way to install docker is to use get.docker.com script: First, install curl tool:
# apt-get install curl

Let's say you wish to do some changes to nginx source code in order to add or remove some features before the actual nginx package installation. In this config we will show how to recompile nginx package on Debian linux.

First install package building tools:
# apt-get install dpkg-dev
Next, we need to install all nginx build dependencies:
# apt-get build-dep nginx

What is Reverse Proxy

In short a reverse proxy server acts as intermediary service between client requesting a resource such as HTTP page and one or more servers. Using reverse proxy allows for multiple advantages such as improved performance, load balancing, transparent server maintenance of servers behind the reverse proxy server, improved security and more.

Basic scenario

In this section we will setup a basic reverse proxy using Nginx webserver on Debian Linux. We will be running two separate servers server1 and server2. Server1 is running Debian Linux with Nginx reverse proxy and an IP address 10.1.1.251. Server2 run basic website using Apache2 webserver on IP address 10.1.1.252. We assume that Server2 is up and running to serve a content on port 80:
$ lynx -dump http://10.1.1.252
   Hello this is apache2 sitting on host 10.1.1.252

In this config we will setup a python virtualenv. The intention behind the use of virtualenv as a python development environment is to separate global system installed executables and libraries with packages installed directly inside virtualenv. As a result, one is able to test a given python application with multiple system environments on a single host.
The installation of virtualenv on Debian Linux is simple as:
# apt-get install python-virtualenv

Symptoms:

Using a apt tools may result in a following error:
Traceback (most recent call last):
  File "/usr/bin/lsb_release", line 28, in 
    import lsb_release
ImportError: No module named 'lsb_release'
Traceback (most recent call last):
  File "/usr/bin/lsb_release", line 28, in 
    import lsb_release
ImportError: No module named 'lsb_release'

phpVirtualBox allows you to manage locally or remotely your virtual machines running under VirtualBox via web-based interface. This config will describe an installation and basic configuration of phpVirtualBox on Debian Linux.

First, we need to install apache2 and php support:
# apt-get install libapache2-mod-php5 apache2 unzip wget
Next, we need to download phpVirtualBox. Please update your download link if necessary:
$ wget http://downloads.sourceforge.net/project/phpvirtualbox/phpvirtualbox-4.3-2.zip
Next, we will unzip and move the phpVirtualBoxcode into root directory of our apache2 webserver directory.
# unzip phpvirtualbox-4.3-2.zip
# mv phpvirtualbox-4.3-2/ /var/www/html/vbox

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: