Why my blog was on hold.

Hey All!

 

Oke I know it’s been a while, let me explain…

First of all I had major computer problems, my virtual boxes where all corrupted or so it appeared. After some back and forward mailing with Oracle (yeah help desk actually replies) they said the problems I had could only be solved by a format.

 

What problems you ask?

Well, I’m running windows 8.1 64bit so I can have 64bit virtual machines, but virtual box did say I’m only allowed to 32bit and virtualization isn’t available.

What!?! For those that don’t know, virtualization need to be enabled in the bios of your system. So checked that and it was on.

Oracle gave me tips, also I asked 2 lectors of me, and they hadn’t a clue either. Final mail from Oracle, sorry only thing we can think off is to format you system. Tum tum tummmmmmm…

So I did, whoop give the inventor of SSD a statue! It installs fast, I installed all my software again and then virtual box: yes it worked!

Next day it failed again :s same problems, I was in distress now, what had changed? I couldn’t figure it out.

Remember that I told you at the start of the blog I was in school too? Well our lectors where dumping sh*t load of work on us. That is passed for now, I can focus again bit more on other projects, like this blog.

I was telling a friend of me the problem that I had (friend is an understatement tbh, Gunther is my best friend for over 20 years now, yeah I know we are old timers whit our 30y +), while I was formatting my newer laptop for school purposes he was Googling for me (I had done that multiple times, but hey 4 eyes see more then 2) he found lots of things but nothing that I didn’t find. Virtual box was working on the laptop now and I was glad, I had the plan now first of all install virtual box then test it and then start installing other software one by one. Then bam, virtual box was failing again, after installing Visual studio 2013… That’s when I saw in the install files that it installs a newer version of hyper-v. Whit that added in the Google troubleshooting search I came on a tech post that tells u to disable hyper-v and it should work.

Simply open your windows PowerShell and be sure you are admin or have the rights to and execute following command: bcdedit /set hypervisorlaunchtype off

Now all works!

 

The Lamp stack post follows soon now, then I gone do less bigger setups so there will be a bit more posts.

Till soon,

Take care all!

David Duym

 

Ps: you were wondering if my virtual projects were damaged? Nope they all are running fine 😀

Finding your dream job… Experience vs motivation and enthusiasm.

Hey all,

Just a quick post, my next blog will be the LAMP-stack as promest, but I wanted to do this first. And no it won’t be a rant.

As you know I’m a 32 year young Belgian, with great passion in the ICT world. I did some jobs, which I like doing but I wanted to follow my passion, while studying at HOGent for my career switch and to feed my hunger for knowledge. This way I want to find a job… and there we go…

Sending from January till now around 80 applications to job offers, I just checked my mail box to be 100% sure what I’m going to say next… I got 6 replies’ from companies that is 7.5% of all the addressed companies that just took the time to read and reply…

I had 3 or 4 job interviews so far and all ended same way: ”Although you are an enthusiastic driven person who is clearly into ICT, we took someone with experience for the job. Thank you for the interest in our company and good luck in the future.”  That is the story so far.

I had the chance to have a good talk with a job consult and he told me that statistics tell that an IT’er stays about 5 to 7 years in the same company and then leaves. But companies that invest in people at the start, by giving them a chance to prove themselves and intern education, can convince most of their employees to stay till the end of their career.

Maybe companies should take a moment here and reflect on that thought.  Beware I have my secondary degree in economics so I do understand how a company works. They want a new member to be deployed at once, so there would be minimal work loss a.k.a. money loss. But if they would gave some internal lessons, and let the new employee run for some time with an experienced employee, I’m sure it would be so much better for the new member and for the company. In that way less time is lost and activities can go on; Ok, a bit slower due to learning purposes.

Because of the fast approach, companies already lost a lot of people that could have worked for them. I know people, including myself that had missed opportunities just because we had no experience. But what people like me lack in experience, is compensated by the tons of motivation and enthusiasm to take the bull by the horns and make the company proud.

