Python/インストール/Linux/Python
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
*Pythonのインストール [#sca7e9b2]
サーバは、使えるねっと(OSはCentOS)です。&br;
[[soundkitchen:http://humming.via-kitchen.com/]]と[[kishi...
ありがとうございました~。
**Pythonのインストール [#d6287a93]
# wget http://www.python.jp/pub/ftp.python.org/python/2....
# tar zxvf Python-2.5.tgz
# cd Python-2.5
# ./configure --prefix=/usr/local/python
# make
# make install
**パスを通す [#xccb4632]
***.bash_profileを変更しパスを追加する [#j6e7bcf3]
# vim .bash_profile
***設定を反映させる [#tef3e1bd]
# source ~/.bash_profile
**確認 [#t82137ea]
python -V
もし、インストールしたバージョンと違うバージョン(古い)が...
# python -V
Python 2.3.4
↓
# python -V
Python 2.5
**easy_installをインストール [#cc223db6]
# wget http://peak.telecommunity.com/dist/ez_setup.py
# /usr/local/python/bin/python ez_setup.py
**easy_installを使ってパッケージをインストールする [#bfde...
なお、今回は、以下のコマンドでインストールしましたが、イ...
# easy_install -UZ *****
***文書用ユーティリティ [#g45e3f3b]
# /usr/local/python/bin/easy_install-2.5 -U -Z docutils
***MySQL用コネクタ [#kac4c532]
# /usr/local/python/bin/easy_install-2.5 -U -Z MySQL_Pyt...
***インタラクティブなPython実装 [#l2beb90b]
# /usr/local/python/bin/easy_install-2.5 -U -Z ipython
***パッケージ管理 [#j6f41577]
# /usr/local/python/bin/easy_install-2.5 -U -Z yolk
***PostgreSQL用コネクタ [#x8448d00]
# /usr/local/python/bin/easy_install-2.5 -U -Z psycopg2
***XMLを使う場合入れておくと幸せになれる [#obc9ff1c]
# /usr/local/python/bin/easy_install-2.5 -U -Z lxml==1.3.6
**PythonImagingLibraryインストール [#eaee91a8]
***関連パッケージのインストール [#x98bdd99]
# yum install freetype-devel
# yum install freetype2-devel
# yum install libjpeg-devel
# yum install libpng-devel
# yum install zlib-devel
**ImagingLibraryインストール [#s11d51b9]
***コマンド [#m536f15e]
# wget http://effbot.org/media/downloads/Imaging-1.1.6.t...
# tar zxvf Imaging-1.1.6.tar.gz
# cd Imaging-1.1.6
# /usr/local/python/bin/python2.5 setup.py build
***installコマンド [#icac58bf]
# /usr/local/python/bin/python2.5 setup.py install
***確認 [#l45f40b5]
エラーが出ていなければインストール成功。
# /usr/local/python/bin/python2.5
>>> from PIL import Image
**mod_wsgiインストール [#r68594ac]
mod_pythonではなくmod_wsgiをインストールする。&br;
[[WSGI(ウイスキー):http://ja.wikipedia.org/wiki/Web_Serve...
***インストール [#z2e389cf]
※パスは環境にあわせて変更してください。
# wget http://modwsgi.googlecode.com/files/mod_wsgi-2.0....
# tar zxvf mod_wsgi-2.0.tar.gz
# cd mod_wsgi-2.0
# ./configure --with-apxs=/usr/sbin/apxs --with-python=/...
# make
# make install
***http.confの設定 [#xb945ac1]
以下の1行を追記する。
# vim /etc/httpd/conf/httpd.conf
LoadModule wsgi_module modules/mod_wsgi.so
***apacheの再起動 [#f5070f57]
# /etc/init.d/httpd configtest
Syntax OK
# /etc/init.d/httpd restart
Stopping httpd: ...
Starting httpd: ...
&br;
*Comment [#x6062cc3]
#comment_nospam
&br;
#counter
終了行:
*Pythonのインストール [#sca7e9b2]
サーバは、使えるねっと(OSはCentOS)です。&br;
[[soundkitchen:http://humming.via-kitchen.com/]]と[[kishi...
ありがとうございました~。
**Pythonのインストール [#d6287a93]
# wget http://www.python.jp/pub/ftp.python.org/python/2....
# tar zxvf Python-2.5.tgz
# cd Python-2.5
# ./configure --prefix=/usr/local/python
# make
# make install
**パスを通す [#xccb4632]
***.bash_profileを変更しパスを追加する [#j6e7bcf3]
# vim .bash_profile
***設定を反映させる [#tef3e1bd]
# source ~/.bash_profile
**確認 [#t82137ea]
python -V
もし、インストールしたバージョンと違うバージョン(古い)が...
# python -V
Python 2.3.4
↓
# python -V
Python 2.5
**easy_installをインストール [#cc223db6]
# wget http://peak.telecommunity.com/dist/ez_setup.py
# /usr/local/python/bin/python ez_setup.py
**easy_installを使ってパッケージをインストールする [#bfde...
なお、今回は、以下のコマンドでインストールしましたが、イ...
# easy_install -UZ *****
***文書用ユーティリティ [#g45e3f3b]
# /usr/local/python/bin/easy_install-2.5 -U -Z docutils
***MySQL用コネクタ [#kac4c532]
# /usr/local/python/bin/easy_install-2.5 -U -Z MySQL_Pyt...
***インタラクティブなPython実装 [#l2beb90b]
# /usr/local/python/bin/easy_install-2.5 -U -Z ipython
***パッケージ管理 [#j6f41577]
# /usr/local/python/bin/easy_install-2.5 -U -Z yolk
***PostgreSQL用コネクタ [#x8448d00]
# /usr/local/python/bin/easy_install-2.5 -U -Z psycopg2
***XMLを使う場合入れておくと幸せになれる [#obc9ff1c]
# /usr/local/python/bin/easy_install-2.5 -U -Z lxml==1.3.6
**PythonImagingLibraryインストール [#eaee91a8]
***関連パッケージのインストール [#x98bdd99]
# yum install freetype-devel
# yum install freetype2-devel
# yum install libjpeg-devel
# yum install libpng-devel
# yum install zlib-devel
**ImagingLibraryインストール [#s11d51b9]
***コマンド [#m536f15e]
# wget http://effbot.org/media/downloads/Imaging-1.1.6.t...
# tar zxvf Imaging-1.1.6.tar.gz
# cd Imaging-1.1.6
# /usr/local/python/bin/python2.5 setup.py build
***installコマンド [#icac58bf]
# /usr/local/python/bin/python2.5 setup.py install
***確認 [#l45f40b5]
エラーが出ていなければインストール成功。
# /usr/local/python/bin/python2.5
>>> from PIL import Image
**mod_wsgiインストール [#r68594ac]
mod_pythonではなくmod_wsgiをインストールする。&br;
[[WSGI(ウイスキー):http://ja.wikipedia.org/wiki/Web_Serve...
***インストール [#z2e389cf]
※パスは環境にあわせて変更してください。
# wget http://modwsgi.googlecode.com/files/mod_wsgi-2.0....
# tar zxvf mod_wsgi-2.0.tar.gz
# cd mod_wsgi-2.0
# ./configure --with-apxs=/usr/sbin/apxs --with-python=/...
# make
# make install
***http.confの設定 [#xb945ac1]
以下の1行を追記する。
# vim /etc/httpd/conf/httpd.conf
LoadModule wsgi_module modules/mod_wsgi.so
***apacheの再起動 [#f5070f57]
# /etc/init.d/httpd configtest
Syntax OK
# /etc/init.d/httpd restart
Stopping httpd: ...
Starting httpd: ...
&br;
*Comment [#x6062cc3]
#comment_nospam
&br;
#counter
ページ名: