Пошаговая инструкция по запуску django (www.djangoproject.com) и satchmo (www.satchmoproject.com) на CentOS-5.1-i386-ispmanager комплекте ПО VDS хостинга http://firstfds.ru
Все данные приведены на момент написания поста и могут отличаться в будущем
# Обновим систему (download size 96 мб)
yum -y update
# Для satchmo нужен python2.5, в репозитариях для CentOS его нет, будем ставить из исходников
# перед установкой питона поставим необходимые пакеты
# Fix error: zipimport.ZipImportError: can’t decompress data; zlib not available
# See also: http://brichotomy.com/post/49322472/python-2-5-zlib-on-centos-5
yum -y install zlib-devel
# Fix: django.core.exceptions.ImproperlyConfigured: Error loading sqlite3 module: No module named _sqlite3
yum -y install sqlite-devel
# чтоб было чем компилировать
yum -y install gcc
# Устанавливаем питон
cd /tmp
wget http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz
tar xvfz Python-2.5.4.tgz
cd Python-2.5.4
./configure
make
make install
суббота, 14 марта 2009 г.
понедельник, 9 марта 2009 г.
воскресенье, 8 марта 2009 г.
Apache httpd.conf for django satchmo simple store
CentOS user name "first"
mkdir /home/first/www
mkdir /home/first/logs/httpd
mkdir /home/first/sites
ServerName simple.com
DocumentRoot /home/first/www/simple.com
SuexecUserGroup first first
CustomLog /home/first/logs/httpd/simple.com.access.log combined
ErrorLog /home/first/logs/httpd/simple.com.error.log
ServerAlias www.simple.com
ServerAdmin apochekutov@gmail.com
AddDefaultCharset utf8
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE simple.settings
PythonDebug Off
PythonPath "['/home/first/sites'] + sys.path"
SetHandler None
# set chmod (todo: minimize right)
cd /home/first
chmod -R 755 www
#http://www.briggs.net.nz/log/2007/04/20/mod_python-and-python25/
# http://codespatter.com/2008/10/15/setting-up-apache2-mod_python-mysql-and-django-on-debian-lenny-or-ubuntu-hardy-heron/
http://209.85.129.132/search?q=cache:zIulRm3UHY0J:d.hatena.ne.jp/tanakahisateru/20080721/1216575819+apache+centos+mod_python+python2.5&hl=ru&ct=clnk&cd=3&gl=ru&client=firefox-a
mkdir /home/first/www
mkdir /home/first/logs/httpd
mkdir /home/first/sites
ServerName simple.com
DocumentRoot /home/first/www/simple.com
SuexecUserGroup first first
CustomLog /home/first/logs/httpd/simple.com.access.log combined
ErrorLog /home/first/logs/httpd/simple.com.error.log
ServerAlias www.simple.com
ServerAdmin apochekutov@gmail.com
AddDefaultCharset utf8
SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE simple.settings
PythonDebug Off
PythonPath "['/home/first/sites'] + sys.path"
SetHandler None
# set chmod (todo: minimize right)
cd /home/first
chmod -R 755 www
#http://www.briggs.net.nz/log/2007/04/20/mod_python-and-python25/
# http://codespatter.com/2008/10/15/setting-up-apache2-mod_python-mysql-and-django-on-debian-lenny-or-ubuntu-hardy-heron/
http://209.85.129.132/search?q=cache:zIulRm3UHY0J:d.hatena.ne.jp/tanakahisateru/20080721/1216575819+apache+centos+mod_python+python2.5&hl=ru&ct=clnk&cd=3&gl=ru&client=firefox-a
понедельник, 23 февраля 2009 г.
Steps for setup python2.5 django and satchmo on CentOS
# This post is HOW TO Install python2.5 and django and satchmo on CentOS
# You can copy this post to file and run: $ sudo sh this-post-text-file
# See also:
# http://www.perplexedlabs.com/2008/11/10/setup-python-25-mod_wsgi-and-django-10-on-centos-5-cpanel/
### Setup Python2.5 and setuptools
# Install gcc
yum -y install gcc
# Python2.5 + CentOS + ziplib, fix error: zipimport.ZipImportError: can’t decompress data; zlib not available
# for fix
# See also: http://brichotomy.com/post/49322472/python-2-5-zlib-on-centos-5
yum -y install zlib-devel
# fix: django.core.exceptions.ImproperlyConfigured: Error loading sqlite3 module: No module named _sqlite3
yum -y install sqlite-devel
# Setup python2.5.4 (before MUST setup zlib-devel). To avoid static link by python modules(e.g. mod_python) you should run configure script with "--enable-shared" option
cd /tmp
wget http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz
tar xvfz Python-2.5.4.tgz
cd Python-2.5.4
./configure --enable-shared
make
make install
# Enable to find your dyamic link liblary
echo /usr/local/lib > /etc/ld.so.conf.d/python2.5.conf
ldconfig
# Setup easy_install (setuptools)
cd /tmp
wget http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c9-py2.5.egg
sh setuptools-0.6c9-py2.5.egg
### Setup Django
# See also: http://docs.djangoproject.com/en/dev/topics/install/
yum -y install subversion
mkdir /home/apps
svn co http://code.djangoproject.com/svn/django/trunk/ /home/apps/django-trunk
ln -s /home/apps/django-trunk/django /usr/local/lib/python2.5/site-packages/django
ln -s /home/apps/django-trunk/django/bin/django-admin.py /usr/local/bin
### Setup Dependencies for Satchmo
# See also:http://www.satchmoproject.com/docs/svn/new_installation.html
easy_install-2.5 pycrypto
easy_install-2.5 http://code.enthought.com/enstaller/eggs/rhel/3/Reportlab-2.1.0001-py2.5.egg
easy_install-2.5 django-registration
cd /tmp
wget http://www.satchmoproject.com/snapshots/trml2pdf.tar.gz
tar xvfz trml2pdf.tar.gz
cp -R /tmp/trml2pdf/trml2pdf /usr/local/lib/python2.5/site-packages
easy_install-2.5 PyYAML
easy_install-2.5 --find-links=http://download.zope.org/distribution PILwoTk
cd /temp
wget http://banjo.assembla.com/spaces/threaded_multihost/documents/cN9MkM2jyr3Aayab7jnrAJ/download/django_threaded_multihost-1.3_0-py2.5.egg
easy_install-2.5 django_threaded_multihost-1.3_0-py2.5.egg
svn checkout http://django-app-plugins.googlecode.com/svn/trunk/ /home/apps/django-app-plugins
ln -s /home/apps/django-app-plugins/app_plugins /usr/local/lib/python2.5/site-packages/app_plugins
svn co http://sorl-thumbnail.googlecode.com/svn/trunk/sorl/ /home/apps/sorl
ln -s /home/apps/sorl /usr/local/lib/python2.5/site-packages/sorl
### Setup Satchmo
svn co svn://satchmoproject.com/satchmo/trunk /home/apps/satchmo-trunk
cd /home/apps/satchmo-trunk
python2.5 setup.py install
# setup compleeted, test correct
# first test:
# step 4 in http://www.satchmoproject.com/docs/svn/new_installation.html#installing-satchmo-into-your-path
# second test:
# cd /home/apps/satchmo-trunk/satchmo/projects/simple
# python2.5 manage.py runserver
# go to: http://localhost:8000, you can see simple shop
#
#if django running by mod_python we need upgrade mod_python for work with python2.5
#
# "apxs" is extension development framework for Apache web server. mod_python requires apxs
yum -y install httpd-devel
# mod_python; IMPORTANT: you must specify "--with-python"
cd /tmp
wget http://apache.mirrors.redwire.net/httpd/modpython/mod_python-3.3.1.tgz
tar xvfz mod_python-3.3.1.tgz
cd mod_python-3.3.1
./configure --with-python=/usr/local/bin/python2.5
make
make install
# add mod_python to Apache config and restart web server
echo LoadModule python_module /usr/lib/httpd/modules/mod_python.so\ > /etc/httpd/conf.d/python.conf
service httpd restart
# setup sqlite for python2.4
cd /tmp
wget http://oss.itsystementwicklung.de/download/pysqlite/2.5/2.5.5/pysqlite-2.5.5.tar.gz
tar xvfz pysqlite-2.5.5.tar.gz
cd pysqlite-2.5.5
python setup.py
# setup sqllite via easy_install for python2.4
uname -a
yum -y install python-devel
yum -y install sqlite-devel
cd /tmp
wget http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c9-py2.4.egg
sh setuptools-0.6c9-py2.4.egg
easy_install pysqlite
# alternative install setuptools
yum -y install python-setuptools
# install PIL
easy_install --find-links http://www.pythonware.com/products/pil/ Imaging
setup postgre
http://www.postgresonline.com/journal/index.php?/archives/45-An-Almost-Idiots-Guide-to-PostgreSQL-YUM.html
# You can copy this post to file and run: $ sudo sh this-post-text-file
# See also:
# http://www.perplexedlabs.com/2008/11/10/setup-python-25-mod_wsgi-and-django-10-on-centos-5-cpanel/
### Setup Python2.5 and setuptools
# Install gcc
yum -y install gcc
# Python2.5 + CentOS + ziplib, fix error: zipimport.ZipImportError: can’t decompress data; zlib not available
# for fix
# See also: http://brichotomy.com/post/49322472/python-2-5-zlib-on-centos-5
yum -y install zlib-devel
# fix: django.core.exceptions.ImproperlyConfigured: Error loading sqlite3 module: No module named _sqlite3
yum -y install sqlite-devel
# Setup python2.5.4 (before MUST setup zlib-devel). To avoid static link by python modules(e.g. mod_python) you should run configure script with "--enable-shared" option
cd /tmp
wget http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz
tar xvfz Python-2.5.4.tgz
cd Python-2.5.4
./configure --enable-shared
make
make install
# Enable to find your dyamic link liblary
echo /usr/local/lib > /etc/ld.so.conf.d/python2.5.conf
ldconfig
# Setup easy_install (setuptools)
cd /tmp
wget http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c9-py2.5.egg
sh setuptools-0.6c9-py2.5.egg
### Setup Django
# See also: http://docs.djangoproject.com/en/dev/topics/install/
yum -y install subversion
mkdir /home/apps
svn co http://code.djangoproject.com/svn/django/trunk/ /home/apps/django-trunk
ln -s /home/apps/django-trunk/django /usr/local/lib/python2.5/site-packages/django
ln -s /home/apps/django-trunk/django/bin/django-admin.py /usr/local/bin
### Setup Dependencies for Satchmo
# See also:http://www.satchmoproject.com/docs/svn/new_installation.html
easy_install-2.5 pycrypto
easy_install-2.5 http://code.enthought.com/enstaller/eggs/rhel/3/Reportlab-2.1.0001-py2.5.egg
easy_install-2.5 django-registration
cd /tmp
wget http://www.satchmoproject.com/snapshots/trml2pdf.tar.gz
tar xvfz trml2pdf.tar.gz
cp -R /tmp/trml2pdf/trml2pdf /usr/local/lib/python2.5/site-packages
easy_install-2.5 PyYAML
easy_install-2.5 --find-links=http://download.zope.org/distribution PILwoTk
cd /temp
wget http://banjo.assembla.com/spaces/threaded_multihost/documents/cN9MkM2jyr3Aayab7jnrAJ/download/django_threaded_multihost-1.3_0-py2.5.egg
easy_install-2.5 django_threaded_multihost-1.3_0-py2.5.egg
svn checkout http://django-app-plugins.googlecode.com/svn/trunk/ /home/apps/django-app-plugins
ln -s /home/apps/django-app-plugins/app_plugins /usr/local/lib/python2.5/site-packages/app_plugins
svn co http://sorl-thumbnail.googlecode.com/svn/trunk/sorl/ /home/apps/sorl
ln -s /home/apps/sorl /usr/local/lib/python2.5/site-packages/sorl
### Setup Satchmo
svn co svn://satchmoproject.com/satchmo/trunk /home/apps/satchmo-trunk
cd /home/apps/satchmo-trunk
python2.5 setup.py install
# setup compleeted, test correct
# first test:
# step 4 in http://www.satchmoproject.com/docs/svn/new_installation.html#installing-satchmo-into-your-path
# second test:
# cd /home/apps/satchmo-trunk/satchmo/projects/simple
# python2.5 manage.py runserver
# go to: http://localhost:8000, you can see simple shop
#
#if django running by mod_python we need upgrade mod_python for work with python2.5
#
# "apxs" is extension development framework for Apache web server. mod_python requires apxs
yum -y install httpd-devel
# mod_python; IMPORTANT: you must specify "--with-python"
cd /tmp
wget http://apache.mirrors.redwire.net/httpd/modpython/mod_python-3.3.1.tgz
tar xvfz mod_python-3.3.1.tgz
cd mod_python-3.3.1
./configure --with-python=/usr/local/bin/python2.5
make
make install
# add mod_python to Apache config and restart web server
echo LoadModule python_module /usr/lib/httpd/modules/mod_python.so\ > /etc/httpd/conf.d/python.conf
service httpd restart
# setup sqlite for python2.4
cd /tmp
wget http://oss.itsystementwicklung.de/download/pysqlite/2.5/2.5.5/pysqlite-2.5.5.tar.gz
tar xvfz pysqlite-2.5.5.tar.gz
cd pysqlite-2.5.5
python setup.py
# setup sqllite via easy_install for python2.4
uname -a
yum -y install python-devel
yum -y install sqlite-devel
cd /tmp
wget http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c9-py2.4.egg
sh setuptools-0.6c9-py2.4.egg
easy_install pysqlite
# alternative install setuptools
yum -y install python-setuptools
# install PIL
easy_install --find-links http://www.pythonware.com/products/pil/ Imaging
setup postgre
http://www.postgresonline.com/journal/index.php?/archives/45-An-Almost-Idiots-Guide-to-PostgreSQL-YUM.html
среда, 7 ноября 2007 г.
У устья реки Ориноко
У устья реки Ориноко,
Где волны ласкает туман
Индеец сидит одиноко
И курит старинный кальян.
В кальян тот отменнейших шышек
Индеец забил от души
В туманное небо все выше
Летит аромат анаши.
Кругом клубы дыма повисли
Взгляд словно залил мутный воск
И льются потоками мысли
В объятый каннабисом мозг
Индеец тот ищет ответы
И где-то за гранью миров
Он слушает предков советы
И мудрые речи богов
Он в мыслях летит в бесконечность,
Пространства и времени нет
Секунда длинее чем вечность
Молекулы больше планет
У устья реки Ориноко,
Где волны ласкает туман
Мне старый и мудрый индеец
Тех шышек отсыпал стакан.
Где волны ласкает туман
Индеец сидит одиноко
И курит старинный кальян.
В кальян тот отменнейших шышек
Индеец забил от души
В туманное небо все выше
Летит аромат анаши.
Кругом клубы дыма повисли
Взгляд словно залил мутный воск
И льются потоками мысли
В объятый каннабисом мозг
Индеец тот ищет ответы
И где-то за гранью миров
Он слушает предков советы
И мудрые речи богов
Он в мыслях летит в бесконечность,
Пространства и времени нет
Секунда длинее чем вечность
Молекулы больше планет
У устья реки Ориноко,
Где волны ласкает туман
Мне старый и мудрый индеец
Тех шышек отсыпал стакан.
понедельник, 24 сентября 2007 г.
Firefox и его дополнения (add-ons)
За свою бытность пользования браузерами были перепробованы IE, Opera, MyIE. После выхода Firefox 2.0 стал постоянно пользоваться им, объективности для - статья "Сравнение Web браузеров" (на английском).
К стандартному дистрибутиву у меня установлены дополнения:
К стандартному дистрибутиву у меня установлены дополнения:
- Image like Opera позволяет управлять правилама загрузки картинок для каждой закладки (как в Opera'е), "Не загружать изображения, Загружать только из кеша, Загружать с этого сайта, Загружать все).
- Mac Fox II Graphite тема после применения которой Firefox под Widows выглядит как под MacOS.
- Google toolbar for Firefox это, быстрый поиск в Google, доступ к закладкам, переводчик (достаточно подвести курсор к слову).
- Minimize to tray дает возможность Firefox'у сворачиваться в трей.
- Web Developer предоставляет много разнообразных возможностей для web разработчика, жизненно необходим.
четверг, 20 сентября 2007 г.
Основатели в действии: Как создавались новые компании
Основной урок: Главное в предпринимательстве – это тактика, дерзость, незнание того, что надо делать “вот так”, и способность обходиться недостаточной суммой денег.
Вы будете дико смеяться над этими сюжетами и думать, не лучше ли было назвать эту книгу “Flounders at Work” (”Недотепы в действии”).
Перевод обзорной статьи Гая Кавасаки о книге “Основатели в действии: как создавались новые компании ” (Founders at Work: Stories of Startups’ Early Days) ISBN: 1590597141.
Купить книгу на Amazon
Скачать книгу бесплатно на Deposit Files.
Вы будете дико смеяться над этими сюжетами и думать, не лучше ли было назвать эту книгу “Flounders at Work” (”Недотепы в действии”).
Перевод обзорной статьи Гая Кавасаки о книге “Основатели в действии: как создавались новые компании ” (Founders at Work: Stories of Startups’ Early Days) ISBN: 1590597141.
Купить книгу на Amazon
Скачать книгу бесплатно на Deposit Files.
Подписаться на:
Сообщения (Atom)