VirtualBox: Installing CentOS 7 Guest on Windows 8.1 host

Step-by-step guide

  1. Download CentOS.
  2. When selecting a version, select the "DVD ISO" don't select "Everything ISO", it is more than 4 GB for CentOS version 7.
  3. Download & install VirtualBox, or you may use any existing version you already have like what is installed with Genymotion.
  4. Open Virtualbox, and click "New" button.
  5. In the name "CentOS7" you will find the type is automatically changed to "Linux" & version to "Red Hat", change the version to be "Red Hat (64 bit)", click "Next". Note: If you are running VirtualBox in Windows 8/8.1, you may not find the option of 64 bit. If this is the case, and to get it enabled, first make sure that you enabled "Intel Virtualization" option in your BIOS. Second, disable Hyper-v platform in Windows through ControlPanel->Programs->Turn Windows Features On or Off.
  6. For the memory, select at least 1024 MB, click "Next".
  7. For the Hard drive, click "Create a virtual hard drive now", click "Create".
  8. Keep "VDI (VirtualBox Disk Image)", click "Next".
  9. Keep storage as "Dynamically allocated", click "Next".
  10. Type a location for this file without spaces.
  11. The maximum size limit 40 GB will be more than enough (Dynamic allocated as required this is just maximum limit), click "Create".
  12. Select your virtual machine, click "Settings":
    1. Click "System", Boot order, uncheck "Floppy".
    2. Click "Storage", click "Controller: IDE" and select the CD ROM, and click the button "Set up virtual CD DVD drive" and select the iso image file downloaded in step #2, click "OK".
    3. Click "Network", Adapter 1, attached to "Bridged Adapter" instead of NAT & then:
      1. Select your WiFi controller in name in-case you are using your laptop and will use the wireless network on your Internet connectivity.
      2. Select your Ethernet in name in-case you are using a PC and you will be using the Ethernet network on your Internet connectivity.
  13. Select your virtual machine, click "Start".
  14. Select "Install CentOS 7".
  15. You can abort checking the media by clicking "Esc".
  16. In the graphical installer starts, select "English", "United States", click "Continue".
  17. Change the timezone.
  18. In software selection "Basic Web Server" & select the following Add-Ons (Based on your needs):
    1. Backup client.
    2. Directory client.
    3. Guest agents.
    4. Hardware Monitoring utilities.
    5. Large Systems performance.
    6. Performance tools.
    7. Remote Management for Linux
  19. For Installation Destination, Keep "Automatic partitioning selected".
  20. For Network & hostname:
    1. You will find a Network Ethernet (Either you are using Wireless or Ethernet connection on your host; VirtualBox will mimic any network connection to Ethernet), click the button to make it "On" as you will need for Internet connectivity & your work later. It will say connected.
    2. Scroll down and change the hostname to "centos7.localdomain"
  21. Click button "Begin Installation".
  22. For root password: root_password_must_memorize
  23. For user creation: Type your name it will suggest login name, make sure to "Make this user as administrator" and provide your password.
  24. When installation, click "Reboot".
  25. From the virtualbox settings, storage, "Remove disk from virtual drive" to avoid re-installing CentOS again.
  26. Make sure your system is up & running before performing post installation steps.

    You can scroll up & down in the CentOS guest using shift + pageup & shift + pagedown

Post installation

Installing DKMS & Guest Additions

  1. In-case you have VirtualBox older than v4.3.14RC1, download newer version of Guest Additions, tried for version 4.3.20, & copy it to virtual box folder having the original one. If you have already higher version, please skip this step.
  2. While your CentOS vm is already started, and you have logged using root.
  3. Run the following command to install EPEL (Extra Packages for Enterprise Linux):
    yum install epel-release
    Is this ok? y
  4. Run the following command to install kernel-devel package that provides the headers needed to compile modules for the kernel:
    yum install kernel-devel
    Is this ok? y
  5. Run the following command to install dkms (Dynamic Kernel Module Support):
    yum install dkms
    Is this ok? y
  6. While your CentOS vm is already started, and you have logged using root. Select "Device" menu, and select "CD/DVD", and mount VirtualBox Guest Additions 4.3.20
  7. In the VM status bar just move to the CD icon, you will find that the CD has mounted "Virtual Guest Additions iso" that is normally located in %VIRTUALBOX_FOLDER%\VBoxGuestAdditions.iso
  8. Auto installation doesn't work with CentOS it just mounted the CD, it usually works for Windows, we will perform the next steps to manually install Guest Additions.
  9. Mount the CD ROM using the command (Note: Without installing the kernel-devel specific version although done before, the building of GuestAdditions was always failing, now it will take time and build successfully):
    yum install kernel-devel-3.10.0-123.el7.x86_64
    Is this ok? y
    mount /dev/cdrom /mnt
    cd /mnt
    sh ./VBoxLinuxAdditions.run
  10. Shutdown your VM using command:
    shutdown -h now "configure shared folder"
  11. Go to your VM settings, click "Shared Folder", Add new folder "c:\shared-with-vbox" with below settings:

  12. Go to your VM settings, click "General", tab "Advanced", for Shared Clipboard select "Bidirectional".
  13. Go to your VM settings, click "Storage", Remove disk from virtual drive.
  14. Start your VM, login with root, you need to make a folder in your centos and then mount the shared folder to this newly created folder using below command:
    cd /tmp
    mkdir sharedhost
    mount -t vboxsf sharedwithvbox /tmp/sharedhost

Installing SELinux (Security-Enhanced Linux) Policy Management tool

This is required later for securing your server when changing the port of SSH
  1. Just run the command:
    yum install policycoreutils-python

Installing Network Time Protocol

This is required later for synchronizing your server with NTP
  1. Just run the command:
    yum install ntp


Configure Squirrel SQL to connect to MySQL

"Squirrel SQL" is a great light weight generic SQL client that I have started using for more than 10 years now. As Java based it can be used from Windows, Linux, Mac OS as well

This is how to configure Squirrel SQL 3.6 on Windows 8.1 to connect to MySQL server ver 5.6 running on CentOS 7.

1- Download MySQL Connector/J ver 5.1.34 & extract to any local folder C:\oracle\mysql\mysql-connector-java-5.1.34
2- You will find MySQL Driver in the drivers with red x mark as indicator that MySQL driver is not  defined.
3- Double click "MySQL Driver".

4- Click "Extra Class Path" tab.
5- Click "Add" and select jar file from %MYSQL_JAVA_CONNECTOR%\mysql-connector-java-5.1.34-bin.jar
6- Click Ok, and we are done defining the driver.
7- Now create an alias for the DB.

Your driver dialog should look like:


VPS hosting comparison

What is VPS?

VPS is a virtual machine sold as a service by an Internet hosting service. A VPS runs its own copy of an operating system, and customers have superuser-level access to that operating system instance, so they can install almost any software that runs on that OS. For many purposes they are functionally equivalent to a dedicated physical server, and being software defined are able to be much more easily created and configured. They are priced much lower than an equivalent physical server, but as they share the underlying physical hardware with other VPSs, performance may be lower, and may depend on the workload of other instances on the same hardware node.

For Java hosting, why VPS is better than shared hosting?

Shared Private (VPS)
Private JVM Heap No - JVM Heap is shared among other java web apps residing on the same shared tomcat instance. Yes - you get a your very own dedicated JVM Heap which equates reliability, security, and availability of your web app.
Ability to Start/Stop Application Server Yes - With scripts which you can execute and the Shared Tomcat will be restarted within 60 minutes or send email to support. Yes - you can restart tomcat at anytime either via SSH or via our online web console.
Access to Application Server Admin / Manager No Yes
Easy deployment of WAR files No - you will have to upload your WAR and manually unpack it yourself. Tomcat's automatic detection and unpacking of WAR files is disabled due because this is a Shared Tomcat environment. Yes - you can deploy your WAR files via Tomcat Manager, SSH or simply upload it and Tomcat automatically detects and unpacks it.
Ability to install different software versions of JDK, Tomcat, JBoss, etc. No - Yes. You can select from different JDK versions and when your account is set up select different Tomcat versions 5.5 and 6.x since it's a shared tomcat environment, you're bound by the shared tomcat version available which is version 5.5.x and JDK 1.5 Yes - you can have custom versions installed for you.
Interference with other application Yes, you are affected by other application No, you don't have to worry about other's application.
Memory/Heap Size Increase No - with shared tomcat you cannot increase your JVM heap size since you're on a shared JVM heap Yes - you can request additional JVM heap increase.

VPS vs Managed VPS

VPS: is just a virtual machine with root access and you do everything on your own.
Managed VPS: As VPS and you have root access as well but you get extra functionality with extra cost, such extra functionality is different between hosting providers. Sample of services are:
      1. GUI web control panel.
      2. Fast script installation.
      3. Operating System updates.
      4. Server hardening.
      5. Backup.
      6. Monitoring.
Managed hosting is for people who are uncertain what their doing with a VPS and can't manage it themselves or don't have the time to.

VPS Comparison

The following providers were selected as constantly repeating in all comparisons on the Internet.

