This post will cover installing PhantomJS on cPanel with root access.
The documentation at http://phantomjs.org/build.html is all that is needed. I am only blogging this to let others know it did not break my cPanel server.
1. Download and install the dependencies
I already had openssl-devel, make, gcc, abd gcc-c++
[root@demos opt]# yum -y install flex bison gperf ruby freetype-devel fontconfig-devel libicu-devel sqlite-devel libpng-devel libjpeg-devel openssl-devel, make, gcc, abd gcc-c++ [root@demos opt]# service httpd start
2. Download and unzip latest source code from http://phantomjs.org/download.html
[root@demos opt]# wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.0.0-source.zip [root@demos opt]# unzip -q phantomjs-2.0.0-source.zip
3. Enter the phantomjs-2.0.0 directory and run './build';
[root@demos phantomjs-2.0.0]# ./build.sh
You will see a notice saying it will 30 minutes to several hours. It only took about 20 minutes on my server.
When build completes and you are still in the phantomjs-2.0.0 directory, you can run 'bin/phantomjs' to test and you should get a prompt.
4. Create a symlink to put phantomjs in everyone's path:
[root@demos phantomjs-2.0.0]# ln -s /opt/phantomjs-2.0.0/bin/phantomjs /usr/bin/phantomjs
As stated in the documentation at
"This produces a build bin/phantomjs. This is an executable; it can be moved to a different directory (e.g. /usr/local/bin) or another machine."
So you could just move it to /usr/bin as well.
This post will cover setting Google for your namesever resolvers in CentOS.
It's a simple task, but my OnApp does not set them for my CentOS templates for some reason.
If they have not been set, the first time you will likely notice is when you go to use yum and it throws PYCURL errors.
Log in as root via SSH and issue 'vi /etc/resolv.conf' to edit your resolv.conf file:
[root@david etc]# vi /etc/resolv.conf
If, like me, you have no nameserver resolvers set, you will see something like this:
# Automatically generated by OnApp (3.0.8) domain davidghedini.com ~ ~
Hit "i" for insert and add the Google Nameservers (188.8.131.52 and 184.108.40.206) as shown below, one per line:
# Automatically generated by OnApp (3.0.8) domain davidghedini.com nameserver 220.127.116.11 nameserver 18.104.22.168
Hit Escape and then ':wq' to save your changes
WHM 11.32.3 (build 19)
CENTOS 5.8 x86_64 xenpv
ProFTPD Version 1.3.4
I was required to change the user name on an existing cPanel account in WHM.
I did this via Modify Account and all seemed well.
I then noticed that ProFTP had gone offline.
Attempting to restart from WHM gave the following:
ftpserver has failed, please contact the sysadmin.
So, checking Messages for proftpd:
root@s27 [~]# cat /var/log/messages | grep proftpd
The following error was found:
Jun 9 19:39:01 s27 proftpd: Fatal: AuthUserFile: unable to use relative path for AuthUserFile '\/etc\/proftpd/username'. on line 187 of '/etc/proftpd.conf'
When the user name was changed, backward slashes were added to the AuthUserFile path (AuthUserFile \/etc\/proftpd/username).
Opening proftp.conf in vi:
<VirtualHost 22.214.171.124> ServerName ftp.domain.com AuthUserFile \/etc\/proftpd/username MaxClients 3 "Sorry, this ftp server has reached its maximum user count (%m). Please try again later" DirFakeGroup On ftpgroup DirFakeUser On ftpuser DefaultRoot ~ <IfModule mod_tls.c> TLSEngine on TLSRequired off TLSRSACertificateFile /etc/ftpd-rsa.pem TLSRSACertificateKeyFile /etc/ftpd-rsa-key.pem TLSVerifyClient off TLSCipherSuite HIGH:MEDIUM:+TLSv1:!SSLv2:+SSLv3 </IfModule> <Directory /> AllowOverwrite on HideGroup wheel HideUser root </Directory> <Anonymous /home/securelo/public_ftp> UseFtpUsers on RequireValidShell off UseFtpUsers on RequireValidShell off User ftp Group ftp UserAlias anonymous ftp DisplayLogin welcome.msg # DisplayChdir .message true <Limit WRITE> DenyAll </Limit> <Directory incoming> <Limit STOR> AllowAll </Limit> <Limit WRITE READ> DenyAll </Limit> </Directory> </Anonymous> </VirtualHost>
I removed the backward slashes from the AuthUserFile path (\/etc\/proftpd/username) and was able to start ProFTP.
HTH someone else....