檔案來源:http://httpd.apache.org/download.cgi#apache24
$ ./config \
-fPIC \--prefix=/RAID/local/lib/OpenSSL \
--openssldir=/RAID/local/lib/OpenSSL
$ make
$ sudo make install
$ /RAID/local/lib/OpenSSL/bin/openssl version
ODBC:
$ ./configure \
--prefix=/RAID/local/lib/unixODBC \
--exec-prefix=/RAID/local/lib/unixODBC
$ make
$ sudo make install
To check the ODBC version and configuration.
$ /RAID/local/lib/unixODBC/bin/odbcinst -j
unixODBC 2.3.4
DRIVERS............: /RAID/local/lib/unixODBC/etc/odbcinst.ini
SYSTEM DATA SOURCES: /RAID/local/lib/unixODBC/etc/odbc.ini
FILE DATA SOURCES..: /RAID/local/lib/unixODBC/etc/ODBCDataSources
USER DATA SOURCES..: /home/neo/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
參數設定:
$ sudo nano /RAID/local/lib/unixODBC/etc/odbcinst.ini
[FreeTDS]
Description=v0.91 with protocol v8.0
Driver=/RAID/local/lib/unixODBC/lib/libtdsodbc.so
UsageCount=1
$ sudo nano /RAID/local/lib/unixODBC/etc/odbc.ini
[SQLServer]
Driver=FreeTDS
Description=SQL
Trace=No
Server=192.168.1.21
Port=1433
TDS_Version=8.0
Database=DW
PS:
$ odbcinst -q -d # View loaded drivers.
$ odbcinst -q -s # View DSN entry
$ tsql -LH 22.33.55.44 # To list MSSQL server instant name,version etc.,
$ osql -S DSN -U Username -P ‘Password’ # list the configuration files loaded to connect ODBC
$ ./configure \
--prefix=/RAID/local/lib/FreeTDS \
--exec-prefix=/RAID/local/lib/FreeTDS \
--with-tdsver=auto \
--with-unixodbc=/RAID/local/lib/unixODBC \
--with-gnu-ld \
--enable-msdblib
$ make
$ sudo make install
$ sudo nano /etc/ld.so.conf
/RAID/local/lib/FreeTDS/lib
$ sudo ldconfig
$ sudo nano /RAID/local/lib/FreeTDS/etc/freetds.conf
[MSsql]
host = 192.168.1.21
# instance = SQLEXPRESS
# instance = MSSQLSERVER
port = 1433
client charset = UTF-8
tds version = 8.0
text size = 20971520
Note: the freetds.conf file you use should have "text size = 20971520" as mentioned in the FreeTDS on Windows section otherwise you might see sessions logging out or worse apache segmentation faults. Also see FreeTDS.
$ sudo touch /RAID/local/lib/FreeTDS/include/tds_sysdep_public.h
$ sudo touch /RAID/local/lib/FreeTDS/lib/libsybdb.a
連線測試:
$ sudo /RAID/local/lib/FreeTDS/bin/tsql -S MSsql -U sa
Note:
$ TDSVER=8.0
$ tsql -H [伺服器名稱 xxxx.database.windows.net ] -p 1433 –D [資料庫名稱 ] -U [使用者帳號 ] -P [使用者密碼 ]
Apache Portable Runtime
http://apr.apache.org/download.cgi
$ ./configure \
--prefix=/RAID/local/lib/APR \
--exec-prefix=/RAID/local/lib/APR
$ make
$ make install
$ ./configure \
--prefix=/RAID/local/lib/APR-iconv \
--exec-prefix=/RAID/local/lib/APR-iconv \
--with-apr=/RAID/local/lib/APR
$ make
$ make install
$ ./configure \
--prefix=/RAID/local/lib/APR-util \
--exec-prefix=/RAID/local/lib/APR-util \
--with-apr=/RAID/local/lib/APR \
--with-apr-iconv=RAID/local/lib/APR-iconv \
--with-crypto=/RAID/local/lib/OpenSSL \
--with-freetds=/RAID/local/lib/FreeTDS \
--with-mysql=/RAID/local/srv/MySQL \
--with-openssl=/RAID/local/lib/OpenSSL
$ make
$ make install
$ sudo nano /etc/ld.so.conf
/RAID/local/lib/APR-util/lib
PERL 5 regular expression pattern matching
$ ./configure \
--prefix=/RAID/local/lib/PCRE \
--exec-prefix=/RAID/local/lib/PCRE \
--enable-utf8
$ make
$ make install
A Massively Spiffy Yet Delicately Unobtrusive Compression Library
$ ./configure \
--prefix=/RAID/local/lib/zlib \
--eprefix=/RAID/local/lib/zlib
$ make
$ make install
- Apache
$ ./configure \
--prefix=/RAID/local/srv/Apache \
--exec-prefix=/RAID/local/srv/Apache \
--enable-ssl \
--enable-so \
--enable-deflate \
--enable-modules=mod_unixd \
--enable-modules=mod_access_compat \
--with-apr=/RAID/local/lib/APR \
--with-apr-util=/RAID/local/lib/APR-util \
--with-pcre=/RAID/local/lib/PCRE \
--with-ssl=/RAID/local/lib/OpenSSL
$ nano /RAID/local/Apache/conf/httpd.conf
ServerRoot "/RAID/local/srv/Apache"
ServerAdmin email@gmail.com
ServerName 127.0.0.1:80
DocumentRoot "/RAID/local/www"
ErrorDocument 404 /404_Apple.html
AddDefaultCharset utf-8
<Directory "/RAID/local/www">
ScriptAlias /cgi-bin/ "/RAID/local/www/cgi-bin/"
<Directory "/RAID/local/www/cgi-bin">
AddType application/x-httpd-php .php
<IfModule dir_module>
DirectoryIndex index.html index.htm index.php
</IfModule>
ErrorLog "|/RAID/local/srv/Apache/bin/rotatelogs -l /RAID/Log/Apache-error-%Y-%m-%d.log 86400"
CustomLog "|/RAID/local/srv/Apache/bin/rotatelogs -l /RAID/Log/Apache-access-%Y-%m-%d.log 86400" common
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule php7_module modules/libphp7.so
- apachectl - Apache HTTP Server Control Interface
$ sudo /RAID/local/srv/Apache/bin/apachectl configtest
$ sudo /RAID/local/srv/Apache/bin/apachectl start
$ sudo /RAID/local/srv/Apache/bin/apachectl restart
$ sudo /RAID/local/srv/Apache/bin/apachectl stop
官方網站:http://php.net
檔案來源:http://php.net/downloads.php
- $ sudo apt install libjpeg-dev
- $ sudo apt install libpng++-dev
- $ sudo apt install libxpm-dev
- $ sudo apt install libxft-dev
- $ sudo apt install libmcrypt-dev
- $ sudo apt install libssh2-1-dev
- $ sudo apt install libgmp-dev
- $ sudo apt install libtool-bin
- $ sudo apt install re2c
- $ sudo apt install autoconf
$ ./configure \
--prefix=/RAID/local/lib/cURL \
--exec-prefix=/RAID/local/lib/cURL \
--with-libssh2
$ make
$ make install
$ ./configure \
--prefix=/RAID/local/srv/PHP \
--exec-prefix=/RAID/local/srv/PHP \
--with-config-file-path=/RAID/local/conf \
--with-pdo-mysql=/RAID/local/srv/MySQL \
--with-mysqli=mysqlnd \
--with-pdo-dblib=/RAID/local/lib/FreeTDS \
--with-pdo-mysql=/RAID/local/srv/MySQL \
--with-pdo-odbc=unixODBC,/RAID/local/lib/unixODBC \
--with-apxs2=/RAID/local/srv/Apache/bin/apxs \
--with-curl=/RAID/local/lib/cURL \
--with-openssl \
--with-pear \
--with-mcrypt \
--with-zlib \--with-jpeg-dir \
--with-png-dir \
--with-xpm-dir \
--with-freetype-dir \
--with-gd \
--with-gmp \
--enable-bcmath \
--enable-intl \
--enable-fpm \
--enable-ftp \
--enable-zip \
--enable-mbstring \
--enable-mysqlnd \
--enable-re2c-cgoto \
--enable-sockets \
--enable-soap \
--enable-debug \
--enable-gd-native-ttf \
--enable-gd-jis-conv
$ make
$ make install
$ cp php.ini-production /RAID/local/conf/php.ini
$ sudo /RAID/local/srv/Apache/bin/apachectl stop
$ sudo /RAID/local/srv/Apache/bin/apachectl start
$ wget http://pear.php.net/go-pear.phar
$ sudo /RAID/local/srv/PHP/bin/php go-pear.phar
$ /RAID/local/srv/PHP/bin/pear version
- MyWebSQL 3.7
沒有留言:
張貼留言