From DreamHost
Jump to: navigation, search
DreamHost does not directly support any of the features described on this page and is not responsible for keeping this content updated or accurate. Use at your own risk!
There may be additional information on the talk page.

GraphViz is open source graph visualization software. Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. Automatic graph drawing has many important applications in software engineering, database and web design, networking, and in visual interfaces for many other domains. GraphViz will take a script file as input and generate an image from the information given.

Installing GraphViz on Dreamhost servers

Replace with your own domain name throughout the instructions below.

  • 1. Establish a secure shell (SSH) connection to your server using software such as PuTTY.
  • 2. From inside your home folder, create a temporary folder (in our example I've called it gvtemp):
$ cd $HOME
$ mkdir gvtemp
$ cd gvtemp
  • 3. Download and extract GraphViz:

If you get errors about 'lperl not found' and 'lruby not found', make sure you have the disable switches. The extension for MediaWiki doesn't seem to need them.

$ wget
$ tar xvzf graphviz-2.26.3.tar.gz
$ cd graphviz-2.26.3
$ ./configure --prefix=$HOME/local --disable-perl --disable-ruby
$ make
$ make install
$ make clean
  • 4. Remove the temporary files no longer needed:
$ cd $HOME
$ rm -r gvtemp
  • 5. To test your GraphViz installation and check its working ok, create a file with the following contents, save it as test.txt into your $HOME/ folder.
digraph prof {
  size="16,14"; ratio = fill;
  node [style=filled];
  start -> main [color="0.002 0.999 0.999"];
  start -> on_exit [color="0.649 0.701 0.701"];
  main -> sort [color="0.348 0.839 0.839"];
  main -> merge [color="0.515 0.762 0.762"];
  sort [color="0.408 0.498 1.000"];
  merge [color="0.603 0.258 1.000"];
  main [color="0.650 0.200 1.000"];
  on_exit [color="0.650 0.200 1.000"];

Next, from your shell prompt run the following commands to process your GraphViz script:

$ cd $HOME/
$ $HOME/local/bin/dot -Tpng -o test.png test.txt

Then in your webbrowser, navigate to and hopefully you should see an image with 5 nodes.

Installing the GraphViz MediaWiki Extension

Once GraphViz is installed you can add the GraphViz MediaWiki extension to your MediaWiki install by following the instructions on MediaWiki's Extension:GraphViz page (you could also check out the talk page for more details and tips). After installation you'll need to edit LocalSettings.php, and add the following:

$wgGraphVizSettings->dotCommand = "$HOME/local/bin/dot";