Apache+PHP4.0+Sybase安裝文檔_伺服器

來源:互聯網
上載者:User
----------- -------- 
110     北京市 
120     天津市 
[相關軟體] 
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環境。 
安裝完成後,建立一個工作目錄/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使用者的密碼。 
現在,用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環境, 

bash-2.04$startx 
在Xwindow環境中,運行/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 (伺服器的ip) 
port Number: 5000 (Sybase伺服器監聽的連接埠) 
完成後,確定退出。 
可用isql命令檢驗是否串連成功, 
bash-2.04$isql -Usa -Sdevhost 
輸入密碼後,出現 
1> use test 
2> go 
1> select * from test.Province 
2> go 
Province_id Province 
----------- -------- 
110     北京市 
120     天津市 
130     河北省 
140     山西省 
150     內蒙古 
210     遼寧省 
220     吉林省 
230     黑龍江 
... ... 
610     陝西省 
620     甘肅省 
630     青海省 
640     寧夏區 
650     新疆區 
660     西藏區 
(28 rows affected) 
1> 
啊,現在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目錄,先行編譯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 
編譯工作已經完成了,現在需要修改一些設定檔。 
#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 
最後,還需要修改幾個參數 
ServerName 
ServerAdmin 
DocumentRoot "/home/apache/htdocs" 
啟動Apache 
cd ../bin 
./apachectl start 
現在,要寫一個檔案,讓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 

================================================================================== 
安裝部分完成。 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.