Thanks so much for pointing me in the right direction, Dane. Things are
going very well now. There are a couple security complications on fedora
(and redhat) that might trip people up so I've attached my (ugly) notes
below. Maybe they'll help someone out. Also I guess it makes sense after
thinking about it for half a second, but you have to install the -devel
packages to build, not the regular ones. This is all new to me so
hopefully this can help out some other newbies.
My next question is on upgrading my xml files. For 0.7 I used cascadenik
but, it looks like carto's taking over that role for 2.0. I just wanted to
be sure it was before going down that path.
Thanks again,
Jeff
#### MAPNIK
cd /usr/local/src
sudo git clone https://github.com/mapnik/mapnik.git
cd mapnik
sudo chown -R user:user /usr/local/src/mapnik/
#to build from source there are more dependencies
yum install-boost-regex boost-system boost-python boost-filesystem
boost-thread boost-devel
# yum install mapnik mapnik-devel mapnik-python
yum install proj-epsg
yum install gdal
yum install gcc gcc-c++
yum install gsl
yum install icu
yum install proj-devel
yum install libtool-ltdl-devel
yum install libicu-devel
yum install sqlite-devel
yum install libxml2-devel
yum install gdal-devel
yum install libtiff-devel
yum install pycairo-devel
sudo yum install python-setuptools
easy_install jonpy
easy_install lxml
easy_install ipython
$ easy_install nik2img
$ easy_install Nikweb
$ easy_install nose
$ easy_install numscons
$ easy_install readline
$ easy_install PIL
yum install libtool-ltdl
sudo python scons/scons.py configure INPUT_PLUGINS=shape,gdal,ogr,sqlite
make
sudo make install
there's a bug where the mapnik python packages can't be found
- Create /etc/ld.so.conf.d/mapnik.conf with contents: /usr/local/lib64
- sudo ldconfig
mapnik should now be accessible from inside python
#### TILECACHE
http://mapnik-utils.googlecode.com/svn/example_code/tilecache/readme.txt
# Get apache going with mod_python
http://tilecache.org/docs/README.html
# Important dirs/files
/var/www/html
/var/lib/tiles
./etc/httpd/conf/httpd.conf
# Install tilecache on apache
yum install httpd # /var/www/html
yum install mod_python
allow port 80 in firewall
cd /usr/local/src
curl http://www.tilecache.org/tilecache-2.11.tar.gz | tar zxf -
sudo cp -r tilecache-2.11/ /var/www/html/
sudo mkdir /var/lib/tiles
change tilecache.cfg
[cache]
type=GoogleDisk
base=/var/lib/tiles
back up http.conf
edit httpd.conf
### Make the below additions to http.conf ###
# Add load instructions for mod_python
LoadModule python_module libexec/apache2/mod_python.so
# Add mod_python directive
<Directory "/var/www/html/test">
AddHandler mod_python .py
PythonHandler mptest
PythonDebug On
</Directory>
/var/www/html/test/mptest.py
from mod_python import apache
def handler(req):
req.content_type = "text/plain"
req.write("Hello World!")
return apache.OK
### Make the below additions to http.conf ###
AddHandler python-program .py
PythonHandler TileCache.Service
PythonPath "['/var/www/html/tilecache-2.11'] + sys.path"
PythonOption TileCacheConfig
"/var/www/html/tilecache-2.11/tilecache.cfg"
PythonDebug Off
chown -R apache:apache /var/www/html/
sudo semanage fcontext -a -t httpd_sys_rw_content_t /var/lib/tiles
restorecon -R -v /var/lib/tiles
sudo semanage fcontext -a -t httpd_sys_rw_content_t
"/var/www/html/tilecache-2.11(/.*)?"
sudo setsebool -P httpd_can_network_connect_db 1
On Fri, Mar 23, 2012 at 8:23 PM, Dane Springmeyer <d
...@dbsgeo.com> wrote:
> Hi Jeff,
> New mailing list is at http://mapnik.org/contact/.
> But, I'll answer below...
> On Mar 23, 2012, at 9:21 AM, Jeff Scott wrote:
> Hi everyone, I'm new to mapnik 2 and I'm having a couple issues that I
> could use some help with.
> I'm trying to get mapnik 2 running on fedora 15 using mysql as the primary
> datasource. It looks like mapnik doesn't have a way to connect natively so
> I have to use the ogr plugin for that, right?
> Right, ogr plugin would be the only way.
> To do that I think I have to build from source,
> It depends on whether fedora packages build that plugin by default. Its
> sounds like you've found they do not, but they could and should.
> but when I run "sudo scons/scons.py configure
> INPUT_PLUGINS=shape,gdal,ogr,sqlite" I get a bunch of missing dependencies,
> including 6 boost packages which I can see are installed.
> can you http://dpaste.com your 'config.log' It should contain more detail
> about why the boost packages are not valid.
> The most likely thing is that you are missing the development headers,
> which likely have their own packages.
> So I guess my first question is: do I need to build from source to be able
> to connect to mysql?
> You'll need an ogr/gdal library built with mysql support. You should test
> this FIRST before getting mapnik going. Then if your ogr/gdal does have
> mysql support, then you should be good to go if you compile the Mapnik OGR
> plugin.
> And if so, is there something obviously wrong about what I'm doing?
> Thanks for any insights you might have,
> Jeff
> _______________________________________________
> Mapnik-users mailing list
> Mapnik-us...@lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/mapnik-users