一、安装
yum -y install graphviz
二、测试
1、测试是否安装成功
[root@localhost ~]# which dot
/usr/bin/dot
[root@localhost ~]# dot -V
dot - graphviz version 2.30.1 (20150306.0020)
三、测试是否能够画图
# 1) 创建test.dot文件
digraph G {
rankdir=LR;
a -> b;
b -> c;
subgraph x{
rank=same;
b->d;
}
subgraph y{
//rank = same;
d->e;
}
subgraph z{
rank=same;
c->e;
}
}
# 2) 画图
dot test.dot -Tpng -o test.png