deepin官方的lamp,安装完,如何安装phalcon和redis扩展呢
Tofloor
poster avatar
waitingfml
deepin
2017-08-30 05:03
Author
deepin官方的lamp,安装完,如何安装phalcon和redis扩展呢
Reply Favorite View the author
All Replies
avatar
jingle
deepin
2017-08-30 17:15
#1
Reply View the author
avatar
waitingfml
deepin
2017-08-30 18:10
#2
https://bbs.deepin.org/post/144829
https://phalconphp.com/en/download/linux

https://redis.io/download

要在Ubuntu或Debian上安装Phalcon,您需要按照以下步骤操作:
curl -s "https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh" | sudo bashsudo apt-get install php5-phalcon
汇编
在Linux上,您可以轻松地从源代码编译和安装扩展。
要求
我们需要先前安装的一些软件包
  • PHP 5.x开发资源
  • GCC编译器
# Ubuntusudo apt-get install php5-dev php5-mysql gcc libpcre3-dev# Fedorasudo yum install php-devel php-mysqlnd gcc libtool pcre-devel# RHELsudo yum install php-devel php-mysql gcc libtool pcre-devel# Suseyast2 -i php5-pear php5-devel php5-mysql gcc libtool pcre-devel# OS X (Homebrew)brew tap homebrew/dupesbrew tap homebrew/versionsbrew tap homebrew/phpbrew install php5x php5x-phalcon # php55, php56, ...
汇编
1.要从C源创建扩展名,请按照下列步骤操作:

git clone --depth=1 "git://github.com/phalcon/cphalcon.git"cd cphalcon/buildsudo ./install
2.将扩展名添加到您的php.ini:
extension=phalcon.so
最后,重新启动Web服务器

用第一种方法装还是第二种呢


Reply View the author
avatar
waitingfml
deepin
2017-08-30 18:29
#3
https://bbs.deepin.org/post/144829
https://phalconphp.com/en/download/linux

https://redis.io/download

root@zhwj-PC:/home/zhwj/Desktop# cd cphalcon/
root@zhwj-PC:/home/zhwj/Desktop/cphalcon# cd build/
root@zhwj-PC:/home/zhwj/Desktop/cphalcon/build# ls
gccarch.c  gcccpuopt  gen-build.php  install  php5  php7  README.md  _resource
root@zhwj-PC:/home/zhwj/Desktop/cphalcon/build# ./install
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
libtool: compile:  gcc -I. -I/home/zhwj/Desktop/cphalcon/build/php5/64bits -DPHP_ATOM_INC -I/home/zhwj/Desktop/cphalcon/build/php5/64bits/include -I/home/zhwj/Desktop/cphalcon/build/php5/64bits/main -I/home/zhwj/Desktop/cphalcon/build/php5/64bits -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -fomit-frame-pointer -c /home/zhwj/Desktop/cphalcon/build/php5/64bits/phalcon.zep.c  -fPIC -DPIC -o .libs/phalcon.o






libtool: link: gcc -shared  -fPIC -DPIC  .libs/phalcon.o    -march=native -mtune=native -O2   -Wl,-soname -Wl,phalcon.so -o .libs/phalcon.so
libtool: link: ( cd ".libs" && rm -f "phalcon.la" && ln -s "../phalcon.la" "phalcon.la" )
libtool: install: cp ./.libs/phalcon.so /home/zhwj/Desktop/cphalcon/build/php5/64bits/modules/phalcon.so
libtool: install: cp ./.libs/phalcon.lai /home/zhwj/Desktop/cphalcon/build/php5/64bits/modules/phalcon.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /home/zhwj/Desktop/cphalcon/build/php5/64bits/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /home/zhwj/Desktop/cphalcon/build/php5/64bits/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/php5/20131226/
Installing header files:           /usr/include/php5/

Thanks for compiling Phalcon!
Build succeed: Please restart your web server to complete the installation

root@zhwj-PC:/home/zhwj/Desktop/cphalcon/build#

然后在
/etc/php5/apache2# gedit php.ini

这个路径的php.ini文件里加入了extension=phalcon.so
重启apache2后,扩展还是没有装上,不知是哪里的问题





Reply View the author