我有一个运行在 centos 5 上的 VPS,内存为 2 GB。我在该服务器上运行 IP.Board 论坛。最近我的服务器被黑客入侵,我不得不格式化磁盘并重新启动。我之前使用过 APC 缓存,它运行良好。但现在当我启用它时,论坛就离线了。我束手无策了。请帮助我让它正常工作。如果我需要提供有关我的服务器的更多信息,请告诉我。问候
我正在使用在 StackOverflow 问题上找到的以下配置: https://stackoverflow.com/questions/3570131/optimize-apc-caching
apc.enabled=1
apc.shm_segments=1
; I would try 32M per WP install, go from there
apc.shm_size=128M
; Relative to approx cached PHP files,
apc.num_files_hint=512
; Relative to approx WP size W/ APC Object Cache Backend,
apc.user_entries_hint=4096
apc.ttl=7200
apc.use_request_time=1
apc.user_ttl=7200
apc.gc_ttl=3600
apc.cache_by_default=1
apc.filters
apc.mmap_file_mask=/tmp/apc.XXXXXX
apc.file_update_protection=2
apc.enable_cli=0
apc.max_file_size=2M
;This should be used when you are finished with PHP file changes.
;As you must clear the APC cache to recompile already cached files.
;If you are still developing, set this to 1.
apc.stat=0
apc.stat_ctime=0
apc.canonicalize=1
apc.write_lock=1
apc.report_autofilter=0
apc.rfc1867=0
apc.rfc1867_prefix =upload_
apc.rfc1867_name=APC_UPLOAD_PROGRESS
apc.rfc1867_freq=0
apc.rfc1867_ttl=3600
;This MUST be 0, WP can have errors otherwise!
apc.include_once_override=0
apc.lazy_classes=0
apc.lazy_functions=0
apc.coredump_unmap=0
apc.file_md5=0
apc.preload_path
我使用了与之前相同的教程来安装 apc。可在此链接中找到
http://www.stevejenkins.com/blog/2011/08/how-to-install-apc-alternative-php-cache-on-centos-5-6/