So this is it what I wanted of my chest. I hope what I wrote here makes sense to you all.

Take care and ty for your time!

David Duym

SSH… What is it and what to do with it?

Hey ALL!

SSH

SSH… what the hell is he writing about?

SSH is a cryptographic network protocol for secure data communication, remote command-line login, remote command execution, and other secure network services between two networked computers. It connects, via a secure channel over an unsecured network, that server and client running, respectively, SSH server and SSH client programs. The protocol specification distinguishes between two major versions that are referred to as SSH-1 and SSH-2.

The best-known application of the protocol is for access to shell accounts on Unix-like operating systems, but it can also be used in a similar fashion for accounts on Windows. It was designed as a replacement for Telnet and other unsecured remote shell protocols such as the Berkeley rsh and rexec protocols, which send information, notably passwords, in plaintext, rendering them susceptible to interception and disclosure using packet analysis. The encryption used by SSH is intended to provide confidentiality and integrity of data over an unsecured network, such as the Internet. Source Wikipedia

There you have SSH in a nutshell.
Now we are going to deploy it on our CentOS installation.
I use the Virtual box CentOS on a Linux host system. But you can use it in a windows environment too. I will tell you what u need to download to get it working.
And that’s the reason I will be running it in a windows setup too.

If you use windows, then you need to download Git Bash to see what SSH does and what you can do with it.

Here is the link http://git-scm.com/download/win

Just install and run it.

As Linux user you don’t need to download additional software.

Here we go!

Check if ssh is running, in command you type:

service sshd status

If it is not running use the following command:

service sshd start

First you need to make a public/private key in order to let it work.

In command line:

ssh-keygen –t rsa

Public_private_key

As you can see on the screenshot, you will be asked 3 questions. Leave them blank just by pressing ‘Enter’.

When that is, done you need to copy the Public key to the server.

In command line:

scp ~/.ssh/id_rsa.pub [your username]@192.168.56.101:/home/[your username]/.ssh/authorized_keys

ssh copy

Some notes here:

  • The ip you enter, is the standard ip address of the Virtual box.
  • The password SSH asks is the user PW which you use to log in.

This is basically it.

sshviagitbash Screenshot of my Git-Bash Program

If you can’t log in you should see whether the SSH daemon is running.

In command line:

service sshd status

CentOS will tell u if it’s running or not.

You do this command line too:

service sshd [start or stop]

To start and stop the daemon ^^

If you want to run SSH on boot just type in command line:

chkconfig sshd on

 sshalwayson

Here you see I forgot the sudo command, it wouldn’t allow me to perform it, because it’s a root command.

Next screen shot shows you a running CentOS with Gith Bash open in windows 8.1.
Normaly I work on my Linux machine, but the essence of this post, is to show new possible Linux users that they can experiment with Linux, without formatting their system first.
Notice that the CentOS doesn’t appear logged in, but I am logged on the Git Bash Program. Easy isn’t it? You ask me why I do that? Under the screenshot I tell u why 😀

gitvbw8
Why do what we did?

Easy, try to see our CentOS now as a server. In companies, servers rarely have a screen let stand a keyboard and mouse connected. So we need to control, update, maintenance… our servers from the office or home. That is why we made an SSH connection. Note that in companies the standard SSH port (22) will be changed to something to their bidding. Otherwise a hacker doesn’t even need to perform a port scan.

This is it on SSH!

As always don’t hesitate to ask questions.

Take care ALL!

David Duym

Update

Hey ALL!

I promised u a LAMP stack… but I forgot to tell u about SSH. So this will be my next post.

From now on, I will visualise my posts more with screenshots, because… plain txt is… plain txt.

Also, someone told me that if this is a beginner Linux blog I should start with basic commands and that is what I’m going to do. I take tips and criticism under advice, it’s important to listen to what people say.

I will do my best to make a blog on why it’s best not to disable SELINUX.

These are my sources:

Ty for your time and you’ll read more soon!

Take Care

David Duym

Add a user and install some packages

Hey ALL!

 So as promised, I’m back to do some fun stuff with our freshly installed CentOS.

The command that u need to type are in italic and are underlined

Log in as root (remember bad practice, but for now we don’t have another option.)

 

So you’re logged in… we first need to check our network for a connection.

Check whether u have an ip address.

Commands u can use are:

 ip addr  or ifconfig

 

You’ll see now that there’s no ip… so use the next command:

cd /etc/sysconfig/network-scripts

 

If u do ls now u see the different network cards ifcfg-eth0 and so on.

Do vi ifcfg-eth0 and change following settings

DEVICE=”eth0”

BOOTPROTO=”dhcp”

ONBOOT=”yes”

 

Do it for ifcfg-eth1 too.

 vi ifcfg-eth1

DEVICE=”eth0”

BOOTPROTO=”dhcp”

ONBOOT=”yes”

 

A big advantage of Linux is that u don’t need to reboot your whole system, just do

service network restart (enter) and look … it’s magic 😀

 

Oke, now we are going to update our OS:

yum update (this will take a while)

Install extra packages to make life easier:

sudo

vimenhanced

wget

 

You do this as followed :

yum install [package name]  (this will take some time too)

 

Now we are going to add a user:

adduser [your name for example]

passwd [set your password]

If u do ls/home/ then u will see the new added user.

 

We will add the user to the group: ”wheel”

usermod aG wheel [then your user u made]

The  –a stands for:

-a, –append : add the user to the supplementary groups(s). Use only with the  –G

And the –G stands for

-G, –groups GROUP1[,GROUP2,…[,GROUPN]] A list of supplementary groups which the user is also a member of.

 Each group is separated from the next by a comma, with no intervening whitespace.

The groups are subject to the same restrictions as the group given with the -g option.

If the user is currently a member of a group which is not listed, the user will be removed from the group.

 

Now we use the command

visudo

Scroll down until u see the following line in the text

%wheel ALL=(ALL) NOPASSWD: ALL

Remove the # before the line

Important note: we do this to feed our laziness demon but never do that on a live production, because everyone in the wheel-group can do commands without password

 

Now we can start using our added user

 su [the added user]

The command line now will show u the name of the current users.

Remember now u can use commands like yum install but u need to place sudo in front of it.

It looks like this now:

sudo yum install

 

This is it, next time we set up an LAMP-server, ow yeah!

Don’t hesitate to contact me if u have questions!

Cya and take care All!

 

David Duym

What is Virtualbox?

Hey ALL,

I got some people that where asking, what is Virtual Box and what to do with it.

Virtual box, VMware and Microsoft Hyper-v are al software packages that in which u can virtualize a pc.

For example, your desktop runs windows 8.1 and you want to test how Linux would work without formatting your pc. U can use a virtual environment to set up a Linux pc, and it works both ways: when u use Linux and want to see a MS environment, u can do that. Mac-software is bit harder but doable if u want to see OSX Mavericks.

So the software uses your current setup and changes it into a virtual setup. If u have 8Gig ram u can safely use 4gig, the OS u run will detect the 4Gig. Be aware: it’s possible that your host machine is tanked by it in which case u should lower some settings (less ram, less CPU cores, etc…)

Here is a screenshot of my virtual box:

screen

 

Now u see, my GPU has 3Gig Ram and the system only uses 128mb. My Virtual Box uses 512MB Ram, but my host system has 8Gig of Ram on it.

It uses the resources of the host, but don’t let it use too much – I would suggest 45% max of it – otherwise, you host system may crash.

This is how u can use Virtual Box at home.

Virtual box is used a lot in professional setups, a lot of companies run virtual servers, because of lack of space for a server park, or because it’s not necessary to have 500 servers and so on.

I would say go out and try these virtual machines.

One last thing, it could be that u need to switch Virtualisation on in your Bios. On my desktop it was off by default. Virtual box wouldn’t run until it’s switched on.

 

Don’t be afraid to contact me, I try to answer as fast and good as possible.

Take care all

David Duym

Installing CentOS for the first time via Virtual box? 

These are the steps to follow, and things to take care off.

 Step 1 Download

Download Virtualbox with latest extensions

https://www.virtualbox.org/wiki/Downloads/

 Step 2 Getting the iso

We are going to work with a CentOS 6.5 Minimal installation

http://mirror.anl.gov/pub/centos/6.5/isos/i386/  for 32bit

http://isoredirect.centos.org/centos/6/isos/x86_64/  for 64bit

 Step 3 Setting up VBox

VBox settings: 256mb or 512mb ram

  • Create a new HDD, Dynamically allocated between 10 to 16 Gig is more than enough for now
  • In Storage tab: mount the iso, 32bit for a 32 bit machine, otherwise u will get a boot failure
  • In Network tab: u create 2 controllers : a NAT controller and also a Hoste only, normally the ip on that will be 192.168.56.101/24 or 192.168.56.102/24
  • In Display tab:  u don’t need to mess with it (for now) because we aren’t using a GUI

Step 4 Starting the install

Now this is all set, we are going start it J

  • In the boot Menu use the option: Install system with basic drivers
  • Next screen Press skip because we know the media is good
  • Language Options, I installed it in English, but it’s your choice of course.
  • I installed the keyboard with the options be-latin1. I use an azerty keyboard so this is best for me.
  • U need to Re-initialize all when he asks it (sometimes he does that and I still don’t know why (I’m researching on it))
  • Time zone selection: for me again it’s Europe/Brussels
  • Set your root PW: for this machine I keep it simple, but on yours never do that for security reasons ofc
  • Partitioning Type: use Replace entire drive, for the VBox u can do that or when u install it on an empty drive
  • When all the files are done hit the reboot option.
  • When your drive is rebooting, hit the enter key so u can get the CentOS option to run, otherwise u will end up in install menu again J

 Step 5 Entering CentOS

Now u are in CentOS

Local host log in is: root with the root PW u made

Congratulations on your CentOS installation

Now enter halt to stop the system.

 Step 6  Finalizing

When the window is closed, go back to your CentOS options and remove the iso, so when u boot it next time u won’t  get the install menus again ^^

Next time!

So next post we will create a user and give it sudo rights because remember working and logging in as ROOT is BAD PRACTICE! And we will add the user to a group.

We also will install some software next time.

We will set the network cards and maybe some more fun stuff J

 

Thank you for reading and cya next time!

 

Take care

David Duym

Welcome!

Man whois David Duym :

I’m David Duym. A 32-year-old Belgian  and father of a beautiful daughter.

Working with computer since my childhood, going from a C64 to an amiga 500+ to my current pc years later. Using a Microsoft environment since ages…

Now my wife suggested, why not go to school again and get the diploma I always wanted, an IT bachelor degree. I started it, and now I am 2 years into the course.

At HOGent  (http://www.hogent.be/) I met Bert Van Vreckem (http://bertvanvreckem.wordpress.com/). He is our lector in Network Science and Operating Systems. He was talking about Linux. As a Microsoft user I was sceptic ofcourse, but… Linux got me where I didn’t expected it to. I was impressed and so it all started… I even run Fedora 20 on my laptop now (bye bye Windows 7). I’m going to blog on experimenting on it, and hoping that freshly started people get some hints and tips here, and that more advanced users can give me some tips and pointers too.

My desktop is still running windows 8.1 because I like to game when I find the time for it. But that is getting lesser by the day since I spend my time between family, work, learning for school and learning the world of Linux.

 

So hope to read/write/discuss with u in the future!

 

Take care!

David Duym