Squid proxy server working example Debian GNU Linux

Hello guys, this is post is about an squid working example. The version of the squid that I am running is

2.7 stable. you can check it out running:

root@khs01sw10:~# squid -v
Squid Cache: Version 2.7.STABLE9
configure options:  (...)
Squid 3 error page

Squid 3 error page

Note: Uprated on november 25, 2015

This post is part of a bigger Debian material that you can access here. If you need to know first the basics about squid configuration, you can check out here.

Now, the network that I have configured the proxy for. Is a 300 PC network with the following range (net mask The IP address of the proxy is My proxy uses a few father proxies. Continue reading

Squid3 proxy with Linux debian jessie 8.

squid3 logo

squid3 logo

Squid3 proxy server is the subject of this post, along this writing I am going to show you how to install and configure this proxy server. For more information you can visit this URL; the official website of the project. My system is a Debian jessie 8.

This post is part of a bigger Linux and Debian basic administration material that you can access here. I have also described a squid 2.7 working configuration here. Squid 2.7 is a bit different from squid3 but they are configured basically the same way except for a few new directives and some other changes and deprecations. Let’s play then.

Installing squid3 is simple: Continue reading

VirtualBox Virtual machine in Linux- Class 7

Virtualbox is today’s posts subject . We will talk about virtualization and how to virtualize a box using Virtualbox. To start we need to know what is virtualization and its advantages.

virtualbox logo

virtualbox logo

Virtualization, in computing, refers to the act of creating a virtual (rather than actual) version of something, including but not limited to a virtual computer hardware platform, operating system (OS), storage device, or computer network resources.

Taken from: http://en.wikipedia.org/wiki/Virtualization on 2014-04-22.

This post is part of a bigger Debian material that you can access here. Continue reading

Fleet management system with Symfony 2, php, MySQL; TeamERP Transport

TeamERP Transport Symfony 2

Updated on 2014-05-19.

I have been programming for one week and I have a transport module that can work for different situation now. I have released it as a MIT license so that any one can use it or do what ever they want with it. My objective is to create a truly free ERP system. But you have to start somewhere, and I have decided that the transport module could be a nice module. This module is a software that can be used to record transport expenses and to follow the cars movements. It’s not a tracking systems. but in the future I an planning to integrate it with one of this projects. the project was developed with Symfony 2; php, MySQL.

In this document I described the Symfony 2 development process for the development of a Fleet management system. I started from scratch to what I currently have and it took me one week of work. The project is going to be used by a friend of mine company. All the iterations and problems found along a real life development process will be posted here. This document is about the Transport module and the objective is not to have a book of how to use Symfony 2 and develop. But a guide of what has been done with Symfony 2 and the current state of the module. More like a diary of notes and the documentation of this development. You can also find some other Symfony 2 development material here. Continue reading

Apache 2 web server; install and config a virtual host

Good day; today we will install a web server using Apache 2. We will specifically use apache because there are many web servers out there, and apache is probably the most popular one even among windows users, when you install Wamp Server, or Xamp,

Apache Web Server

Apache Web Server

you are also installing apache 2.x. It has some other advantages or benefits like Openness, a lot of features, extensibility, portability, cost, simple administration, reliability, flexibility, etc. Check out this link for some explanations. It has also some downsides or disadvantages like for instance; it’s Written By Geeks, For Geeks. That does not mean is difficult or any thing like that, but it can be twisted for some specific situations.

The Linux philosophy to install a software like Apache 2 is different from Windows. Windows tries to solve all of your problems at once, Linux’s philosophy is to solve only one of your problems using the best practices. Each of this ways of thinking has it pros and cons, but that is not the objective of this class, so we move on.

To install the package you have to do:

aptitude install apache2

Continue reading

DNS Bind 9 Linux Server Debian; Class 5

Hello, today I will try to teach how to configure a DNS (Domain Name Server or System). “Putting a DNS server on a network allows for the replacement of IP addresses of individual machines by a name. As a result, it’s



even possible to associate multiple names to the same machine to update the different available services. For example, www.example.com and pop.example.com, could both point to the primary server where the mail server and the business intranet reside, and the domain could be example.com. It’s easy to remember that these two services are running on the same machine whose IP address is

Note: This post is part of a bigger Debian GNU-Linux material that you can access here.


  1. DNS Installation
  2. Configuration
  3. Test the service
  4. Setting up the client

Now imagine that our network administrator decides for some reason or another to move the mail server to the machine The only thing that has to be changed is the DNS server configuration file. You could always go and modify the host configuration for all the users, but that would be time consuming and inconvenient.”

Taken from: https://wiki.debian.org/Bind9 on 2014-03-19

This sounds simply great! But how do we do it? Continue reading

Symfony and WAMP 2.4 windows installation

To work with Symfony, many people recommend to install every thing as a separate entity; PHP, Apache and MySQL. But sometimes the reality is different and you just need to use what you need to use. That was my case. I had WAMP Server 2.4 working for WordPress and I neded to install a Symfony 2.4 project, no option. So I decided to just meet the Symfony dependencies and install it. Then I created a cert of manual or how to? to help to guide others that might have the same problem. Also you might want to do it because of some other reason, but that was my reason. I was requested to do it like that and only like that. And in my country we have a saying that teaches something like this. If someone wants something even if it is a bad thing; don’t give him other thing. Of course I do not mean that WAMP or Symfony together are a bad thing. This is what I have done:
Software to install:

  • WAMP Server 2.4.
  • Symfony Requirements
  • Symfony 2.4

Note: this post is about installing Symfony in windows with wamp if you work with Linux you can use this material. and if what you want is to move an app from development to a production environment, you need to do this.


WAMP Server 2.4

WAMP Server 2.4

1- Install WAMP server 32 bits.

Get wamp from here. Because of some incompatibilities with some versions of cache accelerators for php 5.4 64 bits it’s preferable to install the WAMP server 32 bits version. I have had problems to make the 64 bits work, but I can not 100% confirm it was because of incompatibility. I have installed wamp 32 bits latest version in: D:\Web\wamp. You can install it where ever you want, even the default path is a nice place for most people.

Before installing wamp you need to make sure you have installed Microsoft Visual C++ 2010 Redistributable, if you do not have it you can get the the version for 32 bits Windows from here,  and for 64 bits from here.

The installation process goes straight forward normally is a next-next matter. Once you are done you can start the service straight away and test it by writing in your browser address bar:


Check out the picture.

2- PHP ssl module working

we need to install Composer the tool recommended and that we will use to download Symfony from the prompt. Composer recommends to have the  php ssl module working. To do that we need to edit the php.ini for cli as when you enter commands in the prompt the system does not run the commands through Apache, so is the cli php.ini the one we need to edit. So edit the php.ini in Your\installation\path\php\php5.4.12\php.ini (the php version might change depending on the version of WAMP). On the file go to the extensions section and remove the ; from the extension for ssl.


This let’s composer run secure PHP connections from the prompt.

3- Instal composer.

Follow the website installation instructions for Windows.

4- Environment variables.

Activate environment variable for PHP, MySQL and Composer once you install it. add to the environment variable called PATH the path to your PHP, MySQL and Composer.

Environment variables for Symfony

Environment variables for Symfony

To edit the system PATH environment variable:

  • Right-click on My Computer/Computer and select Properties
  • Select the Advanced system settings tab in the advanced dialog that appears
  • Click on the Environment Variables button
  • Locate PATH in the System variables list
  • Click Edit and add your directories containing the binaries separated by ; mine looks like this:

C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Java\jre7;C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64rogram Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64:\eSuppo৪睗孔\蚰ȯer\Software\MEI\Intel\[AxP][X750JA_X750JB]_Intel(R)_Management_Engine_Components\Vista32_Vista64_Win8_32_Win8_64_9.0.0.1287\Drivers\MEI\HECIᬀ嬱哈ȱ㵸\lags 20 -keypath “Software\Intel\Difx64”;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;D:\Web\wamp\bin\php\php5.4.16;C:\ProgramData\ComposerSetup\bin;D:\Web\wamp\bin\mysql\mysql5.6.12\bin5-

The last part of this I what I have added, but every case might be different depending on your own path to the binary files:


If you look closer there is a ;  between every path that I specify. And the path is just the route to the executable files of the software that you want to be declared in your environment.

Note: Wamp’s php comes with a xdebugger version (a symfony requirement) so it does not need to be installed.just edit the nesting level. to do that update Apache’s php.ini and set the xdebug.max_nesting_level to 250:

zend_extension = "D:/Web/wamp/bin/php/php5.4.16/zend_ext/php_xdebug-2.2.3-5.4-vc9.dll"
 xdebug.remote_enable = off
 xdebug.profiler_enable = off
 xdebug.profiler_enable_trigger = off
 xdebug.profiler_output_name = cachegrind.out.%t.%p
 xdebug.profiler_output_dir = "D:/Web/wamp/tmp"
 xdebug.max_nesting_level = 250

In normal conditions you will only have to add the last line.

5- Install a cache manager extension.

Normally you can install APC (http://dev.freshsite.pl/php-accelerators/apc/file/details/apc-3114-beta-for-php-54-win72008.html) or Opcache (http://dev.freshsite.pl/nc/php-accelerators/zend-opcache). I have decided to install APC if you have any newer PHP version 5 or newer Opcache is recommended as the default PHP acelerator even incorporated in the default installation.

To install APC, first copy the file to the extension_dir (you can find it in your php.ini).

Then add the following to the php.ini file.


where php_apc_3114_beta_php54_win7-2008.dll is the name of the apc dll downloaded from the URL, and it´s copied in the folder php/ext as I mentioned before.

If you want Symfony to use Opcache for this version of PHP, it should be something like this in you php.ini file.

;Opcache Extension for symfony
zend_extension = "D:\Web\wamp\bin\php\php5.4.12\zend_ext\php_opcache_703_php54_vc9.dll"
opcache.enable = 1
opcache.memory_consumption = 300
opcache.interned_strings_buffer = 8
opcache.max_accelerated_files = 8000
opcache.fast_shutdown = 1
opcache.enable_cli = 1
opcache.use_cwd = 1

Taken from: https://coderwall.com/p/0sadqa

As we also have Xdebugger by default in WAMP we need to put the configuration before the xdebugger configuration in order for it to work otherwise it will not load.

Taken from: http://www.php.net/manual/en/opcache.installation.php

6- Activate other PHP modules

I recommend these if they are not already active to be active in yout php.ini:


But also you might need some other like:


7- download and deploy de Symfony framework.

-Open a command prompt and load the path to the install files, normally something like c:/wamp/www/project or in my case D:\Web\wamp\www\combi.

-Open your command prompt (CMDor any other you prefer) and load the folder where you have installed. Have the forder for your project to do that you can use the commands cd, mkdir, etc.

-Execute the command:

composer create-project symfony/framework-standard-edition path/ 2.4.2

Taken from: http://symfony.com/download

Note: If you are behind a proxy server you have to set and environment variable to say who is the proxy and how to authenticate. open a terminal and write something like this:

SET HTTP_PROXY=http://username:password@proxy.yourdomain.com:8080
SET HTTPS_PROXY=http://username:password@proxy.yourdomain.com:8080

Remember to change the parameter to fit in your network. username, password,proxy server name and domain or IP and the proxy port.

Symfony config check

Symfony config check

And that is it. We are done after the download is finished you can check that every thing is working. To do that put the following in the browser or at least something similar:


Under normal circumstances if everything went well you should get something like the picture, otherwise, review the step corresponding to the problem.

Thank you!

Main reference.

DHCP server installation and configuration linux Debian; ISC DHCP Server

The Protocol

The Protocol

DHCP server basic principles; installation and configuration; ISC Server on a Debian Linux system.

This post is part of a bigger Debian material that you can access here.


  1. The DHCP protocol
  2. Precautions before we start
  3. Installation of ISC DHCP Sever.
  4. Configuration of the server.
  5. Checking the results

The DHCP protocol


The DHCP protocol was created to configure computers automatically just by connecting them to the network. That means that thanks to this protocol you dont need to do any thing to be able to connect to certain networks. you connect a new computer and the computer it self is able to talk to a server and get what it need to be able to connect and use the network resources that are available. but tel’s leave the smart guys to define what is the protocol.

“DHCP (Dynamic Host Configuration Protocol) is a communications protocol that lets network administrators centrally manage and automate the assignment of Internet Protocol (IP) addresses in an organization’s network. Using the Internet Protocol, each machine that can connect to the Internet needs a unique IP address, which is assigned when an Internet connection is created for a specific computer. Without DHCP, the IP address must be entered manually at each computer in an organization and a new IP address must be entered each time a computer moves to a new location on the network. [The protocol] lets a network administrator supervise and distribute IP addresses from a central point and automatically sends a new IP address when a computer is plugged into a different place in the network.”

Taken from: http://searchunifiedcommunications.techtarget.com/definition/DHCP on 2014-03-04.

As a mater of fact what happens between the Client PC that wants to connect to the network and the server is a cert of conversation of messages until the client gets and IP addess. That is valid for a certain period of time defined by the server; check out the first picture. The messages include but not only the following.

  1. DHCPDISCOVER (taken from wikipedia) It is a message that marks the beginning of an interaction between client and server. This message is sent by a client (host or device connected to a network) that is connected to a local subnet. It’s a broadcast message that uses as destination IP address while the source IP address is
  2. DHCPOFFER It is message that is sent in response to DHCPDISCOVER by a server to the client. This message contains the network configuration settings for the client that sent the DHCPDISCOVER message.
  3. DHCPREQUEST This message is sent in response to DHCPOFFER indicating that the client has accepted the  network configuration sent in DHCPOFFER message from the server.
  4. DHCPACK This message is sent by the server in response to DHCPREQUEST recieved from the client. This message marks the end of the process that started with DHCPDISCOVER. The DHCPACK message is nothing but an acknowledgement by the DHCP server that authorizes the DHCP client to start using the network configuration it received from the DHCP server earlier.

In the other hand we will use today ISC’s DHCP server. ISC’s DHCP (isc-dhcp-server in Debian) software is the most widely used open source DHCP implementation on the Internet. The same software can be used for LAN too. It is a carrier and enterprise grade solution for any host configuration needs.

But before we start I have to give some advise about precautions that we need to make sure of.

Precautions before start.

After installing the necessary packages isolate the server fragment of network fron the rest of the computers. If you have an error in your configuration you can prevent computers from connecting. After you finish configuring, once you are sure that the configuration is working join the DHCP server to the network and monitor the behavior of the computers.And also make sure that you always backup your initial configuration file.

Installation of ISC DHCP Sever.

As usual, installation is very simple with apt. As root simply run
  • # apt­get install isc­dhcp­server
  • # aptitude install isc­dhcp­server

Sample output.

Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 11 not upgraded.
Need to get 0 B/411 kB of archives.
After this operation, 938 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package isc-dhcp-server.
(Reading database ... 281728 files and directories currently installed.)
Unpacking isc-dhcp-server (from .../isc-dhcp-server_4.1.1-P1-15+squeeze8_amd64.deb) ...
Processing triggers for man-db ...
Setting up isc-dhcp-server (4.1.1-P1-15+squeeze8) ...
Generating /etc/default/isc-dhcp-server...
Starting ISC ... server: dhcpdcheck syslog for diagnostics. ... failed!
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.

Configuration of the server.

The main configuration files are /etc/default/isc­-dhcp­-server. That stores the stating conditions and configurations for the software. And /etc/dhcp/dhcpd.conf that stores the actual configuration of the software.

Note: Remember to back up the original files as I advised before doing any work. To do that you can save the file on a different location or you can save it in the same place with a different name.

Edit isc-dhcp server default file

Edit isc-dhcp server default file

The first thing is to create the condition for the server to start. For that the only real requirement is to say the network interface to listen. Todo that first you should edit or create the file /etc/default/isc-dhcp-server with root permissions, either by running dpkg-reconfigure isc-dhcp-server or enter something like this into the file /etc/default/isc-dhcp-server:

Where Eth0 is the name of the only Ethernet interface that I have. If you have more that one then you need to decide if you are using only one or more than on for this service. In case  You can check out the picture for more information.
Homework A: research about the command dkpg.
After this we don’t really need to change any thing else, but for more advanced configurations you might need to modify this file again. Any way for normal organization requirements you do not really need to do it, so for now we leave like that. Now is the moment to create the actual configuration.
Note: As we are supposed to have backed up the original file. Now you can just create a new file from scratch, and I mean delete the original file (the one we have a back up already). And create a new file with the same name.
For a basic configuration on any real organization, you have to add/edit/create the following lines in /etc/dhcp/dhcpd.conf.
option domain­name "spices.org";
To specify the domain to use by the server and the clients. Also you should add this this line to the file:
 option domain­-name­-servers,;
This entry provides the IP addresses of two domain name servers (DNS), but one would be enough. You have to list here the DNS that work for your network, the addresses given here will most likely not work for you. So you should modify them to have your real DNS servers.
Now we are only missing with defining the network that we will use and the IP addresses that the server can use to give to the “customers”. Check it out:
subnet netmask {
option routers pepper.spices.org;
This entry defines the LAN in the first line is a /24 network. The IP addresses to are typical for an Intranets in many places. The second line defines the range of IP addresses to give to the clients to And lastly the gateway is defined in option routers, this name pepper.spices.org can be changed by any other name or IP address. And it will be the default gateway for the clients. Otherwise we are done with the configuration. Just to say that the ; is very important in the single lines and the {} defines a block of configuration parameters.
Now we just have to start the service and check that the service is working properly. To do that you just need to run the following command.
service isc-dhcp-server start
Or also you can use the old fashion method:
/etc/init.d/isc-dhcp-server start

Checking the results

Now, if it does not give an error we are likely to have finished configuring the server. But we need to double check that the configuration is working properly. For that I am going to introduce a few commands and concepts. Debian GNu Linux like a lot of Unix like systems has a lot of logs that record the things that happen on the system. But there is a really important file that stores the system logs. You can understand Kernel and other very important software’s logs. In Debian and many other Linux distributions you can find this info in the file /var/log/syslog. To check if the dhcp is working we should go to this file.
But if we open it with for instance with nano. We might be lost given the fact that this file records a lot of lines every hour and it might be hundreds of pages. Also nano and similar software show only the records (understand lines) that are in the file when you open it. So it does not update it self’s content dynamically. Then if the server is writing all the time and doing new jobs we will not be able to see it with nano unless we load again the page again and look for the new content. Which is fine for a small fine but not for hundreds of pages. So we need a new command that can show only the las part of the file and dynamically show it’s content as it is being created. Fortunately there is a really simple and nice command.the command is “tail”. and we can use if in this case in the following ways:
tail -f /var/log/syslog
and if we want to see the end of the file only statically we can use it this way:
tail -n100 /var/log/syslog
Where -n100 means the last 100 lines, so you can change this number to what ever you want.
Also we can use the “cat” command. What is does is that it shows the whole content of a file:
cat /var/log/syslog
Let me just show a sample of “tail -f” for a DHCP server that is working:
root@khs01sw10:~# tail -f /var/log/syslog 
Mar  5 09:31:05 khs01sw10 dhcpd: DHCPREQUEST for from 00:0f:fe:c6:1f:76 (medimizer3) via eth0
Mar  5 09:31:05 khs01sw10 dhcpd: DHCPACK on to 00:0f:fe:c6:1f:76 (medimizer3) via eth0
Mar  5 09:31:06 khs01sw10 dhcpd: DHCPREQUEST for from 00:30:05:c0:99:22 (khs01wx0010) via eth0
Mar  5 09:31:06 khs01sw10 dhcpd: DHCPACK on to 00:30:05:c0:99:22 (khs01wx0010) via eth0
Mar  5 09:31:07 khs01sw10 dhcpd: DHCPINFORM from via eth0
Mar  5 09:31:07 khs01sw10 dhcpd: DHCPACK to (d4:3d:7e:d3:ed:ba) via eth0
Mar  5 09:31:07 khs01sw10 dhcpd: DHCPINFORM from via eth0
Mar  5 09:31:07 khs01sw10 dhcpd: DHCPACK to (d4:3d:7e:d3:ee:8d) via eth0
Mar  5 09:31:08 khs01sw10 dhcpd: DHCPREQUEST for from 00:02:e3:32:c4:4b (khs01wx0188) via eth0
Mar  5 09:31:08 khs01sw10 dhcpd: DHCPACK on to 00:02:e3:32:c4:4b (khs01wx0188) via eth0
Mar  5 09:31:08 khs01sw10 dhcpd: DHCPREQUEST for from f0:27:65:35:45:73 (android-7f4c9b6f9482a823) via eth0
Mar  5 09:31:08 khs01sw10 dhcpd: DHCPACK on to f0:27:65:35:45:73 (android-7f4c9b6f9482a823) via eth0
Mar  5 09:31:08 khs01sw10 dhcpd: DHCPINFORM from via eth0
Mar  5 09:31:08 khs01sw10 dhcpd: DHCPACK to (74:de:2b:ce:25:f4) via eth0
Mar  5 09:31:08 khs01sw10 dhcpd: DHCPREQUEST for from 00:1e:79:28:5f:40 (Switch) via eth0
Mar  5 09:31:08 khs01sw10 dhcpd: DHCPACK on to 00:1e:79:28:5f:40 (Switch) via eth0
Homework B: How does the following command Works:  dhclient
In class we have seen a really simple configuration, but isc-dhcp-server is able to handle much more complex ones for different user requirements. Please bring different examples of configurations to the next class and try to explain a possible use case for that configuration.
Thank you for your time. That is it for today.

Debian; file system, superuser, commands, configuring and installing

Along this Debian class we will deal with the following. Debian file system, superuser, editing text files, executing commands in the shell, configuring, installing and uninstalling packages.

This post is part of a bigger Debian material that you can access here.

Debian File system, users and superusers; Introduction.

Debian GNU Linux uses the superuser paradigm. In computing, “the superuser is a special user account used for system administration. Depending on the operating system, the actual name of this account might be: root, administrator, admin or supervisor. In some cases the actual name is not significant, rather an authorization flag in the user’s profile determines if administrative functions can be performed. In operating systems which have the concept of a superuser, it is generally recommended that most application work be done using an ordinary account which does not have the ability to make system-wide changes.”

Taken from: http://en.wikipedia.org/wiki/Superuser on 2014-02-16

Debian Linux is of course a system with the superuser paradigm, by default the superuser name is root. But root might refer also to other parts of the system. Root is where every thing starts in Linux systems is like the alpha of the system. Is the “father

directory” (root directory represented by / ) in the file system. And root is also the “superuser”. to see the root directory you can execute the ls command from the fist class.
ls /
ls ­-la /
and to know if your current user is root you can use the whoami command also from the first class.
The root user is the privileged user of the system and is a lot more powerful than the Windows administrator; this user can even destroy the systems and it will not be even waned about it. The concept behind it is that this user should only be used when is strictly required. As you might already figure out you need to be extremely careful when working with this user. A lot of power comes with a lot of respectability. To continue with the root user now we will learn a command that helps to change your session to other users. ler say you are rafael and you want to change to miguel or to root. Well “su” is the command that you can use for that un debian and in most Linux systems. You can execute this command by it self:
su ­

Now it will prompt you for the root password and after you introduce it correctly it will change to the root user. Or if you want to change to a specific user you can use su, followed by the user name.

su class

To know the user you are in you can use the who am I command again.

As some of you might have noticed there is a small difference in the prompt between the root user and the non-privileged user. the non-privileged user appears in the shell with a $ and the root user with a # symbol. Check out this example:
abel@khs01wxl001:~$ whoami
abel@khs01wxl001:~$ su
root@khs01wxl001:/home/abel# whoami
root@khs01wxl001:/home/abel# su abel
abel@khs01wxl001:~$ whoami

The linux systems and Debian as one of them works like a cage for users. If you are abel and you execute su, then you login to root. But the session for abel does not end. After you execute su and change to root you can go back to your old session. To do that you just have to execute the command “exit” and it will take you back to the old user.

Before we continue with other content related to the file system and the super user. Let me introduce a few other commands and concepts.

System restart and shutdown; init run levels-command

  • init 0 – Shootsdown the computer. DEPRECATED in favour of “shutdown -h”
  • init 6 – Reboots the system.DEPRECATED in favour of shutdown e.g.: “shutdown -r +1”
Homework A:
  • What are the init run levels?
  • There are other init run levels from 1 to 5. What do they do?

Command to view current the network configuration; ifconfig.

“The ifconfig  is used to configure the kernel-resident network interfaces.  It is used at boot time to set up interfaces as necessary. After that, it is usually only needed when debugging or when system  tuning  is needed.

If  no arguments are given, ifconfig displays the status of the currently active interfaces.  If a single interface argument is given, it displays the status of the given interface only; if a single -a  argument is  given,  it displays the status of all interfaces, even those that are down.  Otherwise, it configures an interface.”

Taken from ifconfig Debian official manual (man ifconfig)

Tor now we will use it just to view the network interface to view the interfaces configuration you just have to insert the command as root.

root@khs01wxl001:/home/abel# ifconfig 
eth0      Link encap:Ethernet  HWaddr 70:71:bc:b9:34:ad  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::7271:bcff:feb9:34ad/64 Scope:Link
          RX packets:29874506 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1161761 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:5595877026 (5.2 GiB)  TX bytes:213607775 (203.7 MiB)

lo        Link encap:Local Loopback  
          inet addr:  Mask:
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:333529 errors:0 dropped:0 overruns:0 frame:0
          TX packets:333529 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:123740836 (118.0 MiB)  TX bytes:123740836 (118.0 MiB)


Feel free to research about this very useful command.

Remote connections using ssh protocol.

“OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on. Users of telnet, rlogin, and ftp may not realize that their password is transmitted across the Internet unencrypted, but it is. OpenSSH encrypts all traffic (including passwords) to effectively eliminate eavesdropping, connection hijacking, and other attacks. Additionally, OpenSSH  provides secure tunneling capabilities and several authentication methods, and supports all SSH protocol versions”
Taken from: http://www.openssh.com/ on 2014-02-16.
In the other hand, the Debian Official CD version comes with the ssh client installed by default. (that means you can use it to connect to ssh servers). And the ssh server can also be installed from repository. here is as example of how to connect through ssh.
root@khs01wxl001:~# ssh root@
root@'s password:
Linux khs01sw10 2.6.32­5­amd64 #1 SMP Mon Sep 23
22:14:43 UTC 2013 x86_64
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to
the extent
permitted by applicable law.
Last login: Mon Feb 17 15:50:11 2014 from
Here in the first line you basically say that you are going to use ssh to connect with root at the host (ssh root@ If your connection is fine, the remote host has a ssh server running and you are allowed to connect from your IP address then you will be prompted for the password. Then insert the password and press enter and thats is it. You should login be logged in to the remote system. Only then you can execute any command on the remote system, like for instance init 6 to restart the remote system or also you can perform any other task there.

Mount command

As an additional homework lets call it B -I leave you the mount mount command
# mount
Research about how can we use the mount command?
File system Linux vs Windows

File system Linux vs Windows

Organization of the root directory and HDDs in Linux.

To organize the file system most modern Linux distribution like Debian use the File system Hierarchy Standard. That is an agreement between some authorities of the Free software, some companies and individuals to improve the systems efficiency and interoperability. As per Wikipedia:
The Filesystem Hierarchy Standard (FHS) defines the directory structure and directory contents in Unix and Unix-like operating systems, maintained by the Linux Foundation. The current version is 2.3, announced on 29 January 2004.[1]
Taken from: http://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
on 2014-02-16.

You can find more information about it here and here. but for now to continue let me just mention the main directories that we will use along



This classes. Please feel free to user the ls command and also the CD command from class 1 to understand this structure.

  • /etc – Configuration files for most of the
  • softwares eg: ssh, network, dhcp, etc.
  • /home – users folder exept for the root user
  • eg: class, abel, pedro, miguel, etc.
  • /var -variable data eg: databases, caches,
  • logs.

And secondly we will also work with:

  • /media- Is the mounting point for removable media.
  • /mnt- mounting point for temporary mounted file systems.
  • /boot- boot loader static files.
  • /bin – essential user command binaries

Also we will work with the root user’s folder. So I will leave a homework, for you to research about it.

Homework C:

  • Where is the root user folder?

Now to continue with the class lets first learn hot to edit with nano.

Editing files with nano.

“nano is a text editor for Unix-like computing systems or operating environments using a command line interface. It emulates the Pico text editor, part of the Pine email client, and also provides additional functionality. In contrast to Pico, nano is licensed under the GNU General Public License.”
Taken from: http://en.wikipedia.org/wiki/Nano_%28text_editor%29 on 2014-03-04
There are some other text editors like vi or vim both also for the shell and gedit or leafpad for the graphic interface. You can use the one you want or can. But in this classes I will assume you are using nano. Basics with nano:
  • To edit a file: $ nano /path/to/file.\
  • Nano internal commands:
    • CTRL + x: closes the file.
    • CTRL + o: saves.
    • CTRL + c: cursor position.
    • CTRL + k: cuts from nano.
    • CTRL + y: paste to nano from nano
    • CTRL + C cancels the current action if it’s not finished or says information about the cursor’s position.
Exersice 1: Create a text file called class1 in /home/class. Write some content and practice the commands from last slide.

The repository

“Commmonly refers to a storage location, often for safety or preservation. Many software publishers and other organizations

maintain servers on the Internet for this purpose, either free of charge or for a subscription fee. Repositories may be solely for particular programs, such as CPAN for the Perl programming language, or for an entire operating system. Operators of such repositories typically provide a package management system, tools intended to search for, install and otherwise manipulate software packages from the repositories. For example, many Linux distributions use Advanced Packaging Tool (APT), commonly found in Debian based distributions, or yum found in Red Hat based distributions. There are also multiple independent package management systems, such as pacman, used in Arch Linux and equo, found in Sabayon Linux.”
Taken from: http://en.wikipedia.org/wiki/Repository on 2014-02-16.
Now as the repository is formed by packages we have to define. What is a package?
“A package format is a type of archive containing files and additional metadata found on packages.While the archive file format itself is unchanged, package formats additionally specify the contents, such as requiring a manifest file or certain directory layout. The term is particularly used on Unix systems, and there are several formats available, both for Linux distributions and BSD systems, though the concept also includes pkg files on Mac OS X, MSI files on Windows, JAR files for Java, among others.”
Taken from: http://en.wikipedia.org/wiki/Linux_packages on 2014-03-04.
An other valid definition for package could be this one:
“In Linux distributions, a “package” refers to a compressed file archive containing all of the files that come with a particular application. The files are usually stored in the package according to their relative installation paths on your system. Most packages also contain installation instructions for the OS, as well as a list of any other packages that are dependencies (prerequisites required for installation.”
Taken from: http://www.internetblog.org.uk/post/1520/what-is-a-linux-package/ 2014-03-04.

Debian Package Management

apt-get – package manager
aptitude – higher level package manager.
  • aptitude install ssh
  • aptitude install mc
Homework C –
What us the diference between:
  • aptitude update
  • aptitude install
  • aptitude upgrade
How do you remove a packege?
How can you search for a package?
And that is it for today. On the next class we will discus about the package manager and we will install a DHCP server. be ready for it.



Network and DNS configuration Debian Linux – Class 4

Network and DNS client configuration; introduction

Network use of CPU resources

Network use of CPU resources

This post is part of a bigger Linux Debian administration material that you can access here.

Today we will deal with network and DNS configurations from command line. The graphical interface has different tools to configure the network and DNS, but this is a servers administrators post; so we will configure every thing from the command prompt. if you need more basic material explaining other aspects about Linux, Debian, basic commands etc, than you can go to the whole index of materials. We will only deal with IP version 4 (IPv4), but IPv6 is pretty similar. So you can learn IPv4 and then configure a network and DNS with IPv6 with just a few changes.


  1. Network and DNS client configuration; introduction.
  2. Network Configuration
  3. The loopback Interface
  4. Creating the network configuration to use a DHCP server.
  5. Creating the network configuration to use a static IP address.
  6. DNS client configuration.

Now the main resources that I have used to create this material are the Debian network interfaces manual and the resolv.conf. You can access it by typing the following.

man interfaces
man resolv.conf

And the official’ Debian website material that you can find in the following link.

If you want to configure a network from the command prompt you have to know how to edit a file and some basic commands (Class 2 listed at the en of this page). In this material we will use nano for that purpose . Any way I will try to be as specific as I can and you can use any other editor of your preference. Also is advisable to have some knowledge about creating subnetworks and IP addresses. Lets start!

Network Configuration

The first thing that I am going to remind you off, also from Class 2 is a network command:

ifcofig: it lists your network interfaces; names, Mac Address (HWaddr), IP addresses (inet addr), Network mask (Mask), Broadcast (Bcast). For the Windows Network guys is similar to ipconfig /all. To test it you just need to run this in a root command prompt.

root@khs01sw10:~# ifconfig
 eth0      Link encap:Ethernet  HWaddr 08:00:27:a0:7e:72
 inet addr:  Bcast:  Mask:
 inet6 addr: fe80::a00:27ff:fea0:7e72/64 Scope:Link
 RX packets:831736957 errors:0 dropped:0 overruns:0 frame:0
 TX packets:1006510543 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000
 RX bytes:673686597602 (627.4 GiB)  TX bytes:685797076123 (638.6 GiB)

lo        Link encap:Local Loopback
 inet addr:  Mask:
 inet6 addr: ::1/128 Scope:Host
 RX packets:293263 errors:0 dropped:0 overruns:0 frame:0
 TX packets:293263 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:0
 RX bytes:103963497 (99.1 MiB)  TX bytes:103963497 (99.1 MiB)

When you do ifconfig it shows a lot of text. Of course it depends on how many interfaces you have. For a computer with only one network interface (what we “normally” use as a workstation), it should show only 2 blocks of text. One corresponding to the Network interface. Normally this network interface is called eth0 for Ethernets and wlan0 for wireless connections. And an other one corresponding to the loop back interface.

The loopback Interface

“The loopback device is a special, virtual network interface that your computer uses to communicate with itself. It is used mainly for diagnostics and troubleshooting, and to connect to servers running on the local machine.”

Taken from: http://askubuntu.com/questions/247625/what-is-the-loopback-device-and-how-do-i-use-it on 2014-03-03.

Creating the network configuration to use a DHCP server.

Network Interface file back up.

Network Interface file back up.

Both of them, the loopback and the Ethernet interface have more or less the same information. Just that loopback is a lot simpler than eth0. But to summarize you need to know is that net ifconfig command shows the network configurations Currently running. It gives the network interfaces names, Mac Address (HWaddr), IP addresses (inet addr), Network mask (Mask), Broadcast (Bcast).

  • (Optional) First step. Lets backup the network interface content. To do that we have to edit the file /etc/network/interfaces.
root@khs01sw10:~# nano /etc/network/interfaces

It will show the content of a text file. the first action every time that you are going to change a configuration file is to backup the original. so using CTRL+o, we will save the file with a different name and then we will close it. After that just open again the file in /etc/network/interfaces. As we have a backup we can just delete every thing a create out own content.

Note: In case we make a mistake we can always go to our old configuration by creating renaming the backup file to interfaces. for that we can use the following command.

mv /etc/network/interfaces.back /etc/network/interfaces

And it will move the file /etc/network/interfaces.back with a different name to /etc/network/interfaces. Also if we still need to leave a copy we can use the command cp with the same arguments. To get more information about this commands you can use man cp and man mv.

cp /etc/network/interfaces.back /etc/network/interfaces

Now lets edit the file lets delete every thing in the file and lets create our own content.

  • Second open the file as I said with:
nano /etc/network/interfaces
  • Delete the content of the file. Al the text inside. for that you can just use Delete key, backspace or CTRL+k key to cut line by line.
  • write the following on the file:
auto lo
iface lo inet loopback

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

“Auto Ethernet” and “Auto eth0”

Auto Ethernet means “Select an Ethernet interface automatically”

Auto eth0 means “autoconfigure the eth0 interface”.

taken from: https://wiki.debian.org/NetworkManager on 2014-03-03.

  • Save using CRTL+o again. and we are done with the withing in the network file.
  • Restart the network interface. This step is basically test the configuration file integrity and reload the configuration from the file to the actual interfaces.
root@khs01wxl001:/home/abel# service networking restart
[warn] Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning).
[....] Reconfiguring network interfaces...Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth0/70:71:bc:b9:34:ad
Sending on   LPF/eth0/70:71:bc:b9:34:ad
Sending on   Socket/fallback
DHCPRELEASE on eth0 to port 67
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/70:71:bc:b9:34:ad
Sending on   LPF/eth0/70:71:bc:b9:34:ad
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to port 67 interval 4
DHCPDISCOVER on eth0 to port 67 interval 10
DHCPREQUEST on eth0 to port 67
bound to -- renewal in 276 seconds.
ifup: interface eth0 already configured

If you receive this same warning do not worry, the warning is normal. It is just letting you know about of a configuration command that is deprecated and therefore is not supposed to be used any more.

 Creating the network configuration to use a static IP address.

To create an static IP address to access the network, the procedure basically is the same. The only difference is that you have to change the content of the configuration file to something something like this:

auto eth0
allow-hotplug eth0
iface eth0 inet static

After restarting it is supposed to work just fine.

DNS client configuration

To connect to external resources using network names instead of IP addresses, the computer needs to use the DNS service. This service is very useful to translate from for instance php.net to the actual IP of the web server wherever this resource is located. In Linux systems all the DNS configuration for the client are located in a single file in etc or otherwise pointed from this file. The file is called resolv.conf.

The resolv.conf configuration file

“The configuration file resolv.conf at /etc/resolv.conf contains information that allows a computer connected to a network to resolve names into addresses. (Note: Do not confuse this configuration file with the program resolvconf, which unfortunately has a nearly identical name.)

The resolv.conf file typically contains the IP addresses of nameservers (DNS name resolvers) that will attempt to translate names into addresses for any node available on the network. There will be a line or lines that look like this:


In this example, the system is using nameservers at the IP addresses and Simply edit the file and enter the IP addresses of the nameservers you need to use after each nameserver. Add more nameserver lines if you have more nameservers. Don’t use this method if you have the resolvconf program installed.

The resolv.conf configuration file has many other options for defining how resolver looks up names. See man resolv.conf for details.”

Taken from: https://wiki.debian.org/NetworkConfiguration on 2014-03-03.

So basically you just have to open the file with nano or any other editor and change it to your prefered DNS.

root@khs01wxl001:/home/abel# nano /etc/resolv.conf

This configuration is named should contain something like unless you have a DNS configuration handler like resolvconf.

domain gabs.hospitals.moh.gov.bw
search gabs.hospitals.moh.gov.bw

And that is basically it. Today we have configured the network and learned how to change the DNS configuration. i hope that this knowledge is useful some how for you, if you have any question or you see any error, please feel free to post it.

Debian GNU/Linux Introduction Class 1

Debian Linux Evolution.Introduction to GNU-Linux.  Linux Environment in Princess Marina Hospital; Servers, services and workstations.

This post is part of a bigger Debian material that you can access here.

Even when this GNU/Linux Debian classes are for Information Technology personnel if you are starting you might have a lot of question.

What is Debian? What is Linux? What is GNU? What is Debian GNU/Linux? what is a Distrubution? A Kernel? Are they all the same? Is Linus Torvalds the author of every thing?
Not intending to answer all of them I will just quote some clever guys from out there.

The Kernel




“A kernel is the central part of an operating system. It manages the tasks of the computer and the hardware -most notably memory and CPU time. There are two types of kernels:

  1. A microkernel, which only contains basic functionality;
  2. A monolithic kernel, which contains many drivers [Linux].
A computer user never interacts directly with the kernel. It runs behind the scenes and cannot be seen, except for the text logs that it prints.”
Taken from: http://simple.wikipedia.org/wiki/Kernel_%28computer_science%29 on 2014-02-12
Nice and simple, so the kernel is the middle man between me and the computer hardware.

Linux – GNU/Linux

  • “Many Linux users are familiar with Linux being called “GNU/Linux”. This means something special. “GNU” refers to the userland and “Linux” refers to the kernel. Now, you may be wondering if these two components can be swapped. Yes, they can.
  • For example, in the beginning of Linux’s history, the GNU community had no kernel at the time and Linux was just a kernel. So, they put the two projects together. Today, the GNU community has a kernel called “Hurd”.
  • They then swapped the Linux kernel with the Hurd kernel to make “GNU/Hurd” systems. For instance, Arch exists as “GNU/Linux” and “GNU/Hurd”.
  • Not only do various userland and kernel combinations exist, there are different Linux kernels. Also, Linux is not the only perating system with a module (obvious, right?).”
Taken from: http://www.linux.org/threads/the-linux-kernel-types-of-kernels.5409/ on 2014/02/11.
Evolution Of Linux

Evolution Of Linux

The fist bullet is very important where he says that a lot of Linux users are aware that the term GNU/Linux.That GNU is the part of the Operating System (OS) that does the direct work with the user (understand that user does not mean only someone who is using a computer). Then Linux refers to the kernel only, that is the part of the OS that interacts with the hardware.

So basically they have joined GNU and Linux and created GNU/Linux. Of course afterwards both projects have evolved and improved their different components. And an other incredible thing that happened was that when people saw that they could take the Software modify it and create their own new code and make it available again, more and more people started to cooperate to create their own versions of GNU/Linux or to contribute to existing ones. Check out the picture to get a rough idea of what I am talking about.


This next picture is a summary of only the most important GNU/Linux distributions created after the code was released for free. What happened at that time was that some distribution appeared and they evolved to our days becoming better and better and better. Also in important to remark that every time that someone does a good contribution this code is free (generally) and it is incorporated again in other distributions making every generally better or at least more updated with the latest free software.

Linux distribution time-line evolution

Linux distribution time-line evolution

The main branches on this graphic are Red Hat from 1994 with child distributions like Mandrake, PCLinux, CentOS, Mandriva, Fedora Core and some other important distributions. Also we have Suse Linux also from 1994 made by Novel Enterprices. An other of the important branches id Debian, it was started back on 1993, for more information read the following paragraph taken from Debian’s project website.

“The Debian Project was officially founded by Ian Murdock on August 16th, 1993. At that time, the whole concept of a “distribution” of Linux was new. Ian intended Debian to be a distribution which would be made openly, in the spirit of Linux and GNU … The creation of Debian was sponsored by the FSF’s GNU project…”

Taken from: https://www.debian.org/doc/manuals/project-history/ch-intro.en.html on 2014/02/28

Now from Debian we also have a whole lot of good derived distributions, like for instance Knopix,Dam Small Linux or the Ubuntu family that started on 2004.Otherwise along this classes we will be working with Debian mostly. But at the end if you know how to work with one of the distributions. You are very likely to be able to work with other distributions with small or no help.


“The Debian Project (…) is a free operating system. An operating system is the set of basic programs and utilities that make your computer run. At the core of an operating system is the kernel. The kernel is the most fundamental program on the computer and does all the basic housekeeping and lets you start other programs.
  • Debian systems currently use the Linux kernel or the FreeBSD kernel. Linux is a piece of software started by Linus Torvalds and
  • supported by thousands of programmers worldwide. FreeBSD is an operating system including a kernel and other software.
  • However, work is in progress to provide Debian for other kernels, primarily for the Hurd. The Hurd is free software produced by the GNU project.”
Taken from: http://www.debian.org/intro/about#what 2014/02/11.
To get more information about the GNU/Linux and Debian you can go to the official websites:
  • Debian Project: www.debian.org
  • Linux Project: www.linux.org
  • GNU project: www.gnu.org


An other of the Linux myths if that Linux has no graphic interface or very rudimentary ones, the true is that there are some very good projects with great future, although there is still a lot to be done. For instance we have Gnome Prject, check out the image, we can get more information about this project here. but Linux has a lot other graphic interfaces among them KDE the closest competitor to gnome or fresh one like LXDE and XFCE. But this classes are not for graphic fans but for Network administrators, so I will not talk to much about graphics any more along the course. We will use the Text Terminal mostly, the scary black Screen that many people are afraid of. The true is that this terminal is very pwoerful and you can perform a lot of activities nicely using it, and also most of the work is not like rocket sciences so we can learn it and that is what we will do along the classes.

Debian and Linux command prompt

We are going to start with real Linux. So if you do not have your Debian GNU/Linux workstation this is the moment to get it. the first thing that we will do is to change to a text terminal you can do that by pressing:

  • CTRL+ALT+(F1 to F6) Opens a Text terminal.

Now to switch back to the graphic terminal you can press:

  • Alt+F7 Opens the graphic terminal.

And you can also open a terminal from the graphic interface of your computer. by going to activities and typing terminal in the search box.

Linux Terminal

Linux Terminal

If you open the you text terminal (black screen) you have to login with a user, because it will prompt you immediately, there you are supposed to put your user and your password. As a curious detail in the Linux terminal when you type a password it does not show the dots that we might be used to in other  systems, so someone might think that is not typing but the terminal is really recording every key that you press. This was done that way for security reasons.

Once you are in you can type commands already, lets do for instance:


It should return your user name.

root@khs01sw10:~# whoami 
Debian man command linux

Debian man command linux

So running commands is simple. But this is not it, if you do not know how to use a command you can use the commandman passing an other command as augment and it will tell you what it does.

man <CommandIDon’tKnow>

for instance:

root@khs01sw10:~# man whoami

And it will show you the Linux manual for the command. the manuals are always something like  the picture. Also if it is not enough you can go to Internet and research about ways of using any command. To get out of the manual you can just press q key and it will exit the manual.

That is what I had prepared for today, let me just add the homework that you can do using the manual and we will met in the next class.

Homework: Explain how to use this commands on a Debian environment.

 ls -la
 passwd user

Thank you for your time.


Linux Server Classes (Introduction)

Linux Server Classes; About this group of materials.

Linux Versions with Tux

Linux Versions with Tux

I have started this post to bring Linux classes to any one in Gaborone, Botswana. Also you can access and use this materials any where else in the world. The only conditions is that you have to be willing to learn new and useful stuff from the free software movement. This Linux skill sharing was done for the ICT staff in Princess Marina Hospital in Gaborone, Botswana. The main objective was to socialize the Linux knowledge. These skill sharing classes are not part of any certified course. They are just the product of the personal experiences of a Linux and windows network administrator. Linux is currently being used at the hospital in most of the servers and a few workstations. But the course is thought as a General introduction to networking using GNU Linux Debian.


 The online HTML materials are supposed to be self explainable enough to be used as a self-study and learning material with no assistance. If you have any doubt you can always post then and I will try to answer. SO YOU DO NOT NEED TO GO TO THE CLASSES TO LEARN OR EVEN BE IN BOTSWANA. You can just consult the HTML materials and post your specific questions in the class. Otherwise the materials are being create was we speak, so some of the classes might have some gaps. Feel free to post any error you find or any suggestion of a material to add.


  1. About this material
  2. Content
  3. Course Classes Content
  4. The Linux Classes Content

Content of the classes


Along the classes you will learn about the main services on a network and how to install, configure and maintain them. GUN Linux Debian was the distribution selected. That was due to Debian’s popularity all over the world and it’s robustness for different server environments. Along the course we will deal with with a lot of useful staff.


  1. Introduction to Linux. The Debian operating system. GNU Linux Environment in Princess Marina Hospital. The server, services and workstations using Linux.
  2. How to execute Linux commands on the prompt. The edition of text file and the suse of configuration files. how to install software. The use of repositories and packages. use of the following commands: cat, ls, pwd, whoami, passwd, nano, mkdir, touch, rm, aptitude, apt-get. How to configure a network configuration.
  3. The DHCP service and specifically ISC DHCP Server. How to install it and basic configuration. More useful commands: service, tail, ps, grep, uname, make, make install, aptitude, purge.
  4. The DNS server and specifically Bind. How to install and basic configuration. How to create a Zone, reverse zone, forwarders, zone transfer, etc.
  5. The Web serverand specifically Apache 2. Installation and basic configuration. Virtual host, Apache module.
  6. Proxy server; squid. Installation and basic configuration. Acls: Authentication configuration basics, sarg, cache configuration.
  7. Linux start up and Linux crontab configuration. How to make a command or a software to execute when the system starts, how to create chronological/periodical tasks.
  8. Virtualization; Virtual Box. Installation and basic configuration, commands headless Virtual machines.
  9. Windows file sharing service; Samba Service, printing servers, introduction to integration with active directory.

Before we begin I have to add the main materials to start with this course: https://www.debian.org/CD/ installation images or any other preferred installation that you want. Also if you first want to know what is possible with Linux to set your beginner goal you can check out this article. also the main philosophy of this course is : “I can show you the door, you have to open it” that means that I will try to teach a lot of thing in every class but you have to put your own effort.

The Linux Classes:


8. Squid3; install and configure a proxy server part IView

Class Title HTML self explainable Class Shorter slide presentation
1. Introduction to GNU/Linux Debian: Linux Evolution. Linux Environment, Servers, services and workstations. View PDF
2. Debian Basic Commands Debian file system, superuser, editing text files, executing commands in the shell, configuring, installing and uninstalling packages. View PDF
3. DHCP server basic principles; installation and configuration. View PDF
4. Network and DNS client configuration. View PDF
5. DNS server configuration. View
6. Apache 2 web server; install and configure a virtual host View
7. Virtualbox; install and configure a virtual machine View
8. Squid; Introduction, part I View
9. Squid; working example a proxy server part II View

In case one any question you feel free to leave your message here as a comment.

MS Dynamics Business intelligence Specialist wanted.

One of our customers wants a to get some MS Dynamics graphics, Maps with coordinates, etc. from their existing MS Dynamics system running. If you have what it takes, please send relevant experience, rates and references.
Please contact me with the information required and we will come back to you

Closing date: End of February.

Crystal Reports and Java expert needed

We need a crystal reports specialist to work as a consultant on some project for one of our best customers. They have an ERP system done in java with reports in Crystal Reports. They want some extra custom reports, so the main task is going to be related to the reports and not java programming but could also be included. Basically they will send the reports wanted once we have the specialist. Please send me the works you have done related to Crystal reports and having some Java knowledge is a plus and some references also send your hourly rate or some figures about how would you change for your job. We need someone able to spend time to understand the customer requirements and complete the work from A to Z.

Please contact me with the information required and we will come back to you.

Closing date: End of February.


Animate on linux command prompt gif

To Animate images (even simple ones) sometimes difficult to achieve, and not every one has 700.00 USD to pay for the adobe products or you just do not want to pay 20 USD for adobe cloud for a simple animation. Here you can find a note to know how to create .gif animation from the command prompt in linux (in my case Debian).

The first is to install imagemagick.

sudo apt-get install imagemagick

Them Go to the folder where you have the images to convert in the animate .gif  e.g.

cd /home/abel/img

After that you can convert all of your images to the size that you need for the animate slide show:

 mogrify -resize 640x480 *.png

If you have already done that with any other software like Gimp you can omit this step last step.

Then you actually animate .gif with this command:

convert -delay 20 -loop 0 *.png myimage.gif
Animate: Digital Experience Shop

Animate: Digital Experience Shop

Now; -delay 20 is the time to change the image, may be you need to add a different timing. Loop 0 is to repeat infinitely, if you want to do it just a few times you can change this value. *.png because all the images in the folder where I am are all .png, but you can do it also with jpeg. If you want to animate a complex image like this one. I mean animate every single element on this picture, I think you need to use something more complex but for simple animations like 2 or 3 logos rotating should be good enough.



CSS 3 to style a Symfony 2 project

CSS 3 and Symfony 2

CSS 3 and Symfony 2

Symfony 2 and CSS 3 is the subject of this how to. Styling a project can make the difference between buy or not to buy. so even if you have the best functional application, you need to css style it nicely to be able to attract people to it. We will go through styling your project from ground and also some additional tips that I have learn along my day to day work with Symfony 2.

Note: I have created a few more Symfony 2 posts, saying how to install a server and also about how to change a Symfony 2 project from development to production environment. our you can check all of my Symfony related posts here.

Well, when you are going to style a project the first thing is to add the style sheets. In Symfony 2 for instance in my base.html.twig (Find it in SymfonyProject/app/Resources/views) I has this in my header:

{% stylesheets 
 <link href="{{ asset_url }}" rel="stylesheet" media="screen" />
{% endstylesheets %}

Where @OsdRetireBundle is my @MyProjectMyBundle and then  /Resources/public/css/main.css is the path to the actual css style sheet. Now we have added the reference to a style sheet to the project. But the style sheet does not exist in our Symfony 2 project. So we create it, and for that we create the folder called public. If it does not exists in SymfonyProject/src/Osd/RetireBundle/Resources/public/css Osd is my project name, RetireBundle is the name of my bundle. We create it and  do the same also with css inside it. Then create your style sheet page in my case main.css. Now we have created our style sheet in Symfony 2 the rest is the same as any other css style sheet, I have this form:

<div id="search-box">
 <fieldset><legend>Select the search criteria</legend>
 {% block form_row %}
 {% spaceless %}
 <form action="{{ path('osd_retire_searchpage') }}" method="post" 
 {{ form_enctype(searchWorkerForm) }} >
 {{ form_row (searchWorkerForm._token) }}
 <div id="omang-label">
 {{ form_label(searchWorkerForm.omang) }} 
 {{ form_errors(searchWorkerForm.omang) }}
 {{ form_widget(searchWorkerForm.omang) }}
 {% if searchWorkerForm.workerTitle is defined %}
 <div id="title-worker">
 {{ form_label(searchWorkerForm.workerTitle) }}
 {{ form_errors(searchWorkerForm.workerTitle) }}
 {{ form_widget(searchWorkerForm.workerTitle) }} 
 {% endif %}
 <div id="name-worker">
 {{ form_label(searchWorkerForm.workerName) }}
 {{ form_errors(searchWorkerForm.workerName) }}
 {{ form_widget(searchWorkerForm.workerName) }} 
 <div id="surname-worker">
 {{ form_label(searchWorkerForm.workerSurname) }}
 {{ form_errors(searchWorkerForm.workerSurname) }}
 {{ form_widget(searchWorkerForm.workerSurname) }} 
 <div id="Worker-status">
 {{ form_label(searchWorkerForm.aIdWorkerStatus, 'Worker Status') }}
 {{ form_errors(searchWorkerForm.aIdWorkerStatus) }}
 <div id="status-worker">{{ form_widget(searchWorkerForm.aIdWorkerStatus) }}</div> 
 <div id="birthday">
 {{ form_label(searchWorkerForm.birthDay) }}
 {{ form_errors(searchWorkerForm.birthDay) }}
 <div id="worker-birthDay">{{ form_widget(searchWorkerForm.birthDay) }}</div>
 <div id="Date-of-employment">
 {{ form_label(searchWorkerForm.dateOfEmployment) }}
 {{ form_errors(searchWorkerForm.dateOfEmployment) }}
 <div id="first-appointment">{{ form_widget(searchWorkerForm.dateOfEmployment) }}</div>
 <div id="File-number">
 {{ form_label(searchWorkerForm.fileNumber) }}
 {{ form_errors(searchWorkerForm.fileNumber) }}
 <div id="fine-number-field">{{ form_widget(searchWorkerForm.fileNumber) }}</div> 
 <div id="form-submit">
 {{ form_widget(searchWorkerForm.search) }}
 {% endspaceless %} 
 {% endblock form_row %}

Note: Of curse this is not the only content of the project.

And the style for it are these:

html, body, div, span, applet, object, iframe,
 p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
 border: 0;
 font-family: inherit;
 font-size: 100%;
 font-style: inherit;
 font-weight: inherit;
 margin: 0;
 outline: 0;
 padding: 0;
 vertical-align: baseline;
 font-family: Tahoma, Geneva, sans-serif;
html, body {
body {
 padding: 0 2em; 
 background-size: cover;
/*background-size: cover;*/
 background: #86c9f5 no-repeat ;
/* IE10 Consumer Preview */ 
 background-image: -ms-linear-gradient(top, #589ac4 0%, #000000 100%);
/* Mozilla Firefox */ 
 background-image: -moz-linear-gradient(top, #589ac4 0%, #000000 100%);
/* Opera */ 
 background-image: -o-linear-gradient(top, #589ac4 0%, #000000 100%);
/* Webkit (Safari/Chrome 10) */ 
 background-image: -webkit-gradient(linear, left top, left bottom
 , color-stop(0, #589ac4), color-stop(1, #000000));
/* Webkit (Chrome 11+) */ 
 background-image: -webkit-linear-gradient(top, #589ac4 0%, #000000 100%);
/* W3C Markup, IE10 Release Preview */ 
 background-image: linear-gradient(to bottom, #589ac4 0%, #000000 100%);
table {/* tables still need 'cellspacing="0"' in the markup */
 border-collapse: separate;
 border-spacing: 0;
caption, th, td {
 font-weight: normal;
 text-align: left;
a img {
 border: 0;
#separator {
 padding: 0.5em;
 background-color: #fff;
 -moz-border-radius: 20px;
 -webkit-border-radius: 20px;
 -khtml-border-radius: 20px;
 border-radius: 20px;
 padding-top: 2em;
 padding-bottom: 2em;
 text-align: center;
 position: relative;
 a:active {
 color: #1982d1;
 /*font-weight: bold;*/

/* Headings */
h1,h2,h3,h4,h5,h6 {
 clear: both;
/*Site title, titulo del sitio*/
#site-title {
 text-align: right;
 padding-bottom: 0.1em;
 padding-right: 1em;

#site-title a {
 color: #660066; /*#ED6464*/
 font-size: 24px;
 font-weight: bold;
 line-height: 28px;
 text-decoration: none;
 font-family: Tahoma, Geneva, sans-serif;
#page-title div{
 float: left;
 width: 10em;
 text-align: right;
 clear: left;
 margin-right: 5px 
#site-title a:hover,
#site-title a:focus,
#site-title a:active {
 color: darkblue; /*#1982d1*/

 padding-bottom: 1em;
 text-align: center;
#nav a{
 color: crimson;
 text-decoration: none;
 font-family: Tahoma, Geneva, sans-serif;
 font-size: 17px;
#nav a:hover,
#nav a:focus,
#nav a:active {
 color: #1982d1;
 font-weight: bold;

#footer-area a {
 color: #CCCCCC;
 text-decoration: none;
 font-family: Tahoma, Geneva, sans-serif;
 font-size: 12px;
#footer-area a:hover,
#footer-area a:focus,
#footer-area a:active {
 color: #1982d1;
 font-weight: bold;

 background: -webkit-gradient(linear, bottom, left 175px, from(#CCCCCC), to(#EEEEEE));
 background: -moz-linear-gradient(bottom, #CCCCCC, #EEEEEE 175px);
 background: -webkit-linear-gradient(#CCCCCC, #EEEEEE);
 margin: auto;
 font-family: Tahoma, Geneva, sans-serif;
 font-size: 13px;
 line-height: 24px;
 color: #09C;
 text-decoration: none;
 -webkit-border-radius: 10px;
 -moz-border-radius: 10px;
 border-radius: 10px;
 border: 1px solid #999;
 border: inset 1px solid #333;
 -webkit-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
 -moz-box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
 box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.3);
 position: relative;
 width: 85%; 
fieldset {
 text-align: center;
form label {
 float: left;
 width: 40em;
 text-align: right;
 clear: left;
 margin-right: 15px;
input {
 display: block;
 margin:5px 0;
#worker-title {
 width: 46em;
 margin:5px 0; 
#status-worker {
 float: left;
 margin:5px 0; 
 float: left; 
 float: left;
#first-appointment {
 float: left; 
#fine-number-field {
 float: left;
#form-submit {
#search-results {
 width: 100%; 
 margin: 0 auto;
Symfony 2. Retirement system search

Symfony 2. Retirement system search

The end result is the for as shown in the next image.

This is it for today, as you might have appreciated creating styles in Symfony 2 is very possible.

Thank you for your time.

GLPI for technical support, the free tickets System.

GLPI Statistic Charts

GLPI Statistic Charts

GLPI is a free Tickets System distributed under GNU/GPL license. But When do you need a ticket system like this? This is one of the biggest challenges of the technical support  companies or technical support teams. If they have to deal with many customers and the response times are critical. To be able to track, follow and organize the work of the different technicians that are supposed to do the actual job. In this scenario the paper work always becomes a challenge, accessibility, loose of information, spell and writing errors, individual and collective statistics, reporting, etc.

This GLPI post is part of the promised series of business automation solutions, so far I have this post and the one about GPS Fleet tracking. And also you can take a look about Using Linux servers for network infrastructure.

In the other hand if the information is in digital format. It can be backed up easily. And if the system is web based like GLPI you can access it from any Internet connection. And the rest depends on every one’s needs. You can have fancy charts that are easier to read. Reports about the performance of the team on a particular employee, etc.

Now you can read about the GLPI project official features here. From my point of view the most important features are:

  1. OCS inventory integration module. This is a project to automate the inventory of computers. Integratin GLPI with OCS You receive information about your computers every day and can have statistics about your inventories easily. and also asing job to a specific computer or guess out how many ram memories your company is going to need in one year based on historical information. I am going to create an other post about OCS in the near future.

    GLPI central console

    GLPI central console

  2. Easily extensible through your own plugins. You just need to know some programming and understand GLPI. and you can develop your own piece of software to work with it.
  3. A reach statistical module with very self explainable graphics.
  4. A robust security module.
  5. Facility to track workers behavior.
  6. Contact management.
  7. Budget management.
  8. E-mail automated reminder or adviser.
  9. Knowledge base

GLPI has a lot other functionality. But those are the ones I have been using and enjoying  more along a few years. Now the system requirements are PHP5.2, a web server like apache, IIS or other and MySQL server 5. As you might have notice already if you know these technologies, the system is multiplatform and it can work under windows Linux or any other system always that you can meet it’s requirements.

Thank you guys for reading this. If you want to maintain your own server and have questions, feel free to ask here. If you are looking for someone someone to do it, check out this sample list of figures and prices.






Useful Notes as a solution to punctual problems

I tend to forget where I find the solution for my problem very often, so I will start recording some of the solutions that I find for my different problems, if any one find this list some how interesting or useful in the future please consider leaving a comment or suggest other useful information that you have found in internet:

  1. Move a Symfony 2 Project to production environment in Linux as a solution. Abel Guzman, post: 2013-11-08
  2. Creating entity relationship with Symfony 2 and Doctrine 2. Official Documentation: Symfony; The Book, 2013-11-08
  3. Git hub getting started. I have created my first project in Git hub, for that I have followed this guide in the official page and it worked for me to create on file but then it was impossible for me to upload a whole project and to modify that project so I asked here. Not it is working. 2013-11-22
  4. On Debian 5, 6 and 7 to execute a command at start-up (boot) you can save the command in /etc/rc.local. I have used it for instance to start a headless Virtualbox Virtual Machine and it works perfectly. any way this subject requires more investigation. probably in the future I will write a post about it.
  5. I am learning python and this website, has been useful.
  6. to install a proper development environment in python you need pip, distribute, nose, virtualenv. on 2014-03-31
  7. Install Debian 7 using expert mode. On 2014-10-29.
  8. Routing on different systes. This article is good, even when it has an exact copied paragraph from Wikipedia.