Install APC on RHEL/CentOS 6.3/5.6 and Fedora 17/12

Source: Internet
Author: User
Tags apc apc configuration apc module file info pear phpinfo

Install APC on RHEL/CentOS 6.3/5.6 and Fedora 17/12
 
Install and enable php apc on Linux
This document describes how to perform the following operations on RHEL 6.3/6.2/6.1/6/5.8/5.6, CentOS 6.3/6.2/6.1/6/5.8/5.6, and Fedora 17,16, 15,14, on, you can use the PECL command to download, install, and enable APC from the code repository.
Install the APC dependency package
First, we need to install the required software packages, pecl, phpize and apxs commands, and use the YUM package management tool to install APC.
Yum install php-pear php-devel httpd-devel pcre-devel gcc make
Install APC using PECL
Now we have installed all the necessary software packages to install APC. Next we will use the PECL command to install it. Select the default value during installation.
Pecl install apc
The output is as follows:
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
Downloading APC-3.1.9.tgz...
Starting to download APC-3.1.9.tgz (155,540 bytes)
.............................. Done: 155,540 bytes
54 source files, building
Running: phpize
Processing ing:
PHP Api Version: 20090626
Zend Module Api No: 20090626
Zend Extension Api No: 220090626
Config. m4: 180: warning: AC_CACHE_VAL (PHP_APC_GCC_ATOMICS,...): suspicious cache-id, must contain _ cv _ to be cached
.../../Lib/autoconf/general. m4: 1974: AC_CACHE_VAL is expanded from...
.../../Lib/autoconf/general. m4: 1994: AC_CACHE_CHECK is expanded from...
Config. m4: 180: the top level
Config. m4: 180: warning: AC_CACHE_VAL (PHP_APC_GCC_ATOMICS,...): suspicious cache-id, must contain _ cv _ to be cached
.../../Lib/autoconf/general. m4: 1974: AC_CACHE_VAL is expanded from...
.../../Lib/autoconf/general. m4: 1994: AC_CACHE_CHECK is expanded from...
Config. m4: 180: the top level Enable internal debugging in APC [no]: Enable per request file info about files used from the APC cache [no]: Enable spin locks (EXPERIMENTAL) [no]: Enable memory protection (EXPERIMENTAL) [no]: Enable pthread mutexes (default) [yes]: Enable pthread read/write locks (EXPERIMENTAL) [no]:
Enable php apc extension module
Run the following command to enable the APC extension module. In Apache configuration
Echo "extension = apc. so">/etc/php. d/apc. ini
Restart the Apache service
Restart the Apache service to make new changes take effect.
Service httpd restart
OR
/Etc/init. d/httpd restart
Verify if APC installation is successful
Create a phpinfo. php file under the Apache WEB Service root directory. For example,/var/www/html/phpinfo. php
# Vi/var/www/html/phpinfo. php
Add the following code to the file, save and close it.
<? Php
// Show all information, defaults to INFO_ALL
Phpinfo ();
?>
Open the following URL link in the browser. You will see the enabled configuration items of the APC module, as shown below.


Php apc Configuration Screen
Enable php apc Management
To open the APC Management Panel, copy the following files:
Cp/usr/share/pear/apc. php/var/www/html/
Next, open the apc. php file.
# Vi/var/www/html/apc. php
Set the user name and password in the apc. php file as follows.
Ults ('admin _ username', 'apc '); // ADMIN USERNAME
Ults ('admin _ password', 'set-PASSWORD-Here '); // ADMIN Password-change this to enable !!!
Enter the following URL link in the browser. You can use the APC Management Panel.
Http: // localhost/apc. php
Below are some APC Management Panel for your reference.
View host statistics

APC View Host Stats Overview
System cache entries

APC System Cache Entries Overview
User cache entries

APC User Cache Entries Overview
APC Login

APC Admin Login Screen
APC version check

APC Version Check Overview
Use PECL to upgrade APC
Run the following command to download and upgrade APC:
Pecl upgrade apc
Uninstall APC using PECL
If you want to remove it, use the following command to completely remove APC from your system.
Pecl uninstall apc

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.