Showing posts with label debian. Show all posts
Showing posts with label debian. Show all posts

Monday, September 6, 2010

distutils/setuptools python setup.py install -> automatic .deb generation

I used the python-stdeb in the ubuntu 10.04 repo to install itself using the
newest version from the git repo:

http://github.com/astraw/stdeb.git

Steps:

1) Add the following to ~/.pydistutils.cfg:

vvvvvvvvvvvvvvvv
[global]
command-packages: stdeb.command
^^^^^^^^^^^^^^

2) If necessary, edit a stdeb.cfg file which contains the options for debian/control.
The stdeb git repo already has a sensible stdeb.cfg file, but for another project,
the following might be appropriate:

[DEFAULT]
Depends: python-numpy
XS-Python-Version: >= 2.6
Provides: python-myproject


3) python setup.py bdist_deb

4) dpkg -i deb_dist/python-stdeb_0.6.0+git-1_all.deb

NB: comparing that .deb
with the one in the
apt cache:
/var/cache/apt/archives/python-stdeb_0.5.1-1_all.deb

Shows similar install paths ... so I think everythings ok

NB:
Another possibility would be:
$ sudo checkinstall --install=no python setup.py install

But I suppose stdeb is more savvy in its pythonic ways ...

Friday, May 7, 2010

MySQL server on Ubuntu or debian

To setup a mysql server on my ubuntu 9.10 box, I followed this guide:

http://library.linode.com/databases/mysql/ubuntu-9.10-karmic

But connecting from another host gave me the following error:

$ mysql -u mysqluser -p --host=myhost.com

ERROR 2003 (HY000): Can't connect to MySQL server on 'myhost.com' (111)

http://dev.mysql.com/doc/refman/5.1/en/access-denied.html

The above link indicates this is a network error.

http://www.aboutdebian.com/database.htm

Referring to the above link, I found to enable access I needed to edit /etc/mysql/my.cnf, specifically, change the bind-address from 127.0.0.1:

#bind-address = 127.0.0.1
bind-address = myhost.com

and restart mysqld:

$ /etc/init.d/mysql restart


Other useful MySQL links:

Adding users, etc.

MYSQL Docs - Access Privilege System

MySQL and SSL