python-bs4package 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 python3After 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 modeConfirm that python 3 is a default version:
# python --version Python 3.4.2All what remains is to install Beautiful Soup parsing HTML and XML package to match python version 3:
# apt-get install python3-bs4All 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)Read more ...
# docker run -d -p 8118:8118 linuxconfig/instantprivacyRead more ...
apt-getor 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-ROMsRead more ...
commitits current state and save it as a docker image.
# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 78727078a04b debian:8 "/bin/bash" 13 seconds ago Up 11 seconds container1From the above output we see a running docker container named
container1with an ID
78727078a04b. We now use
commitcommand to take a snapshot of its current running state:
# docker commit -p 78727078a04b container1 e09f9ac65c8b3095927c14ca0594868f73831bde0800ce66415afeb91aea93cfRead more ...
hellopackage is installed. In order to achieve this in a traditional way of system administration the admin user will need to undergo multiple checks such as current state of the package installation, type of the operating system platform, installation command to be used before the actual package installation takes place. Being puppet a declarative, user only needs to define the state of the desired package and puppet will take care of the rest. In an event that our package "hello" is installed puppet will take no action, whereas if package is not installed it will install it.
node1. Operating system used on both
node1instances is Debian 8 Jessie. Ubuntu Linux can also be used as an alternative to follow this tutorial. The underlying network configuration is irrelevant. However, it is expected that
node1can resolve the
masterhost by its name and both hosts are connected and proper firewall settings are applied to allow puppet
node1agent to communicate:
root@node1:/# ping -c 1 master PING master (172.17.0.1): 56 data bytes 64 bytes from 172.17.0.1: icmp_seq=0 ttl=64 time=0.083 ms --- master ping statistics --- 1 packets transmitted, 1 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.083/0.083/0.083/0.000 msRead more ...
# docker pull debian:8 Pulling repository debian FATA Get https://index.docker.io/v1/repositories/library/debian/images: dial tcp: lookup index.docker.io: no such hostRead more ...
# docker rmi IMAGE-IDThe above docker command will remove a single image from your docker host system. To remove a multiple docker images you may supply as an argument multiple docker image ID's:
# docker rmi IMAGE-ID IMAGE-ID IMAGE-IDIf your intention is to remove all existing docker images the below command will remove all docker images regardless of their count. Warning: Please note we have also included
--forceto remove also images which are in use:
# docker rmi --force `docker images -q`
Building the VirtualBox Guest Additions kernel modules The headers for the current running kernel were not found. If the following module compilation fails then this could be the reason.
# dpkg --get-selections | grep linux-headers linux-headers-3.13.0-53 install linux-headers-3.13.0-53-generic install linux-headers-generic install # uname -r 3.13.0-53-genericRead more ...
xrandr. First get all your connected screens:
$ xrandr | grep -w connected DVI-D-1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 474mm x 296mm HDMI-1 connected primary 1920x1080+1680+0 (normal left inverted right x axis y axis) 598mm x 336mmRead more ...
# yum group list Loaded plugins: fastestmirror There is no installed groups file. Maybe run: yum groups mark convert (see man yum) Loading mirror speeds from cached hostfile * base: centos.mirror.crucial.com.au * extras: centos.mirror.crucial.com.au * updates: centos.mirror.crucial.com.au Available environment groups: Minimal Install Compute Node Infrastructure Server File and Print Server Basic Web Server Virtualization Host Server with GUI GNOME Desktop KDE Plasma Workspaces Development and Creative Workstation Available Groups: Compatibility Libraries Console Internet Tools Development Tools Graphical Administration Tools Legacy UNIX Compatibility Scientific Support Security Tools Smart Card Support System Administration Tools System Management DoneRead more ...