Compiling direwolf on openwrt

just short tutorial, no need to write too much, let's go!! first download openwrt sdk reffering to openwrt firmware/version you want direwolf to build. ie: i'm using NanoPI R2S so i downloaded openwrt-sdk-22.03.3-rockchip-armv8_gcc-11.2.0_musl.Linux-x86_64.xz that's it you have direwolf installer for openwrt now!! is that simple. no, i'm kidding. few more…

CentOS 7, how to install xtables-addons

Here is how you can compile and install xtables-addons on CentOS 7.first, Install Dependencies: download xtables-addons extract, compile and install done! and now for example we want to use geoip module, first of all install geoip database for xtables-addons.still from xtables-addons-2.10 directory. if you want only allow ssh connection from…

Memcached In A shell Using nc And echo

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

How To Make php-fpm Listen On Both Tcp And Unix Socket?

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

Disabling IPv6 for Linux distributions

source: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1013234 Details In many Linux distributions if IPv6 is enabled, VMware Tools cannot be configured with vmware-config-tools.pl after installation. In this case, VMware Tools is unable to set the network device correctly for the virtual machine, and displays a message similar to the following: [text] Unloading pcnet32 module unregister_netdevice: waiting…