sudo yum -y update sudo yum -y upgrade sudo yum -y install gcc gcc-c++ kernel-devel sudo yum -y install sqlite-devel sudo yum -y install readline sudo yum -y install gdbm-devel sudo yum -y install bzip2-devel sudo yum -y install build-essential libbz2-dev sudo yum -y install sqlite3 sudo yum -y install install zip sudo yum -y install zip
※
-y はyesオプション(質問に自動でyesする)
yum install gcc gcc-c++ kernel-devel (aptitudeでいうbuild-essential)
「yum search パッケージ名」で検索する
・Python関連パッケージ
sudo yum -y install python-devel
たいていはdevをdevelにする
・distribute
sudo chmod -R 0775 /usr/local wget http://python-distribute.org/distribute_setup.py sudo python distribute_setup.py
これがないとpipも入れられない
・pipを入れる
wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py sudo python get-pip.py
Pythonのインストールは飛ばす。
・新規作成
mkvirtualenv --python=/opt/python2.7.3/bin/python tornado_app
→bin/pythonまで書かないと
mkvirtualenv --python=/opt/python2.7.3 tornado_app
こうなってしまうので注意
Running virtualenv with interpreter /opt/python2.7.3 Traceback (most recent call last): File "/usr/bin/virtualenv", line 9, in <module> load_entry_point('virtualenv==1.7.2', 'console_scripts', 'virtualenv')() File "/usr/lib/python2.6/site-packages/virtualenv.py", line 893, in main popen = subprocess.Popen([interpreter, file] + sys.argv[1:], env=env) File "/usr/lib64/python2.6/subprocess.py", line 639, in __init__ errread, errwrite) File "/usr/lib64/python2.6/subprocess.py", line 1228, in _execute_child raise child_exception OSError: [Errno 13] Permission denied