PHP Extension Module Memcache Redis MSSQL Deployment

Source: Internet
Author: User
Tags fpm php language zend

Installation of PHP

Installation path/usr/local/php-ver

Ln-s/usr/local/php-ver PHP

./configure--prefix=/usr/local/php-5.3.22 \

--with-pear=/usr/share/php \

--with-zlib-dir=/usr/local \

--WITH-BZ2 \

--WITH-LIBXML-DIR=/USR \

--WITH-GD \

--ENABLE-GD-NATIVE-TTF \

--enable-gd-jis-conv \

--with-freetype-dir \

--with-jpeg-dir \

--with-png-dir \

--WITH-MYSQL=/USR \

--WITH-MYSQLI \

-ENABLE-PCNTL \

--with-iconv \

--disable-ipv6 \

--enable-static \

--enable-zend-multibyte \

--enable-inline-optimization \

--enable-zend-multibyte \

--enable-sockets \

--ENABLE-SOAP \

--with-gettext \

--ENABLE-FPM \


PHP.ini and php-fpm.conf
PHP.ini: Determines the PHP language running environment, supports the extended module, the development environment configuration
PHP-FPM.CONF: Process Control Manager profile, control php-cgi number of processes, resident memory, increase the response rate of Web services, php-cgi runtime loads both configuration files

Installing the Redis Plugin

1, installation Phpredis

Download:https://github.com/nicolasff/phpredis/archive/2.2.4.tar.gz

Upload phpredis-2.2.4.tar.gz to/usr/local/src directory

CD/USR/LOCAL/SRC #进入软件包存放目录

Tar zxvf phpredis-2.2.4.tar.gz #解压

CD phpredis-2.2.4 #进入安装目录

/usr/local/php/bin/phpize #用phpize生成configure配置文件, mainly for the expansion of modules

./configure--with-php-config=/usr/local/php/bin/php-config

Make #编译

Make install #安装

After the installation is complete, the following installation path appears

/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/Extension Module Storage path

2. Configure PHP Support

Configure PHP.ini

Vi/usr/local/php/lib/php.ini
Join
Extension=redis.so
)
First to see if there is extension_dir=/....
Restart PHP and See if the module is loaded

/USR/LOCAL/PHP/SBIN/PHP-FPM Restart PHP

/USR/LOCAL/PHP/BIN/PHP-M Viewing the loaded modules

Installing the MSSQL Plugin

1. Install the FreeTDS FreeTDS Open source client that provides the TDS protocol for the Linux system. Because MS SQL and Sybase use exactly the TDS protocol, FREETDS can be used to connect MS SQL to Linux.

Tar zxvf freetds-stable.tgz

CD freetds-0.91

./configure--prefix=/usr/local/freetds--with-tdsver=9.0--enable-msdblib

Make && make install

When finished, the last update is on the Dynamic Connection library cache:echo "/usr/local/freetds/lib" >>/etc/ld.so.conf ldconfig

2. Configuring FreeTDS and Connection Testing

To modify the master configuration file/freetds.conf

Client CharSet = UTF8

3. Installing the MSSQL Extension for PHP

CD php-5.3.13/ext/mssql/

Usr/local/php/bin/phpize

./configure--with-php-config=/usr/local/php/bin/php-config--with-mssql=/usr/local/freetds

Make

CP modules/mssql.so/usr/local/php/lib/php/ext/extensions/

4. Configuring the php.ini File

Extension=mssql.so

Installing the Memcache Plugin

1. Required software memcache used libevent This library for socket processing

libevent-1.4.6-stable.tar.gz

Memcache-2.2.3.tgz

2. Extension plug-in

CD memcache-3.0.8/

/usr/local/php/bin/phpize

./configure--enable-memcache--with-php-config=/usr/local/php/bin/php-config

Make && make install

3. Modify the php.ini file

Extension=memcache.so

4. Check if the module is loaded

/usr/local/php/bin/php-m

This article from "Banging blog" blog, declined reprint!

PHP Extension Module Memcache Redis MSSQL Deployment

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.