[DB-SIG] Remote Installation of Mysqldb

Tom Bryan tbryan@starship.python.net
Mon, 3 Apr 2000 05:02:12 -0400 (EDT)


On Sun, 2 Apr 2000, Wes Monk wrote:

> Does anybody have any advice how to remotely install the mysqldb
> module with only ftp and web (cgi-bin and normal page areas) access to
> a server?

Use os.popen or popen2 (I assume that the platform is Unix since they're
running MySQL). You should be able to build the library extension and
display the results of your build on your web browser.  Do you know what
OS they're running.

If you're not sure how to do this, then you might want to take the thread
to comp.lang.python or private e-mail because the thread could get long,
but it won't have much relation to db-sig's charter (other than the fact
that you're building Mysqldb).

Basically, you'll be ftping Python scripts to your upload directory where
you've already got the mysql tarball.  You then make calls to gzip and tar
to unpack the tarball, sending the output and error information to a file.
Do whatever you normally have to do to publish the file you just produced,
if anything.  Point your web browser to that file.  Look at the filenames
that were just unpacked from the tarball.  Point your web browser to the
README/installation instructions.  Read those to see how to build the
extension.  Then do the same thing that you did to 

When you're done with the build, you'll want to make the extension files
readable by the nobody (or whatever account runs the http process) account
but not writable by that account. You can delete the build tree except for
the pieces that are actually used at run time (use os.unlink or
shutil.rmtree).  Don't forget to delete the tarball since it also takes up
your (presumably limited) hard drive space.  Note that compiling some
packages requires a lot of space.  You could conceivably overrun your
space quota just trying to compile the library.

If you run into trouble on the compile or aren't even sure how to run/use
things like tar and gzip, then you're going to need a lot of guidance.
Take the thread to comp.lang.python.

Of course, the installation will be local to your directory, and you'll
have to configure the installation that way.  Have you checked to see
whether any other user has already built Mysqldb?  Maybe you could just
use their .so file. :-)

---Tom