Issue
I am trying to install wkhtmltopdf - Removed - via the Linux Terminal using the SSH Access provided by cPanel (with the recommended program PuTTy). The previous link gives commands that should install wkhtmltopdf the server via the terminal. link I have practically tried all the commands in the previous link and am consistently obtaining errors like:
Whenever I use either the sudo or su or yum command like this:
sudo rpm -i wkhtmltox-0.12.6-1.centos7.x86_64.rpm
yum rpm -i wkhtmltox-0.12.6-1.centos7.x86_64.rpm
-bash: sudo: command not found
-bash: yum: command not found
QUESTION: Does anyone know how I can configure cPanel so that I can run commands like sudo, su or yum over SSH (via PuTTy)? Is it a configuration and/or permission issue or possibly something else that isn't allowing me to do so? How might I go about configuring bash if indeed it needs to be configured in my case?
Solution
If you cannot log in to your cPanel server as the root user yourself, it is literally impossible for you to install that software. Based upon the kernel version shown by uname
in the comments, your server is a CloudLinux server which means that your account is securely locked down by CageFS and you cannot access administrative features required to install software on your own.
You must do one of the following to move forward:
- Use software that does not require administrative access to install and use. I found this PHP libarary that appears to be capable of what you need, however, you would need to be able to write a minimal amount of PHP code to use it. They have some good examples. This option is the best of the three and will by far require the least amount of time dedication to get the end result you're looking for.
https://github.com/spipu/html2pdf/blob/master/doc/install.md
OR
- Contact your hosting provider (who are the people who have root access) and ask them if they would install the software for you. It is incredibly unlikely that they will do this for you, so do not be disappointed when they say no. They may however provide you with a server option of thiers that you could upgrade to which would allow you to obtain root access.
OR
- Purchase a VPS or Cloud server where you have full root access. Then purchase a cPanel license from store.cpanel.net. Install cPanel and configure it to meet your needs. Then you can install whatever software you want. However, I would like to stress that this option requires that you either put in the time and effort to learn enough systems administration concepts to manage a Linux server on your own, or you would need to hire a systems administrator to do this for you. cPanel provides a vast number of automations and features that allow a systems administrator to very easily manage a large number of services with minimal effort. However, there still is a lot to learn if you are not already familiar with Linux Systems administration.
Answered By - user16354366