Thursday, November 24, 2016

CentOS 6 with GUI after vagrant up

Introduction

In the previous post (http://leaders-skills.blogspot.kr/2016/11/linux-in-vagrant-and-virtualbox.html), you might have created Linux in the vagrant and virtualbox environment.

Now, you can set up a GUI environment for CentOS 6, as follows:
1. Install CentOS 6 update
2. Install "Desktop" packages

3. Install VirtualBoxGuestAdditions and related packages (optional)
4. Install ubuntu fonts (optional)
5. Modify Vagrantfile (optional)

<CentOS 6 with GUI>

Installing CentOS 6 update

You can login to the virtual machine (CentOS guest) and update it by running:

mict@mict:~/centos6$ vagrant ssh
[vagrant@localhost ~]$ sudo yum update

Loaded plugins: fastestmirror, security
Setting up Update Process
base                                                                                        | 3.7 kB     00:00    
base/primary_db                                                                     | 4.7 MB   00:00    
extras                                                                                      | 3.4 kB    00:00    
extras/primary_db                                                                  |  37 kB     00:00    
updates                                                                                   | 3.4 kB     00:00    
updates/primary_db                                                               | 3.7 MB    00:00    
Resolving Dependencies
--> Running transaction check
---> Package bind-libs.x86_64 32:9.8.2-0.47.rc1.el6_8.1 will be updated
---> Package bind-libs.x86_64 32:9.8.2-0.47.rc1.el6_8.3 will be an update
... [deleted] ...
util-linux-ng.x86_64 0:2.17.2-12.24.el6_8.1                

Complete!
[vagrant@localhost ~]$

You have to reboot the virtual machine here for step 3.

Installing "Desktop" packages

You can group install by running:

[vagrant@localhost ~]$ sudo yum groupinstall Desktop
Loaded plugins: fastestmirror, security
Setting up Group Process
Determining fastest mirrors
 * base: ftp.neowiz.com
 * extras: ftp.neowiz.com
 * updates: ftp.neowiz.com
base/group_gz                                                                                | 226 kB     00:00    
Package 1:dbus-1.2.24-8.el6_6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package NetworkManager.x86_64 1:0.8.1-107.el6 will be installed
--> Processing Dependency: ppp = 2.4.5 for package: 1:NetworkManager-0.8.1-107.el6.x86_64
... [deleted] ...
xulrunner.x86_64 0:17.0.10-1.el6.centos
zenity.x86_64 0:2.28.0-1.el6                         

Complete!
[vagrant@localhost ~]$

You have to run startx after login to the CentOS 6 virtual machine. 

[vagrant@localhost ~]$ startx

Installing VirtualBoxGuestAdditions and required packages (optional)

You will need to install VirtualBoxGuestAdditions to resize the CentOS GUI. The installation of VirtualBoxGuestAdditions needs some required packages beforehand. You need to run:

[vagrant@localhost ~]$ sudo yum install kernel-devel kernel-headers gcc
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Loading mirror speeds from cached hostfile
... [deleted] ...

Dependency Installed:
  cloog-ppl.x86_64 0:0.15.7-1.2.el6        cpp.x86_64 0:4.4.7-17.el6        glibc-devel.x86_64 0:2.12-1.192.el6  
  glibc-headers.x86_64 0:2.12-1.192.el6    libgomp.x86_64 0:4.4.7-17.el6    mpfr.x86_64 0:2.4.1-6.el6            
  ppl.x86_64 0:0.10.2-11.el6             

Complete!
[vagrant@localhost ~]$

Now, you can download the image by running:

[vagrant@localhost ~]$ wget http://download.virtualbox.org/virtualbox/5.1.10/VBoxGuestAdditions_5.1.10.iso
--2016-11-24 01:01:37--  http://download.virtualbox.org/virtualbox/5.1.10/VBoxGuestAdditions_5.1.10.iso
Resolving download.virtualbox.org... 182.162.106.10, 182.162.106.35
Connecting to download.virtualbox.org|182.162.106.10|:80... failed: Connection timed out.
Connecting to download.virtualbox.org|182.162.106.35|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 59408384 (57M) [application/octet-stream]
Saving to: “VBoxGuestAdditions_5.1.10.iso”
100%[==========================================================>] 59,408,384  11.2M/s   in 5.1s   
2016-11-24 01:02:45 (11.2 MB/s) - “VBoxGuestAdditions_5.1.10.iso” saved [59408384/59408384]

[vagrant@localhost ~]$ sudo mkdir /mnt/VBoxGuestAdditions
[vagrant@localhost ~]$ sudo mount -o loop,ro VBoxGuestAdditions_5.1.10.iso /mnt/VBoxGuestAdditions
[vagrant@localhost ~]$ sudo sh /mnt/VBoxGuestAdditions/VBoxLinuxAdditions.run 
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.10 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
vboxadd.sh: Starting the VirtualBox Guest Additions.

Could not find the X.Org or XFree86 Window System, skipping.


[vagrant@localhost ~]$ rm VBoxGuestAdditions_5.1.10.iso
[vagrant@localhost ~]$ sudo umount /mnt/VBoxGuestAdditions 
[vagrant@localhost ~]$ sudo rmdir /mnt/VBoxGuestAdditions

Now, you have a CentOS 6 virtual machine with GUI. Step 4 and 5 will make it better in another post.

Tuesday, November 22, 2016

Linux in the Vagrant and VirtualBox environment


The whole is greater than the sum of its parts.


Introduction 

There are many ways to install Linux on a desktop PC. A freshly installed Linux can be a powerful environment, in particular. However, when you want to develop or just experiment with some software packages in a variety of operating systems, it is very time consuming to reinstall each operating system using a CD-ROM/DVD.

Vagrant (http://www.vagrantup.com) is an extremely useful tool for those who wish to experiment with Linux on a Win PC. A combination of Vagrant and VirtualBox (http://www.virtualbox.org) is a powerful tool which makes the installation of Linux possible with a couple of commands.

Basically, VirtualBox is a software package which allows you to virtualize another PC on one PC. With the help of VirtualBox, you can run Win on Linux and vice versa. Sometimes, you may wish to have a fresh copy of a certain version of Linux to repeat your experiment for debugging purposes.

 <Win on Ubuntu>


Installing Vagrant and VirtualBox

The two software packages can be downloaded from http://www.vagrantup.com and http://www.virtualbox.org. You can follow the standard installation method, depending on your host PC environment.

How to install CentOS 6 on Ubuntu  

Once you have Vagrant and VirtualBox installed, you can create a virtual machine (guest), quite easily by running the following commands:



mict@mict:~$ mkdir centos6
mict@mict:~$ cd centos6
mict@mict:~/centos6$ vagrant init centos/6
A `Vagrantfile` has been placed in this directory. You are now ready to `vagrant up` your first virtual environment! Please read the comments in the Vagrantfile as well as documentation on `vagrantup.com` for more information on using Vagrant.
mict@mict:~/centos6$ 

mict@mict:~/centos6$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'centos/6'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'centos/6' is up to date...
==> default: A newer version of the box 'centos/6' is available! You currently
==> default: have version '1609.01'. The latest is version '1610.01'. Run
==> default: `vagrant box update` to update.
==> default: Setting the name of the VM: centos6_default_1479801951475_89912
... [deleted] ...
default: This is not an error message; everything may continue to work properly,
default: in which case you may ignore this message.
==> default: Rsyncing folder: /home/mict/centos6/ => /vagrant
mict@mict:~/centos6$

deliberate practice (의도적 연습)

"Living in a cave does not make you a geologist," Anders humorously observes, "and simply being in a management position does not make you a great leader." Researchers are clear that not all practice makes perfect. You need a particular kind of practice - "deliberate practice" - to develop expertise.

Deliberate practice has five elements or characteristics:
1. It is designed specifically to improve performance.
2. It has to be repeated a lot.
3. Feedback on results must be continuously available.
4. It is highly demanding mentally.
5. It isn't all that much fun.

 (pp. 128-131, The Truth about Leadership, James M. Kouzes and Barry Z. Posner)

"동굴에 산다고해서 지질학자가 되는 것은 아니며, 단순히 경영자의 위치에 있다는 것으로 위대한 리더가 되는 것이 아니다."라고 앤더스 에릭슨은 익살스럽게 관찰한다. 모든 연습이 완벽하게 만드는 것은 아니다는 것은 연구를 통해 명백하다. 전문성을 발전시키기 위해서는 특별한 종류의 연습 - 의도적 연습 -이 필요한 것이다.

Sunday, October 5, 2014

리더와 역량 (Competence)

당신이 역량이 없이 그 일을 한다고 약속하는 것은  솔직하지 못하거나 어리석다. 성공적으로 수행하기 위한 스킬이나 자원이 없음을 알고도, 새 제품이나 공장을 전환시킬 것이라 대담하게 말하는 데에는 용기 있다고 할 것은 하나도 없다. 리더는 말한 것을 실행할 역량이 실제로 얼마나 있는 지의 정도를 의식하고 있어야 한다. 만약 필요한 역량이 부족하다면 그것을 얻기위해 전력을 다해야 하고, 시간이 부족하거나 당장 그 요구가 있을 때에는 그 일을 할 수 있는 더 나은 사람을 찾아야 한다. (51쪽, 신뢰성 - 리더는 어떻게 얻고 있는가, 그리고 사람들은 왜 요구하는가, 쿠제스와 포스너)

To commit to doing something that you have no capacity to do is either disingenuous or stupid. There is nothing courageous about boldly saying you will launch a new product or turn around a factory if you know you have neither the skills nor the resources to do it successfully. Leaders must be aware of the degree to which they actually have the capabilities to do what they say. And if they lack the necessary competence they must dedicate themselves to acquiring it, or, it time is short and the demand is immediate, find someone better for the job. (p. 51, Credibility - How Leaders Gain and Lose It, Why People Demand It. James M. Kouzes and Barry Z. Posner)

Friday, September 5, 2014

현장 경영

'경영자는 현장을 알아야만 자신만의 경영 철학과 기업 문화를 만들 수 있다. 또한 현장 경영을 통해서 누구보다 더 열심히 일하는 동시에 엄격한 존재가 되어야만 회사에 활력을 불어넣을 수 있다.' (60쪽, 회사는 어떻게 강해지는가, 이나모리 가즈오, 김정환 옮김)

Monday, August 25, 2014

성공이 창조하는 새로운 현실

성공은 항상 그것을 가져온 바로 그 행동을 쓸모없게 만든다. 성공은 항상 새로운 현실을 만들어 낸다. 성공은, 무엇보다도, 그 성공 고유의 다른 문제를 만들어낸다. 성공한 회사의 경영진이 "우리의 사업이 무엇인가?"라는 질문을 하는 것은 쉽지 않다.

1920년대 미국의 가장 성공적인 산업은 무연 탄광과 철도였다. 두 산업은 신이 그들에게 확고한 독점을 영원히 내려주었다고 믿었다. 또한, 그들 사업의 정의는 너무 자명하여 생각할 필요가 없다고 믿었다, 어떤 조치에 대한 필요는 말할 것 없고.

Success always obsoletes the very behavior that achieved it. It always creates new realities. It always creates, above all, its own and different problems. It is not easy for the management of a successful company to ask , "What is our business?"

The two most successful American industries of the 1920s were anthracite coal mines and railroads. Both believed that God had given them an unshakable monopoly forever. Both believed that the definition of their business was so obvious as to eliminate all need for thought, let alone for action.
(p. 262, The Daily Drucker, Peter F. Drucker with Joseph A. Maciariello)

Wednesday, May 14, 2014

변화 (개혁)는 어려운가?

통념상 변화는 어렵다고 한다. 하지만 변화가 그렇게 어렵다면 왜 덜 성공적인 비교군에서 급진적인 변화의 증거가  더 많은가? 그것은 변화가 가장 어려운 부분이 아니기 때문이다.
변화를 시행하는 것보다 훨씬 더 어려운 것은 무엇이 제대로 도는지 (작동하고 있는지)를 알아내고, 왜 그것이 잘 도는지 (작동하는 지)를 이해하고, 변화의 시점을 알아내고 그리고 변하지 않아야 하는 시점을 아는 것이다.

Conventional wisdom says that change is hard. But if change is so difficult, why do we see more evidence of radical change in the less successful comparison cases? Because change is not the most difficult part. Far more difficult than implementing change is figuring out what works, understanding why it works, grasping when to change, and knowing when not to. (p. 124, Great By Choice, Jim Collins and Morten T. Hansen)

개혁의 기치아래 많은 것을 바꾼다. 하지만, 무조건 바꾸는 것 아니라 무엇이 (어느 부분이) 작동하고 안하는 지를 파악한 뒤, 그것이 작동하면 왜 작동하는 지 작동하지 않았으면 왜 작동하지 않았는지를 먼저 알아낸 다음에 바꾸어야 한다.