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
This post will cover installing VNC with GNOME Desktop on a remote server running CentOS 6.
Installation has changed a bit since CentOS 5, but is still simple and straight forward.
[root@demo ~]# yum -y install tigervnc-server
This used to be yum groupinstall "X Window System" "GNOME Desktop Environment", but is now simply:
yum groupinstall "X Window System" "Desktop"
[root@demo ~]# useradd david [root@demo ~]# passwd david Changing password for user david. New password: Retype new password: passwd: all authentication tokens updated successfully. [root@demo ~]# su - david
[david@demo ~]$ vncpasswd Password: Verify: [david@demo ~]$
[david@demo ~]$ vncserver :1 xauth: creating new authority file /home/david/.Xauthority New 'demo.domain.net:1 (david)' desktop is demo.domain.net:1 Creating default startup script /home/david/.vnc/xstartup Starting applications specified in /home/david/.vnc/xstartup Log file is /home/david/.vnc/demo.domain.net:1.log [david@demo ~]$
[david@demo ~]$ vncserver -kill :1
In /etc/sysconfig/vncservers, add a line for each user.
NOTE: if you if you need to install Oracle software, use geometry 1024x768.
You can also do this via the shell using: vncserver :1 -geometry 1024x768 -depth xx
# The VNCSERVERS variable is a list of display:user pairs. # # Uncomment the lines below to start a VNC server on display :2 # as my 'myusername' (adjust this to your own). You will also # need to set a VNC password; run 'man vncpasswd' to see how # to do that. # # DO NOT RUN THIS SERVICE if your local area network is # untrusted! For a secure way of using VNC, see this URL: # http://kbase.redhat.com/faq/docs/DOC-7028 # Use "-nolisten tcp" to prevent X connections to your VNC server via TCP. # Use "-localhost" to prevent remote VNC clients connecting except when # doing so through a secure tunnel. See the "-via" option in the # `man vncviewer' manual page. # VNCSERVERS="2:myusername" # VNCSERVERARGS="-geometry 800x600 -nolisten tcp -localhost" VNCSERVERS="1:david" VNCSERVERARGS="-geometry 1024x768"
For multiple users, simply add the user to the VNCSERVERS list and add a VNCSERVERARGS[x] entry.
So for three users:
VNCSERVERS="1:david 2:bill 3:john" VNCSERVERARGS="-geometry 1024x768" VNCSERVERARGS="-geometry 1024x768" VNCSERVERARGS="-geometry 640x480"
-A INPUT -m state --state NEW -m tcp -p tcp --dport 5801 -j ACCEPT
Save and restart IP Tables (/etc/init.d/iptables save | restart)
CentOS Wiki: VNC ( Virtual Network Computing )