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

How to improve the performance of PHP under Linux operating system

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article focuses on "how to improve the performance of PHP under the Linux operating system". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to improve the performance of PHP under the Linux operating system.

Apc installs the latest APC-3.0.18.tgz, decompresses it, and enters the directory

Apc download address http://pecl.php.net/package/APC

/ usr/local/php/bin/phpize (production configure file)

. / configure-- enable-apc--enable-apc-mmap-- with-php-config=/usr/local/bin/php-config

Make make.Install

Cp / usr/local/lib/php/extensions/no-debug-zts-20060613/apc.so / usr/local/lib/php/extensions/apc.so

Chmod 755 / usr/local/lib/php/extensions/apc.so

Configure / join at the end of etc/php.ini

Extension=apc.so

Apc.enabled = 1

Apc.cache_by_default = on

Apc.shm_segments = 1

Apc.shm_size = 128,

Apc.ttl = 7200

Apc.user_ttl = 7200

Apc.num_files_hint = 1024

Apc.write_lock = On

Apc.gc_ttl=3600

Apc.ttl=0

Apc.mmap_file_mask=/tmp/apc.XXXXXX

Restart apache

At this point, I believe you have a deeper understanding of "how to improve the performance of PHP under the Linux operating system". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

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

Servers

Wechat

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

12
Report