How to install memcache and start it in ubuntu environment

This article describes how to install memcache and start it in ubuntu environment. Share with you for your reference, as follows:

It is relatively simple to install the memcache server on ubuntu.

sudo apt-get install memcached
memcached -d -m 128-p 22222-u root -c 1024-l 127.0.0.1-P /tmp/memcached.pid -s /tmp/memcached.sock

**Parameter explanation: **

After starting the above command, check the memcache process

ps -ef | grep memcache
# There will be the following display,Then in/There will also be memcache pid and sock files under tmp
duck  37351011:33?00:00:00 memcached -d -m 128-p 22222-u root -c 1024-l 127.0.0.1-P /tmp/memcached.pid
 - s /tmp/memcached.sock

Test the link

#! /usr/bin/env python
import memcache
mem_cli = memcache.Client(['127.0.0.1:22222'],debug=0)
mem_cli.set("test","what is happend?")
value = pymem.get("test")
print value

I hope that this article will help you configure your ubuntu environment.

Recommended Posts

How to install memcache and start it in ubuntu environment
How to compile and install PHP and Nginx in Ubuntu environment
How to install python in ubuntu server environment
How to compile and install xdebug from source code in Ubuntu environment
How to install Helm in Ubuntu
How to install mysql in Ubuntu 14.04
How to install mysql in Ubuntu 14.04
How to install cuda10.1 driver in Ubuntu
How to install ROS Noetic in Ubuntu20.04
How to install Ubuntu20.04 and install NVIDIA driver
How to install Pycharm and Ipython on Ubuntu 16.04/18.04
How to install and configure Gogs on Ubuntu 18.04
How to modify time zone and time in ubuntu
How to install and configure Cyberpanel on Ubuntu 18.04
How to install and secure phpMyAdmin on Ubuntu 16.04
How to install and configure ownCloud on Ubuntu 16.04
How to install and configure ownCloud on Ubuntu 16.04
How to install and configure GitLab on Ubuntu 18.04
How to install and use Docker on Ubuntu 20.04
How to install and use Curl on Ubuntu 18.04
How to install and use Composer on Ubuntu 18.04
How to install and secure phpMyAdmin on Ubuntu 16.04
How to install and configure Elasticsearch on Ubuntu 16.04
How to install and configure PostGIS on Ubuntu 14.04
How to install and use Composer on Ubuntu 20.04
How to install and use BaasBox on Ubuntu 14.04
How to install and configure VNC on Ubuntu 18.04
How to install and configure Sphinx on Ubuntu 16.04
How to install and configure OrientDB on Ubuntu 14.04
How to install and use PostgreSQL on Ubuntu 16.04
How to install Git on Ubuntu 18.04 [Quick Start]
How to install Anaconda on Ubuntu 18.04 [Quick Start]
How to install and configure AppScale on Ubuntu 12.04
How to install and use Docker on Ubuntu 16.04
How to install and configure PostGIS on Ubuntu 14.04
How to install Hadoop in standalone mode on Ubuntu 18.04
How to install and use MySQL Workbench on Ubuntu 18.04
How to modify time zone and time in ubuntu system
How to install theano and keras on ubuntu system
How to create a Python virtual environment in Ubuntu 14.04
How to install Ruby on Ubuntu 20.04
How to install Memcached on Ubuntu 20.04
How to install MySQL on Ubuntu 20.04
How to use hanlp in ubuntu
How to install VirtualBox on Ubuntu 20.04
How to install Protobuf 3 on Ubuntu
How to install Nginx on Ubuntu 20.04
How to install Apache on Ubuntu 20.04
How to install Git on Ubuntu 20.04
How to install Node.js on Ubuntu 16.04
How to install MySQL on Ubuntu 20.04
How to install PHP7.4 in CentOS
How to install Vagrant on Ubuntu 20.04
How to install Bacula-Web on Ubuntu 14.04
How to install PostgreSQL on Ubuntu 16.04
How to install Git on Ubuntu 20.04
How to install Anaconda3 on Ubuntu 18.04
How to install Memcached on Ubuntu 18.04
Install and configure Docker in Ubuntu
How to install MemSQL on Ubuntu 14.04
How to install Go on Ubuntu 20.04