Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Install xcache

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Premise that php, php-fpm, mariadb and other LAMP environments have been set up.

1. Install xcache

Cd / usr/local/src # enters the package storage directory

Download wget http://xcache.lighttpd.net/pub/Releases/3.2.0/xcache-3.2.0.tar.gz#

Tar zxvf xcache-3.2.0.tar.gz # decompression

Cd xcache-3.2.0 # enter the installation directory

/ usr/bin/phpize # generate the configure configuration file with phpize-the directory here, find it with 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] # phpize

Configuring for:

PHP Api Version: 20100412

Zend Module Api No: 20100525

Zend 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 # configuration

Make # compilation

Make install # installation

After the installation is complete, the following interface appears. Remember the following path, which will be used later. / usr/lib64/php/modules/

/ usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/#xcache module path

2. Create a xcache cache file

Touch / tmp/xcache # create file

Chmod 777 / tmp/xcache # set permissions

3. Create a xcache administrator with a password of 123456

Echo-n "123456" | md5sum # remember the following line of code (password after md5 encryption), which will be used later

C1820eeffb72ef4463aa2a67c65c7b0a

4. Copy the xcache background management program to the root directory of the website

Cp-r / usr/local/src/xcache-3.2.0/htdocs / var/www/html/xcache

Chown apache.apache-R / var/www/html/xcache # sets the same permissions for the xcache directory and the website directory

5. Configure php to support xcache

Vi / usr/local/php/etc/php.ini # edits the configuration file, adding the following on the last line

[xcache-common]

Extension = xcache.so

[xcache.admin]

Xcache.admin.enable_auth = On

Xcache.admin.user = "xcache"

Xcache.admin.pass = "c1820eeffb72ef4463aa2a67c65c7b0a"

[xcache]

Xcache.shm_scheme = "mmap"

Xcache.size=60M

Xcache.count = 1

Xcache.slots = 8K

Xcache.ttl=0

Xcache.gc_interval = 0

Xcache.var_size=64M

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 = ""

: wq! # Save exit

6. Testing

Service php-fpm restart# restart php-fpm

Service nginx restart # restart nginx

The browser opens the xcache under the root of the website

Enter user name xcache password 123456

You can see the following interface

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 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.php on line 126

It is caused by the problem of time zone.

Vim / etc/php.ini remove the; sign in front of date.timezone, Asia/Shanghai after it, and there will be no more error messages.

Date.timezone = Asia/Shanghai

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report