Perfect Match PHP And Sybase On SUSE Linux 11
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: *** 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 10 14:20 ? 00:00:00 /usr/local/httpd/bin/httpd -k start
[*]daemon 10772 107710 14:20 ? 00:00:05 /usr/local/httpd/bin/httpd -k start
[*]daemon 10773 107710 14:20 ? 00:00:04 /usr/local/httpd/bin/httpd -k start
[*]daemon 10774 107710 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
http://blog.运维网.com/attachment/201210/141422787.jpg
页:
[1]