{"id":3393,"date":"2017-03-21T15:01:43","date_gmt":"2017-03-21T15:01:43","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=3393"},"modified":"2017-03-21T15:01:43","modified_gmt":"2017-03-21T15:01:43","slug":"install-file_cache_module-centosrhel6","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2017\/03\/21\/install-file_cache_module-centosrhel6\/","title":{"rendered":"Install mod_cloudflare.so, file_cache_module.so and mod_mem_cache.so on CentOS 6"},"content":{"rendered":"<p>How to\u00a0Install mod_cloudflare.so, file_cache_module.so and mod_mem_cache.so on CentOS 6<\/p>\n<p><!--more--><\/p>\n<p>Check for installed modules:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># httpd -M\nLoaded Modules:\n core_module (static)\n mpm_prefork_module (static)\n http_module (static)\n so_module (static)\n auth_basic_module (shared)\n auth_digest_module (shared)\n authn_file_module (shared)\n authn_alias_module (shared)\n authn_anon_module (shared)\n authn_dbm_module (shared)\n authn_default_module (shared)\n authz_host_module (shared)\n authz_user_module (shared)\n authz_owner_module (shared)\n authz_groupfile_module (shared)\n authz_dbm_module (shared)\n authz_default_module (shared)\n ldap_module (shared)\n authnz_ldap_module (shared)\n include_module (shared)\n log_config_module (shared)\n logio_module (shared)\n env_module (shared)\n ext_filter_module (shared)\n mime_magic_module (shared)\n expires_module (shared)\n deflate_module (shared)\n headers_module (shared)\n usertrack_module (shared)\n setenvif_module (shared)\n mime_module (shared)\n dav_module (shared)\n status_module (shared)\n autoindex_module (shared)\n info_module (shared)\n dav_fs_module (shared)\n vhost_alias_module (shared)\n negotiation_module (shared)\n dir_module (shared)\n actions_module (shared)\n speling_module (shared)\n userdir_module (shared)\n alias_module (shared)\n substitute_module (shared)\n rewrite_module (shared)\n proxy_module (shared)\n proxy_balancer_module (shared)\n proxy_ftp_module (shared)\n proxy_http_module (shared)\n proxy_ajp_module (shared)\n proxy_connect_module (shared)\n cache_module (shared)\n suexec_module (shared)\n disk_cache_module (shared)\n cgi_module (shared)\n version_module (shared)\n perl_module (shared)\n php5_module (shared)\n ssl_module (shared)\n wsgi_module (shared)\nSyntax OK\n<\/pre>\n<p>file_cache is not installed<\/p>\n<p>Install the required development packages:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# yum install httpd-devel gcc\n\n<\/pre>\n<p>Get your current running Apache version :<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># httpd -v\nServer version: Apache\/2.2.15 (Unix)\nServer built:   Jan 12 2017 17:09:39\n\n<\/pre>\n<p>or<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># rpm -qv httpd\nhttpd-2.2.15-56.el6.centos.3.x86_64\n<\/pre>\n<p>Get the Apache source matching your running version from the archive download repository :<\/p>\n<p><a href=\"http:\/\/archive.apache.org\/dist\/httpd\/\" target=\"_blank\" rel=\"noopener\">http:\/\/archive.apache.org\/dist\/httpd\/<\/a><\/p>\n<p>(this example would require the following package : http:\/\/archive.apache.org\/dist\/httpd\/httpd-2.2.15.tar.gz)<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# cd \/usr\/local\/src\n# wget http:\/\/archive.apache.org\/dist\/httpd\/httpd-2.2.15.tar.gz\n\n<\/pre>\n<p>Untar:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># tar xvf httpd-2.2.15.tar.gz\n<\/pre>\n<p>Go to the module directory :<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# cd httpd-2.2.15\/modules\/cache\n\n<\/pre>\n<p>Build the module:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# apxs -i -a -c mod_file_cache.c\n\n<\/pre>\n<p>The module has been compiled and added in httpd.conf.<\/p>\n<p>Add mod_mem_cache:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">apxs -c -i mod_mem_cache.c cache_cache.c cache_pqueue.c cache_hash.c\n<\/pre>\n<p>Check your configuration:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# service httpd configtest\n\n<\/pre>\n<p>If no error output, then reload the configuration :<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nservice httpd reload\n\n<\/pre>\n<p>Check the installed modules:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># httpd -M\nLoaded Modules:\n core_module (static)\n mpm_prefork_module (static)\n http_module (static)\n so_module (static)\n auth_basic_module (shared)\n auth_digest_module (shared)\n authn_file_module (shared)\n authn_alias_module (shared)\n authn_anon_module (shared)\n authn_dbm_module (shared)\n authn_default_module (shared)\n authz_host_module (shared)\n authz_user_module (shared)\n authz_owner_module (shared)\n authz_groupfile_module (shared)\n authz_dbm_module (shared)\n authz_default_module (shared)\n ldap_module (shared)\n authnz_ldap_module (shared)\n include_module (shared)\n log_config_module (shared)\n logio_module (shared)\n env_module (shared)\n ext_filter_module (shared)\n mime_magic_module (shared)\n expires_module (shared)\n deflate_module (shared)\n headers_module (shared)\n usertrack_module (shared)\n setenvif_module (shared)\n mime_module (shared)\n dav_module (shared)\n status_module (shared)\n autoindex_module (shared)\n info_module (shared)\n dav_fs_module (shared)\n vhost_alias_module (shared)\n negotiation_module (shared)\n dir_module (shared)\n actions_module (shared)\n speling_module (shared)\n userdir_module (shared)\n alias_module (shared)\n substitute_module (shared)\n rewrite_module (shared)\n proxy_module (shared)\n proxy_balancer_module (shared)\n proxy_ftp_module (shared)\n proxy_http_module (shared)\n proxy_ajp_module (shared)\n proxy_connect_module (shared)\n cache_module (shared)\n suexec_module (shared)\n disk_cache_module (shared)\n cgi_module (shared)\n version_module (shared)\n file_cache_module (shared)\n perl_module (shared)\n php5_module (shared)\n ssl_module (shared)\n wsgi_module (shared)\nSyntax OK\n\n<\/pre>\n<p>file_cache is installed but mem_cache is not seen. Check the apache configuration file &#8211; its disabled by default &#8211; enable it:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">#nano \/etc\/httpd\/conf\/httpd.conf\nLoadModule proxy_connect_module modules\/mod_proxy_connect.so\nLoadModule cache_module modules\/mod_cache.so\nLoadModule suexec_module modules\/mod_suexec.so\nLoadModule disk_cache_module modules\/mod_disk_cache.so\nLoadModule cgi_module modules\/mod_cgi.so\nLoadModule version_module modules\/mod_version.so\n\n#\n# The following modules are not loaded by default:\n#\n#LoadModule asis_module modules\/mod_asis.so\n#LoadModule authn_dbd_module modules\/mod_authn_dbd.so\n#LoadModule cern_meta_module modules\/mod_cern_meta.so\n#LoadModule cgid_module modules\/mod_cgid.so\n#LoadModule dbd_module modules\/mod_dbd.so\n#LoadModule dumpio_module modules\/mod_dumpio.so\n#LoadModule filter_module modules\/mod_filter.so\n#LoadModule ident_module modules\/mod_ident.so\n#LoadModule log_forensic_module modules\/mod_log_forensic.so\n#LoadModule unique_id_module modules\/mod_unique_id.so\nLoadModule file_cache_module  \/usr\/lib64\/httpd\/modules\/mod_file_cache.so\nLoadModule mem_cache_module   \/usr\/lib64\/httpd\/modules\/mod_mem_cache.so\n\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># service httpd restart\n<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">httpd -M\n mem_cache_module (shared)\n<\/pre>\n<p>Cloudflare module installation:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\"># https:\/\/www.cloudflare.com\/technical-resources\/\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>How to\u00a0Install mod_cloudflare.so, file_cache_module.so and mod_mem_cache.so on CentOS 6<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-3393","post","type-post","status-publish","format-standard","hentry","category-apache"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/3393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=3393"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/3393\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=3393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=3393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=3393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}