www.linuxexpert.ro

Tutorials

  • Home
  • BGP Tutorials
    • Remove private AS
  • cPanel Tutorials
    • Install ImageMagick on cPanel
    • Install Softaculous
  • Linux Tutorials
    • Auto-reboot Linux after kernel panic
    • Building a firewall with Iptables
    • Change array RAID 1 disk order
    • Configure ntfs-3g on Linux Slackware
    • DHCP Option Codes
    • DansGuardian with Squid and ClamAV
    • Fetchmail for Gmail accounts
    • Install Zend & APC PHP Optimizers
    • Install Atheros AR242x PCI Express Adapter
    • Install awstats with DirectAdmin
    • Install DBD::mysql via CPAN shell
    • Install DjbDNS on Ubuntu
    • Installing fail2ban on Centos 5
    • Install GoDaddy SSL Certificate
    • Install i386 packages under x86_64
    • Install Linux via USB flashdrive
    • Install ModSecurity2 on Apache2.0.x
    • Install Nginx on CentOS
    • Install webalizer with ispconfig
    • Install intel A/B/G/N wireless on linux
    • Kernel Upgrade
    • Mobile phone access via bluetooth
    • Optimize MySQL
    • Optimize Qmail
    • Optimize server load
    • Optimize and Tune Apache for performance
    • Optimize and Tune Nginx for performance
    • Perfect Mailserver on Debian
    • Pidgin "Now Playing" Status Message
    • PHP hardening
    • PHP hardening with Suhosin
    • PHP5 Support allong with PHP4
    • Previewing your site before making DNS changes
    • Proxy Auto Configuration
    • PXE boot install rescue
    • Setup awstats on CentOS
    • Setup EC2 Amazon L2TP IPSec VPN
    • Setup email piping with Qmail
    • Setup Exim with DKIM
    • Setup Exim smart relay with cPanel
    • Setup OpenVPN
    • Setup postfix on nonstandard port
    • Setup SS5 Socks Proxy
    • Setup vsftp with no shell access
    • Sendmail smart relay with gmail auth
    • Squid proxy NCSA authentication
    • Tcpdump filters
    • Upgrade PHP to 5.3 in Plesk 10
    • Useful regular expressions
    • X with [SiS] 771/671 VGA controller
  • Joomla Tutorials
    • Hardening Joomla
    • Module Positions
    • Remove Joomla description meta tag
  • Looking Glasses
  • Optimize Firefox
  • Security
    • Crack WiFi WEP passwords
    • Defend against UDP isc.org DNS query DDOS
    • Detect DDoS attack
    • Remove malware from web sites
    • Sniff SSL passwords with ettercap
    • Snort2BGP
    • Track Hackers
    • What Is My IP
  • Troubleshooting
    • Grub error no such disk
    • named dumping master file: tmp-XXXXXXXXXX: open: permission denied
    • Nginx 413 Request Entity Too Large
    • SSH conection closed by remote host
    • Troubleshooting sis190.c
  • Unix Tutorials
    • FreeBSD reset root password
    • Installing snort on OpenBSD
    • Unix Toolbox
  • Virtualization Tutorials
    • Convert VirtualBox image to VMWare
    • VMware SNMP Enable
  • VoIP Tutorials
    • Install Elastix
    • Qos for Asterisk

Who's Online

We have 18 guests and no members online

Most Read

  • Setup SS5 Socks Proxy
  • Install webalizer with ispconfig
  • Sniff SSL passwords with ettercap
  • __404__
  • Optimize and Tune Apache for performance

Products and Services

  • Home
  • Linux Products and Services
  • Buy VPN Account
  • Privacy Policy for Linuxexpert
  • Remove malware

Install Zend & APC PHP Optimizers

  • Print
  • Email
Details
Parent Category: Tutorials
Published: 22 January 2009
Hits: 10315

 

Zend Optimizer is a free application that allows PHP to run files encoded by Zend Guard. Zend Optimizer greatly enhances the performance of PHP applications.

The Zend Optimizer goes over the code generated by the standard Zend run-time compiler and optimizes it for faster execution. The standard Zend run-time compiler used by PHP is indeed very fast, generating code that is usually 2 to 10 times faster. But an application that uses Zend Optimizer can execute scripts another 40% to 100% faster.
Here are the steps for instaling it.
You must be root in order to install it.
Get optimizer form here:
http://www.zend.com/free_download/optimizer
#tar -vxzf ZendOptimizer-3.3.3-linux-glibc23-x86_64.tar.gz
#cd ZendOptimizer-3.3.3-linux-glibc23-x86_64
#./install.sh
Answer to those questions.
Add in your php.ini those lines:
[Zend]
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.3
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.3
zend_optimizer.version=3.3.0
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so


Restart apache:
/sbin/service httpd restart
You should have:
# php -v | grep Optimizer
with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies
#


The Alternative PHP Cache (APC) is a free, open, and robust framework for caching and optimizing
PHP intermediate code. It's an PECL extension which shares the packaging and distribution system
with its sister, PEAR.
Ubuntu/Debian install:
First you need to install dependencies for compilation:
$ sudo aptitude install apache2-dev php5-dev build-essential
Get current version of apc and install it
$ wget http://pecl.php.net/get/APC-3.0.16.tgz
$ tar xzf APC-3.0.16.tgz
$ cd APC-3.0.16
$ phpize
$ ./configure --enable-apc --enable-apc-mmap \
--with-apxs=/usr/bin/apxs2 \
--with-php-config=/usr/bin/php-config
$ make
$ sudo make install
You need to add in /etc/php5/apache2/php.ini extension=apc.so . After that just restart apache:
$ sudo apache2ctl restart
Slackware Install:
# wget http://pecl.php.net/get/APC-3.0.19.tgz

# tar -vxzf APC-3.0.19.tgz

# cd APC-3.0.19
#phpize
# which apxs
/usr/sbin/apxs# which php-config
/usr/bin/php-config
# ./configure --enable-apc --enable-apc-mmap --with-apxs=/usr/sbin/apxs --with-php-config=/usr/bin/php-config
#make
#checkinstall --fstrans=no -S -y
#installpkg APC-3.0.19-i386-1.tgz
Add extension=apc.so in /etc/httpd/php.ini and reload apache:
# /etc/rc.d/rc.httpd restart
Now a phpinfo(); should show you a new apc section.

Note:

We use Hosting and VPS Hosting, from: www.star-host.org

We like and trust them.

Good prices, high security.

 

fShare
Tweet