Setup a BlueHost Account
From Ben Cheng Personal Wiki
Setting Up Blue Host Account
Contents |
[edit] Trac
[edit] Enviroment Setup
- Add these lines into ~/.bash_profile
- export PYTHONPATH="$HOME/lib/python2.3/site-packages"
- export LD_LIBRARY_PATH="$HOME/lib"
[edit] Install Trac
- Download and extract to ~/src
- python setup.py install --prefix=$HOME
[edit] Install ClearSilver
- Download and extract to ~/src
- sed -i "s@/usr/local/bin/python@/usr/bin/env python@g" scripts/document.py
- PYTHON_SITE=`python -c "import sys; print [path for path in sys.path if path.find('site-packages') != -1][0]"` ./configure --prefix=$HOME --disable-ruby --disable-java --disable-apache --disable-csharp --disable-perl
- make; make install
[edit] Install SQLite
- Download and extract to ~/src
- ./configure --prefix=$HOME --disable-tcl
- make; make install
- ln -s $HOME/bin/sqlite3 $HOME/bin/sqlite
[edit] Install PySQLite
- Download and extract to ~/src
- Change setup.cfg:
- include_dirs = /home/{username}/include
- library_dirs = /home/{username}/lib
- python setup.py build
- python setup.py install --prefix=$HOME
[edit] Install SWIG
- Download and extract to ~/src
- ./configure --prefix=$HOME
- make; make install
[edit] Subversion
- mkdir ~/src
[edit] Make Subversion Dep (Apr, Apr-Util)
- Download and extract subversion dep into ~/src
- Install Apr
- cd apr
- ./configure --prefix=$HOME
- make; make install
- Install Apr Util
- cd apr-util
- ./configure --prefix=$HOME --with-apr=$HOME
- make; make install
- Install Neon
- cd neon
- ./configure --enable-shared --prefix=$HOME
- make; make install
- Remove the dir before continue to subversion
[edit] Make Subversion
- Download and extract subversion into ~/src
- ./configure --prefix=$HOME --with-swig=$HOME/bin/swig --without-berkeley-db --with-zlib --with-ssl --with-neon=$HOME
- make; make install
- make swig-py; make install-swig-py
- Setup the correct py-svn binding
- cd ~/lib/python2.3/site-packages
- echo $HOME/lib/svn-python > subversion.pth
- ln -s ~/lib/svn-python/libsvn
- ln -s ~/lib/svn-python/svn
- Test with python -c "from svn import client"
[edit] Setup SVNServe
- To use SVN+SSH, we need to make sure svnserve is inside $PATH env variable.
- Move ~/.bash_profile line of "PATH=$PATH:$HOME/bin" to ~/.bashrc
- the svn path is: svn+ssh://username@hostname/home/username/repos
[edit] New Project of Trac
[edit] Setup Trac Project
- svnadmin create ~/svn/{project id}
- trac-admin ~/trac/{project id} initenv
- Add a user with admin permission
- trac-admin ~/trac/{project id}
- permission add admins TRAC_ADMIN
- permission add {username} admins
[edit] Install trac-webadmin
- Download to ~/src
- Drop the .egg file into "plugins" in each project directory
[edit] Make the CGI
- At your desired directory (/public_html/trac/{project id}, make an index.cgi
#!/bin/bash
export HOME="/home/{username}"
export TRAC_ENV="$HOME/trac/{your trac project id}"
export PYTHONPATH="$HOME/lib/python2.3/site-packages"
export PATH="$HOME/bin:$PATH"
export LD_LIBRARY_PATH="$HOME/lib"
exec $HOME/share/trac/cgi-bin/trac.cgi
- And index.fcgi
#!/bin/bash
export HOME="/home/{username}"
export TRAC_ENV="$HOME/trac/{your trac project id}"
export PYTHONPATH="$HOME/lib/python2.3/site-packages"
export PATH="$HOME/bin:$PATH"
export LD_LIBRARY_PATH="$HOME/lib"
exec $HOME/share/trac/cgi-bin/trac.fcgi
- And .htaccess
DirectoryIndex index.cgi
or
DirectoryIndex index.fcgi
[edit] Setup the authentication
- htpasswd -c ./trac/{project id}/trac.htpasswd chpapa
- Make the .htaccess file under public_html/trac/{project id}
AuthType Basic AuthName "Trac" AuthUserFile /somewhere/trac.htpasswd Require valid-user
[edit] Pylons
- Install flup
- Download and extract into ~/src
- python ez_setup.py --prefix=$HOME
- Install pylons (easy_install installed by ez_setup.py already)
- easy_install --prefix=$HOME Pylons==0.9.6
