1.libpqԴ?码下?????
2.å¦ä½å¨ç³»ç»å®è£
ARGB
libpqԴ??????
应用场景
硬件/整机信息:AMD平台
OS版本信息:服务器e版
软件信息:psqlodbc .版本
功能介绍
部分用户在使用etl工具连接数据库时,需要使用到odbc驱动,码下下面介绍下服务器e版系统中编译安装此工具的码下源码 tms相关过程。
ETL:是码下英文Extract-Transform-Load的缩写,用来描述将数据从来源端经过抽取(extract)、码下爬虫项目源码大全转换(transform)、码下全球最大源码加载(load)至目的码下端的过程。
ODBC:是码下英文Open Database Connectivity的缩写,中文含义表示为开放数据库互连,码下是码下微软公司开放服务结构(WOSA,Windows Open Services Architecture)中有关数据库的码下一个组成部分,它建立了一组规范,码下并提供了一组对数据库访问的码下解析视频软件源码标准API(应用程序编程接口)。
psqlodbc:即表示ODBC driver for PostgreSQL,码下是码下mt怎么提取源码一种支持访问开放式互联数据库且支持PostgreSQL数据库的访问脚本。
安装使用
步骤一:安装相关依赖
root@uos-PC:~# yum install unixODBC-devel
root@uos-PC:~# yum install libpq-devel
步骤二:编译安装
psqlodbc项目各版本源码下载地址:2.php.net/distributions/php-5.4.7.tar.gztar zvxf php-5.4.7.tar.gz
cd php-5.4.7./configure --prefix=/usr/local/php --enable-fpm --with-mcrypt \--enable-mbstring --disable-pdo --with-curl --disable-debug --disable-rpath \--enable-inline-optimization --with-bz2 --with-zlib --enable-sockets \--enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex \--with-mhash --enable-zip --with-pcre-regex --with-mysql --with-mysqli \--with-gd --with-jpeg-dir
make all install
æ§çæå¨æè¡¥ä¸php-fpmå®è£ ï¼æ§çç¨åºå·²ç»æ²¡æäºï¼å¤§å®¶æ°ççå§ï¼è¿éå个å±ç¤ºï¼
wget 2.php.net/get/php-5.2..tar.gz
wget tl -enable-sockets -with-bz2 -with-curl -with-curlwrappers\
-enable-mbregex -with-gd -enable-gd-native-ttf -enable-zip -enable-soap -with-iconv -enable-bcmath\
-enable-shmop -enable-sysvsem -enable-inline-optimization -with-ldap -with-ldap-sasl -enable-pdo\
-with-pdo-mysql
make all install
以ä¸ä¸¤ç§æ¹å¼é½å¯ä»¥å®è£ php-fpmï¼å®è£ åå 容æ¾å¨/usr/local/phpç®å½ä¸
以ä¸å°±å®æäºphp-fpmçå®è£ ã
ä¸é¢æ¯å¯¹php-fpmè¿è¡ç¨æ·è¿è¡è®¾ç½®
cd /usr/local/php
cp etc/php-fpm.conf.default etc/php-fpm.conf
vi etc/php-fpm.conf
ä¿®æ¹
user = www-data
group = www-data
å¦æwww-dataç¨æ·ä¸åå¨ï¼é£ä¹å æ·»å www-dataç¨æ·
groupadd www-data
useradd -g www-data www-data
äºãç¼è¯å®è£ nginx
ç¶ånginxï¼
nginxå¯ä»¥ä½¿ç¨åå¹³å°çé»è®¤å æ¥å®è£ ï¼æ¬ææ¯ä»ç»ä½¿ç¨æºç ç¼è¯å®è£ ï¼å æ¬å ·ä½çç¼è¯åæ°ä¿¡æ¯ã
æ£å¼å¼å§åï¼ç¼è¯ç¯å¢gcc g++ å¼ååºä¹ç±»çéè¦æåè£ å¥½ï¼è¿éé»è®¤ä½ å·²ç»è£ 好ã
ububtuå¹³å°ç¼è¯ç¯å¢å¯ä»¥ä½¿ç¨ä»¥ä¸æ令
1
2
apt-get install build-essential
apt-get install libtool
centoså¹³å°ç¼è¯ç¯å¢ä½¿ç¨å¦ä¸æ令
å®è£ makeï¼
1
yum -y install gcc automake autoconf libtool make
å®è£ g++:
1
yum install gcc gcc-c++
ä¸é¢æ£å¼å¼å§
---------------------------------------------------------------------------
ä¸è¬æ们é½éè¦å è£ pcre, zlibï¼åè 为äºéårewriteï¼åè 为äºgzipå缩ã
1.éå®æºç ç®å½
å¯ä»¥æ¯ä»»ä½ç®å½ï¼æ¬æéå®çæ¯/usr/local/src
1
cd /usr/local/src
2.å®è£ PCREåº
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ ä¸è½½ææ°ç PCRE æºç å ï¼ä½¿ç¨ä¸é¢å½ä»¤ä¸è½½ç¼è¯åå®è£ PCRE å ï¼
1
2
3
4
5
6
7
cd /usr/local/src
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8..tar.gz
tar -zxvf pcre-8..tar.gz
cd pcre-8.
./configure
make
make install
3.å®è£ zlibåº
e to nginx! å表示 Nginx å·²ç»å®è£ 并è¿è¡æåã
-----------------------------------------------------
å°è¿énginxå°±å®è£ å®æäºï¼å¦æåªæ¯å¤çéæhtmlå°±ä¸ç¨ç»§ç»å®è£ äº
å¦æä½ éè¦å¤çphpèæ¬çè¯ï¼è¿éè¦å®è£ php-fpmã
ä¸é¢å®è£ æé
éï¼å¯è½éå°çé误åä¸äºå¸®å©ä¿¡æ¯
1.1ç¼è¯pcreé误
1
2
3
4
5
libtool: compile: unrecognized option `-DHAVE_CONFIG_H'
libtool: compile: Try `libtool --help' for more information.
make[1]: *** [pcrecpp.lo] Error 1
make[1]: Leaving directory `/usr/local/src/pcre-8.'
make: *** [all] Error 2
解å³åæ³ï¼å®è£ g++,å«å¿äºéæ°configure
1
2
3
4
5
apt-get install g++
apt-get install build-essential
make clean
./configure
make
1.2 makeåºé
1
2
3
4
5
make: *** No rule to make target `build', needed by `default'. Stop.
./configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.
æç §ç¬¬4æ¥çå®è£ æ¹æ³æ
ubuntuä¸
1
2
apt-get install openssl
apt-get install libssl-dev
centosä¸
1
yum -y install openssl openssl-devel
2.nginxç¼è¯é项
makeæ¯ç¨æ¥ç¼è¯çï¼å®ä»Makefileä¸è¯»åæ令ï¼ç¶åç¼è¯ã
make installæ¯ç¨æ¥å®è£ çï¼å®ä¹ä»Makefileä¸è¯»åæ令ï¼å®è£ å°æå®çä½ç½®ã
configureå½ä»¤æ¯ç¨æ¥æ£æµä½ çå®è£ å¹³å°çç®æ ç¹å¾çãå®å®ä¹äºç³»ç»çå个æ¹é¢ï¼å æ¬nginxç被å 许使ç¨çè¿æ¥å¤ççæ¹æ³ï¼æ¯å¦å®ä¼æ£æµä½ æ¯ä¸æ¯æCCæGCCï¼å¹¶ä¸æ¯éè¦CCæGCCï¼å®æ¯ä¸ªshellèæ¬ï¼æ§è¡ç»ææ¶ï¼å®ä¼å建ä¸ä¸ªMakefileæ件ãnginxçconfigureå½ä»¤æ¯æ以ä¸åæ°ï¼
--prefix=path å®ä¹ä¸ä¸ªç®å½ï¼åæ¾æå¡å¨ä¸çæ件 ï¼ä¹å°±æ¯nginxçå®è£ ç®å½ãé»è®¤ä½¿ç¨ /usr/local/nginxã
--sbin-path=path 设置nginxçå¯æ§è¡æ件çè·¯å¾ï¼é»è®¤ä¸º prefix/sbin/nginx.
--conf-path=path 设置å¨nginx.confé ç½®æ件çè·¯å¾ãnginxå 许使ç¨ä¸åçé ç½®æ件å¯å¨ï¼éè¿å½ä»¤è¡ä¸ç-cé项ãé»è®¤ä¸ºprefix/conf/nginx.conf.
--pid-path=path 设置nginx.pidæ件ï¼å°åå¨ç主è¿ç¨çè¿ç¨å·ãå®è£ å®æåï¼å¯ä»¥éæ¶æ¹åçæ件å ï¼ å¨nginx.confé ç½®æ件ä¸ä½¿ç¨ PIDæ令ãé»è®¤æ åµä¸ï¼æ件å 为prefix/logs/nginx.pid.
--error-log-path=path 设置主é误ï¼è¦åï¼åè¯ææ件çå称ãå®è£ å®æåï¼å¯ä»¥éæ¶æ¹åçæ件å ï¼å¨nginx.confé ç½®æä»¶ä¸ ä½¿ç¨ çerror_logæ令ãé»è®¤æ åµä¸ï¼æ件å 为prefix/logs/error.log.
--pilationâï¼1.1.ä¸ï¼ pcre_jitæ令ï¼ã
--with-zlib=path â设置çzlibåºçæºç è·¯å¾ãè¦ä¸è½½ä» zlibï¼çæ¬1.1.3 - 1.2.5ï¼ç并解åãå ¶ä½çå·¥ä½æ¯Nginxç./ configureåmakeå®æãngx_/sourceforge/mcrypt/libmcrypt-2.5.8.tar.gz
tar -zxvf libmcrypt-2.5.8.tar.gz
cd /usr/local/src/libmcrypt-2.5.8
./configure --prefix=/usr/local
make
make install
7. php-fpm 5.4.7 å¦ä½å ³é éå¯ï¼
php 5.4.7 ä¸çphp-fpm ä¸åæ¯æ php-fpm 以åå ·æç /usr/local/php/sbin/php-fpm (start|stop|reload)çå½ä»¤ï¼éè¦ä½¿ç¨ä¿¡å·æ§å¶ï¼
masterè¿ç¨å¯ä»¥ç解以ä¸ä¿¡å·
INT, TERM ç«å»ç»æ¢ QUIT å¹³æ»ç»æ¢ USR1 éæ°æå¼æ¥å¿æ件 USR2 å¹³æ»éè½½ææworkerè¿ç¨å¹¶éæ°è½½å ¥é ç½®åäºè¿å¶æ¨¡å
示ä¾ï¼
php-fpm å ³éï¼
kill -INT `cat /usr/local/php/var/run/php-fpm.pid`
php-fpm éå¯ï¼
kill -USR2 `cat /usr/local/php/var/run/php-fpm.pid`
æ¥çphp-fpmè¿ç¨æ°ï¼
ps aux | grep -c php-fpm
8.å½ä»¤è¡ä¸æ§è¡phpï¼æ示æ¾ä¸å°å½ä»¤
-bash: /usr/bin/php: No such file or directory
vi /etc/profile
å¨æ件åºé¨å¢å ä¸è¡é ç½®
export PATH=/usr/local/php/bin:$PATH
ä¿åéåº
source /etc/profile
éå pathinfoé ç½®
location ~ ^(.+\.php)(.*)$ {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME /path/to/php$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;