[Guide] Setup MySQL ( CentOS 6.3 )
#1

MySQL Installation:

 

yum install mysql mysql-server

 

Then we create the system startup links for MySQL (so that MySQL starts automatically whenever the system boots) and start the MySQL server:

 

chkconfig --levels 235 mysqld on

/etc/init.d/mysqld start

 

Set passwords for the MySQL root account:

 

mysql_secure_installation

 

~[root@server1 ~]# mysql_secure_installation ~

 

When It Asks To Set MySQL Pass [y/N] choose N

_________________________________________________________________________________________________

 

Installing Apache2

 

yum install httpd

 

Now configure your system to start Apache at boot time...

 

chkconfig --levels 235 httpd on

 

... and start Apache:

 

/etc/init.d/httpd start

 

Installing PHP5

 

We can install PHP5 and the Apache PHP5 module as follows:

 

yum install php

 

We must restart Apache afterwards:

 

/etc/init.d/httpd restart

_________________________________________________________________

 

Testing PHP5 / Getting Details About Your PHP5 Installation

 

The document root of the default web site is /var/www/html. We will now create a small PHP file (info.php) in that directory and call it in a browser. The file will display lots of useful details about our PHP installation, such as the installed PHP version.

 

vi /var/www/html/info.php

 

 

<?php

phpinfo();

?>

 

_________________________________________________________________________________________________

 

Getting MySQL Support In PHP5

 

To get MySQL support in PHP, we can install the php-mysql package. It's a good idea to install some other PHP5 modules as well as you might need them for your applications. You can search for available PHP5 modules like this:

 

yum search php

 

Pick the ones you need and install them like this:

yum install php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc

 

APC can be installed as follows:

yum install php-pecl-apc

 

Now restart Apache2:

/etc/init.d/httpd restart

 

__________________________________________________________________________________________________

 

Installing phpMyAdmin

 

First we enable the RPMforge repository on our CentOS system as phpMyAdmin is not available in the official CentOS 6.3 repositories:

 

Import the RPMforge GPG key:

rpm --import 2

 

On x86_64 systems:

yum install 2

 

On i386 systems:

yum install 2

 

phpMyAdmin can now be installed as follows:

yum install phpmyadmin
 

Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the <Directory "/usr/share/phpmyadmin"> stanza):

 

vi /etc/httpd/conf.d/phpmyadmin.conf

 

Press: Shift + : and write: wq

 

Next we change the authentication in phpMyAdmin from cookie to http:

 

vi /usr/share/phpmyadmin/config.inc.php

Change Like It:

/* Authentication type */

$cfg['Servers'][$i]['auth_type'] = 'http';

 

Restart Apache:

/etc/init.d/httpd restart

 

Afterwards, you can access phpMyAdmin under 2 ip/phpmyadmin/

 

To get Ip Adress

ifconfig

 

Credits to www.howtoforge.com



Messages In This Thread
[No subject] - by Noizy - 11-03-2012, 09:18 AM
[No subject] - by redbull - 11-03-2012, 09:20 AM
[No subject] - by MrBeaN - 11-03-2012, 09:30 AM
[No subject] - by MrSKULL - 11-03-2012, 12:37 PM
[No subject] - by XxMachaxX - 11-03-2012, 01:42 PM
[No subject] - by atanatorr - 11-03-2012, 02:01 PM
[No subject] - by exitest - 11-03-2012, 02:09 PM
[No subject] - by atanatorr - 11-03-2012, 02:21 PM
[No subject] - by someone - 11-03-2012, 02:34 PM
[No subject] - by soryjero - 11-03-2012, 03:17 PM
[No subject] - by Noizy - 11-03-2012, 03:21 PM
[No subject] - by maxig - 11-03-2012, 07:48 PM
[No subject] - by moro - 11-04-2012, 11:10 AM
[No subject] - by SKY - 11-04-2012, 02:19 PM
[No subject] - by filix_93 - 11-04-2012, 05:35 PM
[No subject] - by bloockbloock - 11-04-2012, 08:25 PM
[No subject] - by filix_93 - 11-04-2012, 08:41 PM
[No subject] - by Noizy - 11-05-2012, 12:35 PM
[No subject] - by filix_93 - 11-05-2012, 01:39 PM
[No subject] - by olo3007 - 11-05-2012, 04:27 PM
[No subject] - by filix_93 - 11-06-2012, 08:40 PM
[No subject] - by ANDREI777 - 11-07-2012, 01:07 PM
[No subject] - by Wahrheit - 11-07-2012, 01:40 PM
[No subject] - by Mr.Speedy - 12-09-2012, 08:32 PM
[No subject] - by Noizy - 12-10-2012, 06:31 PM
[No subject] - by Mr.Speedy - 12-10-2012, 08:28 PM
[No subject] - by Noizy - 12-11-2012, 10:41 AM
[No subject] - by Peter - 01-15-2013, 07:59 PM
[No subject] - by xMostHateD - 07-23-2013, 12:56 AM
[No subject] - by DarkSong - 12-23-2013, 10:20 AM
[No subject] - by BlackNight - 01-29-2014, 08:00 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)