“I've just installed CentOS 6! Now what?”
CentOS installation is really quick and simple. After answering very few questions you end up facing a black console screen with the login prompt. I you find yourself a bit intimidated in such situation, this page may help you. It describes the essential steps you need to perform to make your system a bit more useful. Just follow through the steps in the order provided or select any item from the list of links below.
In the /boot/grub/grub.conf (or /boot/grub/menu.lst) add vga= parameters at the end of the kernel configuration line (the line may be quite long and span multiple lines on the screen):
Reboot the system to activate the setting:
For your reference here is a partial list of vga mode numbers:
|640x480 800x600 1024x768 1280x1024
----+-------------------------------------
256 | 0x301 0x303 0x305 0x307
32k | 0x310 0x313 0x316 0x319
64k | 0x311 0x314 0x317 0x31A
16M | 0x312 0x315 0x318 0x31B
More details...
List of VGA modes...
Enable mouse support in console mode
To enable mouse support install gpm package from the installation DVD.
Create a mount point for DVD/CDROM:
Mount DVD/CDROM:
Install gpm package:
Reboot:
If system has Internet connectivity install gpm package using yum (see yum further below):
In /etc/sysconfig/network modify the HOSTNAME parameter. Reboot.
To configure a DHCP client, modify the /etc/sysconfig/network file to enable networking
and modify the configuration file for each network
device in the /etc/sysconfig/network-scripts directory. In this directory, each network device should have a
configuration file named ifcfg-eth0, where eth0 is the network device name.
To list all network devices run ifconfig -a command.
The /etc/sysconfig/network file should contain the following line:
The NETWORKING variable must be set to “yes” if you want networking to start at boot time.
The /etc/sysconfig/network-scripts/ifcfg-eth0 file should contain the following lines:
A configuration file is needed for each device to be configured to use DHCP.
Reboot system after modifying the files.
More information...
To assign static IP address to a network interface modify the
corresponding configuration file in the /etc/sysconfig/network-scripts folder.
For example, to assign static IP to the eth0 interface,
modify the /etc/sysconfig/network-scripts/ifcfg-eth0 file as shown below:
In /etc/grub.conf add the ipv6.disable=1 parameter to the end of the kernel line (the line may be quite long and span multiple lines on the screen):
Removing network cards with higher numbers created after VM cloning
Go into /etc/udev/rules.d and delete the 70-persistent-net.rules
file and reboot. If you open it before hand you will most likely see
the original network card MAC listed as eth0 and the new one as eth1.
Now you need to edit /etc/sysconfig/network-scripts/ifcfg-eth0
and manually update the MAC of your new network card. Deleting the file
forces the detection process to run again at boot with no baggage
left over from the cloning process, namely the old card MAC address(es).
More information...
Start/Stop/Restart networking service
Configure yum to work through a proxy server
In /etc/yum.conf add proxy server parameters:
Proxy server setting - <proxy server URL>:<port number>
Proxy user account details for yum connection:
Run yum to update your server:
Apache httpd server can be installed as a group of packages called “Web
Server” using yum groupinstall command, or package by package
using yum install.
To list all packages included in the “Web Server” group run:
To install the “Web Server” package group run:
Command yum groupinstall "Web Server” will install by default only mandatory and default packages. If you want to install all packages, including optional, add the following line to the /etc/yum.conf file:
To install only httpd package (including dependencies) use yum install, for example:
Configure the Apache service to start on boot:
In the httpd configuration file /etc/httpd/conf/httpd.conf uncomment the line containing the text:
Restart the Apache HTTP Server daemon:
Type the server's URL or IP in your web browser and you should see Apache 2 Test Page.
If you received connection time out error and you've done everything correctly, take
a look at this post.
More information...
Php can be installed as a group of packages called “PHP Support” using yum groupinstall command:
If you are planning to use php together with MySQL install php-mysql package:
Verify that /etc/httpd/conf.d contains php.conf file. Restart Apache
Verify that php module is running:
To test your php installation perform the followings steps:
In the default Apache DocumentRoot folder - /var/www/html
create a file called, for example, info.php
with the following content:
To access the file type into your web browser the web server's URL or IP
with the /info.php file reference at the end, for example:
http://192.168.0.100/info.php
MySQL can be installed using yum groupinstall command:
If you are planning to use php together with MySQL install php-mysql package
Set the MySQL service to start automatically on boot:
Start the MySQL service
Run the following script to set root passwords and remove anonymous users:
To test Apache + php + My SQL perform the following steps:
Launch MySQL command-line tool
Create a new test database, called “mytest”:
Create a new simple table, called “things”:
Add some data to the table:
Create a new user, called “phpuser” and assign “SELECT” privileges for the things table:
In the default Apache DocumentRoot folder - /var/www/html create a file called, for example, mysqltest.php with the following content:
To access the file type into your web browser the web server's URL or IP
with the /mysqltest.php file reference at the end, for example:
http://192.168.0.100/mysqltest.php
File integrity / MD5 checksum verification
Windows:
Download and install MS File Checksum Integrity Verifier (Windows-KB841290-x86-ENU.exe)
To calculate the MD5 checksum of a file run:
Linux:
To calculate the MD5 checksum of a file run: