Updating linbpq on my armbian S905 (ex STB/set top box)
This morning there's an update from John Wiseman G8BPQ linbpq repository. (git://vps1.g8bpq.net/linbpq) it's time to update.
Some example accessing memcached from a shell using nc and echo
Storage Commands
set add get gets replace append prepend cas delete command [key] [flags] [exptime] [bytes] [noreply]\r\n[value]\r
Parameters :
[key] : the key of the data stored [flags] : 32-bit unsigned integer that the server store with the data (provided by the user), and return along the data when the item is retrieved [exptime] : expiration time in seconds, 0 mean no delay, if exptime is superior to 30 day, Memcached will use it as a UNIX timestamps for expiration [bytes] : number of bytes in the data block [cas unique] : unique 64-bit value of an existing entry (retrieved with gets command) to use with cas command [noreply] : optional parameter that inform the server to not send the reply
I need to make php-fpm listeing on both tcp/unix socket, and this is how it done.
(this was not pretty workarround i guess, but it work 😀 )
first  download php rpm source
$ wget http://centos.alt.ru/pub/php-fpm/5.3.3-2/SRPMS/php-5.3.3-2.el5.src.rpm
Compile and install
$ rpmbuild --rebuild php-5.3.3-2.el5.src.rpm $ sudo rpm -Uvh /path/to/RPMS/php-*
Configuring the default php-fpm for using tcp socket
Edit www.conf
$ sudo vi /etc/php-fpm.d/www.conf
Find line containing
listen = 127.0.0.1:9000
We can make it listening to port what ever we desire, ie 9001 etc
Start php-fpm first instance
$ sudo service php-fpm start
Configuring php-fpm for using unix socket
$ sudo cp /etc/php-fpm.conf /etc/php-fpm2.conf $ sudo cp -rp /etc/php-fpm.d /etc/php-fpm2.d
Edit /etc/php-fpm2.conf
include=/etc/php-fpm2.d/*.conf pid = /var/run/php-fpm/php-fpm2.pid error_log = /var/log/php-fpm/error2.log
Edit /etc/php-fpm2.d/www.conf
listen = /tmp/php-fpm.sock php_admin_value[error_log] = /var/log/php-fpm/www-error2.log