{"id":422,"date":"2010-02-25T09:31:21","date_gmt":"2010-02-25T00:31:21","guid":{"rendered":"http:\/\/www.lancard.com\/blog\/?p=422"},"modified":"2025-03-12T11:31:55","modified_gmt":"2025-03-12T02:31:55","slug":"centos5-5-64bit-mod_python-install","status":"publish","type":"post","link":"https:\/\/www.lancard.com\/blog\/2010\/02\/25\/centos5-5-64bit-mod_python-install\/","title":{"rendered":"CentOS5.5 64bit\u306bmod_python\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb"},"content":{"rendered":"<p>CentOS5.5\u306b\u6a19\u6e96\u3067\u5165\u3063\u3066\u3044\u308bPython\u306f2.4\u7cfb\u3067\u3057\u305f\u3002\u6700\u521d\u306f\u4f55\u3082\u8003\u3048\u305a\u30bd\u30fc\u30b9\u53d6\u3063\u3066\u6765\u3066\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307e\u3057\u305f\u304c\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u7121\u3057\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3068mod_python\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3053\u3051\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002\u4e0b\u8a18\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>Python 2.6<\/h3>\n<pre lang=\"bash\">\nwget http:\/\/www.python.org\/ftp\/python\/2.6.5\/Python-2.6.5.tgz\ntar xzvf Python-2.6.5.tgz\ncd Python-2.6.5\n.\/configure --enable-shared\nCFLAGS=\"-fPIC\" CXXFLAGS=\"-fPIC\" LDFLAGS=\"\/usr\/local\/lib\" make\nmake install\ncp libpython2.6.so* \/usr\/lib64\/\n<\/pre>\n<pre lang=\"bash\">\nvi \/etc\/ld.so.conf.d\/python2.6.conf\n+1:\/usr\/local\/bin\n<\/pre>\n<pre lang=\"bash\">\n\/sbin\/ldconfig\nln -s \/usr\/local\/bin\/python \/usr\/bin\/python2.6\n<\/pre>\n<p>\u4e00\u65e6\u30ed\u30b0\u30a2\u30a6\u30c8<\/p>\n<pre lang=\"bash\">\nldd \/usr\/local\/bin\/python\n    libpython2.6.so.1.0 => \/usr\/lib64\/libpython2.6.so.1.0 (0x00002b7ea57a7000)\n    libpthread.so.0 => \/lib64\/libpthread.so.0 (0x0000003d9cc00000)\n    libdl.so.2 => \/lib64\/libdl.so.2 (0x0000003d9c400000)\n    libutil.so.1 => \/lib64\/libutil.so.1 (0x0000003d9f800000)\n    libm.so.6 => \/lib64\/libm.so.6 (0x0000003d9d000000)\n    libc.so.6 => \/lib64\/libc.so.6 (0x0000003d9c000000)\n    \/lib64\/ld-linux-x86-64.so.2 (0x0000003d9bc00000)\n<\/pre>\n<p>lib64\u3092\u898b\u3066\u3044\u308b\u304b\u78ba\u8a8d<\/p>\n<h3>mod_python<\/h3>\n<pre lang=\"bash\">\nwget http:\/\/ftp.kddilabs.jp\/infosystems\/apache\/httpd\/modpython\/mod_python-3.3.1.tgz\ntar xzvf mod_python-3.3.1.tgz\ncd mod_python-3.3.1\n.\/configure --with-apxs=\/usr\/local\/apache2\/bin\/apxs --with-python=\/usr\/local\/bin\/python\n<\/pre>\n<pre lang=\"bash\">\nvi src\/connobject.c\n-142:!(b == APR_BRIGADE_SENTINEL(b) ||\n+142:!(b == APR_BRIGADE_SENTINEL(bb) ||\n#\u30d5\u30a9\u30fc\u30e9\u30e0\u306b\u3042\u308a\u307e\u3057\u305f\u304c\u3001\u3069\u3046\u3084\u3089\u30d0\u30b0\u306e\u3088\u3046\u3067\u3059\u3002\n<\/pre>\n<pre lang=\"bash\">\nchown apache:apache \/usr\/local\/apache2\/modules\/mod_python.so\n#\u6a29\u9650\u306f\u74b0\u5883\u306b\u5408\u308f\u305b\u3066\u304f\u3060\u3055\u3044\n<\/pre>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F422&#038;t=CentOS5.5%2064bit%E3%81%ABmod_python%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F422&#038;p&#091;images&#093;&#091;0&#093;=&#038;p&#091;title&#093;=CentOS5.5%2064bit%E3%81%ABmod_python%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/facebook.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"http:\/\/twitter.com\/share?url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F422&#038;text=CentOS5.5%2064bit%E3%81%ABmod_python%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/twitter.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F422&#038;title=CentOS5.5%2064bit%E3%81%ABmod_python%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/linkedin.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-tumblr nolightbox\" data-provider=\"tumblr\" target=\"_blank\" rel=\"nofollow\" title=\"Share on tumblr\" href=\"https:\/\/tumblr.com\/share?s=&#038;v=3&#038;t=CentOS5.5%2064bit%E3%81%ABmod_python%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB&#038;u=https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F422\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px;margin-right:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"tumblr\" title=\"Share on tumblr\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/tumblr.png\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-24 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=CentOS5.5%2064bit%E3%81%ABmod_python%E3%82%92%E3%82%A4%E3%83%B3%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB&#038;body=%E3%82%B7%E3%82%A7%E3%82%A2%E3%81%99%E3%82%8B%EF%BC%9A:%20https%3A%2F%2Fwww.lancard.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F422\" style=\"font-size: 0px;width:24px;height:24px;margin:0;margin-bottom:5px\"><img loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"24\" height=\"24\" style=\"display: inline;width:24px;height:24px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/www.lancard.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/48x48\/mail.png\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>CentOS5.5\u306b\u6a19\u6e96\u3067\u5165\u3063\u3066\u3044\u308bPython\u306f2.4\u7cfb\u3067\u3057\u305f\u3002\u6700\u521d\u306f\u4f55\u3082\u8003\u3048\u305a\u30bd\u30fc\u30b9\u53d6\u3063\u3066\u6765\u3066\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u307e\u3057\u305f\u304c\u3001\u30aa\u30d7\u30b7\u30e7\u30f3\u7121\u3057\u3067\u30b3\u30f3\u30d1\u30a4\u30eb\u3059\u308b\u3068mod_python\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306b\u3053\u3051\u3066\u3057\u307e\u3044\u307e [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[25,136,34],"class_list":["post-422","post","type-post","status-publish","format-standard","hentry","category-1","tag-apache","tag-centos","tag-mod_python"],"_links":{"self":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/422","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/comments?post=422"}],"version-history":[{"count":13,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/422\/revisions"}],"predecessor-version":[{"id":4748,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/posts\/422\/revisions\/4748"}],"wp:attachment":[{"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/media?parent=422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/categories?post=422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lancard.com\/blog\/wp-json\/wp\/v2\/tags?post=422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}