Apache+PHP4.0+Sybase安裝文檔
2024-08-27 18:30:11
供稿:網(wǎng)友
----------- --------
110 北京市
120 天津市
[相關(guān)軟件]
Redhat 7.0 Linux
Apache 1.3.12
PHP 4.0.0
Sybase 11.9.2 for Linux /Intel
[安裝過程]
1。 安裝RED HAT 7.0
我選擇了Customer 全安裝,因為安裝Sybase時,要有X環(huán)境。
安裝完成后,建立一個工作目錄/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 -hiv sybase-common-11.9.2-3.i386.rpm
host_name# rpm -hiv sybase-openclient-11.1.1-3.i386.rpm
默認的安裝路徑為/opt/sybase-11.9.2/ , 并且有了一個sybase用戶,用passwd sybase命令更改sybase用戶的密碼。
現(xiàn)在,用sybase登陸到你的linux計算機上,計算機將顯示
------------------------------------------------------------------------
C-Shell users:
source .cshrc
=> Start @#srvbuild@#
srvbuild
Documentation towards any Sybase product can be found on our Dynaweb
pages accessible from our World Wide Web site:
We would like you to register your installation and find more
information about this Sybase Adaptive Server Enterprise release
for Linux available from:
Enjoy this Sybase Adaptive Enterprise Server installation !
bash-2.04$
------------------------------------------------------------------------
這時,啟動Xwindow環(huán)境,
bash-2.04$startx
在Xwindow環(huán)境中,運行/opt/sybase-11.9.2/bin/dsedit, 選擇Add New Server Entry,
Server Name : devhost (可隨意寫)
再選擇add new network transport ,
transport type : TCP
host name : 211.5.6.50 (服務(wù)器的ip)
port Number: 5000 (Sybase服務(wù)器監(jiān)聽的端口)
完成后,確定退出。
可用isql命令檢驗是否連接成功,
bash-2.04$isql -Usa -Sdevhost
輸入密碼后,出現(xiàn)
1> use test
2> go
1> select * from test.Province
2> go
Province_id Province
----------- --------
110 北京市
120 天津市
130 河北省
140 山西省
150 內(nèi)蒙古
210 遼寧省
220 吉林省
230 黑龍江
... ...
610 陜西省
620 甘肅省
630 青海省
640 寧夏區(qū)
650 新疆區(qū)
660 西藏區(qū)
(28 rows affected)
1>
啊,現(xiàn)在openclient就安裝完成了。
2. 安裝Apache 及 PHP4
host_name/home/workshop# tar -vzxf apache_1.3.12.tar.gz
host_name/home/workshop# tar -vzxf php-4.0.0.tar.gz
進入apache目錄,預(yù)編譯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 ; make install
# cp php.ini-dist /usr/local/lib/php.ini
# cd ../apache_1.3.12
# ./configure --prefix=/home/apache --activate-module=src/modules/php4/libphp4.a
# make ; make install
編譯工作已經(jīng)完成了,現(xiàn)在需要修改一些配置文件。
#cd /home/apache/conf
#vi httpd.conf
修改DirectoryIndex index.html index.php3 index.php那一行
將AddType application/x-httpd-php .php那一行前面的#去掉
加入一行AddType application/x-httpd-php .php3
最后,還需要修改幾個參數(shù)
ServerName
ServerAdmin
DocumentRoot "/home/apache/htdocs"
啟動Apache
cd ../bin
./apachectl start
現(xiàn)在,要寫一個文件,讓apache在計算機啟動時也啟動。
and you will edit /etc/rc.d/rc.sysinit , add auto_run file at the last line.
auto_run will be created at /usr/sbin and with +x mode.
auto_run is:
#!/bin/sh
/home/apache/bin/apachectl restart
==================================================================================
安裝部分完成。