SlideShare a Scribd company logo
1 of 3
How to Install and Configure Redis-Server on Centos/ Fedora Server
‘Redis’ is an Open source key-value data store. Key values are more complex types like
Hashes, Lists, Sets or Sorted Sets. It is a highly scalable data store which is shared by
multiple processes, multiple applications, or multiple Servers.
Steps to install ‘Redis’:
Step-1
Install prerequisites packages for the ‘Redis’ server
#yum install make gccwget

Step-2
Download Redis Packages and unzip
#wgethttp://redis.googlecode.com/files/redis-2.2.12.tar.gz
#tar -xf redis-2.2.12.tar.gz

Step-3
we are ready to install Redis from the source.
#cd redis-2.2.12
#makez
#make install

Step- 4
Now we will modify the default configuration of the Redis and change the location of the
database. We would also change the log notices to a production acceptable level and
the location of the log file.
#mkdir /etc/redis/var/lib/redis

#sed -e "s/^daemonize no$/daemonize yes/" -e "s/^dir .//dir /var/lib/redis//" -e "s/
/var/log/redis.log/" redis.conf > /etc/redis/redis.conf

Step-5
Add the ‘redis’ init script.
#vi /etc/init.d/redis-server

Add the below lines
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/bin/redis-server
DAEMON_ARGS=/etc/redis/redis.conf
NAME=redis-server
DESC=redis-server
PIDFILE=/var/run/redis.pid
test -x $DAEMON || exit 0
test -x $DAEMONBOOTSTRAP || exit 0
set -e

case "$1" in
start)
echo -n "Starting $DESC: "
touch $PIDFILE
chownredis:redis $PIDFILE
if start-stop-daemon --start --quiet --umask 007 --pidfile $PIDFILE --chuidredis:redis --e
background -- $DAEMON_ARGS
then
echo "$NAME."
else
echo "failed"
fi
;;
stop)
echo -n "Stopping $DESC: "
if start-stop-daemon --stop --retry 10 --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
then
echo "$NAME."
else
echo "failed"
fi
rm -f $PIDFILE
;;
restart|force-reload)
${0} stop
${0} start
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0

Note:Give appropriate permission to the init script
chmodu+x

redis-server

Step-6
To run the ‘redis’ server at startup we need to add it to the chkconfig list.
#/sbin/chkconfig --add redis-server
#/sbin/chkconfig --level 345 redis-server on
Step-7
Finally we are ready to start the Redis Server.
# /etc/init.d/redis-server start

Conclusion:
‘Redis’ also supports datatypes such as Transitions, Publish and Subscribe. ‘Redis ’ is
considered more powerful than ‘Memcache’ . It would be smart to bring ‘Redis’ into
practice and put ‘Memcache’ down for a while.

More Related Content

More from Andolasoft Inc

More from Andolasoft Inc (20)

How to Optimize the SEO of Shopify Stores
 How to Optimize the SEO of Shopify Stores How to Optimize the SEO of Shopify Stores
How to Optimize the SEO of Shopify Stores
 
14 Tips On How To Improve Android App Performance
14 Tips On How To Improve Android App Performance14 Tips On How To Improve Android App Performance
14 Tips On How To Improve Android App Performance
 
The Ultimate Guide to Setting Up Your WooCommerce Store
The Ultimate Guide to Setting Up Your WooCommerce StoreThe Ultimate Guide to Setting Up Your WooCommerce Store
The Ultimate Guide to Setting Up Your WooCommerce Store
 
Ranking The Best PHP Development Companies in the World
Ranking The Best PHP Development Companies in the WorldRanking The Best PHP Development Companies in the World
Ranking The Best PHP Development Companies in the World
 
Top 8 WordPress Design and Development Trends of 2023
Top 8 WordPress Design and Development Trends of 2023Top 8 WordPress Design and Development Trends of 2023
Top 8 WordPress Design and Development Trends of 2023
 
List of 10 Best WordPress Development Companies
List of 10 Best WordPress Development CompaniesList of 10 Best WordPress Development Companies
List of 10 Best WordPress Development Companies
 
WooCommerce vs Shopify: Which is Better For Your Online Store
WooCommerce vs Shopify: Which is Better For Your Online StoreWooCommerce vs Shopify: Which is Better For Your Online Store
WooCommerce vs Shopify: Which is Better For Your Online Store
 
Why Choose WooCommerce For Your eCommerce Store
Why Choose WooCommerce For Your eCommerce StoreWhy Choose WooCommerce For Your eCommerce Store
Why Choose WooCommerce For Your eCommerce Store
 
Django Workflow and Architecture
Django Workflow and ArchitectureDjango Workflow and Architecture
Django Workflow and Architecture
 
Service Oriented Architecture in NodeJS
Service Oriented Architecture in NodeJSService Oriented Architecture in NodeJS
Service Oriented Architecture in NodeJS
 
Top Features And Updates Of Angular 13 You Must Know
Top Features And Updates Of Angular 13 You Must KnowTop Features And Updates Of Angular 13 You Must Know
Top Features And Updates Of Angular 13 You Must Know
 
How To Organize And Structure Your SASS Code
How To Organize And Structure Your SASS CodeHow To Organize And Structure Your SASS Code
How To Organize And Structure Your SASS Code
 
Why Businesses Need Open Source Software
Why Businesses Need Open Source Software Why Businesses Need Open Source Software
Why Businesses Need Open Source Software
 
What is Closure and Its Uses in PHP
 What is Closure and Its Uses in PHP What is Closure and Its Uses in PHP
What is Closure and Its Uses in PHP
 
AngularJS vs ReactJS: Which One is Best for Next Front-end Development
 AngularJS vs ReactJS: Which One is Best for Next Front-end Development AngularJS vs ReactJS: Which One is Best for Next Front-end Development
AngularJS vs ReactJS: Which One is Best for Next Front-end Development
 
Reactjs Vs React Native – Key Difference, Advantages, And Disadvantages
Reactjs Vs React Native – Key Difference, Advantages, And DisadvantagesReactjs Vs React Native – Key Difference, Advantages, And Disadvantages
Reactjs Vs React Native – Key Difference, Advantages, And Disadvantages
 
Organization Management Software Helps To Improve Your Employee Productivity
Organization Management Software Helps To Improve Your Employee ProductivityOrganization Management Software Helps To Improve Your Employee Productivity
Organization Management Software Helps To Improve Your Employee Productivity
 
How To Manage API Request with AXIOS on a React Native App
How To Manage API Request with AXIOS on a React Native AppHow To Manage API Request with AXIOS on a React Native App
How To Manage API Request with AXIOS on a React Native App
 
Institute Of Life Sciences Applicant Can Apply For Job With ILS Web Application
Institute Of Life Sciences Applicant Can Apply For Job With ILS Web ApplicationInstitute Of Life Sciences Applicant Can Apply For Job With ILS Web Application
Institute Of Life Sciences Applicant Can Apply For Job With ILS Web Application
 
What Is BuildContext In Flutter And It's Importance
What Is BuildContext In Flutter And It's ImportanceWhat Is BuildContext In Flutter And It's Importance
What Is BuildContext In Flutter And It's Importance
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

How to install and configure redis server on Centos/Fedora server

  • 1. How to Install and Configure Redis-Server on Centos/ Fedora Server ‘Redis’ is an Open source key-value data store. Key values are more complex types like Hashes, Lists, Sets or Sorted Sets. It is a highly scalable data store which is shared by multiple processes, multiple applications, or multiple Servers. Steps to install ‘Redis’: Step-1 Install prerequisites packages for the ‘Redis’ server #yum install make gccwget Step-2 Download Redis Packages and unzip #wgethttp://redis.googlecode.com/files/redis-2.2.12.tar.gz #tar -xf redis-2.2.12.tar.gz Step-3 we are ready to install Redis from the source. #cd redis-2.2.12 #makez #make install Step- 4 Now we will modify the default configuration of the Redis and change the location of the database. We would also change the log notices to a production acceptable level and the location of the log file. #mkdir /etc/redis/var/lib/redis #sed -e "s/^daemonize no$/daemonize yes/" -e "s/^dir .//dir /var/lib/redis//" -e "s/ /var/log/redis.log/" redis.conf > /etc/redis/redis.conf Step-5 Add the ‘redis’ init script. #vi /etc/init.d/redis-server Add the below lines #!/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/local/bin/redis-server
  • 2. DAEMON_ARGS=/etc/redis/redis.conf NAME=redis-server DESC=redis-server PIDFILE=/var/run/redis.pid test -x $DAEMON || exit 0 test -x $DAEMONBOOTSTRAP || exit 0 set -e case "$1" in start) echo -n "Starting $DESC: " touch $PIDFILE chownredis:redis $PIDFILE if start-stop-daemon --start --quiet --umask 007 --pidfile $PIDFILE --chuidredis:redis --e background -- $DAEMON_ARGS then echo "$NAME." else echo "failed" fi ;; stop) echo -n "Stopping $DESC: " if start-stop-daemon --stop --retry 10 --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON then echo "$NAME." else echo "failed" fi rm -f $PIDFILE ;; restart|force-reload) ${0} stop ${0} start ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 Note:Give appropriate permission to the init script chmodu+x redis-server Step-6 To run the ‘redis’ server at startup we need to add it to the chkconfig list. #/sbin/chkconfig --add redis-server #/sbin/chkconfig --level 345 redis-server on
  • 3. Step-7 Finally we are ready to start the Redis Server. # /etc/init.d/redis-server start Conclusion: ‘Redis’ also supports datatypes such as Transitions, Publish and Subscribe. ‘Redis ’ is considered more powerful than ‘Memcache’ . It would be smart to bring ‘Redis’ into practice and put ‘Memcache’ down for a while.