PHP 安装 eaccelerator

安装开发工具包:

		yum groupinstall -y "Development Tools"

	查看本机php版本:

		rpm -qi php



	下载rpm包:

		wget http://mirror.centos.org/centos/6/updates/x86_64/Packages/php-devel-5.3.3-27.el6_5.2.x86_64.rpm

	安装rpm包:

		 rpm -ihv php-devel-5.3.3-27.el6_5.2.x86_64.rpm



	下载eAccelerator:

		wget https://github.com/eaccelerator/eaccelerator/archive/master.zip

	重命名:

		 mv master master.zip

	解压文件:

		unzip master.zip

	进入解压后的文件夹:

		 cd eaccelerator-master/

	编译前 先运行如下命令:

		phpize

	编译:

		./configure

		make

		make install



	进入目录:

		cd /etc/php.d

		vim eaccelerator.ini

			内容如下:

				extension="eaccelerator.so"

  eaccelerator.shm_size="16"

  eaccelerator.cache_dir="/tmp/eaccelerator"

  eaccelerator.enable="1"

  eaccelerator.optimizer="1"

  eaccelerator.check_mtime="1"

  eaccelerator.debug="0"

  eaccelerator.filter=""

  eaccelerator.shm_ttl="0"

  eaccelerator.shm_prune_period="0"

  eaccelerator.shm_only="0"



再执行如下命令:

	mkdir /tmp/eaccelerator

  chmod 0777 /tmp/eaccelerator

至此配置结束,下面重启Web服务器:

	service httpd restart

  

你可能感兴趣的:(PHP)