Install XCache PHP Accelerator in Linux by Compiling from Source Install XCache PHP Accelerator in Linux Apkopojot no avota
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 ir alternatīva vēl ātri un stabilu PHP akseleratoram un opcode cacher, kas ir līdzīga slavens eAccelerator un 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 paplašināšanas darbus ar caching Apkopotajā bytecode (opcode vai starpproduktu kods) veidā PHP skriptus, lai izvairītos no pieskaitāmajām parsēt un apkopo PHP izejas kodu uz katra lapa pieprasījumu, un tādējādi samazina servera slodzes, palielina veiktspēju PHP skripti un palielina ātrumu par PHP kodu no 2-10 reizes.
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 atbalsta visas jaunākās PHP CV filiāles, piemēram, PHP 4.3, PHP 4.4, PHP 5.1 un PHP 5,2 par Linux servera ieskaitot CentOS kuras kopīgi izmantojams par cPanel un plesk balstās web hosting servera, un ThreadSafe / Windows interneta serveri. XCache overcomes a lot of problems that exist on opcachers or accelerators such as unable to work with new PHP versions. XCache pārvar daudz problēmas, kas pastāv opcachers vai paātrinātāji, piemēram, nespēj strādāt ar jaunajām PHP versijas. Beside, XCache also been Blakus, XCache arī benchmarked to be faster kritēriju, lai ātrāk than other opcode cachers. nekā citi opcode cachers.
This is a simple tutorial and guide on how to install XCache PHP cacher by manually compiling from source code package. Šis ir vienkāršs pamācību un norādījumus par to, kā uzstādīt XCache PHP cacher ar manuāli apkopojot no avota kods 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. Ja jūs izmantojat WordPress vai izmantojot XCache, lai paātrinātu un uzlabotu WordPress blog sniegumu, jums vispirms jāpārliecinās, ka PHP ir modernizētas ar jaunāko versiju (PHP 5.2.1), kā PHP 4 var izraisīt zināmu nestabilitātes jautājumu, piemēram, nespēj post comment , daļēja lapas ielādes uc Anyway, PHP5, vienmēr ir ieteicama, ja ir iespējams. And as with all PHP accelerator, XCache won't work with PHP suEXEC turns on. Un tāpat kā visas PHP akseleratora, XCache nestrādās ar PHP suEXEC ieslēdz. PHP suEXEC must be disabled for XCache to work properly. PHP suEXEC jābūt atspējota XCache strādāt pareizi.
Currently, XCache maintains 2 branches, ie version 1.0.3 and version 1.2.0. Pašlaik XCache apgalvo, 2 filiāles, ti, versija 1.0.3 un versiju 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. Abas versijas tagad ir stabils release, ar versiju 1.0.x ieteicams PHP 4.3.x un 4.4.x, un versija 1.2.x ieteicams visvairāk versiju PHP ieskaitot 5.1.x un 5.2.x, izņemot PHP 5.0.x sērija. If you're using PHP4, try both version of XCache to pick the one most suitable for your application. Ja jūs izmantojat PHP4, mēģiniet gan versija XCache izvēlēties vienu vispiemērotāko savu pieteikumu. 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: Lai pārbaudītu, kas versiju PHP jūs usinng izdod komanda php-v vai setup a PHP failu ar šādu saturu, tad zvana failu no interneta pārlūka:
<?php <? php
phpinfo(); phpinfo ();
?> ?>
- Change to user local source directory such as /usr/local/src by using following command: Mainīt uz lietotāja vietējā avota direktorijā, piemēram, / usr / local / src izmantojot komandu:
cd /usr/local/src cd / usr / local / src
- Retrieve and download the source package of the version of XCache you choose to install. Nolasītu un lejupielādēt avots paketes versiju, XCache izvēlaties uzstādīt.
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 (par XCache 1.0.3)
or vai
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 (par XCache 1.2.0)
- Untar, unzip, unpack or extract the archive with one of the following commands: Untar, unzip, izkravāt vai izraksta arhīvu ar vienu no šādām komandas:
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: Iet uz xcache katalogu ar avots saturs:
cd xcache cd xcache
- Trigger PHP building environment: Izsauc PHP ēkas vidi:
phpize phpize
- Optional but recommended practice is to build XCache outside of source directory: Izvēles, bet ieteicamā prakse ir veidot XCache ārpus avots katalogs:
mkdir ../xcache-build mkdir .. / xcache-veidot
cd ../xcache-build cd .. / xcache-veidot - Run the configure with the option that you want, the basic is as below which will enable the XCache by default: Palaidiet konfigurēt ar iespēju, ka jūs vēlaties, pamata un tā ir zemāka, kas ļaus XCache pēc noklusējuma:
../xcache/configure –enable-xcache .. / xcache / konfigurēt iespējosim-xcache
You can list out all available options by using ../xcache/configure –help command, which will display the following: Varat sarakstu visas pieejamās iespējas, izmantojot .. / xcache / konfigurēt-help komanda, kas būs redzams, šādi:
–enable-xcache Include XCACHE support. Iespējosim-xcache Include XCACHE atbalstu.
–enable-xcache-optimizer XCACHE: (N/A) Iespējosim-xcache-pilnveidotāju XCACHE: (N / A)
–enable-xcache-coverager XCACHE: Enable code coverage dumper Iespējosim-xcache-coverager XCACHE: Enable kods segumu dumper
–enable-xcache-assembler XCACHE: (N/A) Iespējosim-xcache-montētājam XCACHE: (N / A)
–enable-xcache-disassembler XCACHE: Enable opcode to php variable dumper Iespējosim-xcache-disassembler XCACHE: Enable opcode uz php mainīgā dumper
–enable-xcache-encoder XCACHE: (N/A) Iespējosim-xcache-kodēšanas XCACHE: (N / A)
–enable-xcache-decoder XCACHE: (N/A) Iespējosim-xcache-decoder XCACHE: (N / A)
–enable-xcache-test XCACHE: Enable self test - FOR DEVELOPERS ONLY!! Iespējosim-xcache-test XCACHE: Enable self testu - FOR DEVELOPERS ONLY! - Compile the source with following command: Aizpildi avots ar sekojošu komandu:
make taisīt
Ensure that no error occurred. Pārliecinieties, ka neviena kļūda.
- If you haven't already using root account, su to root user. Ja jūs neesat jau izmanto root kontam, su uz root lietotājam.
- Install XCache binary with the following command: Install XCache bināro ar šādu komandu:
make install padarīt instalēt
Ensure that no error occurred, and note down the extension installation path of the xcache.so. Pārliecinieties, ka nav kļūda, un atzīmējiet nosaka pagarināšana uzstādīšanas ceļš, kas xcache.so.
- Next, XCache need to be configured and enabled in PHP.INI file. Tālāk, XCache nepieciešams konfigurēt un ļāvusi in PHP.INI failu. Locate the correct location of php.ini configuration file by using Atrast pareizo vietu php.ini konfigurācijas failu, izmantojot phpinfo() phpinfo () function (see sample listed above to check version of PHP). funkciju (skatīt paraugu iepriekš uzskaitītajām pārbaudīt versiju, PHP). In web hosting environment, normally it's located in /etc or /usr/local/lib. In web hosting vidē, parasti tas atrodas / etc vai / 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. Ja instalēšanas PHP parses uz / etc / php.d / mape, tad vienkārši izveidot failu, ka mape ar nosaukumu "xcache.ini" vai kopiju virs parauga xcache.ini ieradās ar avots pakete.
Change back to xcache source unpack directory, and run the following command with root user: Maina atpakaļ uz xcache avots izkravāt directory, un palaist šādu komandu ar root lietotājam:
cat xcache.ini >> /etc/php.ini kaķis xcache.ini>> / etc / php.ini
$EDITOR /etc/php.ini $ REDAKTORS / etc / php.iniNote: change to the path of php.ini accordingly Piezīme: izmaiņas ceļu php.ini attiecīgi
This will append the default XCache configuration to the end of php.ini. Tas pievienot noklusēto XCache konfigurācija līdz php.ini. Alternatively, you can copy and paste the following text into the php.ini file yourself too: Jūs varat kopēt un ielīmēt šādu tekstu uz php.ini failu sevi pārāk:
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 = 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 = "" - You can configure XCache to your preference. Varat konfigur XCache jūsu preferenci. One setting that must be changed is under the [xcache-common], where you must specify the correct installation path of the XCache extension module. Viens uzstādījums, ka jāmaina ir saskaņā ar [xcache-kopējā], ja jums ir jānorāda pareizs uzstādīšanas ceļš, kas XCache pagarinājums moduli. You can also opt to run XCache as PHP extension instead of extension for Zend module. Varat arī izvēlēties rādīt XCache kā PHP paplašinājumu vietā pagarināt Zend moduli. In this case, comment and uncomment the line accordingly. Šajā gadījumā, komentārus un uncomment līnijas attiecīgi. 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. Citi svarīgi risinājumi ietver "xcache.size", kas norāda summu atmiņas piešķirti XCache, "xcache.count", lai izmantotu multi-core procesori vai vairākiem pārstrādātājiem. And if you plan to use XCache web administration interface, input the “xcache.admin.user” and md5 checksum value of “xcache.admin.pass”. Un, ja jūs plānojat izmantot XCache interneta administrācijas saskarni, ievadi par "xcache.admin.user" un MD5 kontrolsumma vērtību "xcache.admin.pass". Try Mēģinājums MD5 tools MD5 darbarīki to generate the correct value, or use the following command to generate the MD5 for your password: radīt pareizo vērtību vai izmantot šādu komandu, lai radītu MD5 jūsu parole:
echo -n “password” | md5sum echo-n "parole" | md5sum
Note: Explanation and definition of all XCache INI settings can be found Piezīme: Paskaidrojums un definēt visus XCache INI settings var atrast here šeit . .
- Restart the Apache httpd web server. Restart Apache httpd web serveri. The following commands should work: Turpmāk komandas jāstrādā:
/etc/init.d/apache* restart / etc / init.d / apache * restart
or vai
/etc/init.d/httpd* restart / etc / init.d / httpd * restart
- Ensure the XCache is running by calling PHP file with phpinfo() (see sample above). Nodrošināt XCache darbojas zvanot PHP failu ar phpinfo () (sk. parauga iepriekš). You should see a new XCache Support block with opcode cache enabled. Jums vajadzētu ieraudzīt jaunu XCache Support blokā opcode cache iespējots.
- 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. Ja vēlaties izveidot XCache administrācija lapu, konfigurēt ir alias in httpd.conf no Apache norāda, admin subdirectory ar 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): Lai to izdarītu, pievienojiet šādu pozīcija httpd.conf (pieņemot, ka jūsu xcache avots ekstrahē at / usr / local / src /, un vēlaties piekļūt admin lapa no / xcache-admin / URL):
Alias /xcache-admin/ /usr/local/src/xcache/admin/ Alias / xcache-admin / / usr / local / src / xcache / admin /
Then restart Apache web server. Pēc tam restart Apache Web serveri. For lighttpd, add the following line instead: Par lighttpd, pievieno šādu rindu vietā ir:
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. Jūs varat arī kopiju visu "admin" direktorijā, no "xcache" avots mapi tīmekļa dokumentu sakņu vai apakšgrupas directory jūsu domēnā, kas ir tīkla pieejamiem. However, this method is not recommended as you may forget to update the admin page when XCache package is updated. Tomēr šī metode nav ieteicama, jo Jums var aizmirst atjaunināt admin lapā, kad XCache paketē ir atjaunināts.
Note: Ensure that Piezīme: Pārliecinieties, ka open_basedir protection open_basedir aizsardzība , if enabled, is excluded for the directory contains admin-page. , Ja iespējota, ir izslēgts direktorija satur admin-lapu.
IMPORTANT : The page is machine translated and provided "as is" without warranty. SVARĪGI: Šī lapa ir mašīna tulkoto un ar nosacījumu ", kas ir" bez garantijas. Machine translation may be difficult to understand. Machine translation var būt grūti saprast. Please refer to Lūdzu, skatiet original English article oriģināls angļu rakstu whenever possible. kad vien iespējams.
Related Articles Saistītie raksti
- Proper Way to Generate MD5 Hash for XCache Administration Password with md5sum or PHP Proper Way radīt MD5 Hash par XCache Administration Parole ar md5sum vai PHP
- Get Ready for Linux Genuine Advantage (LGA) - with Source and Crack Get Ready Linux Genuine Advantage (LGA) - ar Source un kreka
- Run WordPress at Top Fast Speed by Putting Objects and Variables into XCache or eAccelerator Cache Memory (Plugin) Nobraukums WordPress uz augšu Ātrās Speed Pievēršot Objekti un Mainīgie vērā XCache vai eAccelerator Cache Memory (Plugin)
- Open, Extract and Convert DAA, ISO and BIN Files in Linux with Free PowerISO for Linux Open, Ekstrahētais un Convert DAA, ISO un BIN failus Linux bezmaksas PowerISO Linux
- How to Make or Create Symbolic Link in Unix or Linux Kā veikt vai Izveidot simbolisks posmā Unix vai Linux
- Windows Vista Security Guide Reviewed by NSA and NIST with Solution Accelerator Windows Vista drošības rokasgrāmata pārskata VDI un NIST ar Solution Accelerator
- Refresh Linux or Unix Path Environmental Variables with rehash Atjaunot Linux vai Unix Path Vides Mainīgie ar rehash
- Install phpBB 2 in Windows XP running on Apache 2, PHP 5 and MySQL 4 Install phpBB 2 Windows XP darboties ar Apache 2, PHP 5 un MySQL 4
- How to Calculate and Generate MD5 Hash Value in Linux and Unix with md5sum Kā aprēķināt un Ģenerējiet MD5 Hash vērtība Linux un Unix ar md5sum
- Preview C#, Visual Basic, and C++ Source Code files Direct in Attachments Without Opening Preview C #, Visual Basic un C + + Source Code failus tieši Pielikumi Bez atklāšana









































