How to Install PhantomJS on Ubuntu 16.04
Introduction
PhantomJS is a scripted, headless browser that can be used for automating web page interaction. PhantomJS is a free, open source and distributed under the BSD license. PhantomJS is based on WebKit and is very similar browsing environment to Safari and Google Chrome. The PhantomJS JavaScript API can be used to open web pages, execute user actions and take screenshots.
In this tutorial, we will learn how to install PhantomJS in Ubuntu 16.04 server.
Step 1: Update the system
Before starting, it is recommended to update the system with the latest stable release. You can do this with the following command:
sudo apt-get update -y
sudo apt-get upgrade -y
sudo shutdown -r now
Step 2: Install PhantomJS
Before installing PhantomJS, you will need to install some required packages on your system. You can install all of them with the following command:
sudo apt-get install build-essential chrpath libssl-dev libxft-dev libfreetype6-dev libfreetype6 libfontconfig1-dev libfontconfig1 -y
Next, you will need to download the PhantomJS. You can download the latest stable version of the PhantomJS from their official website. Run the following command to download PhantomJS:
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
Once the download is complete, extract the downloaded archive file to desired system location:
sudo tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C /usr/local/share/
Next, create a symlink of PhantomJS binary file to systems bin dirctory:
sudo ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/
Step 3: Verify PhantomJS
PhantomJS is now installed on your system. You can now verify the installed version of PhantomJS with the following command:
phantomjs --version
You should see the following output:
2.1.1
How to Install PhantomJS on Ubuntu 16.04的更多相关文章
- How To Install Nginx on Ubuntu 16.04 zz
Introduction Nginx is one of the most popular web servers in the world and is responsible for hostin ...
- ubuntu 16.04上源码编译和安装cgal并编写CMakeLists.txt | compile and install cgal on ubuntu 16.04
本文首发于个人博客https://kezunlin.me/post/39ab7ed9/,欢迎阅读最新内容! compile and install cgal on ubuntu 16.04 Guide ...
- ubuntu 16.04 上编译和安装C++机器学习工具包mlpack并编写mlpack-config.cmake | tutorial to compile and install mplack on ubuntu 16.04
本文首发于个人博客https://kezunlin.me/post/1cd6a04d/,欢迎阅读最新内容! tutorial to compile and install mplack on ubun ...
- How To Install MySQL on Ubuntu 16.04
https://help.ubuntu.com/lts/serverguide/mysql.html http://www.cnblogs.com/wuhou/archive/2008/09/28/1 ...
- How to Install KDE on Ubuntu 16.04
sudo add-apt-repository ppa:kubuntu-ppa/backportssudo apt-get updatesudo apt-get dist-upgradesudo ap ...
- MySQL5.7的安装(CentOS 7 & Ubuntu 16.04)
CentOS 通过 yum 安装MySQL5.7 Yum Repository 下载地址:https://dev.mysql.com/downloads/repo/yum/ 选择相应的版本进行下载:R ...
- [GUIDE] How to Setup Ubuntu 16.04 LTS Xenial Xerus for Compiling Android ROMs
With a new version of Ubuntu comes an update to my guide for setting up a build environment to compi ...
- Ubuntu 16.04 一系列软件安装命令,包括QQ、搜狗、Chrome、vlc、网易云音乐安装方法
1 简介 Ubuntu 16.04安装完后,还需要做一些配置才能愉快的使用,包括添加软件源.安装搜狗输入法.Chrome浏览器.网易云音乐.配置快捷键.安装git等等,下面就跟着我来配置吧,just ...
- Install and Configure Apache Kafka on Ubuntu 16.04
https://devops.profitbricks.com/tutorials/install-and-configure-apache-kafka-on-ubuntu-1604-1/ by hi ...
随机推荐
- atom 插件 python语法验证linter-flake8-------填坑
python的语法相对于一般语言的语法比较严格.对于刚刚从前端入门python的我来说,有时候代码写完了,然后报错,好多语法错误.所以这个时候一个好的语法验证插件是很好的.linter-flake8这 ...
- thinkphp5修改入口文件位置及相应的问题
问题1:thinkphp5修改入口文件 解决:参考手册 http://www.kancloud.cn/manual/thinkphp5/129746,然后需要把.htaccess跟入口文件放到同一目录 ...
- 线程池(4)Executors.newScheduledThreadPool-只执行1次
例子1:延迟3秒后,只执行1次 ScheduledExecutorService es = Executors.newScheduledThreadPool(5); log.info("开始 ...
- NET CORE 基础
NET CORE 基础管理系统 [SF]开源的.NET CORE 基础管理系统 - 安装篇 [SF]开源的.NET CORE 基础管理系统 -系列导航 1.开发必备工具 IDE:VS2017 运行 ...
- js和jq中常见的各种位置距离之offset()和position()的区别(二)
offset()返回的是相对于当前文档的坐标,position()返回的是相对于其定位的祖辈元素的坐标. 使用position()方法时事实上是把该元素当绝对定位来处理,获取的是该元素相当于最近的一个 ...
- ruby 正则表达式 匹配所有符合规则的信息
假设一个字符串当中有很多符合规则的信息,下面的例子可以把所有匹配到的结果打印出来: message="afhadhffkdf414j9tr3j43i3433094jwoert223jwew1 ...
- springboot项目实现批量新增功能
这个困扰我一整天东西,终于解决了. 首先是mybatis中的批量新增sql语句. 注意:这里我给的是我需要新增的字段,你们改成你们需要的字段. <insert id="insertBa ...
- <context:property-placeholder>标签实现参数剥离
<context:property-placeholder>标签提供了一种优雅的外在化参数配置的方式(可以是键值对的形式保存在.properties文件中),不过该标签在spring配置文 ...
- HBase数据模型(1)
HBase数据模型(1) HBase数据模型(2) 1.0 HBase的特性 Table HBase以表(Table)的方式组织数据,数据存储在表中. Row/Column 行(Row)和列(Colu ...
- iOS-浅谈runtime运行时机制02-runtime简单使用
http://blog.csdn.net/jiajiayouba/article/details/44201079 由于OC是运行时语言,只有在程序运行时,才会去确定对象的类型,并调用类与对象相应的方 ...