设为首页 收藏本站
查看: 684|回复: 0

[经验分享] Perfect Match PHP And Sybase On SUSE Linux 11

[复制链接]

尚未签到

发表于 2018-12-20 08:47:49 | 显示全部楼层 |阅读模式
  All of the software are source code in this article,so it's very troublesome when you install them.
  Before
  1.Make sure that you have already installed the Sybase ASE On SUSE Linux 11 SP2.
  2.Download below following softwares.


  • zlib--->http://www.zlib.net   
  • jpeg--->http://www.ijg.org  
  • libpng--->http://www.libpng.org/pub/png/libpng.html  
  • apache2--->http://mirror.bit.edu.cn/apache/httpd/  
  • freetype--->http://download.savannah.gnu.org/releases/freetype/  
  • php--->http://www.php.net/downloads.php  
  • pcre--->ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/  
  • libxml2--->ftp://xmlsoft.org/libxml2/  
  • apr and apr-util--->http://apr.apache.org/download.cgi  
  • freetds--->http://www.freetds.org/software.html  
  • gd--->http://www.boutell.com/gd/  

  3.Edit /etc/ld.so.conf file append following line:


  • /home/sybase/OCS-15_0/lib

  If you forgot do this,you will meet following error when you make php:


  • /mnt/tgz/d/php-5.4.7/sapi/cli/php:error while loading shared libraries:libsybunic64.so: cannot open shared object file: No such file or directory
  • make: *** [ext/phar/phar.php] Error 127

  Installing above softwares
  1.apr


  • suse01:/u01 #tar -xzf apr-1.4.6.tar.gz
  • suse01:/u01 #cd apr-1.4.6
  • suse01:/u01/apr-1.4.6 # ./configure --prefix=/usr/local/apr
  • suse01:/u01/apr-1.4.6 # make
  • suse01:/u01/apr-1.4.6 # make install

  2.apr-util


  • suse01:/u01 # tar -xzf apr-util-1.5.1.tar.gz
  • suse01:/u01 # cd apr-util-1.5.1
  • suse01:/u01/apr-util-1.5.1 # ./configure --with-apr=/usr/local/apr
  • suse01:/u01/apr-util-1.5.1 # make
  • suse01:/u01/apr-util-1.5.1 # make install

  3.zlib


  • suse01:/u01 # tar –xzf zlib-1.2.7.tar.gz
  • suse01:/u01 # cd zlib-1.2.7
  • suse01:/u01/zlib-1.2.7 # ./configure --prefix=/usr/local/zlib
  • suse01:/u01/zlib-1.2.7 # make
  • suse01:/u01/zlib-1.2.7 # make install

  4.libxml2


  • suse01:/u01 # tar -xzf libxml2-sources-2.9.0.tar.gz
  • suse01:/u01 # cd libxml2-2.9.0
  • suse01:/u01/libxml2-2.9.0 # ./configure --prefix=/usr/local/libxml2 --with-zlib=/usr/local/zlib --with-http --with-ftp --with-html
  • suse01:/u01/libxml2-2.9.0 # make
  • suse01:/u01/libxml2-2.9.0 # make install

  5.pcre


  • suse01:/u01 # tar -xzf pcre-8.31.tar.gz
  • suse01:/u01 # cd pcre-8.31
  • suse01:/u01/pcre-8.3 # ./configure --prefix=/usr/local/pcre
  • suse01:/u01/pcre-8.3 # make
  • suse01:/u01/pcre-8.3 # make install

  6.freetype


  • suse01:/u01 # tar -xzf freetype-2.4.10.tar.gz
  • suse01:/u01 # cd freetype-2.4.10
  • suse01:/u01/freetype-2.4.10 # ./configure --prefix=/usr/local/freetype
  • suse01:/u01/freetype-2.4.10 # make
  • suse01:/u01/freetype-2.4.10 # make install

  7.jpeg


  • suse01:/u01 # tar -xzf jpegsrc.v8d.tar.gz
  • suse01:/u01 # cd jpeg-8d
  • suse01:/u01/jpeg-8d # ./configure --prefix=/usr/local/jpeg
  • suse01:/u01/jpeg-8d # make
  • suse01:/u01/jpeg-8d # make install

  8.libpng


  • suse01:/u01 # tar -xzf libpng-1.5.13.tar.gz
  • suse01:/u01 # cd libpng-1.5.13
  • suse01:/u01/libpng-1.5.13 # ./configure --prefix=/usr/local/libpng
  • suse01:/u01/libpng-1.5.13 # make
  • suse01:/u01/libpng-1.5.13 # make install

  9.freetds


  • suse01:/u01 # tar -xzf freetds-stable.tgz
  • suse01:/u01 # cd freetds-0.91
  • suse01:/u01/freetds-0.91 # ./configure --prefix=/usr/local/freetds  
  • suse01:/u01/freetds-0.91 # make
  • suse01:/u01/freetds-0.91 # make install

  10.gd


  • suse01:/u01 # tar -xzf gd-2.0.33.tar.gz
  • suse01:/u01 # cd gd-2.0.33
  • suse01:/u01/gd-2.0.33 # ./configure --prefix=/usr/local/gd --with-freetype=/usr/local/freetype --with-png=/usr/local/libpng/include --with-jpeg=/usr/local/jpeg
  • suse01:/u01/gd-2.0.33 # make
  • suse01:/u01/gd-2.0.33 # make install

  11.apache


  • suse01:/u01 # tar -xzf httpd-2.4.3.tar.gz
  • suse01:/u01 # cd httpd-2.4.3
  • suse01:/u01/httpd-2.4.3 # ./configure --with-apr=/usr/local/apr --with-pcre=/usr/local/pcre --prefix=/usr/local/httpd --with-libxml2
  • suse01:/u01/httpd-2.4.3 # make
  • suse01:/u01/httpd-2.4.3 # make install

  12.php


  • suse01:/u01 # tar -xzf php-5.4.7.tar.gz
  • suse01:/u01 # cd php-5.4.7
  • suse01:/u01/php-5.4.7 # ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd/bin/apxs --with-pcre-dir=/usr/local/pcre --with-sybase-ct=/home/sybase/OCS-15_0 --with-libxml-dir=/usr/local/libxml2 --with-config-file-path=/usr/local/php/etc --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-jpeg-dir=/usr/local/jpeg --with-png-dir=/usr/local/libpng --with-zlib-dir=/usr/local/zlib --with-gd --enable-gd-native-ttf --enable-sockets  
  • suse01:/u01/php-5.4.7 # make  
  • suse01:/u01/php-5.4.7 # make install
  • suse01:/u01/php-5.4.7 # cp php.ini-developmen /usr/local/php/etc/php.ini

  Configure Apache
  1.Edit httpd.conf file append following lines:


  • AddType application/x-httpd-php .php
  • AddType application/x-httpd-php .php .html .htm

  2.Change DirectoryIndex
  Append index.php to DirectoryIndex line.
  3.Edit php.ini
  You need to increase the value of following parameters,the default value is 10.


  • sybct.min_server_severity = 20
  • sybct.min_client_severity = 20

  4.Start Apache Server


  • suse01:/usr/local/httpd/bin # ./apachectl start
  • suse01:/usr/local/httpd/bin # ps -ef|grep httpd
  • root     10771     1  0 14:20 ?        00:00:00 /usr/local/httpd/bin/httpd -k start
  • daemon   10772 10771  0 14:20 ?        00:00:05 /usr/local/httpd/bin/httpd -k start
  • daemon   10773 10771  0 14:20 ?        00:00:04 /usr/local/httpd/bin/httpd -k start
  • daemon   10774 10771  0 14:20 ?        00:00:05 /usr/local/httpd/bin/httpd -k start

  5.Create the index.php file


  • suse01: # vi /usr/local/httpd/htdocs/index.php



  6.Access the apache server then you get following results





运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-653399-1-1.html 上篇帖子: 亮剑:PHP,我的未来不是梦(12) 下篇帖子: php通过thrift操作hbase
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表