'Django'에 해당되는 글 1건

  1. 2011.01.28 CentOS 5.5 에서 Python 2.7.1 + twisted + django 설치 쉘 스크립트

CentOS 5.5 에서 Python 2.7.1 + twisted + django 설치 쉘 스크립트

프로그래밍 2011.01.28 17:40
#!/usr/bin/sh

PY_VER=2.7.1
PY_PACKAGE_VER=2.7
PY_INSTALL_PATH=/opt/python2.7.1

su
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.$HOSTTYPE.rpm
rpm -Uhv rpmforge-release-0.5.1-1.el5.rf.$HOSTTYPE.rpm

yum -y groupinstall 'Development Tools'
yum -y install openssl-devel* zlib*.$HOSTTYPE

wget http://sqlite.org/sqlite-amalgamation-3.7.3.tar.gz
wget http://python.org/ftp/python/$PY_VER/Python-$PY_VER.tgz
wget http://pypi.python.org/packages/$PY_PACKAGE_VER/s/setuptools/setuptools-0.6c11-py$PY_PACKAGE_VER.egg

cd
tar xfz sqlite-amalgamation-3.7.3.tar.gz
cd sqlite-3.7.3/
./configure
make
make install

cd
tar xfz Python-$PY_VER.tgz
cd Python-$PY_VER
./configure --prefix=$PY_INSTALL_PATH --with-threads --enable-shared
make
make install

cd
echo "alias python=$PY_INSTALL_PATH/bin/python" >> .bash_profile
echo "alias python$PY_PACKAGE_VER=$PY_INSTALL_PATH/bin/python" >> .bash_profile
echo "PATH=\$PATH:$PY_INSTALL_PATH/bin" >> .bash_profile

cd
echo "$PY_INSTALL_PATH/lib" >> /etc/ld.so.conf.d/opt-python$PY_PACKAGE_VER.conf

cd
sh setuptools-0.6c11-py$PY_PACKAGE_VER.egg
cd $PY_INSTALL_PATH/lib/python$PY_PACKAGE_VER/config
ln -s ../../libpython$PY_PACKAGE_VER.so .

cd
source .bash_profile
/sbin/ldconfig

easy_install twisted
easy_install django

Trackbacks 1 : Comments 0