Install APC on RHEL/CentOS6.3/5.6 and Fedora17/12

Source: Internet
Author: User
Tags apc apc configuration apc module file info
Install APC on RHEL/CentOS6.3/5.6 and Fedora17/12 and install PHPAPC on Linux. This document describes how to install and enable PHPAPC on RHEL6.3/6.2/6.1/6/5.8/5.6, centOS6.3/6.2/6.1/6/5.8/5.6/6.3 and Fedora17, 16,15, 14,13, 12 use the PECL command to install APC on RHEL/CentOS 5.6/17/12 and Fedora
 
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.
// 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.