Easy Way to Install the MongoDB PHP Driver on CentOS/RHEL 6x & Ubuntu 14.04
Step: 1. Install Apache Server :
For CentOS Users :
# yum -y install httpd httpd-devel
For Ubuntu Users :
# apt-get -y install apache2
Step: 2. Install PHP :
For CentOS Users :
# yum -y install epel-release
# yum -y install php php-cli php-mysql php-common php-gd php-mbstring php-mcrypt php-devel \
php-xml php-imap php-ldap php-mbstring php-odbc php-pear php-xmlrpc php-soap php-intl mod_ssl
For Ubuntu Users :
# apt-get -y install php5 php5-cli libapache2-mod-php5 php-pear php5-dev
Step: 3. Install Mongo Driver :
For CentOS Users :
# yum -y install openssl-devel
# pecl install mongo
For Ubuntu Users :
# pecl install mongo
Step: 4. Add the Extension in php.ini File :
For CentOS Users :
# vi /etc/php.d/mongo.ini
extension=mongo.so
-- Save & Quit (:wq)
For Ubuntu Users :
# vi /etc/php5/conf.d/mongo.ini
extension=mongo.so
-- Save & Quit (:wq)
Step: 5. Finally Restart the Apache Service :
For CentOS Users :
# service httpd restart
For Ubuntu Users :
# service apache2 restart
Step: 6. Now Create a info.php File Under /var/www/html & Check the Mongo Driver :
# vi /var/www/html/info.php
<?php
phpinfo ();
?>
-- Save & Quit (:wq)
http://ip_address/info.php
Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog
0 comments:
Post a Comment