Installation documentation for Linux on Apache+php4.0+sybase _php tutorial

Source: Internet
Author: User
Tags sybase sybase database
[Purpose]

Use the Linux Architecture Web server to connect the Sybase database on the small machine. We have installed a database of experiments on the Sybase server, the database name is test, a table in test is province, the fields are province_id, province.

province_id Province
----------- --------
110 Beijing
120 Tianjin

[Related software]

Redhat 7.0 Linux
Apache 1.3.12
PHP 4.0.0
Sybase 11.9.2 for Linux/intel

[installation process]

1. Install Red Hat 7.0

I chose the customer full installation because of the X environment when installing Sybase.

After the installation is complete, create a working directory/home/workshop, upload all installation files

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. Install Sybase's open-client.

Under the/home/workshop directory:

host_name# Rpm-hiv sybase-common-11.9.2-3.i386.rpm
host_name# Rpm-hiv sybase-openclient-11.1.1-3.i386.rpm

The default installation path is/OPT/SYBASE-11.9.2/, and a Sybase user is used to change the Sybase user's password with the passwd Sybase command.

Now, using Sybase to log on to your Linux computer, the computer will display











At this point, start the Xwindow environment,

Bash-2.04$startx

In the Xwindow environment, run/opt/sybase-11.9.2/bin/dsedit, select Add New Server Entry,

Server Name:devhost (can write freely)
Then choose Add New Network Transport,
Transport TYPE:TCP
Host name:211.5.6.50 (IP for server)
Port number:5000 (the ports that the Sybase server listens on)

When you are finished, make sure to exit.

Use the isql command to verify that the connection is successful.

Bash-2.04$isql-usa-sdevhost, after entering the password, it appears
1> Use test
2> Go
1> SELECT * FROM Test. Province
2> Go
province_id Province
----------- --------
110 Beijing
120 Tianjin
130 Hebei Province
140 Shanxi Province
150 Inner Mongolia
210 Liaoning Province
220 Jilin Province
230 Heilongjiang
... ...
610 Shaanxi Province
620 Gansu Province
630 Qinghai Province
640 Ningxia
650 Xinjiang Area
660 Tibet Area
(Rows affected)
1>
The openclient is now complete.

3. Installing Apache and 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

Go to Apache directory, pre-compile Apache

#./configure--prefix=/home/apache

We have Apache installed in the/home directory.

Go to php directory, compile 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

The compilation has been completed and some configuration files need to be modified now.

#cd/home/apache/conf
#vi httpd.conf

Modify DirectoryIndex index.html index.php3 index.php that line

Remove the AddType application/x-httpd-php. PHP line in front of the #

Add a row AddType application/x-httpd-php. php3

Finally, there are several parameters that need to be modified

ServerName
ServerAdmin
DocumentRoot "/home/apache/htdocs"

Launch Apache

Cd.. /bin
./apachectl Start

Now, to write a file, let Apache also start when the computer starts.

And you'll edit/etc/rc.d/rc.sysinit, add Auto_run file at the last line.
Auto_run'll is created At/usr/sbin and with +x mode.

Auto_run is:
#!/bin/sh
/home/apache/bin/apachectl restart

The installation section is complete.

"Related articles"


http://www.bkjia.com/PHPjc/446783.html www.bkjia.com true http://www.bkjia.com/PHPjc/446783.html techarticle [objective] to connect a Sybase database on a small machine using a Linux Architecture Web server. We have installed a database of experiments on the Sybase server, the database name is test, and the test has a ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    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.