Centos安裝PhantomJS
阿新 • • 發佈:2018-10-31
ins phantomjs 使用 軟連接 生產 tco x86 font conf
1.下載PhantomJS
[root@liuge ~]# wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
2.解壓,重命名
[root@liuge ~]# bzip2 -d phantomjs-2.1.1-linux-x86_64.tar.bz2 [root@liuge ~]# [root@liuge ~]# tar xf phantomjs-2.1.1-linux-x86_64.tar -C /usr/local/ #上面吧解壓後的文件放到/usr/local文件下
重命名(方便以後使用phantomjs命令)
[root@liuge ~]# mv /usr/local/phantomjs-2.1.1-linux-x86_64/ /usr/local/phantomjs
3.安裝依賴軟件fontconfig
yum -y install wget fontconfig
4.建立軟連接
在/usr/bin/目錄下生產一個phantomjs的軟連接
[root@liuge ~]# ln -s /usr/local/phantomjs/bin/phantomjs /usr/bin/ [root@liuge ~]# ll /usr/bin/ph* lrwxrwxrwx 1 root root 34 Apr 26 20:24 /usr/bin/phantomjs -> /usr/local/phantomjs/bin/phantomjs [root@liuge ~]#
5.命令測試
[root@liuge ~]# phantomjs
phantomjs>
Centos安裝PhantomJS