Install XCache PHP Accelerator in Linux by Compiling from Source XCache installare PHP Accelerator in Linux di compilazione dai sorgenti
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 è un'alternativa ancora veloce e stabile PHP acceleratore e Opcode cacher che è simile alla famosa 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 lavori di ampliamento di caching il bytecode compilato (o Opcode codice intermedio) sotto forma di script PHP per evitare il sovraccarico per analizzare e compilare il codice sorgente di PHP su ogni pagina richiesta e, quindi, riduce i carichi server, aumenta il rendimento di script PHP e aumenta la velocità di codice PHP da 2-10 volte.
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 supporta tutte le ultime PHP cvs rami come ad esempio PHP 4,3, 4,4 PHP, PHP e PHP 5,1 a 5,2 server Linux compreso che CentOS comune utilizzato su cPanel e Plesk web basati su server host, e ThreadSafe / Windows server web. XCache overcomes a lot of problems that exist on opcachers or accelerators such as unable to work with new PHP versions. XCache supera un sacco di problemi che esistono sul opcachers o acceleratori come ad esempio in grado di lavorare con le nuove versioni di PHP. Beside, XCache also been Accanto, anche XCache benchmarked to be faster riferimento a essere più veloce than other opcode cachers. rispetto ad altri Opcode cachers.
This is a simple tutorial and guide on how to install XCache PHP cacher by manually compiling from source code package. Si tratta di un semplice tutorial e guida su come installare XCache PHP cacher manualmente la compilazione di codice sorgente dal pacchetto. 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 si sta utilizzando o utilizzando Wordpress XCache di accelerare e migliorare le prestazioni di Wordpress blog, si dovrebbe prima assicurarsi che il PHP è aggiornato alla versione più recente (PHP 5.2.1), come PHP 4 può causare qualche problema di instabilità come ad esempio in grado di Pubblica commento , Parziale e caricamento della pagina, ecc In ogni caso, PHP5 è sempre raccomandato, se possibile. And as with all PHP accelerator, XCache won’t work with PHP suEXEC turns on. E, come tutte le PHP acceleratore, XCache non funziona con PHP suexec si accende. PHP suEXEC must be disabled for XCache to work properly. PHP suexec deve essere disabilitata per XCache per funzionare correttamente.
Currently, XCache maintains 2 branches, ie version 1.0.3 and version 1.2.0. Attualmente, XCache mantiene 2 succursali, vale a dire la versione 1.0.3 e la versione 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. Sia la versione è ora stabile release, con la versione 1.0.x consigliato per PHP 4.3.x e 4.4.x, e la versione 1.2.x raccomandato per la maggior parte versione di PHP 5.1.x compresi e 5.2.x, ad eccezione di PHP 5.0.x serie. If you’re using PHP4, try both version of XCache to pick the one most suitable for your application. Se si sta utilizzando PHP4, provare sia la versione di XCache scegliere quello più adatto per l'applicazione. 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: Per verificare quale versione di PHP che stai usinng, il rilascio di comando php-v o installare un file PHP con il seguente contenuto, quindi chiamare il file da browser web:
<?php <? php
phpinfo(); phpinfo ();
?>
- Change to user local source directory such as /usr/local/src by using following command: Utente a cambiare directory dei sorgenti locali come ad esempio / usr / local / src utilizzando seguente comando:
cd /usr/local/src cd / usr / local / src
- Retrieve and download the source package of the version of XCache you choose to install. Recuperare e scaricare il pacchetto sorgente della versione di XCache si sceglie di installare.
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 (per XCache 1.0.3)
or o
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 (per XCache 1.2.0)
- Untar, unzip, unpack or extract the archive with one of the following commands: Scompattate, unzip, decomprimere o estrarre l'archivio con uno dei seguenti comandi:
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: Andare nella directory con xcache fonte di contenuti:
cd xcache CD xcache
- Trigger PHP building environment: Trigger PHP edificio ambiente:
phpize
- Optional but recommended practice is to build XCache outside of source directory: Facoltativa, ma pratica raccomandata è di costruire XCache al di fuori della directory dei sorgenti:
mkdir ../xcache-build mkdir .. / xcache-costruire
cd ../xcache-build cd .. / xcache-costruire - Run the configure with the option that you want, the basic is as below which will enable the XCache by default: Eseguire il configure con l'opzione desiderata, la base è come al di sotto del quale consentirà alla XCache di default:
../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: Si possono elencare tutte le opzioni disponibili utilizzando .. / xcache / configure-help comando, che visualizzerà la seguente:
–enable-xcache Include XCACHE support. - Enable-xcache Includi XCACHE sostegno.
–enable-xcache-optimizer XCACHE: (N/A) - Enable-xcache-ottimizzatore XCACHE: (N / A)
–enable-xcache-coverager XCACHE: Enable code coverage dumper - Enable-xcache-coverager XCACHE: Attiva codice copertura dumper
–enable-xcache-assembler XCACHE: (N/A) - Enable-xcache-Assembler XCACHE: (N / A)
–enable-xcache-disassembler XCACHE: Enable opcode to php variable dumper - Enable-xcache-disassembler XCACHE: Attiva Opcode a php variabile dumper
–enable-xcache-encoder XCACHE: (N/A) - Enable-xcache-encoder XCACHE: (N / A)
–enable-xcache-decoder XCACHE: (N/A) - Enable-xcache-decodificatore XCACHE: (N / A)
–enable-xcache-test XCACHE: Enable self test - FOR DEVELOPERS ONLY!! - Enable-xcache-test XCACHE: Attiva Self Test - per gli sviluppatori SOLO! - Compile the source with following command: Compilare il sorgente con il seguente comando:
make fare
Ensure that no error occurred. Garantire che non si sono verificati errori.
- If you haven’t already using root account, su to root user. Se non hai già utilizzando account root, su verso root.
- Install XCache binary with the following command: Installare XCache binario con il seguente comando:
make install make install
Ensure that no error occurred, and note down the extension installation path of the xcache.so. Garantire che non si sono verificati errori, e annotare il percorso di installazione estensione dei xcache.so.
- Next, XCache need to be configured and enabled in PHP.INI file. Avanti, XCache bisogno di essere configurato e attivato nel file php.ini. Locate the correct location of php.ini configuration file by using Individuare la corretta posizione del file di configurazione php.ini utilizzando phpinfo() phpinfo () function (see sample listed above to check version of PHP). funzione (vedi sopra elencati campione per verificare la versione di PHP). In web hosting environment, normally it’s located in /etc or /usr/local/lib. In ambiente web hosting, di solito si trova in / etc o / 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 l'installazione di PHP analizza il file / etc / php.d / cartella, quindi è sufficiente creare un file nella cartella di nome "xcache.ini" o copiare il campione fornito con xcache.ini pacchetto sorgente.
Change back to xcache source unpack directory, and run the following command with root user: Modificare nuovamente il xcache fonte scompattare directory, ed eseguire il seguente comando con utente root:
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 Nota: per cambiare il percorso del php.ini di conseguenza
This will append the default XCache configuration to the end of php.ini. Questo appende le XCache configurazione di default per la fine del php.ini. Alternatively, you can copy and paste the following text into the php.ini file yourself too: In alternativa, è possibile copiare e incollare il seguente testo nel file php.ini te troppo:
[xcache-common][xcache-comune]
;; install as zend extension (recommended);; Installa come estensione Zend (consigliato)
zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-xxx/xcache.sozend_extension = / usr / local / lib / php / extensions / no-debug-non ZTS-xxx / xcache.so
;; install as zend extension with thread-safe;; Installa come estensione Zend a thread-safe
; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so; Zend_extension_ts = / usr / local / lib / php / extensions / non-debug-ZTS-xxx / xcache.so
;; install as PHP extension (extension_dir must be set to the full path to xcache.so);; Come installare PHP Extension (extension_dir deve essere impostato per il percorso completo xcache.so)
; extension = xcache.so; Extension = xcache.so[xcache.admin]
xcache.admin.user = “admin” xcache.admin.user = "admin"
xcache.admin.pass = md5($your_password) xcache.admin.pass = md5 ($ propria_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 = Su xcache.cacher
xcache.stat = On = Su 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. È possibile configurare XCache alle tue preferenze. One setting that must be changed is under the [xcache-common], where you must specify the correct installation path of the XCache extension module. Una impostazione che deve essere cambiato è sotto il [xcache-comune], dove è necessario specificare il percorso di installazione corretta del modulo XCache estensione. You can also opt to run XCache as PHP extension instead of extension for Zend module. È anche possibile scegliere di eseguire XCache come estensione di PHP invece di estensione Zend per modulo. In this case, comment and uncomment the line accordingly. In questo caso, togliere il commento e la linea di conseguenza. 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. Altri importanti opzioni comprendono "xcache.size" che specificano la quantità di memoria allocata XCache, "xcache.count" ad approfittare di processori multi-core o più processori. 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 si prevede di utilizzare XCache interfaccia di amministrazione web, ingresso "xcache.admin.user" e checksum md5 valore di "xcache.admin.pass". Try Provare MD5 tools MD5 strumenti to generate the correct value, or use the following command to generate the MD5 for your password: per generare il valore corretto, o utilizzare il seguente comando per generare la MD5 per la tua password:
echo -n “password” | md5sum echo-n "password" | md5sum
Note: Explanation and definition of all XCache INI settings can be found Nota: Spiegazione e la definizione di tutti i XCache INI impostazioni possono essere trovati here qui .
- Restart the Apache httpd web server. Riavviare httpd Apache web server. The following commands should work: I seguenti comandi dovrebbe funzionare:
/etc/init.d/apache* restart / etc / init.d / apache restart *
or o
/etc/init.d/httpd* restart / etc / init.d / httpd restart *
- Ensure the XCache is running by calling PHP file with phpinfo() (see sample above). Garantire la XCache è in esecuzione chiamando PHP file con phpinfo () (vedi esempio sopra). You should see a new XCache Support block with opcode cache enabled. Si dovrebbe vedere un nuovo blocco di Supporto XCache Opcode con cache abilitata.
- 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 si desidera impostare XCache pagina di amministrazione, configurare un alias in httpd.conf di Apache a punto per l'amministratore sottodirectory all'interno 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): Per fare questo, aggiungere la seguente linea a httpd.conf (supponendo che il tuo xcache fonte viene estratto in / usr / local / src /, e si desidera accedere dalla pagina 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. Quindi riavviare Apache web server. For lighttpd, add the following line instead: Per lighttpd, aggiungere la seguente riga invece:
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. In alternativa, è possibile anche copiare l'intero "admin" directory dal "xcache" cartella di origine di documento web-root o sotto-directory del proprio dominio Web che è accessibile. However, this method is not recommended as you may forget to update the admin page when XCache package is updated. Tuttavia, questo metodo non è raccomandato in quanto si potrebbe dimenticare di aggiornare la pagina quando admin XCache pacchetto viene aggiornato.
Note: Ensure that Nota: Accertarsi che open_basedir protection open_basedir protezione , if enabled, is excluded for the directory contains admin-page. , Se attivata, è escluso per le directory contiene admin-pagina.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Questa è una pagina tradotta macchina che è fornito "così com'è" senza alcuna garanzia. Machine translation may be difficult to understand. Traduzione automatica può essere difficile da capire. Please refer to Si prega di fare riferimento a original English article articolo originale in lingua inglese whenever possible. quando possibile.
Share and contribute or get technical support and help at Condividere e contribuire o ottenere supporto tecnico e assistenza in My Digital Life Forums La mia vita digitale Forum .
Related Articles Articoli correlati
- Proper Way to Generate MD5 Hash for XCache Administration Password with md5sum or PHP Buon modo per generare hash MD5 per XCache Amministrazione Password con md5sum o PHP
- Run WordPress at Top Fast Speed by Putting Objects and Variables into XCache or eAccelerator Cache Memory (Plugin) Esegui WordPress in alto a velocità di Mettere Oggetti e variabili in XCache o eAccelerator memoria cache (Plugin)
- Running Google Earth on Suse Linux with VMware In esecuzione di Google Earth su Suse Linux con VMware
- Cheapest Linux Box Ever Crescente Linux box mai
- Get Ready for Linux Genuine Advantage (LGA) - with Source and Crack Preparatevi per Linux Genuine Advantage (LGA) - a Fonte e Crack
- Novell SUSE Linux Enterprise Server 10 Reviews Novell SUSE Linux Enterprise Server 10 recensioni
- Enable Gzip Compress on Wordpress with WP-Cache 2.x Compressione Gzip consentire a Wordpress con WP-Cache 2.x
- How to Open and View or Extract CHM (Compiled HTML) Files in Linux Come aprire e visualizzare o estratto CHM (Compiled HTML) File in Linux
- Free Download Manager 2.5 Build 708 Released Free Download Manager 2,5 Build 708 Released
- Easily Set Up Web Server with XAMPP Facilmente istituire server Web con XAMPP














