Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
litespeed_wiki:cache:lscwp:configuration:cache:object_cache:unix-socket [2018/01/18 16:34]
qtwrk [How to use Memcached in a UNIX socket]
litespeed_wiki:cache:lscwp:configuration:cache:object_cache:unix-socket [2018/01/22 13:56]
Lisa Clarke [for Centos6.X]
Line 5: Line 5:
 **Note**: If Memcached fails to start, it is usually due to permission and user problems. Please use root privilege to execute the following instructions,​ and verify that the socket path is writable to the designated user.  **Note**: If Memcached fails to start, it is usually due to permission and user problems. Please use root privilege to execute the following instructions,​ and verify that the socket path is writable to the designated user. 
  
-and host should set to /​path/​to/​memcached.sock , without any prefix as screenshot 
  
-{{ :​litespeed_wiki:​cache:​lscwp:​configuration:​cache:​object_cache:​unix_socket.jpg?​direct |}} 
 =====For Centos7.X===== =====For Centos7.X=====
  
Line 22: Line 20:
   - Check if everything is working well: <​code>​nc -U /​path/​to/​memcached.sock   - Check if everything is working well: <​code>​nc -U /​path/​to/​memcached.sock
 stats</​code>​ stats</​code>​
 +  - If there is still a permission issue, please check selinux status: <​code>​getenforce</​code>​ 
 +  - Disable selinux if status shows ''​Enforcing'': ​ <​code>​setenforce 0 </​code>​ (reboot will re-enable selinux) 
 +  - To permanently disable selinux, edit ''/​etc/​selinux/​config'',​ change ''​enforcing''​ to ''​permissive''​or''​disabled''​ and then reboot.
 =====for Centos6.X===== =====for Centos6.X=====
  
Line 28: Line 28:
   - Edit ''/​etc/​sysconfig/​memcached''​ and change <​code>​OPTIONS=""​   - Edit ''/​etc/​sysconfig/​memcached''​ and change <​code>​OPTIONS=""​
 USER=""</​code>​ to <​code>​OPTIONS="​-s /​path/​to/​memcached.sock -a 0770" USER=""</​code>​ to <​code>​OPTIONS="​-s /​path/​to/​memcached.sock -a 0770"
-USER="​username"</​code>​ where ''​userid''​ is the same user that runs PHP.+USER="​username"</​code>​ where ''​user''​ is the same user that runs PHP.
   - Start Memcached <​code>​service memcached start</​code>​   - Start Memcached <​code>​service memcached start</​code>​
   - Check if everything is working well: <​code>​nc -U /​path/​to/​memcached.sock   - Check if everything is working well: <​code>​nc -U /​path/​to/​memcached.sock
 stats</​code>​ stats</​code>​
 +  - If there is still a permission issue, please check selinux status: <​code>​getenforce</​code>​ 
 +  - Disable selinux if status shows ''​Enforcing'': ​ <​code>​setenforce 0 </​code>​ (reboot will re-enable selinux) 
 +  - To permanently disable selinux, edit ''/​etc/​selinux/​config'',​ change ''​enforcing''​ to ''​permissive''​or''​disabled''​ and then reboot.
 =====For Ubuntu 17.10, Ubuntu 16.04, Debian 8 and Debian 9===== =====For Ubuntu 17.10, Ubuntu 16.04, Debian 8 and Debian 9=====
  
  • Admin
  • Last modified: 2018/01/22 13:57
  • by Lisa Clarke