{"id":17,"date":"2015-09-04T12:31:27","date_gmt":"2015-09-04T12:31:27","guid":{"rendered":"http:\/\/www.asianux.org.vn\/?p=17"},"modified":"2015-09-04T12:31:27","modified_gmt":"2015-09-04T12:31:27","slug":"install-redis-on-centos-6-5","status":"publish","type":"post","link":"https:\/\/www.asianux.org.vn\/index.php\/2015\/09\/04\/install-redis-on-centos-6-5\/","title":{"rendered":"Install Redis on CentOS 6.5"},"content":{"rendered":"<h4><span id=\"Perform_an_update_to_ensure_you.27ve_got_the_latest_of_everything_in_the_base_package.\" class=\"mw-headline\">Perform an update to ensure you\u2019ve got the latest of everything in the base package.<\/span><\/h4>\n<div class=\"mw-geshi mw-code mw-content-ltr\" dir=\"ltr\">\n<div class=\"bash source-bash\">\n<pre class=\"de1\"><span class=\"kw2\">yum update<\/span><\/pre>\n<\/div>\n<\/div>\n<h4><span id=\"Install_wget_so_you_can_download_a_few_things.\" class=\"mw-headline\">Install wget so you can download a few things.<\/span><\/h4>\n<div class=\"mw-geshi mw-code mw-content-ltr\" dir=\"ltr\">\n<div class=\"bash source-bash\">\n<pre class=\"de1\"><span class=\"kw2\">yum install<\/span> <span class=\"kw2\">wget<\/span><\/pre>\n<\/div>\n<\/div>\n<h4><span id=\"Allow_yum_to_locate.2Finstall_redis.2C_per_this_page_here.\" class=\"mw-headline\">Allow yum to locate\/install redis, per this page here.<\/span><\/h4>\n<div><a class=\"external free\" href=\"http:\/\/thoughts.z-dev.org\/2013\/05\/27\/install-redis-on-centos-6-4\/\" rel=\"nofollow noopener\" target=\"_blank\">http:\/\/thoughts.z-dev.org\/2013\/05\/27\/install-redis-on-centos-6-4\/<\/a><\/div>\n<div class=\"mw-geshi mw-code mw-content-ltr\" dir=\"ltr\">\n<div class=\"bash source-bash\">\n<pre class=\"de1\"><span class=\"kw2\">wget<\/span> http:<span class=\"sy0\">\/\/<\/span><span class=\"skimlinks-unlinked\">dl.fedoraproject.org<\/span><span class=\"sy0\">\/<\/span>pub<span class=\"sy0\">\/<\/span>epel<span class=\"sy0\">\/<\/span><span class=\"nu0\">6<\/span><span class=\"sy0\">\/<\/span>x86_64<span class=\"sy0\">\/<\/span>epel-release-<span class=\"nu0\">6<\/span>-<span class=\"nu0\">8<\/span>.<span class=\"skimlinks-unlinked\">noarch.rpm<\/span>\n<span class=\"kw2\">wget<\/span> http:<span class=\"sy0\">\/\/<\/span><span class=\"skimlinks-unlinked\">rpms.famillecollet.com<\/span><span class=\"sy0\">\/<\/span>enterprise<span class=\"sy0\">\/<\/span>remi-release-<span class=\"nu0\">6<\/span>.rpm\nrpm <span class=\"re5\">-Uvh<\/span> remi-release-<span class=\"nu0\">6<\/span><span class=\"sy0\">*<\/span>.rpm epel-release-<span class=\"nu0\">6<\/span><span class=\"sy0\">*<\/span>.rpm<span class=\"st0\">\"<\/span><\/pre>\n<\/div>\n<\/div>\n<h4><span id=\"Now.2C_install_all_the_prerequisites\" class=\"mw-headline\">Now, install all the prerequisites<\/span><\/h4>\n<div class=\"mw-geshi mw-code mw-content-ltr\" dir=\"ltr\">\n<div class=\"bash source-bash\">\n<pre class=\"de1\"><span class=\"kw2\">yum install<\/span> <span class=\"kw2\">tar<\/span> <span class=\"kw2\">make<\/span> <span class=\"kw2\">automake<\/span> <span class=\"kw2\">gcc<\/span> gcc-c++ <span class=\"kw2\">git<\/span> net-tools libcurl-devel libxml2-devel libffi-devel libxslt-devel tcl redis ImageMagick npm mysql-server mysql-devel nginx libyaml libyaml-devel <span class=\"kw2\">patch<\/span> readline-devel libtool <span class=\"kw2\">bison<\/span><\/pre>\n<\/div>\n<\/div>\n<h4><span id=\"Enable_and_start_MySQL\" class=\"mw-headline\">Enable and start MySQL<\/span><\/h4>\n<div class=\"mw-geshi mw-code mw-content-ltr\" dir=\"ltr\">\n<div class=\"bash source-bash\">\n<pre class=\"de1\">chkconfig <span class=\"re5\">--level<\/span> <span class=\"nu0\">3<\/span> mysqld on\nservice mysqld start<\/pre>\n<\/div>\n<\/div>\n<h4><span id=\"Secure_your_MySQL_installation_by_setting_a_password._replace_.27new-password.27_with_your_secure_password.\" class=\"mw-headline\">Secure your MySQL installation by setting a password. replace \u2018new-password\u2019 with your secure password.<\/span><\/h4>\n<div class=\"mw-geshi mw-code mw-content-ltr\" dir=\"ltr\">\n<div class=\"bash source-bash\">\n<pre class=\"de1\">mysqladmin <span class=\"re5\">-u<\/span> root password <span class=\"st_h\">'new-password'<\/span>\nmysqladmin <span class=\"re5\">-u<\/span> root <span class=\"re5\">-h<\/span> <span class=\"skimlinks-unlinked\">YourHost.YourDomain.com<\/span> password <span class=\"st_h\">'new-password'<\/span><\/pre>\n<\/div>\n<\/div>\n<h4><span id=\"Open_up_the_necessary_firewall_ports\" class=\"mw-headline\">Open up the necessary firewall ports<\/span><\/h4>\n<div class=\"mw-geshi mw-code mw-content-ltr\" dir=\"ltr\">\n<div class=\"bash source-bash\">\n<pre class=\"de1\"><span class=\"kw2\">vi<\/span> <span class=\"sy0\">\/<\/span>etc<span class=\"sy0\">\/<\/span>sysconfig<span class=\"sy0\">\/<\/span>iptables\n  copy this line.\n    <span class=\"re5\">-A<\/span> INPUT <span class=\"re5\">-m<\/span> state <span class=\"re5\">--state<\/span> NEW <span class=\"re5\">-m<\/span> tcp <span class=\"re5\">-p<\/span> tcp <span class=\"re5\">--dport<\/span> <span class=\"nu0\">22<\/span> <span class=\"re5\">-j<\/span> ACCEPT\n  and add two <span class=\"kw2\">more<\/span> with port <span class=\"nu0\">80<\/span> <span class=\"sy0\">&amp;<\/span> <span class=\"nu0\">443<\/span> <span class=\"kw2\">as<\/span> well\n    <span class=\"re5\">-A<\/span> INPUT <span class=\"re5\">-m<\/span> state <span class=\"re5\">--state<\/span> NEW <span class=\"re5\">-m<\/span> tcp <span class=\"re5\">-p<\/span> tcp <span class=\"re5\">--dport<\/span> <span class=\"nu0\">80<\/span> <span class=\"re5\">-j<\/span> ACCEPT\n    <span class=\"re5\">-A<\/span> INPUT <span class=\"re5\">-m<\/span> state <span class=\"re5\">--state<\/span> NEW <span class=\"re5\">-m<\/span> tcp <span class=\"re5\">-p<\/span> tcp <span class=\"re5\">--dport<\/span> <span class=\"nu0\">443<\/span> <span class=\"re5\">-j<\/span> ACCEPT<\/pre>\n<\/div>\n<\/div>\n<h4><span id=\"Restart_the_firewall\" class=\"mw-headline\">Restart the firewall<\/span><\/h4>\n<div class=\"mw-geshi mw-code mw-content-ltr\" dir=\"ltr\">\n<div class=\"bash source-bash\">\n<pre class=\"de1\">service iptables restart<\/pre>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Perform an update to ensure you\u2019ve got the latest of everything in the base package. yum update Install wget so you can download a few things. yum install wget Allow yum to locate\/install redis, per&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-17","post","type-post","status-publish","format-standard","hentry","category-he-thong"],"_links":{"self":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/17","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/comments?post=17"}],"version-history":[{"count":0,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/17\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/media?parent=17"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/categories?post=17"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/tags?post=17"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}