Install XCache PHP Accelerator in Linux by Compiling from Source Inštalácia XCache PHP Accelerator v Linuxe by Kompilácia zo zdrojových kódov

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 je alternatívou zatiaľ rýchly a stabilný PHP akcelerátora a opcode cacher, ktorá je obdobou slávneho eAccelerator a APC (Alternatívne 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 rozšírenie diela caching kompilovaný bytecode (opcode alebo medziproduktu kód) formou PHP skripty, aby sa zabránilo réžii na Pársovia a kompilovat PHP zdrojový kód na každej stránke žiadosť, a tak znižuje zaťaženie servera, zvyšuje výkonnosť PHP skripty a zvyšuje rýchlosť PHP kód 2-10 krát.

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 podporuje všetky najnovšie PHP cvs disciplín, ako je PHP 4.3, PHP 4.4, PHP 5.1 a PHP 5.2 pre Linux server vrátane CentOS, ktorá spoločne využívané na cPanel Plesk založené a web hosting server a ThreadSafe / Windows web server. XCache overcomes a lot of problems that exist on opcachers or accelerators such as unable to work with new PHP versions. XCache prekonať veľa problémov, ktoré existujú na opcachers alebo urýchľovačmi, ako je schopný pracovať s novými verziami PHP. Beside, XCache also been Vedľa, XCache tiež benchmarked to be faster vzorovým byť rýchlejší than other opcode cachers. ako ostatné opcode cachers.

This is a simple tutorial and guide on how to install XCache PHP cacher by manually compiling from source code package. To je jednoduchý tutoriál a návod, ako nainštalovať XCache PHP cacher ručne kompilácii zo zdrojových kódov balíka. 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. Ak používate Wordpress, alebo pomocou XCache urýchliť a zlepšiť Wordpress blog výkonnosti, mali by ste najprv zabezpečiť, že PHP je aktualizovaný na najnovšiu verziu (PHP 5.2.1), PHP 4, ako môžu spôsobiť nestabilitu tému, ako je schopný písať komentár , čiastočné načítania stránky a atď Každopádně, PHP5 sa odporúča vždy, ak je to možné. And as with all PHP accelerator, XCache won't work with PHP suEXEC turns on. A rovnako ako u všetkých PHP urýchľovača, XCache nebude pracovať s PHP suEXEC zapne. PHP suEXEC must be disabled for XCache to work properly. PHP suEXEC musia byť pre telesne postihnutých XCache pracovať správne.

Currently, XCache maintains 2 branches, ie version 1.0.3 and version 1.2.0. V súčasnej dobe XCache udržiava 2 vetvy, tj verzia 1.0.3 a verzie 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. Obe verzie je teraz stabilnú verziu, s verziou 1.0.x je doporučované pre PHP 4.3.x a 4.4.x, a verzie 1.2.x odporúča pre väčšinu verzií vrátane PHP 5.1.x a 5.2.x, okrem PHP 5.0.x radu. If you're using PHP4, try both version of XCache to pick the one most suitable for your application. Ak používate PHP4, skúste obe verzie XCache vybrať ten najvhodnejší pre vašu aplikáciu. 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: Ak chcete skontrolovať, ktoré verzie PHP, ktorú ste usinng vydať príkaz php-v PHP alebo nastaviť súbor s týmto obsahom, potom volajte na obrázok z webového prehliadača:

<?php <? Php
phpinfo(); phpinfo ();
?> ?>

  1. Change to user local source directory such as /usr/local/src by using following command: Zmeniť užívateľské miestny zdroj adresár ako / usr / local / src pomocou nasledujúceho príkazu:

    cd /usr/local/src cd / usr / local / src

  2. Retrieve and download the source package of the version of XCache you choose to install. Vyhľadať a stiahnuť zdrojový balík verziu XCache nainštalujete.

    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 (pre XCache 1.0.3)

    or alebo

    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 (pre XCache 1.2.0)

  3. Untar, unzip, unpack or extract the archive with one of the following commands: Untar, Dekomprimujte, rozbaliť alebo rozbaliť archív s jedným z nasledujúcich príkazov:

    tar -zxf xcache-*.tar.gz tar-zxf xcache-*. tar.gz
    gzip -dc xcache-*.tar.gz | tar -x gzip-dc xcache-*. tar.gz | tar-x

  4. Go into the xcache directory with source content: Prejdite do adresára so zdrojovými xcache obsahu:

    cd xcache cd xcache

  5. Trigger PHP building environment: Trigger PHP budovanie prostredia:

    phpize phpize

  6. Optional but recommended practice is to build XCache outside of source directory: Nepovinné, ale odporúčané praxe je vybudovať XCache mimo zdrojový adresár:

    mkdir ../xcache-build mkdir .. / xcache-vybudovanie
    cd ../xcache-build cd .. / xcache-vybudovanie

  7. Run the configure with the option that you want, the basic is as below which will enable the XCache by default: Spustite konfiguráciu s možnosťou, že budete chcieť, základná je, ako je uvedené nižšie, ktorá umožní XCache implicitne:

    ../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: Môžete uviesť všetky dostupné možnosti pomocou .. / xcache / configure-help príkaz, ktorý sa zobrazí nasledovne:

    –enable-xcache Include XCACHE support. -Enable-xcache Zarátajte XCACHE podporu.
    –enable-xcache-optimizer XCACHE: (N/A) -Enable-xcache-optimizer XCACHE: (N / A)
    –enable-xcache-coverager XCACHE: Enable code coverage dumper -Enable-xcache-coverager XCACHE: Povoľte kód pokrytie sklápěč
    –enable-xcache-assembler XCACHE: (N/A) -Enable-xcache-asembleru XCACHE: (N / A)
    –enable-xcache-disassembler XCACHE: Enable opcode to php variable dumper -Enable-xcache-disassembler XCACHE: Povoľte opcode na php premenná sklápěč
    –enable-xcache-encoder XCACHE: (N/A) -Enable-xcache-kodér XCACHE: (N / A)
    –enable-xcache-decoder XCACHE: (N/A) -Enable-xcache-dekodér XCACHE: (N / A)
    –enable-xcache-test XCACHE: Enable self test - FOR DEVELOPERS ONLY!! -Enable-xcache-test XCACHE: Povoliť vlastné test - Pre vývojárov LEN!

  8. Compile the source with following command: Kompilácia zdroje s nasledujúci príkaz:

    make vyrobiť

    Ensure that no error occurred. Zabezpečilo, že k žiadnej chybe.

  9. If you haven't already using root account, su to root user. Ak ste tak ešte neurobili pomocou roota, su to root.
  10. Install XCache binary with the following command: Inštalácia XCache binárnou s nasledujúci príkaz:

    make install make install

    Ensure that no error occurred, and note down the extension installation path of the xcache.so. Zabezpečilo, že k žiadnej chybe, a uvedomte si predĺženie cesty inštalácia z xcache.so.

  11. Next, XCache need to be configured and enabled in PHP.INI file. Ďalšie XCache musia byť nakonfigurovaná a zapnutá v php.ini file. Locate the correct location of php.ini configuration file by using Prejdite na správne umiestnenie konfiguračného súboru php.ini pomocou phpinfo() phpinfo () function (see sample listed above to check version of PHP). funkcie (pozri príklad vyššie uvedených skontrolovať verziu PHP). In web hosting environment, normally it's located in /etc or /usr/local/lib. V prostredí, web hosting, obvykle je umiestnený v / etc alebo / 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. Ak k inštalácii PHP analýzy / etc / php.d / zložky, potom stačí vytvoriť súbor v tomto priečinku s názvom "xcache.ini" alebo skopírovať cez vzorky xcache.ini prišiel s zdrojového balíčka.

    Change back to xcache source unpack directory, and run the following command with root user: Zmeniť späť na xcache zdroj Vybaľte adresára a spustiť nasledujúci príkaz sa užívateľa root:

    cat xcache.ini >> /etc/php.ini mačka xcache.ini>> / etc / php.ini
    $EDITOR /etc/php.ini $ EDITOR / etc / php.ini

    Note: change to the path of php.ini accordingly Poznámka: zmena cestu php.ini zodpovedajúcim

    This will append the default XCache configuration to the end of php.ini. To bude append predvolené XCache konfigurácia do konca php.ini. Alternatively, you can copy and paste the following text into the php.ini file yourself too: Alebo môžete skopírovať a vložiť nasledujúci text do súboru php.ini si taky:


    [xcache-common]
    ;; install as zend extension (recommended)
    zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-xxx/xcache.so
    ;; install as zend extension with thread-safe
    ; 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)
    ; extension = xcache.so
    local
    [xcache-common]
    ;; install as zend extension (recommended)
    zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-xxx/xcache.so
    ;; install as zend extension with thread-safe
    ; 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)
    ; extension = xcache.so
    local
    [xcache-common]
    ;; install as zend extension (recommended)
    zend_extension = /usr/local/lib/php/extensions/no-debug-non-zts-xxx/xcache.so
    ;; install as zend extension with thread-safe
    ; 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)
    ; extension = xcache.so

    [xcache.admin] [xcache.admin]
    xcache.admin.user = “admin” xcache.admin.user = "admin"
    xcache.admin.pass = md5($your_password) xcache.admin.pass = md5 ($ your_password)

    [xcache] [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 = 0

    xcache.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 = 300

    xcache.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 xcache.cacher = On
    xcache.stat = On xcache.stat = On
    xcache.optimizer = Off xcache.optimizer = Off

    [xcache.coverager] [xcache.coverager]
    xcache.coverager = Off xcache.coverager = Off
    xcache.coveragedump_directory = “” xcache.coveragedump_directory = ""

  12. You can configure XCache to your preference. Môžete nastaviť XCache na vaše preferencie. One setting that must be changed is under the [xcache-common], where you must specify the correct installation path of the XCache extension module. Jedným z nastavenia, ktoré je potrebné zmeniť, je podľa [xcache-common], kde musíte zadať správny inštalačný cestu k XCache rozšiřující modul. You can also opt to run XCache as PHP extension instead of extension for Zend module. Môžete tiež vybrať plynúť XCache ako rozšírenie PHP miesto pre rozšírenie Zend modul. In this case, comment and uncomment the line accordingly. V tomto prípade komentár a odkomentovat riadku zodpovedajúcim spôsobom. 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. Ďalšie dôležité voľby sú "xcache.size", ktoré určujú výšku pamäte pridelené XCache, "xcache.count" využiť viac-jadrové procesory alebo viac procesorov. And if you plan to use XCache web administration interface, input the “xcache.admin.user” and md5 checksum value of “xcache.admin.pass”. A ak máte v pláne použiť XCache webové administračné rozhranie, vstup na "xcache.admin.user" a md5 kontrolné hodnota "xcache.admin.pass". Try Skúsiť MD5 tools MD5 nástroje to generate the correct value, or use the following command to generate the MD5 for your password: vygenerovať správnu hodnotu alebo použite nasledujúci príkaz pre vygenerovanie MD5 pre Vaše heslo:

    echo -n “password” | md5sum echo-n "heslo" | md5sum

    Note: Explanation and definition of all XCache INI settings can be found Poznámka: Vysvetlenie a definície všetkých XCache INI nastavenia možno nájsť here tady . .

  13. Restart the Apache httpd web server. Reštartujte Apache httpd web server. The following commands should work: Nasledujúce príkazy by mali pracovať:

    /etc/init.d/apache* restart / Etc / init.d / apache restart *

    or alebo

    /etc/init.d/httpd* restart / Etc / init.d / httpd restart *

  14. Ensure the XCache is running by calling PHP file with phpinfo() (see sample above). Zabezpečiť XCache beží zavolaním PHP súbor s phpinfo () (pozri príklad vyššie). You should see a new XCache Support block with opcode cache enabled. Mali by ste vidieť nové XCache Podpora bloku s opcode cache povolený.
  15. 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. Ak si prajete nastaviť XCache správy stránky, nastaviť alias v httpd.conf Apache bodu do podadresára admin do 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): Ak tak chcete urobiť, pridajte nasledujúci riadok do httpd.conf (za predpokladu, že váš xcache zdroj je extrahoval v / usr / local / src /, a chcete mať prístup admin stránku od / xcache-admin / URL):

    Alias /xcache-admin/ /usr/local/src/xcache/admin/ Alias / xcache-admin / / usr / local / src / xcache / admin /

    Then restart Apache web server. Reštartujte webový server Apache. For lighttpd, add the following line instead: Pre lighttpd, pridajte nasledujúci riadok: namiesto:

    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. Prípadne môžete tiež skopírovať celý "admin" adresár z "xcache" zdroj zložky na web dokument-root, alebo sub-adresári domény, ktorý je prístupný web. However, this method is not recommended as you may forget to update the admin page when XCache package is updated. Avšak, táto metóda sa neodporúča, ak môžete zabudnúť na aktualizáciu stránok, keď XCache admin balík je aktualizovaný.

    Note: Ensure that Poznámka: Zaistite, aby open_basedir protection open_basedir ochrany , if enabled, is excluded for the directory contains admin-page. , Ak je povolená, je vylúčená pre adresár obsahuje admin-stránku.

