Install XCache PHP Accelerator in Linux by Compiling from Source Instale XCache PHP acelerador em Linux em compilar a partir da fonte
XCache is an alternative yet fast and stable PHP accelerator and opcode cacher that is similar to the famous eAccelerator and APC (Alternative PHP Cache). XCache ainda é uma alternativa rápida e estável PHP acelerador e opcode cacher que é semelhante à do famoso eAccelerator e APC (Alternative PHP Cache). XCache extension works by caching the compiled bytecode (opcode or intermediate code) form of PHP scripts to avoid the overhead to parse and compile PHP source code on every page request, and thus reduces server loads, boosts the performance of PHP scripts and increases the speed of PHP code from 2-10 times. XCache obras de ampliação caching o bytecode compilado (opcode ou código intermediário) PHP scripts de forma a evitar a sobrecarga para analisar e compilar o código fonte do PHP em todas as páginas pedido, e, portanto, reduz servidor cargas, estimula o desempenho de scripts PHP e aumenta a velocidade de código PHP de 2-10 vezes.
XCache supports all of the latest PHP cvs branches such as PHP 4.3, PHP 4.4, PHP 5.1 and PHP 5.2 on Linux server including CentOS which common used on cPanel and Plesk based web hosting server, and ThreadSafe/Windows web server. XCache apoia todas as últimas PHP cvs sucursais, tais como PHP 4,3, 4,4 PHP, PHP e PHP 5,2 a 5,1 servidor Linux CentOS que inclusive utilizado em comum e Plesk cPanel baseado na web hosting servidor, e ThreadSafe / Windows servidor web. XCache overcomes a lot of problems that exist on opcachers or accelerators such as unable to work with new PHP versions. XCache supera uma série de problemas que existem em opcachers ou aceleradores como incapaz de trabalhar com novas versões do PHP. Beside, XCache also been Ao lado, foram também XCache benchmarked to be faster aferido a ser mais rápido than other opcode cachers. opcode cachers do que outros.
This is a simple tutorial and guide on how to install XCache PHP cacher by manually compiling from source code package. Este é um tutorial simples e orientar sobre como instalar manualmente XCache PHP cacher por compilar pacote de código fonte. If you’re using Wordpress or using XCache to speed up and improve Wordpress blog performance, you should first ensure that PHP is upgraded to latest version (PHP 5.2.1), as PHP 4 may cause some instability issue such as unable to post comment, partial page loading and etc. Anyway, PHP5 is always recommended if possible. Se você estiver usando Wordpress ou usando XCache para acelerar e melhorar o desempenho Wordpress blog, você primeiro deve assegurar que o PHP é atualizado para a versão mais recente (PHP 5.2.1), tal como PHP 4 pode provocar alguma instabilidade questão como incapaz de postar comentários , Parciais página carga e etc De qualquer forma, é sempre recomendável PHP5, se possível. And as with all PHP accelerator, XCache won’t work with PHP suEXEC turns on. E, como em todos os PHP acelerador, XCache não irá funcionar com suEXEC gira em PHP. PHP suEXEC must be disabled for XCache to work properly. PHP suEXEC deve ser desativado para XCache para funcionar corretamente.
Currently, XCache maintains 2 branches, ie version 1.0.3 and version 1.2.0. Atualmente, XCache mantém 2 sucursais, ou seja, a versão versão 1.0.3 e 1.2.0. Both version is now stable release, with version 1.0.x recommended for PHP 4.3.x and 4.4.x, and version 1.2.x recommended for most version of PHP including 5.1.x and 5.2.x, except PHP 5.0.x series. Tanto versão está agora a versão estável, com a versão 1.0.x recomendado para PHP 4.3.x e 4.4.x, ea versão 1.2.x recomendado para a maioria versão do PHP incluindo 5.1.x e 5.2.x, exceto PHP 5.0.x série. If you’re using PHP4, try both version of XCache to pick the one most suitable for your application. Se você estiver usando PHP4, tente tanto versão de um XCache para escolher o mais adequado para a sua aplicação. To check which version of PHP you’re usinng, issue command php -v or setup a PHP file with the following content, then call the file from web browser: Para verificar qual a versão do PHP você está usinng, emitir comando php-v ou configurar um arquivo PHP com o seguinte teor, em seguida, chame o arquivo a partir do navegador:
<?php <? PHP
phpinfo(); phpinfo ();
?>
- Change to user local source directory such as /usr/local/src by using following command: Mude para o diretório fonte do usuário local, tais como / usr / local / src usando seguinte comando:
cd /usr/local/src cd / usr / local / src
- Retrieve and download the source package of the version of XCache you choose to install. Recuperar e fazer o download do pacote fonte da versão de XCache você escolher a instalação.
wget http://210.51.190.228/pub/XCache/Releases/xcache-1.0.3.tar.gz (for XCache 1.0.3) wget http://210.51.190.228/pub/XCache/Releases/xcache-1.0.3.tar.gz (para XCache 1.0.3)
or ou
wget http://210.51.190.228/pub/XCache/Releases/xcache-1.2.0.tar.gz (for XCache 1.2.0) wget http://210.51.190.228/pub/XCache/Releases/xcache-1.2.0.tar.gz (para XCache 1.2.0)
- Untar, unzip, unpack or extract the archive with one of the following commands: Untar, unzip, desempacotar ou extrair o arquivo com um dos seguintes comandos:
tar -zxf xcache-*.tar.gz tar-zxf xcache-*. tar.gz
gzip -dc xcache-*.tar.gz | tar -x gzip-dc xcache-*. tar.gz | tar-x - Go into the xcache directory with source content: Vá para o diretório xcache a fonte conteúdo:
cd xcache CD xcache
- Trigger PHP building environment: Acionar PHP edifício ambiente:
phpize
- Optional but recommended practice is to build XCache outside of source directory: Opcional, mas prática recomendada é construir XCache fora do diretório fonte:
mkdir ../xcache-build mkdir .. / xcache-construir
cd ../xcache-build cd .. / xcache-construir - Run the configure with the option that you want, the basic is as below which will enable the XCache by default: Execute o configure com a opção que você deseja, a base é a seguir o que permitirá que os XCache por padrão:
../xcache/configure –enable-xcache .. / xcache / configure-enable-xcache
You can list out all available options by using ../xcache/configure –help command, which will display the following: Você pode listar todas as opções disponíveis através da utilização .. / xcache / configure-help comando, que irá mostrar o seguinte:
–enable-xcache Include XCACHE support. - Enable-xcache Incluir XCACHE apoio.
–enable-xcache-optimizer XCACHE: (N/A) - Enable-xcache-otimizador XCACHE: (N / A)
–enable-xcache-coverager XCACHE: Enable code coverage dumper - Enable-xcache-coverager XCACHE: Ativar código cobertura dumper
–enable-xcache-assembler XCACHE: (N/A) - Enable-assembler xcache-XCACHE: (N / A)
–enable-xcache-disassembler XCACHE: Enable opcode to php variable dumper - Enable-xcache-desmontador XCACHE: Permitir a opcode php variável dumper
–enable-xcache-encoder XCACHE: (N/A) - Enable-xcache-codificador XCACHE: (N / A)
–enable-xcache-decoder XCACHE: (N/A) - Enable-xcache-decodificador XCACHE: (N / A)
–enable-xcache-test XCACHE: Enable self test - FOR DEVELOPERS ONLY!! - Enable-xcache-teste XCACHE: Ativar auto teste - para desenvolvedores SÓ! - Compile the source with following command: Compile com a fonte seguinte comando:
make fazer
Ensure that no error occurred. Assegurar que não ocorreu nenhum erro.
- If you haven’t already using root account, su to root user. Se você ainda não conta usando raiz, a raiz su usuário.
- Install XCache binary with the following command: Instale XCache binário com o seguinte comando:
make install make install
Ensure that no error occurred, and note down the extension installation path of the xcache.so. Assegurar que não ocorreu nenhum erro, e anotar a extensão do caminho de instalação xcache.so.
- Next, XCache need to be configured and enabled in PHP.INI file. Em seguida, XCache precisam de ser configurado e ativado no arquivo php.ini. Locate the correct location of php.ini configuration file by using Localize o local correto do arquivo de configuração php.ini usando phpinfo() phpinfo () function (see sample listed above to check version of PHP). função (ver amostra acima listadas para verificar a versão do PHP). In web hosting environment, normally it’s located in /etc or /usr/local/lib. Na web hosting ambiente, que é normalmente localizado em / etc ou / usr / local / lib. If the install of PHP parses the /etc/php.d/ folder, then simply create a file in that folder named “xcache.ini” or copy over the sample xcache.ini came with source package. Se a instalação do PHP analisa o / etc / php.d / pasta e, em seguida, basta criar um arquivo em que a pasta denominada "xcache.ini" ou cópia durante a amostra xcache.ini veio com pacote fonte.
Change back to xcache source unpack directory, and run the following command with root user: Mudança de volta para descompactar fonte xcache diretório, e execute o seguinte comando com raiz usuário:
cat xcache.ini >> /etc/php.ini xcache.ini cat>> / etc / php.ini
$EDITOR /etc/php.ini $ EDITOR / etc / php.iniNote: change to the path of php.ini accordingly Observação: para alterar o caminho do php.ini consequentemente
This will append the default XCache configuration to the end of php.ini. Isto irá anexar o XCache configuração padrão para o final do php.ini. Alternatively, you can copy and paste the following text into the php.ini file yourself too: Alternativamente, você pode copiar e colar o seguinte texto no arquivo php.ini você também:
[xcache-common][xcache-comum]
;; install as zend extension (recommended);; Instalar como extensão Zend (recomendado)
zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-xxx/xcache.sozend_extension = / usr / local / lib / php / extensões / não-debug-não-zts-xxx / xcache.so
;; install as zend extension with thread-safe;; Como instalar a extensão Zend thread-safe
; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so; Zend_extension_ts = / usr / local / lib / php / extensões / não-debug-zts-xxx / xcache.so
;; install as PHP extension (extension_dir must be set to the full path to xcache.so);; Instalar como extensão PHP (extension_dir deve ser definida para o caminho completo para xcache.so)
; extension = xcache.so; Extensão = xcache.so[xcache.admin]
xcache.admin.user = “admin” xcache.admin.user = "admin"
xcache.admin.pass = md5($your_password) xcache.admin.pass = md5 ($ your_password)[xcache]
xcache.shm_scheme = “mmap” xcache.shm_scheme = "mmap"
xcache.size = 16M xcache.size = 16M
xcache.count = 1 xcache.count = 1
xcache.slots = 8K xcache.slots = 8k
xcache.ttl = 0 xcache.ttl = 0
xcache.gc_interval = 0 xcache.gc_interval = 0xcache.var_size = 0M xcache.var_size = 0M
xcache.var_count = 1 xcache.var_count = 1
xcache.var_slots = 8K xcache.var_slots = 8k
xcache.var_ttl = 0 xcache.var_ttl = 0
xcache.var_maxttl = 0 xcache.var_maxttl = 0
xcache.var_gc_interval = 300 xcache.var_gc_interval = 300xcache.test = Off xcache.test = Off
xcache.readonly_protection = Off xcache.readonly_protection = Off
xcache.mmap_path = “/dev/zero” xcache.mmap_path = "/ dev / zero"
xcache.coredump_directory = “” xcache.coredump_directory = ""
xcache.cacher = On Em xcache.cacher =
xcache.stat = On Em xcache.stat =
xcache.optimizer = Off xcache.optimizer = Off[xcache.coverager]
xcache.coverager = Off xcache.coverager = Off
xcache.coveragedump_directory = “” xcache.coveragedump_directory = "" - You can configure XCache to your preference. Você pode configurar XCache a sua preferência. One setting that must be changed is under the [xcache-common], where you must specify the correct installation path of the XCache extension module. Uma definição que deve ser mudado está sob a [xcache-comum], onde você deve especificar o caminho correto instalação do módulo XCache extensão. You can also opt to run XCache as PHP extension instead of extension for Zend module. Você também pode optar por correr XCache como extensão PHP em vez de prorrogação para a Zend módulo. In this case, comment and uncomment the line accordingly. Neste caso, comentar e descomentando a linha em conformidade. Other important options include “xcache.size” which specify amount the memory allocated to XCache, “xcache.count” to take advantage of multi-core processors or multiple processors. Outras opções incluem importantes "xcache.size", que especifique o montante atribuído a memória XCache, "xcache.count" para tirar partido dos processadores multi-core ou múltiplos processadores. And if you plan to use XCache web administration interface, input the “xcache.admin.user” and md5 checksum value of “xcache.admin.pass”. E, se você pretende utilizar XCache administração interface web, o input "xcache.admin.user" e md5 checksum valor de "xcache.admin.pass". Try Tentar MD5 tools MD5 ferramentas to generate the correct value, or use the following command to generate the MD5 for your password: para gerar o valor correto, ou usar o seguinte comando para gerar o MD5 para a sua senha:
echo -n “password” | md5sum echo-n "senha" | md5sum
Note: Explanation and definition of all XCache INI settings can be found Nota: Explicação e definição de todos os XCache INI configurações podem ser encontrados here aqui .
- Restart the Apache httpd web server. Reinicie o servidor web Apache httpd. The following commands should work: Os seguintes comandos devem trabalhar:
/etc/init.d/apache* restart / etc / init.d / apache restart *
or ou
/etc/init.d/httpd* restart / etc / init.d / httpd restart *
- Ensure the XCache is running by calling PHP file with phpinfo() (see sample above). Garantir a XCache está funcionando através do telefone PHP arquivo com phpinfo () (veja exemplo acima). You should see a new XCache Support block with opcode cache enabled. Você deverá ver um novo bloco com Suporte XCache opcode cache ativado.
- If you wish to set up XCache administration page, configure an alias in httpd.conf of Apache to point to the admin subdirectory within XCache. Se você deseja criar XCache administração página, configurar um alias no httpd.conf do Apache para apontar para o administrador subdiretório dentro XCache. To do so, add the following line to httpd.conf (assuming your xcache source is extracted at /usr/local/src/, and you want to access admin page from /xcache-admin/ URL): Para fazer isso, adicione a seguinte linha no httpd.conf (assumindo que o seu xcache fonte é extraído em / usr / local / src /, e você deseja acessar a página de admin / xcache-admin / URL):
Alias /xcache-admin/ /usr/local/src/xcache/admin/ Alias / xcache-admin / / usr / local / src / xcache / admin /
Then restart Apache web server. Em seguida, reinicie o servidor web Apache. For lighttpd, add the following line instead: Para Lighttpd, adicione a seguinte linha em vez:
alias.url += (”/xcache-admin/” => “/usr/share/xcache/admin/”) alias.url + = ( "/ xcache-admin /" => "/ usr / share / xcache / admin /")
Alternatively, you can also copy the whole “admin” directory from the “xcache” source folder to web document-root or sub-directory of your domain which is web accessible. Se preferir, você também pode copiar todo o "admin" a partir do diretório "xcache" fonte pasta para web documento de raiz ou sub-diretório do seu domínio que está acessível na web. However, this method is not recommended as you may forget to update the admin page when XCache package is updated. No entanto, este método não é recomendado que você pode se esqueça de actualizar a página quando admin XCache pacote é atualizado.
Note: Ensure that Nota: Certifique-se de que open_basedir protection open_basedir protecção , if enabled, is excluded for the directory contains admin-page. , Se for ativado, é excluído para o diretório contém admin-page.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Esta é uma página traduzida máquina que é fornecida "como está" sem garantia. Machine translation may be difficult to understand. A tradução automática pode ser difícil de compreender. Please refer to Por favor, consulte a original English article Inglês original article whenever possible. sempre que possível.
Share and contribute or get technical support and help at Compartilhe e contribuir ou obter suporte técnico e ajudar a My Digital Life Forums Minha vida digital Fóruns .
Related Articles Artigos relacionados
- Proper Way to Generate MD5 Hash for XCache Administration Password with md5sum or PHP A boa forma de gerar hash MD5 para XCache Administração Senha com md5sum ou PHP
- Run WordPress at Top Fast Speed by Putting Objects and Variables into XCache or eAccelerator Cache Memory (Plugin) Executar a WordPress Top Speed Fast Colocar a Objetos e variáveis em XCache ou eAccelerator memória cache (Plugin)
- Running Google Earth on Suse Linux with VMware Correndo o Google Earth em Suse Linux com VMware
- Cheapest Linux Box Ever O Linux Caixa cada vez mais baratos
- Get Ready for Linux Genuine Advantage (LGA) - with Source and Crack Prepare-se para o Linux Genuine Advantage (LGA) - com Fonte e crack
- Novell SUSE Linux Enterprise Server 10 Reviews Novell SUSE Linux Enterprise Server 10 comentários
- Enable Gzip Compress on Wordpress with WP-Cache 2.x Enable GZIP Compress sobre a Wordpress WP-Cache 2.x
- How to Open and View or Extract CHM (Compiled HTML) Files in Linux Como Abrir e Ver ou extrato CHM (Compilado HTML) Ficheiros no Linux
- Free Download Manager 2.5 Build 708 Released Free Download Manager 2,5 construir 708 libertados
- Easily Set Up Web Server with XAMPP Facilmente criado com o servidor web XAMPP


















