CentOS下如何安裝phpredis擴充套件
1.到redis的官網找到redis客戶端下載,選擇php
安裝Redis的PHP擴充套件
2.1 安裝phpize
yum install php-devel
2.2 下載擴充套件原始碼包,直接用wget
wget下載github上的檔案
wget https://github.com/nicolasff/phpredis/archive/master.zip
2.3 如果沒裝unzip,需要先安裝unzip
yum install unzip
2.4 解壓master.zip
unzip master.zip
2.5 解壓目錄為phpredis-master,進入該資料夾,開始編譯php擴充套件
phpize
2.6 配置環境
./configure
2.7 編譯
make && make install
編譯完成後顯示:
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/lib64/php/modules/
進入/usr/lib64/php/modules/資料夾,發現redis.so的擴充套件
2.8 修改/etc/php.ini,新增下面的擴充套件
extension=redis.so
2.9 重啟伺服器
service httpd restart
最後檢視phpinfo,顯示如下,代表安裝成功:
安裝完成以後,建立index.php測試一下
<?php
//例項化
$redis = new Redis();
//連線伺服器
$a=$redis->connect("localhost",6379);
//var_dump($a);
//授權
$redis->auth("107lab");
$redis->set("name1","107lab");
$data=$redis->get("name1" );
var_dump($data);
執行結果為:
string(6) "107lab"
以下是安裝過程全記錄
[[email protected]_114_93_centos local]# ls
redis-3.0.6 redis-3.0.6.tar.gz
[[email protected]_114_93_centos local]# wget https://github.com/phpredis/phpredis/archive/develop.zip
--2016-10-02 11:06:16-- https://github.com/phpredis/phpredis/archive/develop.zip
Resolving github.com... 192.30.253.112
Connecting to github.com|192.30.253.112|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/phpredis/phpredis/zip/develop [following]
--2016-10-02 11:06:18-- https://codeload.github.com/phpredis/phpredis/zip/develop
Resolving codeload.github.com... 192.30.253.121
Connecting to codeload.github.com|192.30.253.121|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 220222 (215K) [application/zip]
Saving to: `develop.zip'
100%[==============================================>] 220,222 104K/s in 2.1s
2016-10-02 11:06:23 (104 KB/s) - `develop.zip' saved [220222/220222]
[[email protected]_114_93_centos local]# ls
develop.zip redis-3.0.6 redis-3.0.6.tar.gz
[[email protected]_114_93_centos local]# yum install unzip
Loaded plugins: fastestmirror, security
Setting up Install Process
Determining fastest mirrors
epel | 4.3 kB 00:00
extras | 3.3 kB 00:00
os | 3.7 kB 00:00
updates | 3.4 kB 00:00
Package unzip-6.0-4.el6.i686 already installed and latest version
Nothing to do
[[email protected]_114_93_centos local]# unzip develop.zip
Archive: develop.zip
b5fd2ccc95457fe1c3decfdbdd72751a87ed12b4
creating: phpredis-develop/
inflating: phpredis-develop/.gitignore
inflating: phpredis-develop/.travis.yml
inflating: phpredis-develop/COPYING
inflating: phpredis-develop/CREDITS
inflating: phpredis-develop/README.markdown
inflating: phpredis-develop/arrays.markdown
inflating: phpredis-develop/cluster.markdown
inflating: phpredis-develop/cluster_library.c
inflating: phpredis-develop/cluster_library.h
inflating: phpredis-develop/common.h
inflating: phpredis-develop/config.m4
inflating: phpredis-develop/config.w32
inflating: phpredis-develop/crc16.h
inflating: phpredis-develop/debian.control
creating: phpredis-develop/debian/
inflating: phpredis-develop/debian/changelog
extracting: phpredis-develop/debian/compat
inflating: phpredis-develop/debian/control
inflating: phpredis-develop/debian/copyright
inflating: phpredis-develop/debian/postinst
inflating: phpredis-develop/debian/postrm
inflating: phpredis-develop/debian/rules
inflating: phpredis-develop/library.c
inflating: phpredis-develop/library.h
inflating: phpredis-develop/mkdeb-apache2.sh
inflating: phpredis-develop/mkdeb.sh
inflating: phpredis-develop/package.xml
inflating: phpredis-develop/php_redis.h
inflating: phpredis-develop/redis.c
inflating: phpredis-develop/redis_array.c
inflating: phpredis-develop/redis_array.h
inflating: phpredis-develop/redis_array_impl.c
inflating: phpredis-develop/redis_array_impl.h
inflating: phpredis-develop/redis_cluster.c
inflating: phpredis-develop/redis_cluster.h
inflating: phpredis-develop/redis_commands.c
inflating: phpredis-develop/redis_commands.h
inflating: phpredis-develop/redis_session.c
inflating: phpredis-develop/redis_session.h
creating: phpredis-develop/rpm/
inflating: phpredis-develop/rpm/php-redis.spec
extracting: phpredis-develop/rpm/redis.ini
inflating: phpredis-develop/serialize.list
creating: phpredis-develop/tests/
inflating: phpredis-develop/tests/RedisArrayTest.php
inflating: phpredis-develop/tests/RedisClusterTest.php
inflating: phpredis-develop/tests/RedisTest.php
inflating: phpredis-develop/tests/TestRedis.php
inflating: phpredis-develop/tests/TestSuite.php
inflating: phpredis-develop/tests/make-cluster.sh
inflating: phpredis-develop/tests/mkring.sh
[[email protected]_114_93_centos local]# ls
develop.zip phpredis-develop redis-3.0.6 redis-3.0.6.tar.gz
[[email protected]_114_93_centos local]# cd phpredis-develop/
[[email protected]_114_93_centos phpredis-develop]# ls
COPYING config.w32 php_redis.h redis_commands.h
CREDITS crc16.h redis.c redis_session.c
README.markdown debian redis_array.c redis_session.h
arrays.markdown debian.control redis_array.h rpm
cluster.markdown library.c redis_array_impl.c serialize.list
cluster_library.c library.h redis_array_impl.h tests
cluster_library.h mkdeb-apache2.sh redis_cluster.c
common.h mkdeb.sh redis_cluster.h
config.m4 package.xml redis_commands.c
[[email protected]_114_93_centos phpredis-develop]# phpize
Configuring for:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
[[email protected]_114_93_centos phpredis-develop]# ll
total 2124
-rw-r--r-- 1 root root 3218 Oct 1 17:56 COPYING
-rw-r--r-- 1 root root 204 Oct 1 17:56 CREDITS
-rw-r--r-- 1 root root 5462 Oct 2 11:07 Makefile.global
-rw-r--r-- 1 root root 96037 Oct 1 17:56 README.markdown
-rw-r--r-- 1 root root 75570 Oct 2 11:07 acinclude.m4
-rw-r--r-- 1 root root 358139 Oct 2 11:07 aclocal.m4
-rw-r--r-- 1 root root 8471 Oct 1 17:56 arrays.markdown
drwxr-xr-x 2 root root 4096 Oct 2 11:07 autom4te.cache
drwxr-xr-x 2 root root 4096 Oct 2 11:07 build
-rw-r--r-- 1 root root 10126 Oct 1 17:56 cluster.markdown
-rw-r--r-- 1 root root 75698 Oct 1 17:56 cluster_library.c
-rw-r--r-- 1 root root 16362 Oct 1 17:56 cluster_library.h
-rw-r--r-- 1 root root 13417 Oct 1 17:56 common.h
-rwxr-xr-x 1 root root 44892 Oct 2 11:07 config.guess
-rw-r--r-- 1 root root 1754 Oct 2 11:07 config.h.in
-rwxr-xr-x 1 root root 3395 Oct 1 17:56 config.m4
-rwxr-xr-x 1 root root 33387 Oct 2 11:07 config.sub
-rw-r--r-- 1 root root 923 Oct 1 17:56 config.w32
-rwxr-xr-x 1 root root 402197 Oct 2 11:07 configure
-rw-r--r-- 1 root root 4639 Oct 2 11:07 configure.in
-rw-r--r-- 1 root root 4483 Oct 1 17:56 crc16.h
drwxr-xr-x 2 root root 4096 Oct 1 17:56 debian
-rw-r--r-- 1 root root 309 Oct 1 17:56 debian.control
-rw-r--r-- 1 root root 0 Oct 2 11:07 install-sh
-rw-r--r-- 1 root root 69874 Oct 1 17:56 library.c
-rw-r--r-- 1 root root 6647 Oct 1 17:56 library.h
-rw-r--r-- 1 root root 243248 Oct 2 11:07 ltmain.sh
-rw-r--r-- 1 root root 0 Oct 2 11:07 missing
-rwxr-xr-x 1 root root 636 Oct 1 17:56 mkdeb-apache2.sh
-rwxr-xr-x 1 root root 471 Oct 1 17:56 mkdeb.sh
-rw-r--r-- 1 root root 0 Oct 2 11:07 mkinstalldirs
-rw-r--r-- 1 root root 10686 Oct 1 17:56 package.xml
-rw-r--r-- 1 root root 8715 Oct 1 17:56 php_redis.h
-rw-r--r-- 1 root root 119068 Oct 1 17:56 redis.c
-rw-r--r-- 1 root root 37494 Oct 1 17:56 redis_array.c
-rw-r--r-- 1 root root 1681 Oct 1 17:56 redis_array.h
-rw-r--r-- 1 root root 36659 Oct 1 17:56 redis_array_impl.c
-rw-r--r-- 1 root root 1613 Oct 1 17:56 redis_array_impl.h
-rw-r--r-- 1 root root 96357 Oct 1 17:56 redis_cluster.c
-rw-r--r-- 1 root root 9833 Oct 1 17:56 redis_cluster.h
-rw-r--r-- 1 root root 102831 Oct 1 17:56 redis_commands.c
-rw-r--r-- 1 root root 11419 Oct 1 17:56 redis_commands.h
-rw-r--r-- 1 root root 21666 Oct 1 17:56 redis_session.c
-rw-r--r-- 1 root root 422 Oct 1 17:56 redis_session.h
drwxr-xr-x 2 root root 4096 Oct 1 17:56 rpm
-rw-r--r-- 1 root root 68683 Oct 2 11:07 run-tests.php
-rw-r--r-- 1 root root 424 Oct 1 17:56 serialize.list
drwxr-xr-x 2 root root 4096 Oct 1 17:56 tests
[[email protected]_114_93_centos phpredis-develop]# ./configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable redis support... yes, shared
checking whether to enable sessions... yes
checking whether to enable igbinary serializer support... no
checking for redis igbinary support... disabled
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
[[email protected]_114_93_centos phpredis-develop]# make && make install
/bin/sh /local/phpredis-develop/libtool --mode=compile cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/redis.c -o redis.lo
libtool: compile: cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/redis.c -fPIC -DPIC -o .libs/redis.o
/bin/sh /local/phpredis-develop/libtool --mode=compile cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/redis_commands.c -o redis_commands.lo
libtool: compile: cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/redis_commands.c -fPIC -DPIC -o .libs/redis_commands.o
/local/phpredis-develop/redis_commands.c: In function 'redis_setbit_cmd':
/local/phpredis-develop/redis_commands.c:2081: warning: this decimal constant is unsigned only in ISO C90
/bin/sh /local/phpredis-develop/libtool --mode=compile cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/library.c -o library.lo
libtool: compile: cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/library.c -fPIC -DPIC -o .libs/library.o
/bin/sh /local/phpredis-develop/libtool --mode=compile cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/redis_session.c -o redis_session.lo
libtool: compile: cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/redis_session.c -fPIC -DPIC -o .libs/redis_session.o
/bin/sh /local/phpredis-develop/libtool --mode=compile cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/redis_array.c -o redis_array.lo
libtool: compile: cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/redis_array.c -fPIC -DPIC -o .libs/redis_array.o
/bin/sh /local/phpredis-develop/libtool --mode=compile cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/redis_array_impl.c -o redis_array_impl.lo
libtool: compile: cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/redis_array_impl.c -fPIC -DPIC -o .libs/redis_array_impl.o
/bin/sh /local/phpredis-develop/libtool --mode=compile cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/redis_cluster.c -o redis_cluster.lo
libtool: compile: cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/redis_cluster.c -fPIC -DPIC -o .libs/redis_cluster.o
/bin/sh /local/phpredis-develop/libtool --mode=compile cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/cluster_library.c -o cluster_library.lo
libtool: compile: cc -I. -I/local/phpredis-develop -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /local/phpredis-develop/cluster_library.c -fPIC -DPIC -o .libs/cluster_library.o
/bin/sh /local/phpredis-develop/libtool --mode=link cc -DPHP_ATOM_INC -I/local/phpredis-develop/include -I/local/phpredis-develop/main -I/local/phpredis-develop -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -o redis.la -export-dynamic -avoid-version -prefer-pic -module -rpath /local/phpredis-develop/modules redis.lo redis_commands.lo library.lo redis_session.lo redis_array.lo redis_array_impl.lo redis_cluster.lo cluster_library.lo
libtool: link: cc -shared .libs/redis.o .libs/redis_commands.o .libs/library.o .libs/redis_session.o .libs/redis_array.o .libs/redis_array_impl.o .libs/redis_cluster.o .libs/cluster_library.o -Wl,-soname -Wl,redis.so -o .libs/redis.so
libtool: link: ( cd ".libs" && rm -f "redis.la" && ln -s "../redis.la" "redis.la" )
/bin/sh /local/phpredis-develop/libtool --mode=install cp ./redis.la /local/phpredis-develop/modules
libtool: install: cp ./.libs/redis.so /local/phpredis-develop/modules/redis.so
libtool: install: cp ./.libs/redis.lai /local/phpredis-develop/modules/redis.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/sbin" ldconfig -n /local/phpredis-develop/modules
----------------------------------------------------------------------
Libraries have been installed in:
/local/phpredis-develop/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
Installing shared extensions: /usr/lib/php/modules/
[[email protected]_114_93_centos phpredis-develop]# cd /usr/lib/php/modules/
[[email protected]_114_93_centos modules]# ll
total 4744
-rwxr-xr-x 1 root root 65568 May 11 05:33 curl.so
-rwxr-xr-x 1 root root 158384 May 11 05:33 dom.so
-rwxr-xr-x 1 root root 1843676 May 11 05:33 fileinfo.so
-rwxr-xr-x 1 root root 316012 May 11 05:33 gd.so
-rwxr-xr-x 1 root root 90676 May 11 05:33 imap.so
-rwxr-xr-x 1 root root 33428 May 11 05:33 json.so
-rwxr-xr-x 1 root root 45396 May 11 05:33 ldap.so
-rwxr-xr-x 1 root root 45332 May 11 05:33 mysql.so
-rwxr-xr-x 1 root root 122024 May 11 05:33 mysqli.so
-rwxr-xr-x 1 root root 61460 May 11 05:33 odbc.so
-rwxr-xr-x 1 root root 90872 May 11 05:33 pdo.so
-rwxr-xr-x 1 root root 25672 May 11 05:33 pdo_mysql.so
-rwxr-xr-x 1 root root 22696 May 11 05:33 pdo_odbc.so
-rwxr-xr-x 1 root root 21288 May 11 05:33 pdo_sqlite.so
-rwxr-xr-x 1 root root 265280 May 11 05:33 phar.so
-rwxr-xr-x 1 root root 1216119 Oct 2 11:09 redis.so
-rwxr-xr-x 1 root root 41344 May 11 05:33 sqlite3.so
-rwxr-xr-x 1 root root 31572 May 11 05:33 wddx.so
-rwxr-xr-x 1 root root 25592 May 11 05:33 xmlreader.so
-rwxr-xr-x 1 root root 81584 May 11 05:33 xmlrpc.so
-rwxr-xr-x 1 root root 37752 May 11 05:33 xmlwriter.so
-rwxr-xr-x 1 root root 27892 May 11 05:33 xsl.so
-rwxr-xr-x 1 root root 81248 May 11 05:33 zip.so
[[email protected]_114_93_centos modules]# vim /etc/php.ini
You have new mail in /var/spool/mail/root
[[email protected]_114_93_centos modules]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[[email protected]_114_93_centos modules]#
相關推薦
centos下安裝phpredis擴充套件
1、在github 下載安裝包 https://github.com/phpredis/phpredis,上傳到伺服器上,並unzip解壓 2、安裝 #進入安裝包 $ cd phpredis-develop #php安裝後的路徑,需結合實際情況,可用whereis命令
centos 下安裝php擴充套件curl
首先系統裡已經安裝curl 然後進入下載的php原始碼中的擴充套件目錄,我的在cd /root/php/php-7.1.11/ext/ ./configure --with-curl=/usr/include/curl/ (curl的安裝目錄) 然後make & make ins
CentOS下如何安裝phpredis擴充套件
1.到redis的官網找到redis客戶端下載,選擇php 安裝Redis的PHP擴充套件 2.1 安裝phpize yum install php-devel 2.2 下載擴充套件原始碼包,直接用wget wget下載github上的檔案
CentOS 下 安裝Redis的PHP擴充套件[轉]
、安裝Redis的PHP擴充套件 2.1 安裝phpize yum install php-devel 2.2 下載擴充套件原始碼包,直接用wget #wget下載github上的檔案 wget https://github.com/nicolasff/phpredis/arc
CentOS環境PHP下安裝memcache擴充套件
注意:必須要memcache上下對包,memcached和memcache php擴充套件,先安裝memcached 1、安裝libmemcached庫 yum install libmemcached 2、下載並解壓memcache檔案 wget http://pecl.p
Centos 下安裝php7以及其擴充套件
安裝php7 1.安裝epel-release rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm 2.安裝PHP7的rpm源 rpm -Uvh https
centos下安裝PHP的PDO擴充套件!
PHP 資料物件PDO擴充套件為PHP訪問資料庫定義了一個輕量級的一致介面。PDO 提供了一個數據訪問抽象層,這意味著,不管使用哪種資料庫,都可以用相同的函式(方法)來查詢和獲取資料。 環境: 伺服器系統:Centos6.5 (虛擬機器演示) PHP軟體包存放目錄:/d
mac下安裝php擴充套件phpredis
git clone git://github.com/nicolasff/phpredis.git cd ./phpredis phpize make make install 然後編寫ini檔案: vim /opt/local/etc/php5/conf.d/php.i
linux下使用phpize 安裝 phpredis擴充套件
對Linux很不熟悉,折騰了些時間,把redis擴充套件安裝好,其中遇到不少的問題,作個記錄。 (1)下載原始碼包 到redis中文網:http://www.redis.net.cn/clients/#php(或官網),下圖: 到github,連結:https://git
centos安裝PHPredis擴充套件安裝
本人安裝步驟:(linux系統php安裝redis擴充套件) 1.從官網下載安裝包: cd /usr/local/src (安裝包在此存放) wget https://pecl.php.net/get/redis-3.1.0.tgz 2.解壓安裝包: tar -zxvf
CentOS 下安裝php zookeeper擴充套件
一、安裝libzookeeper 1. cd /usr/local/zookeeper/zookeeper-3.4.3/src/c 2. sudo ./configure --prefix=/usr/local/zookeeper/zookeeper-3.4.3/ 3.
centos 下安裝nginx
nginxNginx是C寫的,需要用GCC編譯;Nginx的Rewrite和HTTP模塊會用到PCRE;Nginx中的Gzip用到zlib;wget http://nginx.org/download/nginx-1.13.0.tar.gztar -zxvf nginx-1.13.0.tar.gz./conf
搭建JEESZ分布式架構3--CentOs下安裝MySQL(環境準備)
spring mvc+my batis dubbo+zookeerper kafka restful redis分布式緩存 聲明:因為運行環境是基於Linux系統的,在做此框架之前需要做一些前期的環境準備工作CentOs下安裝MySQL網上很多實例,因為博客後期作為框架的原生教程,故這邊做詳細
Centos下安裝Lamp和vsftpd、redis
arc 4.3 啟動mysql kernel 2.4 avi end 配置 命令 yum安裝httpd和php、mysql服務 1: yum search httpd //搜索httpd開頭的軟件包 2: yum install httpd.x86_6
Centos下安裝php擴展sphinx
問題 for strings () form let rect orm 必須 官方地址:http://pecl.php.net/package/sphinx wget http://pecl.php.net/get/sphinx-1.3.3.tgz tar -zxvf sp
Linux CentOS下安裝、配置mysql數據庫
config 得到 操作 program except naconda 服務端 強力 fig 假設要在Linux上做j2ee開發。首先得搭建好j2ee的開發環境。包含了jdk、tomcat、eclipse的安裝(這個在之前的一篇隨筆中已經有具體解說了Linux學習之Ce
centos 下 安裝mysql
root mmu nbsp server epo http 問題 arc 可用 今天在centos上安裝了一下 mysql 出現了一點問題 記錄一下解決方案: 1:解決yum install mysql-server沒有可用包的問題 sudo yum install mys
JEESZ分布式架構3--CentOs下安裝MySQL(環境準備)
spring mvc+my batis dubbo+zookeerper kafka restful redis分布式緩存 聲明:因為運行環境是基於Linux系統的,在做此框架之前需要做一些前期的環境準備工作CentOs下安裝MySQL網上很多實例,因為博客後期作為框架的原生教程,故這邊做詳細
CentOS下安裝Filezilla軟件
org osc 分享 剛才 http row ron sta 第一條 CentOS下安裝Filezilla軟件 說到Centos大家都是非常熟悉了,當然Filezilla也是日常中應用的軟件,但是在linux下安裝怎麽操作呢。安裝Filezilla有多個方式,但用戶應該
Centos下安裝JDK環境配置
too nbsp java tail 使用 服務 卸載 linu rep 一、linux服務器遠程連接工具安裝準備 a、下載Xshell http://rj.baidu.com/soft/detail/15201.html?ald b、下載xftp