# yum update
# reboot
01. Install web-server software/package.
]# yum install httpd -y
02. Make web service active. (This means web server will automatically starts after server restart's.)
]# chkconfig httpd on
03. Start web service.
]# service httpd start
04. Install php software/package.
]# yum install php -y
For Latest PHP Version install remi repo.
## Install remi repo
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum --enablerepo=remi install php
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum --enablerepo=remi install php
06. Install few additional php group packages. Like php-mysql for connecting mysql server from php code.
]# yum install php-mysql php-gd php-imap php-ldap php-mbstring php-odbc php-pear php-xml php-xmlrpc php-pecl-apc -y
For Mongo Client Support with PHP :
]# yum search php-pecl-mongo
]# yum install php-pecl-mongo.x86_64
]# /etc/init.d/httpd restart
]# httpd -t
]# curl -I localhost
05. Create a file and type below contents in it.
]# vim /var/www/html/info.php
<?php
phpinfo();
?>
:wq
# service httpd restart
INSTALL MEMCACHED:
08. Install memcached package.
]# yum install memcached -y
09. Install memcached connecter (That is used to access memcached service through php code.)
]# yum install php-pecl-memcache -y
10. Now you can edit the file to set memcached port no, maxconnection, and caching settings.
]# vim /etc/sysconfig/memcached
You set increase cachesize to 256 from 64
11. Start memcached service.
# service memcached start
# chkconfig memcached on # service httpd restart
# service memcached restart
# Install MySQL Latest Version
rpm -ivh http://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm
yum install mysql-community-server mysql-community-client mysql-community-libs mysql-community-common
Install phpMyAdmin in CentOS 6.5
## Install remi repo
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum --enablerepo=remi install phpMyAdmin
Step 3: Configure phpMyAdmin
phpMyAdmin by default allowed to access from localhost only. If you want to make it accessible from remote computers edit /etc/httpd/conf.d/phpMyAdmin.conf and update all 127.0.0.1 with your network like below or enable phpMyAdmin access for everyone.
Edit the phpmyadmin.conf file.
# vim /etc/httpd/conf.d/phpMyAdmin.conf
Find and comment the whole /<Directory> section as shown below:
[...]
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
#<Directory /usr/share/phpMyAdmin/>
# <IfModule mod_authz_core.c>
# # Apache 2.4
# Require local
# </IfModule>
# <IfModule !mod_authz_core.c>
# # Apache 2.2
# Order Deny,Allow
# Deny from All
# Allow from 127.0.0.1
# Allow from ::1
# </IfModule>
#</Directory>
[...]
:wq
OR for older phpmyadmin version use below settings:
Open “config.inc.php” file and change from “cookie” to “http” to change the authentication in phpMyAdmin:
# cp /usr/share/phpMyAdmin/config.sample.inc.php /usr/share/phpMyAdmin/config.inc.php
# vim /usr/share/phpMyAdmin/config.inc.php
Change cookie to http.
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yum --enablerepo=remi install phpMyAdmin
Step 3: Configure phpMyAdmin
phpMyAdmin by default allowed to access from localhost only. If you want to make it accessible from remote computers edit /etc/httpd/conf.d/phpMyAdmin.conf and update all 127.0.0.1 with your network like below or enable phpMyAdmin access for everyone.
Edit the phpmyadmin.conf file.
# vim /etc/httpd/conf.d/phpMyAdmin.conf
Find and comment the whole /<Directory> section as shown below:
[...]
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
#<Directory /usr/share/phpMyAdmin/>
# <IfModule mod_authz_core.c>
# # Apache 2.4
# Require local
# </IfModule>
# <IfModule !mod_authz_core.c>
# # Apache 2.2
# Order Deny,Allow
# Deny from All
# Allow from 127.0.0.1
# Allow from ::1
# </IfModule>
#</Directory>
[...]
:wq
OR for older phpmyadmin version use below settings:
Open “config.inc.php” file and change from “cookie” to “http” to change the authentication in phpMyAdmin:
# cp /usr/share/phpMyAdmin/config.sample.inc.php /usr/share/phpMyAdmin/config.inc.php
# vim /usr/share/phpMyAdmin/config.inc.php
Change cookie to http.
[...]
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'http';
[...]
:wq
Restart the Apache service:
# service httpd restart
Login: http://ip/phpMyAdmin
Ref: http://tecadmin.net/how-to-install-phpmyadmin-on-centos-using-yum/
# service mysqld start
# chkconfig mysqld on
# mysql_secure_installation
here we can set mysql root password.
# service mysql restart
No comments:
Post a Comment