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 restart
PDO SQLite extension
sudo service apache2 restart
PDO PostgreSQL extension
sudo apt-get install php5-pgsql
service apache2 restart
Memcache
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 extension
sudo 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 extension
sudo apt-get install php-apc
php5-
直接
y
sudo apt-get install imagemagick libmagickwand-dev
sudo pecl install imagick
sudo echo "extension=imagick.so" >> /etc/php5/apache2/php.ini
sudo /etc/init.d/apache2 restart