Installing and Configuring Apache, PHP, MySQL and PhpMyAdmin in CentOS - By Paid Hackers

installing apache,php,mysql,phpmyadmin by paid hackers
This tutorial will provide a detailed demonstration on how to install Apache, PHP, and a MySQL server on your linux dedicated server, or VPS. This is useful for making your hosting incredibly secure. Rather then using a shared host, this will allow you to be your own host. This and cloudflare can make a pretty nice package.

1. Installing Apache

First we are going to start off by installing Apache. This tutorial covers CentOS. The commands don't vary much within other systems, such as Ubuntu, besides package installing.

1. We will want to install the apache package, you can do this by issuing the command into SSH below.

Side note: If you do not know how to navigate to your SSH, download PuTTY here: http://www.putty.org/ but assuming you're reading this tutorial we assume you have SSH access.


Code:
yum install httpd

Go through the self explanatory steps to install the package.

2. Now you want to issue the following command, this ensures apache will start at boot.

Code:
chkconfig --levels 235 httpd on

3. This is the final command in terms of apache, we need to start the process, we can do this by issuing the command below:

Code:
/etc/init.d/httpd start

Now locate your test apache page by going to your VPS/Dedicated Server's IP address. You should/will see a Apache 2 Test Page.

2. Installing PHP

1. Just like above, we want to install the package, we can do this by issuing the simple command below:

Code:
yum install php

Go through the self explanatory steps to install the package.

2. All we need to do now is restart Apache, we can do this by issuing the following command:

Code:
/etc/init.d/httpd restart

We're done with that part.

2. Installing MySQL

This is another easy part, we're going to install MySQL.

1. Once again we need to install the package, do this by issuing the command below:

Code:
yum install mysql mysql-server

Go through the required self explanatory steps to install the package

2. We need to create boot links again, do this by issuing the two commands below:

Code:
chkconfig --levels 235 mysqld on
Code:
/etc/init.d/mysqld start

Congratulations, MySQL has been installed, now to configure it.

3. We need to configure MySQL, issue this command below and I will explain what options are required.

Code:
mysql_secure_installation

You want to click enter on everything besides

Code:
New password: <-- data-blogger-escaped-br="" data-blogger-escaped-yourrootsqlpassword=""> Re-enter new password: <-- data-blogger-escaped-code="" data-blogger-escaped-yourrootsqlpassword="">

Make this something hard but something you will remember, or write it down.

2. Installing PhpMyAdmin

Now we want to install PhpMyAdmin, I recommend installing this for ease of database management, it's optional though.

1. You'll want to import the RPMforge GPG Key, do this by issuing the command below:

Code:
rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt

And then:

on x86_64 systems:

Code:
yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

on i386 systems:

Code:
yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm

We can now install PhpMyAdmin

2. Install the package by issuing the following command:

Code:
yum install phpmyadmin

3. Now we need to edit a file, this is a tricky part. Well, not so much.

There's a way to edit files through SSH, but I personally hate using this, I would recommend FileZilla (It's an FTP client) where you can connect to your server and use the file manager, and edit files with ease, notepad, and such.

If you choose to use FTP this is the path:

Code:
/etc/httpd/conf.d

Otherwise use this:

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

4. Replace your config file with this:

Code:
#
#  Web application to manage MySQL
#

#
#  Order Deny,Allow
#  Deny from all
#  Allow from 127.0.0.1
#


Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin

5. Once again I recommend FTP, but issue this command if you want to use vi:

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

or on FTP, this is the path:

Code:
/usr/share/phpmyadmin

Your file should look like this originally:

Code:
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
[...]

You need to change 'cookie' to http like done below:

Code:
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]

6. Restart Apache:

Code:
/etc/init.d/httpd restart

7. You can now access PhpMyAdmin with" http://127.0.0.1/phpmyadmin"

Of course by replacing 127.0.0.1 with your servers IP address.
                                     Sincerely Paid hackers
Installing and Configuring Apache, PHP, MySQL and PhpMyAdmin in CentOS - By Paid Hackers Installing and Configuring Apache, PHP, MySQL and PhpMyAdmin in CentOS - By Paid Hackers Reviewed by amit on 09:40 Rating: 5

No comments:

Powered by Blogger.