# Factor Linode DigitalOcean RoseHosting
1 Bandwidth limitation (min - max) 2 - 20 TB 1 - 9 TB 2 - unlimited TB
2 SSD (Solid State Drive) Yes, all Yes, all Yes, all
3 Processor series Intel Ivy Bridge E5-2680 Intel Hexcore Quad core or Dual Quad core Intel Xeon CPUs
4 Processor speed 2.8 GHZ 2.0 - 3.0 GHZ Didn't reply
5 Processor range (min-max) 1 - 20 cores 1 - 20 cores 2 - 10 cores
6 Vertical scaling RAM range (min -max) 1 - 96 GB 0.5 - 64 GB 1 - 32 GB
7 Load balancing support documented and well defined on level of application server Yes No, being built, you can have node balance as droplet. No, you need to build it using Nginx, HAproxy or similar
8 MySQL support clustering or not Load balancing supported for MySQL Support Master/Master, Master/Slave, Load balancing Help you setup MySQL clustering
9 Redundancy level No details provided by their support. Offered in different layers. Yes, details in comment.
Managed VPS Linode DigitalOcean RoseHosting
10 CLI (Command Line Interface) Yes, free Yes, & alternative, but seems community based. Root access
11 API (Programmatic interface for automating tasks) Yes, free (In Python, Perl, PHP, Ruby, Java, Node.js) V1 stable, V2 Public Beta No
12 GUI web control panel. Yes but included in high price Managed requires 100 $ / month Yes Yes within their managed hosting service free
13 Fast script installation. Yes Yes, but few Yes, by request
14 Operating System updates. No, have a look at support question in comments section. No, after looking to support answer link, they help by diving details, or user from community, and you have to do it yourself. No, your responsibility, but they can help.
15 Automated Backup. Yes Yes Weekly free
16 User initiated Backup. Yes Yes Not sure
17 Monitoring. Yes Yes but you need to built as droplet Basic monitoring included
18 Mobile application monitoring on the go Yes management & monitoring iOS, Android Yes by contributors: iOS, Android but seems for management only not monitoring which is much important. Yes by deployed to another server for monitoring.
19 Scheduling Yes, through cron Yes, through cron Not mentioned in knowledgebase but I think will be through cron as well
20 Professional service for support & installation Yes but included with estimation & costing Yes try for help as per the comments section Yes try for help as per the comments section
Application Server Supported Linode DigitalOcean RoseHosting
21 Tomcat No, have a look at support question in comments section. No specialty rather than try to help as per the comments section They can help install them if we are not sure how to do it.
22 JBoss No, have a look at support question in comments section. No specialty rather than try to help as per the comments section They can help install them if we are not sure how to do it.
23 Glassfish No, have a look at support question in comments section. No specialty rather than try to help as per the comments section They can help install them if we are not sure how to do it.
Support Linode DigitalOcean RoseHosting
24 SLA* 99.9% 99.99%
99.9% Network
100% for server with refund policy
25 Support model Web tickets 24 x 7 Web tickets 24 x 7 Web tickets 24 x 7
26 RPO (Recovery Point Objective) No, have a look at support question in comments section. No clear answer from email received No clear answer in email
27 RTO (Recovery Time Objective) No, have a look at support question in comments section. No clear answer from email received No clear answer in email
Pricing Linode DigitalOcean RoseHosting
28 Price for initial launch** 40 - 80 $ / month 40 - 160 $ / month 60 - 80 $ / month
29 Free plan No No No
30 Price for development server 40 $ / month 40 $ / month 60 $ / month
31 Support cost 0 0 0
32 Backup cost 10 - 20 $ / month
Snapshot is supported within the backup service without extra cost, it allows a single snapshot to be kept for every linode, i.e. when you take another snapshot it will ask you to override existing (Details).
Backup: 20 % of virtual cost = 8 - 32 $ / month
Snapshot: 0.02 / GB / month
Backup: 0 for weekly
33 Monitoring cost 0 - 20 $ / month 10 $ / month As new droplet 0 they seem partner with SolidAlert for web site monitoring
34 Load balancing cost 20 $ / month 10 $ / month As new droplet 20 $ / month as new server
35 Total cost for initial load (development, production server, Support, Backup, Monitoring) 90 $ / month 98 $ / month 120 $ / month
Documentation Linode DigitalOcean RoseHosting
36 Video No dedicated channel, but there are lots of videos as tutorials and setup from people using it. Official Channel, but there are lots of videos for tutorials & setup especially OceanCasts None
37 Blog Yes Yes No
38 Forum Yes Question & Answers No
39 Documentation site Yes, comprehensive Tutorials, comprehensive Very limited compared to Linode or DigitalOcean
40 Extra They pay 250$ to the community when submitting articles to encourage sharing information. They pay 200$ to the community when submitting articles to encourage sharing information.

          99% SLA means your cloud access could be disrupted by 7.3 hours a month
          99.9% SLA translates to about 44 minutes of downtime over a month
          99.95% SLA translates to about 22 minutes of downtime over a month
          99.99% SLA translates to about 4 minutes 23 seconds of downtime over a month

Price for initial launch**: For normalization assumption for application is composed of 1 VPS with following configuration:
    1. RAM: 6 GB
    2. Processor: 2 Core
    3. Storage: 100 GB
Price for Development server: For normalization assumption for application is composed of 1 VPS with following configuration:
    1. RAM: 4 GB
    2. Processor: 1 Core
    3. Storage: 50 GB


I think Linode is best option & more production ready than the other VPS provider. It is all based on your needs, and your criteria of selection.

I hope this evaluation helps someone there who might take it as basis and add to it what other relevant factors that is best suited for his/her needs.

Conclusion After 4 months of Linode trial

The server availability is great. Support is quite responsive, and I'm happy customer :)
I have submitted article (Java Development with WildFly on CentOS 7) in their documentation & have been granted 250$ chosen to be credited to my linode account to support my servers ;)

Dropped providers


Enable DEBUG & VERBOSE for Huawei Android Logcat

I'm having Huawei Nova Plus I found that Huawei only prints to its Android log starting log level INFO . As per Huawei; this is done ...