We know that ElastiCache is not recommended to be accessed outside Amazon instances, so we're trying below stuff inside Amazon EC2 instances only. ElastiCache is a managed in-memory caching service. To make things simple, we are going to create an EC2 instance to run a Redis database application server. If not set then the value of the EC2_URL environment variable, if any, is used. Make: *** Error 2zmalloc.h:50:31: error: jemalloc/jemalloc.Connect to elasticache redis from ec2 set a "hello" Error: Connection reset by peer Problem. Make: Leaving directory `/data0/src/redis-2.6.2/src' Zmalloc.h:55:2: error: #error "Newer version of jemalloc required" Zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory Reason is compilation Dependence or problems left over from the original compilation Zmalloc.h:51:31: error: jemalloc/jemalloc.h: No such file or directory
INSTALL REDIS ON EC2 INSTALL
Gcc command is not recognized, please install gcc by yourself Ĭouldn't execute tcl : no such file or dicrectory, please install tcl by yourself The place where installation may go wrong: So far, Self-start configuration is complete Implementation of chkconfig redis on again, the success If you need to boot time, redis service to start automatically, may continue 3)īecause there is no script added redis boot priority information, you can add the following start If you cannot use these 2 commands in other directories, please continue to configure 2), add permissionsĢ) to the startup script to add permissionsĪctual command, according to a different directory, it will not be the same as Service redis start/stop command to start and close redis. PIDFILE=/var/redis/run/redis_$.pidįar, in/etc/init.d/Under the directory, you can already use:
Modify script pid and conf path to actual bin]# vi/etc/init.d/redis_init_script Modify the script name (or not modify) to bin]# mv/etc/init.d/redis_init_script/etc/init.d/redis Utils under redis startup script to copy extracting package bin]# cp ~/redis-stable/utils/redis_init_script/etc/init.d/ Redis has been started, check the process, dump, log, pid, etc.ĥ) The client connects to bin]# redis-cliĦ) At this point, redis basic configuration is completed, if other relevant configuration adjustments, you can find a document and then modify # Note that Redis will write a pid file in/var/run/redis.pid when daemonized.ĭefault rdb, choose whether to open aof, if open, modify the configuration file appendOnlyĤ) start redis, view each file redis]# bin]# redis-server/etc/redis/nf # By default Redis does not run as a daemon. Modify the configuration file to make redis run in the background (The default redis service runs in console mode) # output for logging but daemonize, logs will be sent to/dev/null Also the empty string can be used to force Modify the log storage directory as a new directory # Note that you must specify a directory here, not a file name. # The Append Only File will also be created inside this directory. # above using the 'dbfilename' configuration directive. # The DB will be written inside this directory, with the filename specified Modify the dump directory For the new directory
# nothing bad happens, the server will start and run normally. # Creating a pid file is best effort: if Redis is not able to create it Modify the pid directory to create a new directory # If port 0 is specified Redis will not listen on a TCP socket. # Accept connections on the specified port, default is 6379 (IANA #815344). Open the configuration redis]# vi/etc/redis/nf rwxr-xr-x 1 root root 22K Jan 7 08:03 redis-check-aofġ) create a configuration file directory, dump file directory, process pid directory, log directory and otherĬonfiguration files are typically placed in/etc/down, create redis bin]# etc]# mkdir redisĭump file, process pid, log directory, etc., generally placed in etc]# var]# mkdir var]# cd redis]# mkdir data log runĢ) modify the configuration file, the configuration parametersįirst copy the files in nf packet to extract redis]# cp ~/redis-stable/nf/etc/redis/
Lrwxrwxrwx 1 root root 12 Jan 7 08:03 redis-sentinel -> redis-server rwxr-xr-x 1 root root 7.5M Jan 7 08:03 redis-check-rdb rwxr-xr-x 1 root root 5.5M Jan 7 08:03 redis-cli rwxr-xr-x 1 root root 5.4M Jan 7 08:03 redis-benchmark rwxr-xr-x 1 root root 7.5M Jan 7 08:03 redis-server Verify the startup script in the system ~]# bin]# ls -ltrh to/usr/local/bin in the src directory In the directory, you can also execute the redis-stable]# make install Successful, you can manually copy redis-server, redis-cli, redis-check-aof, redis-check-dump, etc. # -zxvf Redis the Īfter make is successful, you need to execute redis-stable]# make test AWS EC2 CentOS release 6.5 deployment redisĬan Quguan network, wget command can also ~]# wget