Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Sybase+php+apache environment building

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Establish a local source

Zypper ar file:///mnt/suse11sp2 local-sles// add Source

Zypper lr / / list the source

Zypper rr digital delete source

Yast2-I xxxx installation software

Install Apache2.2.22

Install gcc softwar

2. Decompression

Tar-zxvf httpd-2.2.22.tar.gz

3. Create the target folder (note that all of the following operations are performed under the root user)

Mkdir / usr/local/apache2

In other words, the apache2 to be installed later will be installed in this folder.

4. Configuration

Go back to the folder generated after the original decompression

. / configure-prefix=/usr/local/apache-enable-module=shared

Add the following parameters, otherwise you cannot use php,-enable-module=shared to indicate that Apache can load the module dynamically

5. Compilation

Make

6. Installation

Make install

7. Start, restart and stop. Change to the directory / usr/local/apache2/bin after the installation is completed.

. / apachectl-k start

. / apachectl-k restart

. / apachectl-k stop

8. Configuration file (meet the most basic configuration)

Edit / usr/local/apache2/conf/httpd.conf file

Find:

AddType application/x-compress .Z

AddType application/x-gzip .gz .tgz

Add the following:

AddType application/x-httpd-php .php (make Apcche support PHP)

AddType application/x-httpd-php-source .phps

Find:

DirectoryIndex index.html

Add:

DirectoryIndex index.html index.php

Find:

# ServerName www.example.com:80

Modified to:

ServerName 127.0.0.1 80 or ServerName localhost:80

Remember to remove the previous "#"

9. Testing

Type http://127.0.0.1 in the browser

If there is an It Works! It means it's successful.

10. Modify the default Web site directory

The default directory is "/ usr/local/apache2/htdocs". Modify the apache configuration file httpd.conf, such as creating a new / home/gyw/WebSite directory as the apache site directory.

The line that finds DocumentRoot is changed to: DocumentRoot "/ home/gyw/WebSite"

Find this line and modify it to read:

Install mysql

Yast2-I ncurses-devel

Yast2-I gcc-c++

. / configure-prefix=/usr/local/mysql/-with-extra-charsets=all

Make

Make install

Cd mysql/bin

. / mysql_install_db-- user=root

/ mysqld_safe-user=root &

. / mysqladmin-u root password '123456 password / set password

. / mysql-u root-p

Modify database password

Sp_password NULL, "123456", sa

Modify sybase client character set

Select id,name from syscharsets

Cd / charsets/utf8

Charset-Usa-P123456 binary.srt utf8

Sp_configure "default char", 190

Sp_configure "default char"

Modify the database configuration file interfaces

Change the localhost in the file to the IP address

Install unixODBC

. / configure-- prefix=/usr/local/unixodbc/

Make

Make install

Install freetds

. / configure-- prefix=/usr/local/freetds-- with-unixodbc=/usr/local/unixodbc/-- with-tdsver=5.0-enable-msdblib

Make

Make install

Configure freetds and test the connection with tsql

Vim / usr/local/freetds/etc/freetds.conf

Add the following:

[Sybase]

Host = IP address

Port = port number

Tds version = 5.0

Client charset = UTF-8

Test the connection:

/ usr/local/freetds/bin/tsql-S Sybase-U username-P password

If the following or similar content indicates a successful connection, you can try to execute some SQL statements at this time

Install libxml2

Cd libxml2-2.6.30 /

. / configure-- prefix=/usr/local/libxml2

Make

Make install

Install libmcrypt

Cd libmcrypt-2.5.8/

. / configure-- prefix=/usr/local/libmcrypt

Make & & make install

Install zlib

# do not use-prefix to specify the installation directory will affect GD

Code:

Tar zxvf zlib-1.2.3.tar.gz

Cd zlib-1.2.3

. / configure # or CFLAGS= "- O3-fPIC". / configure # if the 64-bit processor requires CFLAGS= "- O3-fPIC"

Make

Make install

Install freetype

Code:

Tar zxvf freetype-2.1.10.tar.gz

Cd freetype-2.1.10

. / configure-prefix=/usr/local/freetype

Make

Make install

Install libpng

# do not use-prefix to specify the installation directory will affect GD

Code:

Tar zxvf libpng-1.2.8-config.tar.gz

Cd libpng-1.2.8-config

. / configure

Make

Make install

= some uses =

Cp scripts/makefile.linux makefile

Make

Make install

=

Install jpeg-6

[root@localhost root] # mkdir / usr/local/jpeg6

/ / establish the installation directory of jpeg6 software

[root@localhost root] # mkdir / usr/local/jpeg6/bin

/ / create a directory to store commands

[root@localhost root] # mkdir / usr/local/jpeg6/lib

/ / create the directory where the jpeg6 library file is located

[root@localhost root] # mkdir / usr/local/jpeg6/include

/ / establish a directory for storing header files

[root@localhost root] # mkdir-p / usr/local/jpeg6/man/man1

Tar zxvf jpegsrc.6.tar.gz

Cd jpeg-6

Then go to the jpeg-6b source directory, and then perform the following steps, remember!

Cp / usr/share/libtool/config.sub.

Cp / usr/share/libtool/config.guess.

. / configure-prefix=/usr/local/jpeg-enable-shared-enable-static

Make

Make install

= some uses =

CFLAGS= "- O3-fPIC". / configure # if the 64-bit processor requires CFLAGS= "- O3-fPIC"

Make

Make install-lib

=

This step may go wrong, mainly because it is impossible to create a file file automatically. If there is a problem, if you lack that file file, you can solve it by using the madir command to build that file file.

Install GD

Code:

Tar zxvf gd-2.0.33.tar.gz

Cd gd-2.0.33

. / configure-prefix=/usr/local/gd2-with-jpeg=/usr/local/jpeg6-with-png-with-zlib-with-freetype=/usr/local/freetype-- enable-lib64-- libdir=/usr/lib64

Make

Make install

Install PHP

/ configure-- prefix=/usr/local/php-- with-apxs2=/usr/local/apache2/bin/apxs-- with-sybase-ct=/usr/local/freetds/-- enable-pdo-- with-pdo-sqlite-- with-pdo-dblib=/usr/local/freetds/-- with-mysqli=/usr/local/mysql/bin/mysql_config-- with-gd-- with-jpeg-dir=/usr/local/jpeg6/-- with-zlib-- with-png-- with- Freetype-dir=/usr/local/freetype/-with-libxml-dir=/usr/local/libxml2

Configure php

Linux-ydax:/usr/local/php-5.5.22 # cp php.ini-development / usr/local/php/lib/php.ini

Apache start

. / apache-k start

Mysql start

. / mysql_safe-- user=root

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report