You must Install Centos on your Server and I am here Using Centos 6.4.
Some we Need For Build a WebServer on CentOS 6.4 :
Apache
PHP5
MYSQL
PhpMyAdmin
APACHE
yum install httpd
and now configure apache in the startup :
chkconfig --levels 235 httpd on |
service httpd start |
PHP5
yum install php
and restart your apache :
service httpd restart
and test the php by create the file “info.php”
cd /
var
/www/html/
nano info.php
Paste the code :
<? phpinfo (); ?>
and open in your browser
http://192.168.1.20/info.php.
and you get all information about your system.
MYSQL
yum install mysql mysql-server
and put mysql running in start up
chkconfig --levels 235 mysqld on
and Now start it
service mysqld start
Next Configure your mysql password :mysql_secure_installation
Just press Enter & Enter
- if you see the word ” Set root password ? Y/N ” you must enter your password there and renter it. And just press ENTER to finish it.Now is Getting MYSQL connect and support for PHP5.
yum install php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc
and restart your Apache
service httpd restart
now check it from yor browser http://192.168.1.20/info.php
and you get mysql there and other module.
PhpMyAdmin
Default Centos Repository is does not provide for phpmyadmin package.And we must install from other repositories.
for 32 bit :
yum -y install http:
//pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
for 64 bit :
yum -y install http:
//pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
now time to install :
yum -y install phpmyadmin
configure phpmyadmin to be easy to access.
nano /etc/httpd/conf.d/phpmyadmin.conf
and comment the code like this :
#
# Web application to manage MySQL
#
#<Directory
"/usr/share/phpmyadmin"
>
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#</Directory>
Alias /phpmyadmin /usr/share/phpmyadmin
Alias /phpMyAdmin /usr/share/phpmyadmin
Alias /mysqladmin /usr/share/phpmyadmin
next is changet the authentication from “cookie” to “http” :
nano /usr/share/phpmyadmin/confic.inc.php
ctrl + w and type “cookie” ENTER. And Replace with “http”
[...]
/* Authentication type */
$cfg
[
'Servers'
][
$i
][
'auth_type'
] =
'http'
;
[...]
now restart apache :
service httpd restart
and test for phpmyadmin http://192.168.1.20/phpmyadmin/
and congratulations you have successfully built webserver on CentOS 6.4 – Thankz @howtoforge
and congratulations you have successfully built webserver on CentOS 6.4 – Thankz @howtoforge
Title : How toinstall LAMP on CentOS 6.4
Description : You must Install Centos on your Server and I am here Using Centos 6.4. Some we Need For Build a WebServer on CentOS 6.4 : Apache P...
Description : You must Install Centos on your Server and I am here Using Centos 6.4. Some we Need For Build a WebServer on CentOS 6.4 : Apache P...
0 Response to "How toinstall LAMP on CentOS 6.4"
Post a Comment