Yum installs Memcache,mongo extensions and Python's MySQL module installation

Source: Internet
Author: User
Tags fpm install php memcached python mysql

Start memcached
/usr/local/memcached/bin/memcached-d-C 10240-m 1024-p 11211-u root
/usr/local/memcached/bin/memcached-d-C 10240-m 1024-p 11212-u root


1. Installing MongoDB

MongoDB installed in the/usr/local/mongod directory
Mkdir/usr/local/mongod/data//Store data,
Touch/usr/local/mongod/logs//Store Log


Start the MONGO service
/usr/local/mongod/bin/mongod--dbpath=/usr/local/mongod/data--logpath=/usr/local/mongod/logs--logappend--port= 27017--fork


2, install php MONGO extension, here need to restart PHP-FPM
(if Phpize is not installed, you will need: Yum install php-devel)
Yum-y Install Php-pecl-mongo
PECL Install MONGO
Add extension=mongo.so to PHP.ini

Vim/etc/php.ini Increase extension=mongo.so
/ETC/RC.D/INIT.D/PHP-FPM restart


3. Installing the Python MySQL module
Yum Install Python-setuptools (if not)
Easy_install pip
Yum-y install python-devel mysql-devel # #libxml2 Libxml2-dev libxslt* zlib gcc OpenSSL
Pip Install Mysql-python

#vim./site.cfg
#第13行 modified to: Mysql_config=/usr/bin/mysql_config
#python setup.py Build
#python setup.py Install

4. Install the Python Pymongo module
Pip Install Pymongo


Installing the Memcache Extension
Yum Install libevent Libevent-devel
Yum-y Install Php-pecl-memcache
PECL Install Memcache
Add extension=memcache.so to PHP.ini
/ETC/RC.D/INIT.D/PHP-FPM restart

Yum installs Memcache,mongo extensions and Python's MySQL module installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.