Prakash Sawarkar: Kernel 3.8 Released, how to Compile in Redhat, CenOS and Fedora..

Kernel 3.8 Released, how to Compile in Redhat, CentOS and Fedora.

Monday, 11 March 2013

How to Install Linux (LAMP) Apache, MySQL 5.5.30 & PHP 5.4.12 on RHEL/CentOS

LAMP  using yum is very easy and takes only minutes. This is a good option for beginners who don’t feel comfortable installing from source.

Installing  Apache, MySQL 5.5.30 & PHP 5.4.12 on RHEL 6.3/6.2/6.1/6.0/5.9/5.8/5.6, CentOS 6.3/6.2/6.1/6.0/5.9/5.8/5.6 (LAMP)

Step 1: Iptables Stop 

# service iptables stop
# chkconfig iptables off

Step 2: Installing Repository

 Install Remi & Epel Repository on RHEL/CentOS 6.3-6.0 - 32 Bit 
#  rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
#  rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

 Install Remi & Epel Repository on RHEL/CentOS 6.3-6.0 - 64 Bit 
#  rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
#  rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

 Install Remi Repository on RHEL/CentOS 5.9-5.0 - 32 Bit 
#  rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm
#  rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

 Install Remi Repository on RHEL/CentOS 5.9-5.0 - 64 Bit 
#  rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
#  rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm

Step 3: Installing Apache, MySQL 5.5.30 & PHP 5.4.12 Modules

# yum --enablerepo=remi,remi-test install httpd  mysql  mysql-server mysql-devel  php php-common php-mysql php-pgsql php-mbstring php-mcrypt

Step 4: Starting/Stopping Apache & MySQL 5.5.30

Enable Apache and MySQL on Run-Levels

# /etc/init.d/httpd start
# /etc/init.d/mysqld start

# chkconfig --levels 235 httpd on
# chkconfig --levels 235 mysqld on

Step 5: Secure Installation of  MySQL

#  mysql_secure_installation
During the installation, MySQL will ask you for your permission twice. After you say Yes to both, MySQL will install.
Once it is done installing, you can set a root MySQL password:
The prompt will ask you for your current root password.
Since you just installed MySQL, you most likely won’t have one, so leave it blank by pressing enter.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Then the prompt will ask you if you want to set a root password. Go ahead and choose Y and follow the instructions.
CentOS automates the process of setting up MySQL, asking you a series of yes or no questions.
It’s easiest just to say Yes to all the options. At the end, MySQL will reload and implement the new changes.

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y                                            
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!
Test MySQL
To run a quick test, use the command line program mysql:
you can login to mysql root account without providing any password as shown below.
# mysql -u root  
Enter Password of root 

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.5.30 MySQL Community Server (GPL) by Remi
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
Step 6: Verifying Apache, MySQL 5.5.30 & PHP 5.4.12

1. Create a page called phpinfo.php under your Apache root directory and add the following lines to it. For example (/var/www/html/phpinfo.php).

<?php
     phpinfo ();
?>

2. Now access the page via web browser like http://localhost/phpinfo.php. You will see below screenshot.



Wednesday, 6 March 2013

Kernel 3.8 Released, how to Compile in Redhat, CentOS and Fedora.

Before starting, Compiling Kernel  make sure the system has all the necessary packages installed.

Kernel 3.8 Dependencies


rpmdevtools
yum-utils
qt3-devel
libXi-devel
gcc
ncurses
ncurses-devel

yum-utils is a default package. To install the other package, use the following command

# yum install rpmdevtools yum-utils
# yum install qt3-devel libXi-devel
# yum install gcc ncurses ncurses-devel

After that

# yum update

Step 1:Downloading Kernel 3.8 

Download the latest Kernel 3.8 using wget command.

goto

# cd /tmp
# wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.8.2.tar.bz2

Step 2:Extracting Kernel 3.8 

# tar -xvf linux-3.8.2.tar.bz2 -C /usr/src/

# cd /usr/src/linux-3.8.2/

Step 3:Configuring Kernel 3.8 

Run the following command:

# make menuconfig

You will get similar to below screen, where you see number of menus to select configuration for your latest kernel.



You have to select different options as per your need. Each configuration option has HELP button associated with it so select help button to get help.        
                                                                                                                                                                               If you like to configure your latest kernel with old configuration then simple type the below command.

# make oldconfig

Step 4: Compiling Kernel 3.8

# make

The compilation would take at least 30-50 minutes depends on your system configuration.

Step 5: Installing Kernel 3.8

# make modules_install install

After Install new kernel entry in your grub.conf file.

Step 6: Verifying Kernel 3.8

To verify newly installed Kernel after reboot just type the following command on the terminal.

# uname -r








                       






Before printing, please think about its necessity..