PHPã§Peclãã¤ã³ã¹ãã¼ã«ããã¡ã¢ã
Pythonã Pythonã ã£ã¦ããã°ã«æ¸ãã¾ãããã§ãæ¬æ¥ã¯JSPããã°ã©ãã¼ã ããPHPã¹ã¯ãªãã¿ã¼ã§ããã§ãããPHPã®ãã¹ããµã¼ãã¼ãå¿ è¦ãTomcatãå¿ è¦ã
ubuntu ã®å ´åãapache2ãç°¡åã«ã¤ã³ã¹ãã¼ã«ã§ãããããã使ããã¨ã«ãããPHP5ã¨PHP4ã¯æ£²ã¿åãããããããã®ã§ãPHP5ã¨æ示çã«ãã¼ã¸ã§ã³ãæå®ããå¿ è¦ãããã
ubuntu ã¯ãDebianãªã®ã§ä»ã®Debianãã£ã¹ããªãã¥ã¼ã·ã§ã³ã§ã使ããããããã ãã³ãã³ãã¯æ¸ãæ®´ããªã®ã§ãæ£ç¢ºã§ã¯ãªãããããã±ã¼ã¸ã¯ã©ãã©ãæ´æ°ãããã®ã§é©å®ããã±ã¼ã¸ãèªã¿æ¿ããã
æ¬é¡ PECL pdo_pgsql pdo_mysql ãã¤ã³ã¹ãã¼ã«ããï¼ãã«ãããã«ã¯ï¼
ä½æ¥ã®ãµããªã使ç¨ããubuntu ã¯ã6.10-ja
Apache2ã®ã¤ã³ã¹ãã¼ã« PHP5ã®ã¤ã³ã¹ãã¼ã« PHP5-devã®ã¤ã³ã¹ãã¼ã« PHP5-cliã®ã¤ã³ã¹ãã¼ã« PHP5-cgiã®ã¤ã³ã¹ãã¼ã« PHP-pearã®ã¤ã³ã¹ãã¼ã« mysqlã®ã¤ã³ã¹ãã¼ã« mysql-dev pgsqlã®ã¤ã³ã¹ãã¼ã« pgsql-devã®ã¤ã³ã¹ãã¼ã« /etc/apache2/apxs 㧠/etc/apache2/apxs2 ã«ãªã³ã¯ä½æ
ãããã®é ã«ä½æ¥å·¥ç¨ããããã
ãã®ã¤ã³ã¹ãã¼ã«ã®ç®æ¨ã¯PECL ã§ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãããã¨
user $ sudo pecl install pdo_mysql user $ sudo pecl install pdo_pgsql user $ sudo pecl install pdo_sqlite user $ sudo pecl install apc
ãå®è¡ãã¦PHPã«çµã¿è¾¼ã¿ããã
PECLã«å¿ é phpizeãå ¥ãã
sudo aptitude php5-dev
PECL èªä½ãã¤ã³ã¹ãã¼ã«ãã*1
sudoo aptitude install php-pear
PHPã¯ãã¡ããå ¥ãã¾ãããã
sudo aptitude install php5
ããããã¾ã¨ãã¦ã¤ã³ã¹ãã¼ã«ããã³ãã³ãã¯ãããã£ã¦æ¸ã
sudo aptitude install apache2 apache-dev php5 php5-dev php-pear
ããã§PECLãå®è¡ã§ããããã«ãªãã¾ãã
試ãã«PDOããã«ã
sudo pecl install pdo sudo pecl install pdo_sqlite
ã§ããããã ã¨ãpdo_mysqlã¯ã¤ã³ã¹ãã¼ã«ã§ããªãã£ãã
åå ã¯ããã ã¨æã
- peclã¯php-cliã§åä½ããããphp-cliã«pdo.soãçµã¿è¾¼ã¾ãã¦ãªãã®ãã
- pdo_mysqlã®ãã«ãã«ã¯mysqlã®devlã®ããã±ã¼ã¸ãå¿ è¦ããã
ã ãã
/etc/php5/cli/php.ini
ã«extenstion=pdo.soãçµã¿è¾¼ãã ã
mysql-devã¿ãããªããã±ã¼ã¸ãå¿
è¦ã£ã½ã
ããã§ãããã±ã¼ã¸ã調ã¹ãã
apt-cache search mysql | more
libmysqlclientdev15ã¨ãããã®ããããããã
postgresql-server-8.1-dev ã¨ããã®ããããããã
ããããã¤ã³ã¹ãã¼ã«ãã
sudo aptitude install postgres-8.1-dev libmysqlclientdev15
ããã§ãPECLã®ãã«ããéãããã«ãªã£ãã
sudo pecl install pdo_mysql sudo pecl install pdo_pgsql
ããããã¾ã ãAPCããã«ãã§ããªãã
http://baheyeldin.com/technology/linux/installing-php-apc-on-ubuntu-dapper-and-debian.html
ãåèã«ããã¨
ãã£ããapt-get ãããã®ã«ã½ã¼ã¹ãããã«ããªãã¦ãã³ãã¯ã»ãæéç¡é§ã ããã®ã¾ã¾ã¤ãããã
ã¿ãããªãã¨ãæ¸ãã¦ããã
ln -s /usr/bin/apxs2 /usr/bin/apxs
apxsx 㨠apxs ããapache2ã¯ååãéãã®ã§ããããªã³ã¯ããã°ããããããï¼
ã£ã¦ãã¨ã
å®éããã§ã
sudo pecl install apc
ãåºæ¥ã¾ãã
ãã¨ã¯ãapache2ã§PHPãåããã¨ãã®è¨å®ã/etc/php5/apache2/php.iniã«ããã®ã§ã
sudo vim /etc/php5/apache2/php.ini sudo /etc/init.d/apache2 restart
ããã§çµäºã
æ¸ãæ®´ãã®ã¨ã³ããªãªã®ã§ãæ£ç¢ºã§ã¯ãªãããã©ãã¤ã¡ã¼ã¸ã¯ã¤ããã§ãã¨æãããã¨ã§ã¿ãã¨ãã«æµãã ããããã°ãããã