{"id":631,"date":"2012-08-24T08:15:58","date_gmt":"2012-08-24T08:15:58","guid":{"rendered":"http:\/\/www.plugged.in\/?p=631"},"modified":"2012-08-24T08:15:58","modified_gmt":"2012-08-24T08:15:58","slug":"install-mod_python-on-centos-6","status":"publish","type":"post","link":"https:\/\/www.veriteknik.net.tr\/en\/install-mod_python-on-centos-6\/","title":{"rendered":"Install mod_python on Centos 6"},"content":{"rendered":"<p>mod_python is one of the easiest ways to use your Python Scripts as web pages. To install mod_python on your Centos 6 server, simply follow the steps below. We also recommend using our <a title=\"Download Plugged.in LAMP installer for CentOS 6.x\" href=\"http:\/\/www.plugged.in\/linux\/plugged-install-lamp-for-centosredhat-6-x-download.html\">LAMP installer<\/a>, this method can easily be implemented with our installer.<\/p>\n<p>To install mod_python, we need the EPEL repositories:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">rpm --import https:\/\/fedoraproject.org\/static\/0608B895.txt\nwget http:\/\/dl.fedoraproject.org\/pub\/epel\/6\/x86_64\/epel-release-6-7.noarch.rpm\nrpm -ivh epel-release-6-7.noarch.rpm\nyum install yum-priorities<\/pre>\n<p>Now edit the <strong>\/etc\/yum.repos.d\/eped.rep<\/strong>o file and add <strong>priority=10<\/strong> to the <strong>[epel]<\/strong> section.<\/p>\n<p>After that follow the steps below and you&#8217;ll have mod_python installed and active.<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">yum install mod_python\nservice httpd restart<\/pre>\n<p>Now you should configure your httpd.conf files so that apache nows where and when to interpret your Python scripts. If you have installed you system with our LAMP installer, then go to <strong>\/etc\/httpd\/conf.d<\/strong> and edit you websites <strong>.conf<\/strong> file (starting with a<strong> z_<\/strong>)<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">vi \/etc\/httpd\/conf.d\/z_castmator.com<\/pre>\n<p>Make sure you add the following lines in the<strong> &lt;Directory &#8230;&gt; &lt;\/Directory&gt;<\/strong> statements.<\/p>\n<pre class=\"brush: text; gutter: true; first-line: 1\">AddHandler mod_python .py\nPythonHandler mod_python.publisher\nPythonDebug On<\/pre>\n<p>Don&#8217;t forget that PythonDebug is for debug mode. When you&#8217;re done developing it may be a good idea to turn it off.<\/p>\n<p>Also don&#8217;t forget to add your DirectoryIndex handlers so that Apache knows you can also have Python Index files. You can add this right after the <strong>&lt;\/Directory&gt;<\/strong> statement.<\/p>\n<pre class=\"brush: text; gutter: true; first-line: 1\">DirectoryIndex index.html index.php index.py<\/pre>\n<p>Since we&#8217;ve altered with the configuration files of Apache, we should restart it again, then you are ready to go.<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">service httpd restart<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>mod_python is one of the easiest ways to use your Python Scripts as web pages. To install mod_python on your Centos 6 server, simply follow the steps below. We also recommend using our LAMP installer, this method can easily be implemented with our installer. To install mod_python, we need the EPEL repositories: rpm &#8211;import https:\/\/fedoraproject.org\/static\/0608B895.txt [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[367,370,448,450],"tags":[365,392,371,541],"yst_prominent_words":[1133,813,605,711,1134,1126,1137,897,1128,899,1132,1136,1129,1130,1131,1127,707,1135],"class_list":["post-631","post","type-post","status-publish","format-standard","hentry","category-httpd","category-linux","category-programm-in","category-python-programming","tag-apache","tag-httpd","tag-linux-2","tag-mod_python"],"jetpack_featured_media_url":"","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Mustafa Emre Ayd\u0131n","author_link":"https:\/\/www.veriteknik.net.tr\/en\/author\/eaydin\/"},"uagb_comment_info":0,"uagb_excerpt":"mod_python is one of the easiest ways to use your Python Scripts as web pages. To install mod_python on your Centos 6 server, simply follow the steps below. We also recommend using our LAMP installer, this method can easily be implemented with our installer. To install mod_python, we need the EPEL repositories: rpm --import https:\/\/fedoraproject.org\/static\/0608B895.txt&hellip;","_links":{"self":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/631","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/comments?post=631"}],"version-history":[{"count":0,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/631\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/media?parent=631"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/categories?post=631"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/tags?post=631"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/yst_prominent_words?post=631"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}