Install XCache PHP Accelerator in Linux by Compiling from Source Įdiekite xcache PHP Accelerator į Linux Surinkimas iš šaltinio
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 yra alternatyva dar greitas ir stabilus PHP greitiklio ir kodas operacijos cacher, panašus į garsaus eAccelerator ir 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 išplėtimo darbų spartinimo ir rengiami bytecode (kodas operacijos arba tarpinis kodas) forma PHP išvengti pridėtinės apdoroti ir kompiliuoti PHP kodo kiekviename puslapyje prašymą, ir tokiu būdu sumažina serverio apkrovą, padidina efektyvumą PHP ir padidina greitį PHP kodą iš 2-10 kartų.
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 palaiko visas naujausią PHP-cvs filialų pavyzdžiui, PHP 4.3, PHP 4.4, PHP 5.1 ir PHP 5,2 Linux serverio įskaitant Centos kurios bendros naudojamos cPanel ir Plesk remiantis interneto serveryje, ir ThreadSafe / Windows serveryje. XCache overcomes a lot of problems that exist on opcachers or accelerators such as unable to work with new PHP versions. Xcache įveikti daug problemų, kurios egzistuoja dėl opcachers arba greitikliai pavyzdžiui, negali dirbti su nauja PHP versijos. Beside, XCache also been Šalia, xcache taip pat buvo benchmarked to be faster etaloninėmis būtų greičiau than other opcode cachers. nei kitų kodas operacijos cachers.
This is a simple tutorial and guide on how to install XCache PHP cacher by manually compiling from source code package. Tai paprasta pamoka, ir vadovas, kaip įdiegti xcache PHP cacher rankiniu būdu kompiliavimo iš kodo pakete. 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. Jei naudojate WordPress arba naudojant xcache paspartinti ir pagerinti WordPress blog veiksmingumą, reikia užtikrinti, kad PHP yra atnaujintas iki naujausios versijos (PHP 5.2.1), kadangi PHP 4 gali sukelti nestabilumo problema pvz negali rašyti komentarą , dalinis puslapio užkrovimo ir tt Bet kokiu atveju, PHP5 visada rekomenduojama, jei įmanoma. And as with all PHP accelerator, XCache won't work with PHP suEXEC turns on. Ir kaip ir visi kiti PHP greitintuvo, xcache neveikia su PHP suexec paverčia į. PHP suEXEC must be disabled for XCache to work properly. PHP suexec turi būti išjungta xcache dirbti tinkamai.
Currently, XCache maintains 2 branches, ie version 1.0.3 and version 1.2.0. Šiuo metu xcache išlaiko 2 filialams, ty versija 1.0.3 ir 1.2.0 versija. 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. Abi versijos yra stabili, versija 1.0.x rekomenduojama PHP 4.3.x ir 4.4.x ir 1.2.x versija rekomenduojama daugumai versiją PHP, įskaitant 5.1.x ir 5.2.x, išskyrus PHP 5.0.x serijos. If you're using PHP4, try both version of XCache to pick the one most suitable for your application. Jei naudojate PHP4, pabandykite versiją xcache pasirinkti vieną labiausiai tinka jūsų paraišką. 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: Norėdami patikrinti versiją PHP jūs usinng, išduoti komandų php-prieš arba diegimo PHP failą su šiuo turiniu, skambinkite failą iš interneto naršyklę:
<?php <? Php
phpinfo(); phpinfo ();
?> ?>
- Change to user local source directory such as /usr/local/src by using following command: Pakeisti naudotojo vietos šaltinio katalogą, pvz / usr / local / src naudojant šią komandą:
cd /usr/local/src cd / usr / local / src
- Retrieve and download the source package of the version of XCache you choose to install. Atkurti ir parsisiùsti šaltinį paketo versiją xcache norite įdiegti.
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 (už xcache 1.0.3)
or arba
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 (už xcache 1.2.0)
- Untar, unzip, unpack or extract the archive with one of the following commands: Untar, unzip, Išspausti arba išskleisti archyvą su viena iš šių komandų:
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: Grįžti į xcache katalogą šaltinis kiekis:
cd xcache cd xcache
- Trigger PHP building environment: Intervencinis PHP kūrimo aplinkos:
phpize phpize
- Optional but recommended practice is to build XCache outside of source directory: Neprivaloma, bet rekomenduojama praktika yra sukurti xcache ne šaltinio katalogą:
mkdir ../xcache-build mkdir .. / xcache statybos
cd ../xcache-build cd .. / xcache statybos - Run the configure with the option that you want, the basic is as below which will enable the XCache by default: Pradėti konfigūruoti su galimybe, kad tu nori, pagrindinis yra žemiau kurios leis xcache pagal nutylėjimą:
../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: Galite peržiūrėti visus galimus variantus naudojant .. / xcache / Configure pagalbos komanda, kuri bus rodoma taip:
–enable-xcache Include XCACHE support. Įjungti-xcache Įtraukti xcache paramą.
–enable-xcache-optimizer XCACHE: (N/A) Įjungti-xcache-optimizatorius xcache: (N / A)
–enable-xcache-coverager XCACHE: Enable code coverage dumper Įjungti-xcache-coverager xcache: Įjungti kodas aprėpties savivartis
–enable-xcache-assembler XCACHE: (N/A) Įjungti-xcache-surinkėjui xcache: (N / A)
–enable-xcache-disassembler XCACHE: Enable opcode to php variable dumper Įjungti-xcache-išspaudimui xcache: Įjungti kodas operacijos su php kintamasis savivartis
–enable-xcache-encoder XCACHE: (N/A) Įjungti-xcache-kodera xcache: (N / A)
–enable-xcache-decoder XCACHE: (N/A) Įjungti-xcache-dekoderis xcache: (N / A)
–enable-xcache-test XCACHE: Enable self test - FOR DEVELOPERS ONLY!! Įjungti-xcache bandymų xcache: Įjungti savarankiškai išbandyti - Programuotojams TIK! - Compile the source with following command: Compiling šaltinį su šią komandą:
make padaryti
Ensure that no error occurred. Užtikrinti, kad ne klaida.
- If you haven't already using root account, su to root user. Jei Jūs vis dar naudojate šaknies sąskaitą, su root vartotojo.
- Install XCache binary with the following command: Įdiekite xcache dvejetainius su šią komandą:
make install make install
Ensure that no error occurred, and note down the extension installation path of the xcache.so. Užtikrinti, kad ne klaida ir patarimai pratęsti įrengimo kelias į xcache.so.
- Next, XCache need to be configured and enabled in PHP.INI file. Kitas, xcache reikia sukonfigūruoti ir įjungtas php.ini failą. Locate the correct location of php.ini configuration file by using Raskite tinkamą vietą php.ini konfigūracijos failą naudodami phpinfo() phpinfo () function (see sample listed above to check version of PHP). funkciją (žr. mėginio išvardytų patikrinti versiją PHP). In web hosting environment, normally it's located in /etc or /usr/local/lib. Web hosting aplinka, paprastai jis yra kataloge / etc arba / 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. Jei įdiegti PHP suvokia / etc / php.d / aplanke, tiesiog sukurkite failą į šį katalogą, pavadintą "xcache.ini" arba nukopijuokite mėginio xcache.ini atėjo su šaltinį paketo.
Change back to xcache source unpack directory, and run the following command with root user: Keisti atgal į xcache šaltinis išspaudimui katalogą ir paleiskite šią komandą su root vartotojas:
cat xcache.ini >> /etc/php.ini katė xcache.ini>> / etc / php.ini
$EDITOR /etc/php.ini $ Redaktorius / etc / php.iniNote: change to the path of php.ini accordingly Pastaba: pakeisti kelią php.ini atitinkamai
This will append the default XCache configuration to the end of php.ini. Tai bus įtraukti numatytąjį xcache konfigūracijos iki php.ini. Alternatively, you can copy and paste the following text into the php.ini file yourself too: Taip pat galite nukopijuoti ir įklijuoti šį tekstą į php.ini failą sau per:
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.solocal
[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-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 = 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 = Išjungta
xcache.readonly_protection = Off xcache.readonly_protection = Išjungta
xcache.mmap_path = “/dev/zero” xcache.mmap_path = "/ dev / zero"
xcache.coredump_directory = “” xcache.coredump_directory = ""
xcache.cacher = On xcache.cacher = Apie
xcache.stat = On xcache.stat = Apie
xcache.optimizer = Off xcache.optimizer = Išjungta[xcache.coverager] [xcache.coverager]
xcache.coverager = Off xcache.coverager = Išjungta
xcache.coveragedump_directory = “” xcache.coveragedump_directory = "" - You can configure XCache to your preference. Galite konfigūruoti xcache į Jūsų pageidavimus. One setting that must be changed is under the [xcache-common], where you must specify the correct installation path of the XCache extension module. Vienas nustatant, kad turi būti pakeisti pagal [xcache-common], kai būtina nurodyti teisingai kelias į xcache išplėtimo modulis. You can also opt to run XCache as PHP extension instead of extension for Zend module. Taip pat galite pasirinkti rodyti xcache kaip PHP pratęsimą vietoj pratęsimo Zend modulis. In this case, comment and uncomment the line accordingly. Šiuo atveju, pastabas ir odkomentować eilutėje atitinkamai. 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. Kitos svarbios funkcijos apima "xcache.size", kuriame nurodoma suma atminties skirta xcache "xcache.count" pasinaudoti multi-core procesorius ar kelis procesoriais. And if you plan to use XCache web administration interface, input the “xcache.admin.user” and md5 checksum value of “xcache.admin.pass”. Ir jei jūs planuojate naudoti xcache interneto administravimo sąsaja, įvesti "xcache.admin.user" ir MD5 kontrolinė vertė "xcache.admin.pass". Try Bandyti MD5 tools MD5 įrankiai to generate the correct value, or use the following command to generate the MD5 for your password: sukurti teisingą vertę, arba naudokite šią komandą, norėdami sukurti MD5 Jūsų slaptažodis:
echo -n “password” | md5sum echo-n "slaptažodį" | md5sum
Note: Explanation and definition of all XCache INI settings can be found Pastaba: Paaiškinimas ir apibrėžimas visų xcache INI parametrus galima rasti here čia . .
- Restart the Apache httpd web server. Paleiskite Apache httpd serveryje. The following commands should work: Šios komandos turėtų veikti:
/etc/init.d/apache* restart / etc / init.d / mysql restart *
or arba
/etc/init.d/httpd* restart / etc / init.d / httpd * paleiskite
- Ensure the XCache is running by calling PHP file with phpinfo() (see sample above). Užtikrinti xcache veikia paskambinę PHP failo su phpinfo () (žr. pavyzdyje). You should see a new XCache Support block with opcode cache enabled. Turėtumėte pamatyti naują xcache Parama blokas su kodas operacijos atmintis įjungtas.
- 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. Jei norite sukurti xcache administravimo puslapyje, sukonfigūruokite alias į httpd.conf ir Apache iki punkto admin podkatalogu per 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): Norėdami tai padaryti, pridėkite šią eilutę į httpd.conf (darant prielaidą, kad jūsų xcache šaltinis ekstrahuojamas "/ usr / local / src / ir norite prisijungti prie administratoriaus puslapis iš / xcache-admin / URL):
Alias /xcache-admin/ /usr/local/src/xcache/admin/ Alias / xcache-admin / / usr / local / src / xcache / admin /
Then restart Apache web server. Tada paleiskite Apache web serverį. For lighttpd, add the following line instead: Norite lighttpd, pridėkite šią eilutę vietoj:
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. Antraip, galite nukopijuoti visą "admin" katalogą iš "xcache" šaltinio katalogą interneto dokumentas šaknis ar pogrupių katalogas domeno, kuri yra prieinama internetu. However, this method is not recommended as you may forget to update the admin page when XCache package is updated. Tačiau šis metodas nėra rekomenduojamas kaip galima pamiršti atnaujinti admin puslapyje xcache pakete yra atnaujinama.
Note: Ensure that Pastaba: Įsitikinkite, kad open_basedir protection open_basedir apsauga , if enabled, is excluded for the directory contains admin-page. , Jei jis įjungtas, yra neleistina, kad katalogas yra admin-puslapio.
IMPORTANT : The page is machine translated and provided "as is" without warranty. DĖMESIO: Šis puslapis yra mašina išvertė ir pateikiama "kaip yra" be garantijų. Machine translation may be difficult to understand. Mašininio vertimo, gali būti sunku suprasti. Please refer to Remkitės original English article originalas anglų straipsnis whenever possible. jei įmanoma.
Related Articles Susiję straipsniai
- Proper Way to Generate MD5 Hash for XCache Administration Password with md5sum or PHP Tinkamas būdas Sukurti MD5 hash už xcache administracijos Slaptažodis su md5sum arba PHP
- Get Ready for Linux Genuine Advantage (LGA) - with Source and Crack Get Ready for Linux Genuine Advantage (LGA) - su šaltinio ir Crack
- Run WordPress at Top Fast Speed by Putting Objects and Variables into XCache or eAccelerator Cache Memory (Plugin) Vykdyti WordPress į viršų greitis pagal Eksploatacijos objektai ir kintamieji į xcache ar eAccelerator Cache Memory (plugin)
- Open, Extract and Convert DAA, ISO and BIN Files in Linux with Free PowerISO for Linux Atidaryti, išgautišio ir Konvertuokite DAA, ISO ir BIN failus Linux su laisvosios PowerISO Linux
- How to Make or Create Symbolic Link in Unix or Linux Kaip redaguoti arba sukurkite simbolinę nuorodą į Unix, Linux
- Windows Vista Security Guide Reviewed by NSA and NIST with Solution Accelerator "Windows Vista" saugumo vadovas Apžvalga pagal NSI ir NSTI su Solution Accelerator
- Refresh Linux or Unix Path Environmental Variables with rehash Atnaujinti Linux arba Unix Kelias aplinkos kintamieji su rehash
- Install phpBB 2 in Windows XP running on Apache 2, PHP 5 and MySQL 4 Įdiekite phpBB 2 Windows XP veikia Apache 2, PHP 5, MySQL 4
- How to Calculate and Generate MD5 Hash Value in Linux and Unix with md5sum Kaip apskaičiuoti ir Sukurti MD5 hash Vertė Linux ir Unix su md5sum
- Preview C#, Visual Basic, and C++ Source Code files Direct in Attachments Without Opening Peržiūrėti C #, Visual Basic, C + + Source Code failus Tiesioginė ir Priedai neatidarant









































