Some expansions of the YII2 framework running under UBUNTU environment

Source: Internet
Author: User
Tags apc intl
Some extensions of the YII2 framework running in Ubuntu environment

Intl Extension (PHP Intl is an international extension and a wrapper for the ICU Library. )

sudo apt-get install php5-intl

sudo service apache2 restartPDO SQLite extensionsudo service apache2 restartPDO PostgreSQL extensionsudo apt-get install php5-pgsqlservice apache2 restartMemcache

Memcache is divided into two parts , Memcache server and client. The Memcache server is run as a service, where all the data caches are created, stored, and deleted, which is actually done here. Client, here we refer to PHP 's extensible extension that can be called.



   Sudoapt-get Install memcached

  Finished installingMemcacheAfter the server, we need to start the service:

Memcached-d-M 128-p 11211-u Root


  Here's what you need to explainmemcachedStartup parameters for the service:

-PPorts to listen on
-LConnected toIPAddress,The default is native
-dstartStartmemcachedService
-drestartRe-upmemcachedService
-dstop|shutdownClose the RunningmemcachedService
-dinstallInstallationmemcachedService
-duninstallUnloadingmemcachedService
-URun as an identity(Only in theRootEffective when running)
-MMaximum memory usage, unitMB。 Default64MB
-MAn error is returned instead of deleting an item when memory is exhausted
-CMaximum number of simultaneous connections, default is1024
-FBlock size growth factor, default is1.25-nMinimum allocated space,Key+value+flagsDefault is48
-HShow Help2)InstallationMemcacheClient

Memcache extensionsudo apt-get install php5-memcache
Test it:
$mem = new Memcache; $mem->connect ("127.0.0.1", 11211), $mem->set (' key ', ' This is a memcached test! ', 0, $); $val = $m Em->get (' key '); Echo $val;

  


APC extensionsudo apt-get install php-apcphp5-直接ysudo apt-get install imagemagick libmagickwand-devsudo pecl install imagicksudo echo "extension=imagick.so" >> /etc/php5/apache2/php.inisudo /etc/init.d/apache2 restart
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.