hsdn / lg

PHP Version of BGP Looking Glass script, based on the Perl sources: https://github.com/Cougar/lg
Other
41 stars 33 forks source link

Install GraphViz tools on CentOS 7/cPanel #25

Closed yapjackson closed 4 years ago

yapjackson commented 5 years ago

Hi, We have upgraded from CentOS 6 to 7. But now, it seems even though GraphViz tools is installed.

Anyone has working instructions how to install GraphViz tools on CentOS 7? Take note NOT Perl Image_GraphViz as that was installed.

yapjackson commented 5 years ago

Still can't find any GraphViz repo for CentOS 7. :(

yapjackson commented 5 years ago

this project seems like dead :(

justkeepquiet commented 5 years ago

Hi, The project is not dead.

When installing on CentOS 7 I did not have any problems.

To install GraphViz package use command: yum install graphviz

To install php Pear package for GraphViz use commands: pear install Image_GraphViz or yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install php-pear-Image-GraphViz

For more info, please see: https://fedoraproject.org/wiki/EPEL https://centos.pkgs.org/7/centos-x86_64/graphviz-2.30.1-21.el7.x86_64.rpm.html https://centos.pkgs.org/7/epel-x86_64/php-pear-Image-GraphViz-1.3.0-7.el7.noarch.rpm.html

yapjackson commented 5 years ago

Hi!

But yum update only provide the old graphviz version, which couldn't work as we know we need newer version like 2.4 above for the graph to work properly?

graphviz x86_64 2.30.1-21.el7

justkeepquiet commented 5 years ago

We use version 2.30.1-21.el7 on our lg server. This version is exists in CentOS standard repo.

[root@server ~]# yum list | grep graphviz
graphviz.x86_64                            2.30.1-21.el7              @base
graphviz.i686                              2.30.1-21.el7              base
...

[root@server ~]# pear list | grep GraphViz
Image_GraphViz   1.3.0   stable
yapjackson commented 5 years ago

Yes, everything is the same. But the graph is showing empty. Any logs we can check?

justkeepquiet commented 5 years ago

Probably php does not have permission to run the graphviz command. Try to run php script from the root user.

yapjackson commented 5 years ago

Unfortunately we still got no idea, no PHP error is showing, just no graph. Any way we can get the error output to anywhere?

justkeepquiet commented 5 years ago

If there is no permission to execute the command, the error is not displayed.

yapjackson commented 5 years ago

Hi, can you advice what command CLI can we run to test the graph?

justkeepquiet commented 5 years ago

You can use this script https://github.com/hsdn/lg/issues/6#issuecomment-354226734 for tests with CLI.

yapjackson commented 5 years ago

running as root it shows successful test. Let me test further.

yapjackson commented 5 years ago

I run the graphviz_test.php as root from CLI, it works. I then tried changing the php file to root, apache and even nobody. but none of them works. The page shows empty still. Do you have any advice? :O

justkeepquiet commented 5 years ago

Check open_basedir parameter in your php.ini or VirtualHost configuration. You need provide access to graphviz binary or disable open_basedir.

Example of VirtualHost configuration:

php_admin_value open_basedir none
yapjackson commented 5 years ago

Thanks hsdn. Unfortunately all the values are set to none. The most frustrating is we cannot see any error thrown by the php. I will try abit more if still can't we will just leave it without the graph. Thanks again!

tryhardtheis commented 4 years ago

hi, does this application support mikrotik os version 6.44.6 ?