#title byteflow blog engine The [[http://byteflow.su/|byteflow]] engine is written under BSD License, so you can use and distribute it absolutely for free. Byteflow is a blog engine, written on Python, using Django. Why should you choose it over competitors? It has very clean codebase and developers, which are struggling to keep it so. It has a lot of cool features, which you can't get in other blog engines or will get with difficulty (consider feed by union of tags, eh?). = Installing byteflow in hardy using nginx webserver = Note: The backslash {{{\}}} means that the command is not finished and is continuing in the next line. == What we need == * [[HardyHeron|Hardy Heron]] - Fresh Hardy install * [[http://byteflow.su/|byteflow]] - byteflow from mercurial repository * [[http://www.djangoproject.com/|django]] - The python based Django framework from subversion repository == Update hardy == {{{ sudo aptitude update sudo aptitude safe-upgrade }}} == Installing needed software from the Ubuntu repository == {{{ sudo aptitude install python-imaging nginx python-openid \ python-beautifulsoup python-flup sqlite3 sqlite3-doc \ python-pysqlite2 mercurial subversion python-docutils }}} == Preconfigure system == {{{ cd mkdir nonroot mkdir sqlite3 sudo mv nonroot /usr/local/src/nonroot sudo mv sqlite3 /var/local/sqlite3 }}} == Install byteflow == {{{ cd /usr/local/src/nonroot hg clone http://hg.piranha.org.ua/byteflow/ cd byteflow cp settings_local.py.template settings_local.py }}} Edit settings_local.py with your favorite text editor: {{{ DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = '/var/local/sqlite3/byteflow.sqlite3' DATABASE_USER = '' DATABASE_PASSWORD = '' }}} Now you can also alter {{{BLOG_NAME, TAGLINE, DEFAULT_FROM_EMAIL}}} with your settings. You can add the var {{{REMOVE_WWW = False}}} if you want that bytflow don't remove the www from your domain. == Configure nginx webserver == === /etc/nginx/nginx.conf === {{{sudo vi /etc/nginx/nginx.conf}}} add the line {{{use epool}}} in the events section. {{{ events { worker_connections 1024; use epoll; } }}} === /etc/nginx/sites-available/default === Change the parameter {{{listen 80;}}} to {{{listen 8089;}}}. This way we can still test the default static test site later to test if the server is available. === /etc/nginx/sites-available/web80 === We create no the file /etc/nginx/sites-available/web80. I usually name the file after purpose+listenPort, so I have named my file web80. {{{ vi /etc/nginx/sites-available/web80 }}} with the following content: {{{ server { # We listen on port 80 listen 80; server_name localhost; # access and error log for our site access_log /var/local/log/localhost.access.web80.log; error_log /var/local/log/localhost.error.web80.log; # Configure redirect for our fastcgi server # The fastcgi server later runs on localhost Port 8080 location / { # to fastcgi server #fastcgi_pass unix:{project_location}/log/django.sock; fastcgi_pass 127.0.0.1:8080; fastcgi_param PATH_INFO $fastcgi_script_name; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param QUERY_STRING $query_string; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_pass_header Authorization; fastcgi_intercept_errors off; } # Alias for static content like themes location /static { alias /usr/local/src/nonroot/byteflow/static; expires 10d; } # Alias for python contrib.admin stuff, needed for admin interface location /admin-media { alias /usr/local/src/nonroot/django-trunk/django/contrib/admin/media; expires 10d; } } }}} Now after we have configured our site for nginx we can activate it. We simply put a link betwen {{{/etc/nginx/site-available/web80}}} and {{{/etc/nginx/sites-enabled/web80}}} {{{ sudo ln -s /etc/nginx/sites-available/web80 /etc/nginx/sites-enabled/web80 }}} == Install the python Django Framework == We are going to install the Django Framework from source because the Django and byteflow software is under heavy development right now and have not reached 1.0 yet. So it make sense to install this package as well from source. {{{ cd /usr/local/src/nonroot svn co http://code.djangoproject.com/svn/django/trunk/ django-trunk cd django-trunk sudo ln -s /usr/local/src/nonroot/django-trunk/django /usr/lib/python2.5/site-packages/django sudo ln -s /usr/local/src/nonroot/django-trunk/django/bin/django-admin.py /usr/local/bin }}} The last two lines are for populate the django framework to the local python installation and the last for easy access of the django-admin.py utility. == Final config of byteflow == Now we have to generate the tables in our sqlite3 database. {{{ cd /usr/local/src/nonroot/byteflow ./manage.py syncdb }}} You are going to be prompted for a user and password. Create the user and don't forgett the password! == Start the fcgi server and restart nginx == Finally we can start the fcgi server and restart the nginx webserver. Hope it will work! {{{ sudo mkdir /var/local/log/ -p python manage.py runfcgi host=127.0.0.1 port=8080 --settings=settings \ pidfile=/var/local/log/byteflow_fcgi_server.pid }}} {{{ sudo /etc/init.d/nginx restart }}} Your blog should be now on port 80 of your webserver. You can log in with the user and password mentioned in the "Final config of byteflow" section. Have fun! == The End == ---- CategoryDocumentation