编译安装apache
- wget http://mirror.bit.edu.cn/apache/httpd/httpd-2.2.22.tar.gz
- tar xf httpd-2.2.22.tar.gz
- cd httpd-2.2.22
- ./configure --prefix=/usr/local/webserver/apache --sysconfdir=/etc/httpd --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib
- make&& make install
- cd php-5.4.4
- ./configure --prefix=/usr/local/php --with-mysql=/usr/local/webserver/mysql --with-openssl --with-mysqli=/usr/local/webserver/mysql/bin/mysql_config --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --with-apxs2=/usr/local/webserver/apache/bin/apxs --with-openssl --with-mhash --disable-rpath --enable-discard-path --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --with-config-file-path=/usr/local/php/etc
- make ZEND_EXTRA_LIBS='-liconv'
- make install
- tar zxvf memcache-2.2.5.tgz
- cd memcache-2.2.5/
- /usr/local/webserver/php/bin/phpize
- ./configure --with-php-config=/usr/local/webserver/php/bin/php-config
- make
- make install
- cd ../
- eaccelerator-0.9.6.1/eaccelerator.c:1938: error: ‘eaccelerator_functions’ undeclared here (not in a function)
- wget -c http://xcache.lighttpd.net/pub/Releases/2.0.1/xcache-2.0.1.tar.gz
- tar xf xcache-2.0.1.tar.gz
- cd xcache-2.0.1
- /usr/local/webserver/php/bin/phpize
- ./configure --with-php-config=/usr/local/webserver/php/bin/php-config
- make&&make install
- ln -sv /usr/local/webserver/mysql/include/* /usr/local/include/
- tar zxvf PDO_MYSQL-1.0.2.tgz
- cd PDO_MYSQL-1.0.2/
- /usr/local/webserver/php/bin/phpize
- ./configure --with-php-config=/usr/local/webserver/php/bin/php-config --with-pdo-mysql=/usr/local/webserver/mysql
- make
- make install
- cd ../
- tar zxvf ImageMagick.tar.gz
- cd ImageMagick-6.5.1-2/
- ./configure
- make
- make install
- cd ../
- wget http://pecl.php.net/get/imagick
- [root@localhost software]# tar xf imagick-3.1.0RC2.tgz
- [root@localhost imagick-3.1.0RC2]# /usr/local/webserver/php/bin/phpize
- Configuring for:
- PHP Api Version: 20100412
- Zend Module Api No: 20100525
- Zend Extension Api No: 220100525
- [root@localhost imagick-3.1.0RC2]# ./configure --with-php-config=/usr/local/webserver/php/bin/php-config
- [root@localhost imagick-3.1.0RC2]# make install
- Installing shared extensions: /usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20100525/
- Installing header files: /usr/local/webserver/php/include/php/
- sed -i 's#extension_dir = "./"#extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/"\nextension = "memcache.so"\nextension = "pdo_mysql.so"\nextension = "imagick.so"\n#' /usr/local/webserver/php/etc/php.ini
- [xcache-common]
- zend_extension = /usr/local/php/lib/php/extensions/xcache.so
- [xcache.admin]
- ; Change xcache.admin.user to your preferred login name
- xcache.admin.user = "admin"
- ; Change xcache.admin.pass to the MD5 fingerprint of your password
- ; Use md5 -s "your_secret_password" to find the fingerprint
- xcache.admin.pass = "e10adc3949ba59abbe56e057f20f883e"
- [xcache]
- ; Change xcache.size to tune the size of the opcode cache
- xcache.size = 24M
- xcache.shm_scheme = "mmap"
- xcache.count = 2
- xcache.slots = 8K
- xcache.ttl = 0
- xcache.gc_interval = 0
- ; Change xcache.var_size to adjust the size of variable cache
- xcache.var_size = 8M
- xcache.var_count = 1
- xcache.var_slots = 8K
- xcache.var_ttl = 0
- xcache.var_maxttl = 0
- xcache.var_gc_interval = 300
- xcache.test = Off
- xcache.readonly_protection = On
- xcache.mmap_path = "/tmp/xcache"
- xcache.coredump_directory = ""
- xcache.cacher = On
- xcache.stat = On
- xcache.optimizer = Off
- [xcache.coverager]
- xcache.coverager = On
- xcache.coveragedump_directory = ""
- AddType application/x-httpd-php .php
- AddType application/x-httpd-php-source .phps
/usr/local/php/bin/php -m