Home | Mirror | Search |
mysql开发库
ls -1 MySQL-devel-5.5.25-1.el6.x86_64.rpm MySQL-shared-5.5.25-1.el6.x86_64.rpm MySQL-shared-compat-5.5.25-1.el6.x86_64.rpm rpm -e --nodeps mysql-libs yum localinstall MySQL-*
tar zxvf php-5.4.8.tar.gz cd php-5.4.8 ./configure --prefix=/srv/php-5.4.8 \ --with-config-file-path=/srv/php-5.4.8/etc \ --with-config-file-scan-dir=/srv/php-5.4.8/etc/conf.d \ --enable-fpm \ --with-fpm-user=www \ --with-fpm-group=www \ --with-curl \ --with-gd \ --with-jpeg-dir \ --with-png-dir \ --with-freetype-dir \ --with-zlib-dir \ --with-iconv \ --with-mcrypt \ --with-mysql \ --with-mysqli=/usr/bin/mysql_config \ --with-pdo-mysql \ --with-mysql-sock=/var/lib/mysql/mysql.sock \ --with-openssl=shared \ --with-mhash=shared \ --with-xsl=shared \ --with-recode=shared \ --with-pear \ --enable-sockets \ --enable-soap \ --enable-mbstring \ --enable-gd-native-ttf \ --enable-zip \ --enable-xml \ --enable-bcmath \ --enable-calendar \ --enable-shmop \ --enable-dba \ --enable-wddx \ --disable-debug make && make install
mkdir -p /srv/php-5.4.8/etc/conf.d cp php.ini-* /srv/php-5.4.8/etc/ cp /srv/php-5.4.8/etc/php.ini-development /srv/php-5.4.8/etc/php.ini cp /srv/php-5.4.8/etc/php-fpm.conf.default /srv/php-5.4.8/etc/php-fpm.conf cp /srv/php-5.4.8/etc/pear.conf{,.original} cp ./sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm chmod +x /etc/init.d/php-fpm ln -s /srv/php-5.4.8/ /srv/php
php-fpm.conf
vim /srv/php-5.4.8/etc/php-fpm.conf <<end > /dev/null 2>&1 :25,25s/;// :wq end
# grep -v '^;' /srv/php-5.4.8/etc/php-fpm.conf | grep -v '^$' [global] pid = run/php-fpm.pid rlimit_files = 4096 [www] user = www group = www listen = 127.0.0.1:9000 pm = dynamic pm.max_children = 512 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 pm.status_path = /status ping.path = /ping ping.response = pong access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" slowlog = log/$pool.log.slow
php.ini
vim /srv/php-5.4.8/etc/php.ini <<EOF > /dev/null 2>&1 :%s!;include_path = ".:/php/includes"!include_path = ".:/srv/php-5.4.8/lib/php:/srv/php-5.4.8/share"! :%s:extension_dir = "./":extension_dir = "/srv/php-5.4.8/lib/php/extensions": :%s/memory_limit = 128M/memory_limit = 16M/ :%s$;open_basedir = $open_basedir = /www/:/tmp/:/srv/php-5.4.8/lib/php/:/srv/php-5.4.8/bin/$ :%s/upload_max_filesize = 2M/upload_max_filesize = 8M/ :%s/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=1/ :%s$;date.timezone =$date.timezone = Asia/Hong_Kong$ :wq EOF