前提php、php-fpm、mariadb等LAMP环境已经架设好1、安装xcachecd /usr/local/src #进入软件包存放目录wget http://xcache.lighttpd.net/pub/Releases/3.2.0/xcache-3.2.0.tar.gz#下载tar zxvf
xcache-3.2.0.tar.gz #解压cd xcache-3.2.0 #进入安装目录/usr/bin/phpize #用phpize生成configure配置文件———这里的目录,用which phpize来找[root@lgq bin]# ln -sv
phpize /usr/src/xcache-3.2.0‘/usr/src/xcache-3.2.0/phpize’
-> ‘phpize[root@lgq
xcache-3.2.0]# phpizeConfiguring for:PHP Api Version: 20100412Zend Module Api
No: 20100525Zend Extension Api
No: 220100525[root@lgq xcache-3.2.0]#./configure
–enable-xcache–enable-xcache-coverager –enable-xcache-optimizer
–with-php-config=/usr/bin/php-config #配置make #编译make install #安装安装完成之后,出现下面的界面,记住以下路径,后面会用到。/usr/lib64/php/modules//usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/#xcache模块路径2、创建xcache缓存文件touch /tmp/xcache #创建文件chmod 777 /tmp/xcache #设置权限3、创建xcache管理员密码为123456echo -n
“123456” | md5sum #记住类似下面一行代码(md5加密之后的密码),后面会用到c1820eeffb72ef4463aa2a67c65c7b0a4、拷贝xcache后台管理程序到网站根目录cp -r
/usr/local/src/xcache-3.2.0/htdocs /var/www/html/xcachechown apache.apache -R /var/www/html/xcache #设置xcache目录和网站目录权限相同5、配置php支持xcachevi
/usr/local/php/etc/php.ini #编辑配置文件,在最后一行添加以下内容[xcache-common]extension = xcache.so[xcache.admin]xcache.admin.enable_auth
= Onxcache.admin.user =
“xcache“xcache.admin.pass =
“c1820eeffb72ef4463aa2a67c65c7b0a”[xcache]xcache.shm_scheme
=”mmap”xcache.size=60Mxcache.count =1xcache.slots =8Kxcache.ttl=0xcache.gc_interval =0xcache.var_size=64Mxcache.var_count =1xcache.var_slots =8Kxcache.var_ttl=0xcache.var_maxttl=0xcache.var_gc_interval
=300xcache.test =Offxcache.readonly_protection
= Onxcache.mmap_path
=”/tmp/xcache“xcache.coredump_directory
=””xcache.cacher =Onxcache.stat=Onxcache.optimizer =Off[xcache.coverager]xcache.coverager =Onxcache.coveragedump_directory
=””:wq! #保存退出6、测试service php-fpm restart#重启php-fpmservice nginx restart #重启nginx浏览器打开网站根目录下面的xcache输入用户名xcache 密码123456可以看到如下界面Warning: phpinfo(): It is not safe to rely on the system’s
timezone settings. You are *required* to use the date.timezone setting or the
date_default_timezone_set() function. In case you used any of those methods and
you are still getting this warning, you most likely misspelled the timezone
identifier. We selected the timezone ‘UTC’ for now, but please set
date.timezone to select your timezone. in /var/www/html/xcache/cacher/index.phpon line 126Warning: phpinfo(): It is not
safe to rely on the system’s timezone settings. You are *required* to use the
date.timezone setting or the date_default_timezone_set() function. In case you
used any of those methods and you are still getting this warning, you m免费云主机域名ost
likely misspelled the timezone identifier. We selected the timezone ‘UTC’ for
now, but please set date.timezone to select your timezone. in /var/www/html/xcache/cacher/index.php on line 126是因为时区的问题引起的vim /etc/php.ini
去掉date.timezone前面的;号,后面上 Asia/Shanghai,就不会再提示错误信息了date.timezone
=Asia/Shanghai
网站劫持:是指当用户打开一个网址的时候,出现一个不归属于网站范畴内的一个广告页面,或者是直接就跳转到某一个不不是这个网站所属的一个网站免费云主机域名的分页面。 网站劫持问题都是如何检测的? IIS7网站监控 测网站是否被劫持、DNS污染检测等信息。 …
免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。