{"id":995,"date":"2017-02-12T16:42:59","date_gmt":"2017-02-12T11:12:59","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=995"},"modified":"2017-03-23T14:03:31","modified_gmt":"2017-03-23T08:33:31","slug":"enable-redis-module-php-nginx-webserver","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/enable-redis-module-php-nginx-webserver\/","title":{"rendered":"Enable redis module on php &#8211; nginx webserver"},"content":{"rendered":"<p><strong>Date Posted:12-02-2017<\/strong><\/p>\n<p>Redis is a in memory cache used as database cache, database to serve the page faster. We are not going to deal with how the application works, usage,etc., Refer redis official documentation to get to know the use case,etc.,<\/p>\n<h5>Prerequisites:<\/h5>\n<ol>\n<li>Ubuntu 16<\/li>\n<li>Nginx webserver<\/li>\n<li>Php<\/li>\n<\/ol>\n<p>If webserver or php not installed then follow the below post.<\/p>\n<p><a href=\"https:\/\/pheonixsolutions.com\/blog\/install-nginx-php-mariadb-ubuntu-16-04-1\/\">Install Nginx, Php, MariaDB on Ubuntu 16.04<\/a><\/p>\n<h5>Enable Redis Module:<\/h5>\n<p>Clone the redis module on the server.<\/p>\n<p><code>cd \/usr\/local\/src\/<\/code><\/p>\n<p><code>git clone https:\/\/github.com\/phpredis\/phpredis.git<\/code><\/p>\n<p>Move the redis folder to \/etc directory.<\/p>\n<p><code>mv phpredis\/ \/etc\/ &amp;&amp; cd \/etc\/phpredis<\/code><\/p>\n<p>Run phpize command.<\/p>\n<p><code>phpize<\/code><\/p>\n<p>Run the configure.<\/p>\n<p><code>.\/configure<\/code><\/p>\n<p>Compile and install the program.<\/p>\n<p><code>make &amp;&amp; make install<\/code><\/p>\n<p>Add the extension to the enable redis module.<\/p>\n<p><code>echo 'extension=redis.so' &gt;\/etc\/php\/7.0\/mods-available\/redis.ini<\/code><\/p>\n<p>Enable the module<\/p>\n<p><code>phpenmod redis<\/code><\/p>\n<p>Restart the webserver.<\/p>\n<p><code>\u00a0service nginx restart<\/code><\/p>\n<p><code> service php7.0-fpm restart<\/code><\/p>\n<h5>Verification:<\/h5>\n<p>Create phpinfo and check the redis module.<\/p>\n<p><code>vi \/var\/www\/html\/info.php<\/code><\/p>\n<blockquote><p>&lt;?php<\/p>\n<p>phpinfo();<\/p>\n<p>?&gt;<\/p><\/blockquote>\n<p>Access the page on the browser using the domain or IP address and we can see redis module.<\/p>\n<p><strong>http:\/\/IPaddress\/info.php<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Date Posted:12-02-2017 Redis is a in memory cache used as database cache, database to serve the page faster. We are [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[261,273,274],"class_list":["post-995","post","type-post","status-publish","format-standard","hentry","category-web-architecture","tag-linux","tag-php","tag-ubuntu","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-g3","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/995","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=995"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/995\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}