KanonConductor

changeset 15:01209a6aabbd centos5-support

Add setup code for CentOS 5.x.
author Tomofumi TANAKA <tanaka.tomofumi@gmail.com>
date Fri, 11 Mar 2011 08:28:46 +0900
parents d48ffe357575
children c3099c3aa885
files kanon-setup pkglist.rhel5
diffstat 2 files changed, 26 insertions(+), 14 deletions(-) [+]
line diff
     1.1 --- a/kanon-setup	Wed Mar 09 18:29:35 2011 +0900
     1.2 +++ b/kanon-setup	Fri Mar 11 08:28:46 2011 +0900
     1.3 @@ -1,4 +1,3 @@
     1.4 -
     1.5  #!/bin/bash
     1.6  
     1.7  export KANON_OPT=/opt/kanon
     1.8 @@ -14,7 +13,7 @@
     1.9      CHK=`egrep "CentOS release 5|Red Hat Enterprise Linux .* 5" /etc/redhat-release`
    1.10      if [ "$CHK" != '' ]
    1.11      then
    1.12 -        OS='rhel5'    
    1.13 +        OS='rhel5'
    1.14      else
    1.15          OS='rhel6'
    1.16      fi
    1.17 @@ -66,20 +65,27 @@
    1.18          yum -y install `cat pkglist.rhel6`
    1.19          ;;
    1.20      rhel5)
    1.21 +        # TODO 環境によっては失敗する模様(proxy環境?)wget してからローカルファイルをインストールに変更する.
    1.22          rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm
    1.23          yum -y install `cat pkglist.rhel5`
    1.24          ;;
    1.25      *)
    1.26 -        ;;    
    1.27 +        ;;
    1.28  esac
    1.29  
    1.30  ### install files
    1.31  cp -fr opt/* /opt
    1.32 -cp -frn etc/* /etc
    1.33 +if [ "$OS" == "rhel5" ]
    1.34 +then
    1.35 +    # FIXME CentOS 5.x では n オプションがないため 強制上書きになってしまう.
    1.36 +    cp -fr etc/* /etc
    1.37 +else
    1.38 +    cp -frn etc/* /etc
    1.39 +fi
    1.40  
    1.41  
    1.42  ### setup configuration
    1.43 -python resource/virtualenv.py /opt/kanon
    1.44 +python2.6 resource/virtualenv.py /opt/kanon
    1.45  source /opt/kanon/bin/activate
    1.46  
    1.47  ## setup sitecustomize for python
    1.48 @@ -92,7 +98,16 @@
    1.49      fi
    1.50  fi
    1.51  
    1.52 +
    1.53  ### install python components
    1.54 +if [ "$OS" == "rhel5" ]
    1.55 +then
    1.56 +    # Install Extra Package for CentOS 5.X
    1.57 +    easy_install "mercurial==1.7.3"
    1.58 +    easy_install bzr
    1.59 +    easy_install pygments
    1.60 +fi
    1.61 +
    1.62  easy_install http://svn.edgewall.org/repos/genshi/tags/0.6.0/
    1.63  easy_install http://ftp.edgewall.com/pub/babel/Babel-0.9.5.zip
    1.64  easy_install http://www.i-act.co.jp/project/products/downloads/Trac-0.12.2.ja1.zip
    1.65 @@ -104,7 +119,7 @@
    1.66  
    1.67  
    1.68  ### install trac plugins
    1.69 -easy_install http://svn.edgewall.com/repos/trac/plugins/0.12/mercurial-plugin 
    1.70 +easy_install http://svn.edgewall.com/repos/trac/plugins/0.12/mercurial-plugin
    1.71  
    1.72  #resource/pluginsディレクトリのプラグインをインストール
    1.73  pushd .
    1.74 @@ -112,8 +127,8 @@
    1.75  cd resource/trac-plugins
    1.76  for i in `ls -1 .`
    1.77  do
    1.78 -    cd $i;python setup.py install --prefix=/opt/kanon
    1.79 -    cd ..   
    1.80 +    cd $i;python setup.py install
    1.81 +    cd ..
    1.82  done
    1.83  cd ../..
    1.84  
    1.85 @@ -124,7 +139,7 @@
    1.86      cd /tmp
    1.87      svn co $i kanon_build
    1.88      cd kanon_build
    1.89 -    python setup.py install --prefix=/opt/kanon
    1.90 +    python setup.py install
    1.91      cd ..
    1.92      rm -fr kanon_build
    1.93  done
    1.94 @@ -162,6 +177,7 @@
    1.95          mkdir -p /var/opt/kanon/trac/.egg-cache
    1.96          chown apache:apache -R /var/opt/kanon/trac/.egg-cache/
    1.97          mkdir -p /usr/lib/python2.6/site-packages/bzrlib/plugin
    1.98 +        # FIXME only works i386.
    1.99          ln -s /usr/lib/python2.4/site-packages/libsvn /opt/kanon/lib/python2.6/site-packages/
   1.100          ln -s /usr/lib/python2.4/site-packages/svn /opt/kanon/lib/python2.6/site-packages/
   1.101  
   1.102 @@ -176,7 +192,7 @@
   1.103          service httpd start
   1.104          ;;
   1.105      *)
   1.106 -        ;;    
   1.107 +        ;;
   1.108  esac
   1.109  
   1.110  
     2.1 --- a/pkglist.rhel5	Wed Mar 09 18:29:35 2011 +0900
     2.2 +++ b/pkglist.rhel5	Fri Mar 11 08:28:46 2011 +0900
     2.3 @@ -2,12 +2,8 @@
     2.4  python26-devel
     2.5  python26-mod_wsgi
     2.6  httpd
     2.7 -python-setuptools
     2.8 -python-pygments
     2.9  sqlite
    2.10  mod_dav_svn
    2.11  subversion
    2.12 -mercurial
    2.13 -bzr
    2.14  gcc
    2.15  git