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.
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.
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:
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:
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:
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:
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:
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.
You want to click enter on everything besides
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:
And then:
on x86_64 systems:
on i386 systems:
We can now install PhpMyAdmin
2. Install the package by issuing the following command:
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:
Otherwise use this:
4. Replace your config file with this:
5. Once again I recommend FTP, but issue this command if you want to use vi:
or on FTP, this is the path:
Your file should look like this originally:
You need to change 'cookie' to http like done below:
6. Restart Apache:
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
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 httpdGo 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 on3. 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 startNow 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 phpGo 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 restartWe'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-serverGo 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 startCongratulations, 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_installationYou 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.txtAnd then:
on x86_64 systems:
Code:
yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpmon i386 systems:
Code:
yum install http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpmWe can now install PhpMyAdmin
2. Install the package by issuing the following command:
Code:
yum install phpmyadmin3. 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.dOtherwise use this:
Code:
vi /etc/httpd/conf.d/phpmyadmin.conf4. 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/phpmyadmin5. Once again I recommend FTP, but issue this command if you want to use vi:
Code:
vi /usr/share/phpmyadmin/config.inc.phpor on FTP, this is the path:
Code:
/usr/share/phpmyadminYour 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 restart7. 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
Reviewed by amit
on
09:40
Rating:
Reviewed by amit
on
09:40
Rating:

No comments: