Install Memcache Rumi, November 11, 2012June 20, 2013 By default PHP loads and saves sessions to disk. Disk storage has a few problems: 1. Slow IO: Reading from disk is one of the most expensive operations an application can perform, aside from reading across a network. 2. Scale: If we add a second server, neither machine will be aware of sessions on the other. Enter Memcached I hinted at Memcached before as a content cache that can improve application performance by preventing trips to the database. Memcached is also perfect for storing session data, and has been supported in PHP for quite some time. Why use memcached rather than file-based sessions? Memcache stores all of its data using key-value pairs in RAM – it does not ever hit the hard drive, which makes it F-A-S-T. In multi-server setups, PHP can grab a persistent connection to the memcache server and share all sessions between multiple nodes. Installation Before beginning, you’ll need to have the Memcached server running. I won’t get into the details for building and installing the program as it is different in each environment. On Ubuntu it’s as easy as aptitude install memcached. Most package managers have a memcached installation available. Installing memcache for PHP is hard (not!). Here’s how you do it: pecl install memcache Careful, it’s memcache, without the ‘d’ at the end. Why is this the case? It’s a long story – let’s save the history lesson for another day. When prompted to install session handling, answer ‘Yes’. Usage Using memcache for sessions is as easy as changing the session handler settings in PHP.ini: session.save_handler = memcache session.save_path = “tcp://127.0.0.1:11211″ (assuming memcached is set up to use default port) Now restart apache (or nginx, or whatever) and watch as your sessions are turbo-charged. Install Memcached and php5-memcached apt-get install memcached php5-memcached Related Administrations Configurations (Linux) memcachephpproxy
Installing Horde in Debian 5 January 7, 2011 Default installation is with Apache + mod_php5 + php-mysql: # aptitude install horde3 Packages installed looks like: apache2-mpm-prefork apache2-utils apache2.2-common fckeditor horde3 libapache2-mod-php5 libmcrypt4 php-cache php-date php-db php-file php-http-request php-log php-mail php-mail-mime php-mail-mimedecode php-net-dime php-net-ftp php-net-smtp php-net-socket php-net-url php-pear php-services-weather php-soap php-xml-parser php-xml-serializer php-xml-util php5-cli php5-common php5-gd php5-mcrypt php5-mysql… Read More
PHP 7.0 on CentOS/RHEL 6.9 and 7.4 using Yum October 9, 2017October 9, 2017 Before beginning this, it is assumed that you already have installed LAMP on your server. To install, first you must add the Webtatic EL yum repository information corresponding to your CentOS/RHEL version to yum: CentOS/RHEL 7.x: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm CentOS/RHEL 6.x: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm… Read More
Install VirtualBox on Centos 6 / 7 September 6, 2019 Step 1 – Add Required Yum Repositories Firstly you are required to add VirtualBox yum repository in your system. Download repository file from its official site and place it under at /etc/yum.repos.d/virtualbox.repo .First navigate to /etc/yum.repos.d/ directory and use one of below commands as per your operating system. cd /etc/yum.repos.d/ wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo… Read More