IMPORTANT : The page is machine translated and provided "as is" without warranty. Upozornenie: Stránka je stroje preložené a poskytované "tak ako sú" bez záruky. Machine translation may be difficult to understand. Strojový preklad môže byť ťažké pochopiť. Please refer to Obráťte sa prosím na original English article Anglický originál článku whenever possible. kedykoľvek je to možné.


Leave a Reply Nechaj Odpoveď

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Môžete použiť tieto značky: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Vyberajte komentáre funkcia bola vypnutá. To receive notification of latest comments posted, subscribe to Ak chcete dostávať oznámenie o najnovšie komentáre posta, prihláste sa My Digital Life Comments RSS feed My Digital Life Komentáre RSS or alebo register to receive register pre príjem new comments in daily email digest. nové komentáre v dennom email Digest.
Custom Search

New Articles Nové články

Incoming Search Terms for the Article Incoming Vyhľadávanie Podmienky pre článok

php accelerator linux php akcelerátoru linux - -- this is default plesk page перекласти українською To je predvolený stránku plesk перекласти українською - -- installing a php accelerator inštalácia php akcelerátora - -- program decode eaccelerator program dekódovať eaccelerator - -- como instalar php accelerator como Inątalova php akcelerátora - -- linux php-accelerator file ini linux php-akcelerátor súbor ini - -- php 5 accelerator php 5 akcelerátora - -- optimal linux centos settings for wordpress Optimálne nastavenie pre linux CentOS wordpress - --