简体   繁体   English

如何安装wkhtmltopdf shell实用程序?

[英]How to install the wkhtmltopdf shell utility?

I have a dedicated WHM / cPanel server with root access. 我有一个具有root访问权限的专用WHM / cPanel服务器。

I am trying to install a shell utility (wkhtmltopdf) to /usr/local/bin/ so that I can call it from within php using exec. 我正在尝试将Shell实用程序(wkhtmltopdf)安装到/ usr / local / bin /,以便可以使用exec从php中调用它。

I've got a handle on the php stuff. 我已经掌握了php的东西。 But I am completely new to all server / sys admin related things. 但是我对所有与服务器/系统管理员相关的事物都是全新的。

I have checked out the instructions on http://code.google.com/p/wkhtmltopdf/ - but these assume a higher level of knowledge than I currently have. 我已经查看了http://code.google.com/p/wkhtmltopdf/上的说明,但是这些说明比我目前拥有的知识水平更高。

I am wondering if anyone can help explain, to a complete newbie, how to go about installing wkhtmltopdf. 我想知道是否有人可以帮助一个完整的新手解释如何安装wkhtmltopdf。

Thanks (in advance) for your help. 在此先感谢您的帮助。

Depends a bit on your server and system. 取决于您的服务器和系统。 Do you have root/sudo access? 您具有root / sudo访问权限吗? Is it an ubuntu? 是ubuntu吗?

sudo apt-get install wkhtmltopdf

Installed it for me nicely and then you can do symbolic links to point to the executable, but this all depends on the environment. 很好地为我安装了它,然后您可以进行符号链接以指向可执行文件,但这完全取决于环境。 This is kind of a broad question, I'll edit the answer if you want more info but it's hard to write such a generic answer that it would work in any case :) Also perhaps check out How to install wkhtmltopdf on a linux based (shared hosting) web server 这是一个广泛的问题,如果您需要更多信息,我将编辑答案,但是很难写出在任何情况下都可以使用的通用答案:)也许还可以查看如何在基于Linux的系统上安装wkhtmltopdf(共享托管)Web服务器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM