How to install CentOS 6.7 minimal on virtualbox + Screenshots

This is a guide on how to install CentOS 6.7 minimal on virtualbox (text mode) in Windows 8.1 including screenshots. Hope this helps!

Requirements:

  1. CentOS 6.7 32-bit ISO : Download Link (~354 MB) {Note: Download the minimal version.}
  2. VirtualBox : Download Link (~114 MB)
  3. Atleast 8GB of free space
  4. CPU that supports Virtualization

Installation Procedure:

First, thing we need to  do is to set up Virtual Box. Go ahead download and install Virtual Box (the download link is given above in the requirements).

Open VirtualBox and click on “New“.

Click on "New" to create VM

Type in “Name” as anything you like. I have named mine as “CentOS 6.7 minimal (32-bit)“. Make sure that the “Type” is “Linux” and the “Version” is “Redhat (32-bit)” as we have downloaded the 32-bit version of CentOS. Then click on “Next“.

select type as "Linux" and Version as "Red Hat (32-bit)"

Now, select the amount of memory /RAM you need to allocate to your CentOS virtual machine. For this installation, allocate 512 MB of RAM for text mode installation and then click on “Next“.

select 512mb RAM

You can now click on “Create a virtual hard disk now” and then click “Create“.

Click "Create a virtual hard disk now"

Now, select the first option “VDI (VirtualBox Disk Image)” and then click on “Next“.

Select VDI

Select “Dynamically Allocated” and then click on “Next“.

Select "Dynamically allocated"

You can now select the size of the hard disk you need to allocate for your CentOS virtual machine and then click on “Create“. I would suggest a minimum of “8 GB”.

[Optional: If you need to change where the hard disk file is to be saved, you can click on the folder icon in the green box and change it accordingly.]

Provide atlease 8gb hard disk space

Now, click on the CentOS virtual machine that you created and then click on “Start” as shown below.

Select CentOS VM and click Start

We need to provide the CentOS ISO file we downloaded earlier to Virtualbox for the VM to boot from the ISO image. You can do this by clicking on the folder icon as shown below and then selecting the CentOS ISO file and then clicking on “Open“.

Click on folder icon

Select ISO file and click Open

Once, you have selected the ISO file, you can click on “Start“.

click start

The virtual machine will now boot from the provided CentOS ISO image and you will be presented with the boot menu as shown below. Select the first option “Install or upgrade and existing system” and hit Enter in your keyboard.

Select "Install or upgrade and existing system"

 

booting progress

[Note: In this mode (i.e the text mode), you can use the arrow keys in your keyboard or the TAB key in your keyboard to move through different options and Enter to confirm selection.]

Now, use your arrow key/ TAB key to select option “Skip” and hit ENTER in your keyboard.

select "Skip" and hit Enter

Installation starting

You will see a message “Welcome to CentOS!” with an “OK” button. Hit Enter in your keyboard.

hit Enter

Select the language as “English” and hit Enter.

Select "English" and hit Enter

Select the keyboard layout as “us” and hit Enter.

select us keyboard

Now, you will get a Warning message “Error processing drive“. Select the last option “Re-initialize all” using arrow/ TAB keys and hit Enter.

Select "Re-initialize all" and hit Enter

Now, make sure you select the right time zone. You can use the arrow keys to cycle down each entry or you can use the Page UP/ Page Down key in your keyboard to cycle through the list quickly. After you have selected the Time Zone, select “OK” and hit Enter in your keyboard.

Select "Time Zone"

Now you need to create a root password for your CentOS virtual machine. Finally select “OK” and hit Enter.

Enter password for root account

Select the first option “Use entire drive“, then select “OK” and hit Enter in your keyboard.

Select "Use entire drive"

Hit Enter

Select “Write changes to disk” and hit Enter.

Select "Write changes to disk"

This will now install all the required packages. It would take a few minutes depending on the speed of your computer.

Installation progress

Once installation is complete you will be prompted with a “Reboot” button. Hit Enter for the CentOS virtual machine to restart.

Select "Reboot"

centos virtual machine rebooting

You should see the CentOS booting progress as shown below.centos boot screen

You will now be prompted with the login screen.

centos login prompt

Now, type the username as “root” and hit ENTER in your keyboard. Then type in the root password that you created during installation and hit Enter. Upon successful login, you will see the bash prompt with # symbol at the end.

succesfully logged in as root

And Voila! You have successfully installed CentOS 6.7 minimal in VirtualBox using text based installation method. I will be creating another post on how to configure the network manually in CentOS 6.7 using the terminal.

If you have any queries regarding this installation, feel free to leave a comment below and will get back to you. Do subscribe to my blog get future updates! 🙂

How to install apache from source in Centos 6.7

This is a simple guide on how to configure Apache from source in Centos 6.7 + installing APR, APR-UTIL and PCRE to make it work.

Step 1. Install gcc:

Open up your terminal window and type the following command:

yum install gcc gcc-c++

Now, change to following directory:

cd /usr/src/

Step 2: Download and configure APR :

To download the APR file, use the below command:

wget http://a.mbbsindia.com//apr/apr-1.5.2.tar.gz

Now extract the downloaded file:

tar -zxvf apr-1.5.2.tar.gz

Change to the extracted folder and run the following commands to configure apr:

cd apr-1.5.2
./configure –prefix=/usr/src/apr
make
make install

Step 3. Download and configure apr-utils:

Change to following /usr/src/ directory:

cd /usr/src/

To download the APR-UTIL file, use the below command:

wget http://mirror.fibergrid.in/apache//apr/apr-util-1.5.4.tar.gz

To extract file, change to extracted folder and to configure apr, run the following commands:

tar -zxvf apr-util-1.5.4.tar.gz

cd apr-util-1.5.4
./configure –prefix=/usr/src/apr-util –with-apr=/usr/src/apr/
make
make install

Step 4. Download and config PCRE:

Change to /usr/src/ directory:

cd /usr/src/

To download pcre2-10.21.tar.gz type the following your terminal:

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.21.tar.gz

To extract file, change to extracted folder and to configure pcre2-10.21, run the following commands:

tar -zxvf pcre2-10.21.tar.gz

cd pcre2-10.21
./configure –prefix=/usr/src/pcre2
make
make install

Step 5. Download Apache / httpd:

Now, change to following directory:

cd /usr/src/

To download httpd tar ball type the following your terminal:

wget http://a.mbbsindia.com//httpd/httpd-2.4.18.tar.gz

To extract file, change to extracted folder and to configure httpd, run the following commands:

tar -zxvf httpd-2.4.18.tar.gz

cd httpd-2.4.18
./configure –prefix=/usr/local/apache2 –with-apr=/usr/src/apr –with-apr-util=/usr/src/apr-util –with-pcre=/usr/src/pcre2/bin/pcre2-config
make
make install

Step 6. Start and test your apache server 

service httpd start
httpd -v

You can also open your browser and go to:

http://localhost/

And it should give you the Apache Welcome page.

And Voila! You have successfully configured apache from source. Hope this helps!

[DISCLAIMER: This guide is strictly for the purpose of learning how to configure apache from source for beginners. This should not to be used in a real production server as no security measures has been discussed or implemented in this tutorial.]

If you liked this article, do leave a comment below. You can also share this article by clicking on the social media buttons below. 

Source: ApacheTroubleshooting source: APR troubleshooting