Vps Hetzner

sketch > vps@hetzner
(For VPS page, see here

debian-minimal-64 bit. Osszehanyta mindennel a lamp konfig, ezert kellett a minimalt feltenni.

Engedelyeztem a backports-ot:
deb http://www.backports.org/debian lenny-backports main contrib non-free
deb-src http://www.backports.org/debian lenny-backports main contrib non-free

Ezeket telepitettem:

#mc
apt-get install mc 

#killall
psmisc

Nginx konfig

UWSGI

uwsgi-t is fell kell tenni.
wget http://ftp.de.debian.org/debian/pool/main/u/uwsgi/uwsgi_0.9.8.3-1.dsc
wget http://ftp.de.debian.org/debian/pool/main/u/uwsgi/uwsgi_0.9.8.3.orig.tar.gz
wget http://ftp.de.debian.org/debian/pool/main/u/uwsgi/uwsgi_0.9.8.3-1.debian.tar.gz

Kicsomagoltam, bemasoltam a [debian ] konyvtarat, 
de debian csomagot nem sikerult gyartanom. (debuild -i -us -uc)

igy sikerult:
apt-get install build-essential python-dev libxml2-dev
make -f Makefile.Py25

ujrainditottam nginx-et:
/etc/init.d/nginx restart

Flask

wget http://pypi.python.org/packages/source/F/Flask/Flask-0.8.tar.gz
tar -xzvf Flask-0.8.tar.gz
apt-get install python-setuptools #easyinstall
easy_install Flask-0.8

kiprobalni:
python hello.py
ahol a hello.py:
from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello World!"

if __name__ == "__main__":
    app.run()

Inditas:
./uwsgi --uid 33 --socket 127.0.0.1:3031 --file /home/lama/shopnew_arcol_hu/hello.py --callable app --pidfile /tmp/uwsgi.pid --daemonize /tmp/uwsgi.log --touch-reload /home/XXX/reload.txt --master --processes 2

SQL-Alchemy

[sudo] easy_install flask_sqlalchemy

Hatterben futtatas

Valamit a hatterben futtatni (tehat, ha ssh-bol is kilepek fusson) igy kell:
nohup /usr/bin/python code.py >log.txt 2>&1 &

Vagy screen.

Planet Venus

apt-get install python-beautifulsoup
apt-get install python-libxslt1
apt-get install python-genshi
apt-get install python-librdf
# apt-get install python-django ???
 File "/usr/lib/python2.6/HTMLParser.py", line 115, in error
    raise HTMLParseError(message, self.getpos())
HTMLParseError: malformed start tag, at line 1, column 14

Ugy nez ki, hogy a BeautifulSoup 3.1-es szar, es 3.2-es kell.
Ezt csinaltam:
wget http://www.crummy.com/software/BeautifulSoup/download/3.x/BeautifulSoup-3.2.0.tar.gz
tar -xzvf BeautifulSoup-3.2.0.tar.gz 
sudo mv BeautifulSoup-3.2.0/BeautifulSoup.py /usr/share/pyshared/BeautifulSoup.py 
sudo mv BeautifulSoup-3.2.0/BeautifulSoupTests.py /usr/share/pyshared/BeautifulSoupTests.py 
rm -rf BeautifulSoup-3.2.0

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-NoDerivs 3.0 License