Run some extensions of the YII2 framework in Ubuntu, ubuntuyii2
Intl extension (PHP intl is an international extension and a package for the ICU database .)
sudo apt-get install php5-intl
sudo service apache2 restart
PDO SQLite extension
sudo apt-get install php5-sqlite
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 runs as a Service. The creation, storage, and deletion of all data caches are actually completed here. The client here refers to the extensions that PHP can call.
Sudoapt-get install memcached
After installing the Memcache server, we need to start the service:
Memcached-d-m 128-p 11211-u root
Here we need to describe the memcached service startup parameters:
-P listening port
-L connected IP address. The default value is local
-Dstart starts the memcached service.
-Drestart: restart the memcached service.
-Dstop | shutdown: Shut down the running memcached service.
-Dinstall install the memcached Service
-Duninstall uninstall the memcached Service
-U runs as the identity (only valid when running as root)
-MB maximum memory usage, in MB. The default value is 64 MB.
-An error is returned when M memory is used up, instead of deleting items.
-C: Maximum number of simultaneous connections. The default value is 1024.
-F block size growth factor. The default value is 1.25-n. The minimum allocation space is 48 for key + value + flags.
-H show help 2) install the Memcache Client
Memcache extension
sudo apt-get install php5-memcache
Test:
$mem = new Memcache;$mem->connect("127.0.0.1", 11211);$mem->set('key', 'This is a memcached test!', 0, 60);$val = $mem->get('key');echo $val;
APC extension
sudo apt-get install php-apc
Will prompt installation
php5-
apcu php-apc
Direct
y
ImageMagick PHP extension
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