Apache+PHP4.0+Sybase安装文档
2021-01-23 14:35:425
-------------------
110 北京市
120 天津市
[相关软件]
Redhat7.0Linux
Apache1.3.12
PHP4.0.0
Sybase11.9.2forLinux/Intel
[安装过程]
1。安装REDHAT7.0
我选择了Customer全安装,因为安装Sybase时,要有X环境。
安装完成后,建立一个工作目录/home/workshop,上传所有安装文件
sybase-common-11.9.2-3.i386.rpm
sybase-openclient-11.1.1-3.i386.rpm
apache_1.3.12.tar.gz
php-4.0.0.tar.gz
2.安装Sybase的open-client.
在/home/workshop目录下:
host_name#rpm-hivsybase-common-11.9.2-3.i386.rpm
host_name#rpm-hivsybase-openclient-11.1.1-3.i386.rpm
默认的安装路径为/opt/sybase-11.9.2/,并且有了一个sybase用户,用passwdsybase命令更改sybase用户的密码。
现在,用sybase登陆到你的linux计算机上,计算机将显示
------------------------------------------------------------------------
C-Shellusers:
source.cshrc
=>Start@#srvbuild@#
srvbuild
DocumentationtowardsanySybaseproductcanbefoundonourDynaweb
pagesaccessiblefromourWorldWideWebsite:
Wewouldlikeyoutoregisteryourinstallationandfindmore
informationaboutthisSybaseAdaptiveServerEnterpriserelease
forLinuxavailablefrom:
EnjoythisSybaseAdaptiveEnterpriseServerinstallation!
bash-2.04$
------------------------------------------------------------------------
这时,启动Xwindow环境,
bash-2.04$startx
在Xwindow环境中,运行/opt/sybase-11.9.2/bin/dsedit,选择AddNewServerEntry,
ServerName:devhost(可随意写)
再选择addnewnetworktransport,
transporttype:TCP
hostname:211.5.6.50(服务器的ip)
portNumber:5000(Sybase服务器监听的端口)
完成后,确定退出。
可用isql命令检验是否连接成功,
bash-2.04$isql-Usa-Sdevhost
输入密码后,出现
1>usetest
2>go
1>select*fromtest.Province
2>go
Province_idProvince
-------------------
110 北京市
120 天津市
130 河北省
140 山西省
150 内蒙古
210 辽宁省
220 吉林省
230 黑龙江
......
610 陕西省
620 甘肃省
630 青海省
640 宁夏区
650 新疆区
660 西藏区
(28rowsaffected)
1>
啊,现在openclient就安装完成了。
2.安装Apache及PHP4
host_name/home/workshop#tar-vzxfapache_1.3.12.tar.gz
host_name/home/workshop#tar-vzxfphp-4.0.0.tar.gz
进入apache目录,预编译apache
#./configure--prefix=/home/apache
我们把Apache安装在/home目录下。
进入php目录,编译php+sybase
#cd../php-4.0.0
#./configure--with-apache=../apache_1.3.12
--with-mysl=no
--with-sybase-ct=/opt/sybase-11.9.2/
--enable-ftp
--enable-track-vars
#make;makeinstall
#cpphp.ini-dist/usr/local/lib/php.ini
#cd../apache_1.3.12
#./configure--prefix=/home/apache--activate-module=src/modules/php4/libphp4.a
#make;makeinstall
编译工作已经完成了,现在需要修改一些配置文件。
#cd/home/apache/conf
#vihttpd.conf
修改DirectoryIndexindex.htmlindex.php3index.php那一行
将AddTypeapplication/x-httpd-php.php那一行前面的#去掉
加入一行AddTypeapplication/x-httpd-php.php3
最后,还需要修改几个参数
ServerName
ServerAdmin
DocumentRoot"/home/apache/htdocs"
启动Apache
cd../bin
./apachectlstart
现在,要写一个文件,让apache在计算机启动时也启动。
andyouwilledit/etc/rc.d/rc.sysinit,addauto_runfileatthelastline.
auto_runwillbecreatedat/usr/sbinandwith+xmode.
auto_runis:
#!/bin/sh
/home/apache/bin/apachectlrestart
==================================================================================
安装部分完成。
点击这里复制本文地址
以上内容由聚米学院网友整理呈现,如对侵犯您的权益,请联系邮箱:fzsbm@qq.com
留言评论