CentOS7: 03-PhantomJS WebDriver

get phantomjs

 

wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2

tar xjf phantomjs-2.1.1-linux-x86_64.tar.bz2

chown setup phantomjs-2.1.1-linux-x86_64

chmod 777 phantomjs-2.1.1-linux-x86_64

chmod +x /bin/phantomns

 


 

Run phantomjs

/.phantomjs

 

[setup@c7 bin]$ ./phantomjs --webdriver 8643
[INFO  - 2018-11-02T01:52:22.711Z] GhostDriver - Main - running on port 8643

 

 

Check phantomjs port

[setup@c7 ~]$ netstat -ntlp
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      -                   
tcp        0      0 0.0.0.0:8643            0.0.0.0:*               LISTEN      1650/./phantomjs    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -                   
tcp6       0      0 ::1:25                  :::*                    LISTEN      -                   
tcp6       0      0 :::22                   :::*                    LISTEN      -                   
[setup@c7 ~]$

 


 

 

 


 

update centos7 rpm

Marking /var/tmp/yum-root-nZc9fM/ius-release.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package ius-release.noarch 0:1.0-15.ius.centos7 will be installed
--> Processing Dependency: epel-release = 7 for package: ius-release-1.0-15.ius.centos7.noarch
Loading mirror speeds from cached hostfile
 * base: repos-tx.psychz.net
 * extras: repos-tx.psychz.net
 * updates: repos-tx.psychz.net
--> Running transaction check
---> Package epel-release.noarch 0:7-11 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================
 Package                        Arch                     Version                              Repository                      Size
===================================================================================================================================
Installing:
 ius-release                    noarch                   1.0-15.ius.centos7                   /ius-release                   8.5 k
Installing for dependencies:
 epel-release                   noarch                   7-11                                 extras                          15 k

Transaction Summary
===================================================================================================================================
Install  1 Package (+1 Dependent package)

Total size: 23 k
Total download size: 15 k
Installed size: 33 k
Is this ok [y/d/N]: y
Downloading packages:
epel-release-7-11.noarch.rpm                                                                                |  15 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : epel-release-7-11.noarch                                                                                        1/2
  Installing : ius-release-1.0-15.ius.centos7.noarch                                                                           2/2
  Verifying  : ius-release-1.0-15.ius.centos7.noarch                                                                           1/2
  Verifying  : epel-release-7-11.noarch                                                                                        2/2

Installed:
  ius-release.noarch 0:1.0-15.ius.centos7                                                                                          

Dependency Installed:
  epel-release.noarch 0:7-11                                                                                                       

Complete!

 


Install PHP7


[setup@c7 ~]$ yum install php71u php71u-cli php71u-common php71u-fpm php71u-gd php71u-mbstring php71u-mysqlnd php71u-opcache php71u-pdo php71u-pear php71u-pecl-igbinary php71u-pecl-memcache php71u-pecl-memcached php71u-process php71u-xml php71u-json -y
Loaded plugins: fastestmirror
You need to be root to perform this command.
[setup@c7 ~]$ sudo yum install php71u php71u-cli php71u-common php71u-fpm php71u-gd php71u-mbstring php71u-mysqlnd php71u-opcache php71u-pdo php71u-pear php71u-pecl-igbinary php71u-pecl-memcache php71u-pecl-memcached php71u-process php71u-xml php71u-json -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/x86_64/metalink                                                                                        | 9.8 kB  00:00:00     
 * base: repos-tx.psychz.net
 * epel: mirror.compevo.com
 * extras: repos-tx.psychz.net
 * ius: ius.mirror.constant.com
 * updates: repos-tx.psychz.net
epel                                                                                                        | 3.2 kB  00:00:00     
ius                                                                                                         | 2.3 kB  00:00:00     
(1/4): epel/x86_64/group_gz                                                                                 |  88 kB  00:00:00     
(2/4): ius/x86_64/primary_db                                                                                | 398 kB  00:00:00     
(3/4): epel/x86_64/updateinfo                                                                               | 934 kB  00:00:00     
(4/4): epel/x86_64/primary                                                                                  | 3.6 MB  00:00:01     
epel                                                                                                                   12737/12737
No package php71u-pear available.
No package php71u-pecl-memcache available.
Resolving Dependencies
--> Running transaction check
---> Package mod_php71u.x86_64 0:7.1.23-1.ius.centos7 will be installed
--> Processing Dependency: httpd-mmn = 20120211x8664 for package: mod_php71u-7.1.23-1.ius.centos7.x86_64
---> Package php71u-cli.x86_64 0:7.1.23-1.ius.centos7 will be installed
---> Package php71u-common.x86_64 0:7.1.23-1.ius.centos7 will be installed
---> Package php71u-fpm.x86_64 0:7.1.23-1.ius.centos7 will be installed
---> Package php71u-gd.x86_64 0:7.1.23-1.ius.centos7 will be installed
--> Processing Dependency: libjpeg.so.62(LIBJPEG_6.2)(64bit) for package: php71u-gd-7.1.23-1.ius.centos7.x86_64
--> Processing Dependency: libpng15.so.15(PNG15_0)(64bit) for package: php71u-gd-7.1.23-1.ius.centos7.x86_64
--> Processing Dependency: libjpeg.so.62()(64bit) for package: php71u-gd-7.1.23-1.ius.centos7.x86_64
--> Processing Dependency: libpng15.so.15()(64bit) for package: php71u-gd-7.1.23-1.ius.centos7.x86_64
--> Processing Dependency: libwebp.so.4()(64bit) for package: php71u-gd-7.1.23-1.ius.centos7.x86_64
--> Processing Dependency: libX11.so.6()(64bit) for package: php71u-gd-7.1.23-1.ius.centos7.x86_64
--> Processing Dependency: libXpm.so.4()(64bit) for package: php71u-gd-7.1.23-1.ius.centos7.x86_64
---> Package php71u-json.x86_64 0:7.1.23-1.ius.centos7 will be installed
---> Package php71u-mbstring.x86_64 0:7.1.23-1.ius.centos7 will be installed
---> Package php71u-mysqlnd.x86_64 0:7.1.23-1.ius.centos7 will be installed
---> Package php71u-opcache.x86_64 0:7.1.23-1.ius.centos7 will be installed
---> Package php71u-pdo.x86_64 0:7.1.23-1.ius.centos7 will be installed
---> Package php71u-pecl-igbinary.x86_64 0:2.0.5-2.ius.centos7 will be installed
---> Package php71u-pecl-memcached.x86_64 0:3.0.4-2.ius.centos7 will be installed
--> Processing Dependency: libevent-2.0.so.5()(64bit) for package: php71u-pecl-memcached-3.0.4-2.ius.centos7.x86_64
--> Processing Dependency: libfastlz.so.0()(64bit) for package: php71u-pecl-memcached-3.0.4-2.ius.centos7.x86_64
--> Processing Dependency: libmemcachedprotocol.so.0()(64bit) for package: php71u-pecl-memcached-3.0.4-2.ius.centos7.x86_64
--> Processing Dependency: libmemcached.so.11()(64bit) for package: php71u-pecl-memcached-3.0.4-2.ius.centos7.x86_64
--> Processing Dependency: libmemcachedutil.so.2()(64bit) for package: php71u-pecl-memcached-3.0.4-2.ius.centos7.x86_64
---> Package php71u-process.x86_64 0:7.1.23-1.ius.centos7 will be installed
---> Package php71u-xml.x86_64 0:7.1.23-1.ius.centos7 will be installed
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: php71u-xml-7.1.23-1.ius.centos7.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13)(64bit) for package: php71u-xml-7.1.23-1.ius.centos7.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: php71u-xml-7.1.23-1.ius.centos7.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for package: php71u-xml-7.1.23-1.ius.centos7.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24)(64bit) for package: php71u-xml-7.1.23-1.ius.centos7.x86_64
--> Processing Dependency: libexslt.so.0()(64bit) for package: php71u-xml-7.1.23-1.ius.centos7.x86_64
--> Processing Dependency: libxslt.so.1()(64bit) for package: php71u-xml-7.1.23-1.ius.centos7.x86_64
--> Running transaction check
---> Package fastlz.x86_64 0:0.1.0-0.1.20070619svnrev12.el7 will be installed
---> Package httpd.x86_64 0:2.4.6-80.el7.centos.1 will be installed
--> Processing Dependency: httpd-tools = 2.4.6-80.el7.centos.1 for package: httpd-2.4.6-80.el7.centos.1.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.4.6-80.el7.centos.1.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.4.6-80.el7.centos.1.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.4.6-80.el7.centos.1.x86_64
---> Package libX11.x86_64 0:1.6.5-1.el7 will be installed
--> Processing Dependency: libX11-common >= 1.6.5-1.el7 for package: libX11-1.6.5-1.el7.x86_64
--> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.6.5-1.el7.x86_64
---> Package libXpm.x86_64 0:3.5.12-1.el7 will be installed
---> Package libevent.x86_64 0:2.0.21-4.el7 will be installed
---> Package libjpeg-turbo.x86_64 0:1.2.90-5.el7 will be installed
---> Package libmemcached.x86_64 0:1.0.16-5.el7 will be installed
---> Package libpng.x86_64 2:1.5.13-7.el7_2 will be installed
---> Package libwebp.x86_64 0:0.3.0-7.el7 will be installed
---> Package libxslt.x86_64 0:1.1.28-5.el7 will be installed
--> Running transaction check
---> Package apr.x86_64 0:1.4.8-3.el7_4.1 will be installed
---> Package apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package httpd-tools.x86_64 0:2.4.6-80.el7.centos.1 will be installed
---> Package libX11-common.noarch 0:1.6.5-1.el7 will be installed
---> Package libxcb.x86_64 0:1.12-1.el7 will be installed
--> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.12-1.el7.x86_64
---> Package mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Running transaction check
---> Package libXau.x86_64 0:1.0.8-2.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================
 Package                             Arch                 Version                                      Repository             Size
===================================================================================================================================
Installing:
 mod_php71u                          x86_64               7.1.23-1.ius.centos7                         ius                   3.0 M
 php71u-cli                          x86_64               7.1.23-1.ius.centos7                         ius                   4.5 M
 php71u-common                       x86_64               7.1.23-1.ius.centos7                         ius                   1.1 M
 php71u-fpm                          x86_64               7.1.23-1.ius.centos7                         ius                   1.5 M
 php71u-gd                           x86_64               7.1.23-1.ius.centos7                         ius                   176 k
 php71u-json                         x86_64               7.1.23-1.ius.centos7                         ius                    67 k
 php71u-mbstring                     x86_64               7.1.23-1.ius.centos7                         ius                   583 k
 php71u-mysqlnd                      x86_64               7.1.23-1.ius.centos7                         ius                   236 k
 php71u-opcache                      x86_64               7.1.23-1.ius.centos7                         ius                   243 k
 php71u-pdo                          x86_64               7.1.23-1.ius.centos7                         ius                   129 k
 php71u-pecl-igbinary                x86_64               2.0.5-2.ius.centos7                          ius                   100 k
 php71u-pecl-memcached               x86_64               3.0.4-2.ius.centos7                          ius                    78 k
 php71u-process                      x86_64               7.1.23-1.ius.centos7                         ius                    83 k
 php71u-xml                          x86_64               7.1.23-1.ius.centos7                         ius                   213 k
Installing for dependencies:
 apr                                 x86_64               1.4.8-3.el7_4.1                              base                  103 k
 apr-util                            x86_64               1.5.2-6.el7                                  base                   92 k
 fastlz                              x86_64               0.1.0-0.1.20070619svnrev12.el7               epel                  9.8 k
 httpd                               x86_64               2.4.6-80.el7.centos.1                        updates               2.7 M
 httpd-tools                         x86_64               2.4.6-80.el7.centos.1                        updates                90 k
 libX11                              x86_64               1.6.5-1.el7                                  base                  606 k
 libX11-common                       noarch               1.6.5-1.el7                                  base                  164 k
 libXau                              x86_64               1.0.8-2.1.el7                                base                   29 k
 libXpm                              x86_64               3.5.12-1.el7                                 base                   55 k
 libevent                            x86_64               2.0.21-4.el7                                 base                  214 k
 libjpeg-turbo                       x86_64               1.2.90-5.el7                                 base                  134 k
 libmemcached                        x86_64               1.0.16-5.el7                                 base                  237 k
 libpng                              x86_64               2:1.5.13-7.el7_2                             base                  213 k
 libwebp                             x86_64               0.3.0-7.el7                                  base                  170 k
 libxcb                              x86_64               1.12-1.el7                                   base                  211 k
 libxslt                             x86_64               1.1.28-5.el7                                 base                  242 k
 mailcap                             noarch               2.1.41-2.el7                                 base                   31 k

Transaction Summary
===================================================================================================================================
Install  14 Packages (+17 Dependent packages)

Total download size: 17 M
Installed size: 60 M
Downloading packages:
(1/31): apr-1.4.8-3.el7_4.1.x86_64.rpm                                                                      | 103 kB  00:00:00     
(2/31): apr-util-1.5.2-6.el7.x86_64.rpm                                                                     |  92 kB  00:00:00     
(3/31): httpd-tools-2.4.6-80.el7.centos.1.x86_64.rpm                                                        |  90 kB  00:00:00     
(4/31): libX11-common-1.6.5-1.el7.noarch.rpm                                                                | 164 kB  00:00:00     
(5/31): libX11-1.6.5-1.el7.x86_64.rpm                                                                       | 606 kB  00:00:00     
(6/31): libXpm-3.5.12-1.el7.x86_64.rpm                                                                      |  55 kB  00:00:00     
(7/31): libjpeg-turbo-1.2.90-5.el7.x86_64.rpm                                                               | 134 kB  00:00:00     
(8/31): libevent-2.0.21-4.el7.x86_64.rpm                                                                    | 214 kB  00:00:00     
(9/31): libmemcached-1.0.16-5.el7.x86_64.rpm                                                                | 237 kB  00:00:00     
(10/31): libwebp-0.3.0-7.el7.x86_64.rpm                                                                     | 170 kB  00:00:00     
(11/31): httpd-2.4.6-80.el7.centos.1.x86_64.rpm                                                             | 2.7 MB  00:00:00     
(12/31): libxcb-1.12-1.el7.x86_64.rpm                                                                       | 211 kB  00:00:00     
(13/31): libxslt-1.1.28-5.el7.x86_64.rpm                                                                    | 242 kB  00:00:00     
(14/31): mailcap-2.1.41-2.el7.noarch.rpm                                                                    |  31 kB  00:00:00     
(15/31): libXau-1.0.8-2.1.el7.x86_64.rpm                                                                    |  29 kB  00:00:00     
(16/31): libpng-1.5.13-7.el7_2.x86_64.rpm                                                                   | 213 kB  00:00:00     
warning: /var/cache/yum/x86_64/7/epel/packages/fastlz-0.1.0-0.1.20070619svnrev12.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Public key for fastlz-0.1.0-0.1.20070619svnrev12.el7.x86_64.rpm is not installed
(17/31): fastlz-0.1.0-0.1.20070619svnrev12.el7.x86_64.rpm                                                   | 9.8 kB  00:00:01     
warning: /var/cache/yum/x86_64/7/ius/packages/mod_php71u-7.1.23-1.ius.centos7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 9cd4953f: NOKEY
Public key for mod_php71u-7.1.23-1.ius.centos7.x86_64.rpm is not installed
(18/31): mod_php71u-7.1.23-1.ius.centos7.x86_64.rpm                                                         | 3.0 MB  00:00:00     
(19/31): php71u-json-7.1.23-1.ius.centos7.x86_64.rpm                                                        |  67 kB  00:00:00     
(20/31): php71u-mbstring-7.1.23-1.ius.centos7.x86_64.rpm                                                    | 583 kB  00:00:00     
php71u-gd-7.1.23-1.ius.centos7 FAILED                                          
http://muug.ca/mirror/ius/stable/CentOS/7/x86_64/php71u-gd-7.1.23-1.ius.centos7.x86_64.rpm: [Errno 14] HTTP Error 404 - Not FoundA
Trying other mirror.
To address this issue please refer to the below wiki article

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

(21/31): php71u-mysqlnd-7.1.23-1.ius.centos7.x86_64.rpm                                                     | 236 kB  00:00:00     
(22/31): php71u-pdo-7.1.23-1.ius.centos7.x86_64.rpm                                                         | 129 kB  00:00:00     
(23/31): php71u-pecl-igbinary-2.0.5-2.ius.centos7.x86_64.rpm                                                | 100 kB  00:00:00     
(24/31): php71u-cli-7.1.23-1.ius.centos7.x86_64.rpm                                                         | 4.5 MB  00:00:01     
(25/31): php71u-process-7.1.23-1.ius.centos7.x86_64.rpm                                                     |  83 kB  00:00:00     
(26/31): php71u-pecl-memcached-3.0.4-2.ius.centos7.x86_64.rpm                                               |  78 kB  00:00:00     
(27/31): php71u-common-7.1.23-1.ius.centos7.x86_64.rpm                                                      | 1.1 MB  00:00:01     
(28/31): php71u-gd-7.1.23-1.ius.centos7.x86_64.rpm                                                          | 176 kB  00:00:00     
(29/31): php71u-opcache-7.1.23-1.ius.centos7.x86_64.rpm                                                     | 243 kB  00:00:00     
(30/31): php71u-xml-7.1.23-1.ius.centos7.x86_64.rpm                                                         | 213 kB  00:00:00     
(31/31): php71u-fpm-7.1.23-1.ius.centos7.x86_64.rpm                                                         | 1.5 MB  00:00:03     
-----------------------------------------------------------------------------------------------------------------------------------
Total                                                                                              3.5 MB/s |  17 MB  00:00:04     
Retrieving key from file:///etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
Importing GPG key 0x9CD4953F:
 Userid     : "IUS Community Project <coredev@iuscommunity.org>"
 Fingerprint: 8b84 6e3a b3fe 6462 74e8 670f da22 1cdf 9cd4 953f
 Package    : ius-release-1.0-15.ius.centos7.noarch (installed)
 From       : /etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Importing GPG key 0x352C64E5:
 Userid     : "Fedora EPEL (7) <epel@fedoraproject.org>"
 Fingerprint: 91e9 7d7c 4a5e 96f1 7f3e 888f 6a2f aea2 352c 64e5
 Package    : epel-release-7-11.noarch (@extras)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : php71u-common-7.1.23-1.ius.centos7.x86_64                                                                      1/31
  Installing : apr-1.4.8-3.el7_4.1.x86_64                                                                                     2/31
  Installing : apr-util-1.5.2-6.el7.x86_64                                                                                    3/31
  Installing : libevent-2.0.21-4.el7.x86_64                                                                                   4/31
  Installing : libmemcached-1.0.16-5.el7.x86_64                                                                               5/31
  Installing : httpd-tools-2.4.6-80.el7.centos.1.x86_64                                                                       6/31
  Installing : php71u-pdo-7.1.23-1.ius.centos7.x86_64                                                                         7/31
  Installing : php71u-pecl-igbinary-2.0.5-2.ius.centos7.x86_64                                                                8/31
  Installing : php71u-json-7.1.23-1.ius.centos7.x86_64                                                                        9/31
  Installing : fastlz-0.1.0-0.1.20070619svnrev12.el7.x86_64                                                                  10/31
  Installing : libXau-1.0.8-2.1.el7.x86_64                                                                                   11/31
  Installing : libxcb-1.12-1.el7.x86_64                                                                                      12/31
  Installing : libX11-common-1.6.5-1.el7.noarch                                                                              13/31
  Installing : libX11-1.6.5-1.el7.x86_64                                                                                     14/31
  Installing : libXpm-3.5.12-1.el7.x86_64                                                                                    15/31
  Installing : libxslt-1.1.28-5.el7.x86_64                                                                                   16/31
  Installing : libwebp-0.3.0-7.el7.x86_64                                                                                    17/31
  Installing : 2:libpng-1.5.13-7.el7_2.x86_64                                                                                18/31
  Installing : mailcap-2.1.41-2.el7.noarch                                                                                   19/31
  Installing : httpd-2.4.6-80.el7.centos.1.x86_64                                                                            20/31
  Installing : libjpeg-turbo-1.2.90-5.el7.x86_64                                                                             21/31
  Installing : php71u-gd-7.1.23-1.ius.centos7.x86_64                                                                         22/31
  Installing : mod_php71u-7.1.23-1.ius.centos7.x86_64                                                                        23/31
  Installing : php71u-xml-7.1.23-1.ius.centos7.x86_64                                                                        24/31
  Installing : php71u-pecl-memcached-3.0.4-2.ius.centos7.x86_64                                                              25/31
  Installing : php71u-mysqlnd-7.1.23-1.ius.centos7.x86_64                                                                    26/31
  Installing : php71u-fpm-7.1.23-1.ius.centos7.x86_64                                                                        27/31
  Installing : php71u-cli-7.1.23-1.ius.centos7.x86_64                                                                        28/31
  Installing : php71u-mbstring-7.1.23-1.ius.centos7.x86_64                                                                   29/31
  Installing : php71u-opcache-7.1.23-1.ius.centos7.x86_64                                                                    30/31
  Installing : php71u-process-7.1.23-1.ius.centos7.x86_64                                                                    31/31
  Verifying  : libX11-1.6.5-1.el7.x86_64                                                                                      1/31
  Verifying  : php71u-mysqlnd-7.1.23-1.ius.centos7.x86_64                                                                     2/31
  Verifying  : libjpeg-turbo-1.2.90-5.el7.x86_64                                                                              3/31
  Verifying  : mailcap-2.1.41-2.el7.noarch                                                                                    4/31
  Verifying  : httpd-tools-2.4.6-80.el7.centos.1.x86_64                                                                       5/31
  Verifying  : php71u-xml-7.1.23-1.ius.centos7.x86_64                                                                         6/31
  Verifying  : httpd-2.4.6-80.el7.centos.1.x86_64                                                                             7/31
  Verifying  : libxcb-1.12-1.el7.x86_64                                                                                       8/31
  Verifying  : 2:libpng-1.5.13-7.el7_2.x86_64                                                                                 9/31
  Verifying  : php71u-fpm-7.1.23-1.ius.centos7.x86_64                                                                        10/31
  Verifying  : php71u-pdo-7.1.23-1.ius.centos7.x86_64                                                                        11/31
  Verifying  : libmemcached-1.0.16-5.el7.x86_64                                                                              12/31
  Verifying  : php71u-cli-7.1.23-1.ius.centos7.x86_64                                                                        13/31
  Verifying  : php71u-pecl-igbinary-2.0.5-2.ius.centos7.x86_64                                                               14/31
  Verifying  : libXpm-3.5.12-1.el7.x86_64                                                                                    15/31
  Verifying  : libwebp-0.3.0-7.el7.x86_64                                                                                    16/31
  Verifying  : php71u-pecl-memcached-3.0.4-2.ius.centos7.x86_64                                                              17/31
  Verifying  : php71u-mbstring-7.1.23-1.ius.centos7.x86_64                                                                   18/31
  Verifying  : libxslt-1.1.28-5.el7.x86_64                                                                                   19/31
  Verifying  : libevent-2.0.21-4.el7.x86_64                                                                                  20/31
  Verifying  : apr-util-1.5.2-6.el7.x86_64                                                                                   21/31
  Verifying  : apr-1.4.8-3.el7_4.1.x86_64                                                                                    22/31
  Verifying  : mod_php71u-7.1.23-1.ius.centos7.x86_64                                                                        23/31
  Verifying  : libX11-common-1.6.5-1.el7.noarch                                                                              24/31
  Verifying  : libXau-1.0.8-2.1.el7.x86_64                                                                                   25/31
  Verifying  : php71u-opcache-7.1.23-1.ius.centos7.x86_64                                                                    26/31
  Verifying  : php71u-gd-7.1.23-1.ius.centos7.x86_64                                                                         27/31
  Verifying  : php71u-process-7.1.23-1.ius.centos7.x86_64                                                                    28/31
  Verifying  : fastlz-0.1.0-0.1.20070619svnrev12.el7.x86_64                                                                  29/31
  Verifying  : php71u-json-7.1.23-1.ius.centos7.x86_64                                                                       30/31
  Verifying  : php71u-common-7.1.23-1.ius.centos7.x86_64                                                                     31/31

Installed:
  mod_php71u.x86_64 0:7.1.23-1.ius.centos7                        php71u-cli.x86_64 0:7.1.23-1.ius.centos7                        
  php71u-common.x86_64 0:7.1.23-1.ius.centos7                     php71u-fpm.x86_64 0:7.1.23-1.ius.centos7                        
  php71u-gd.x86_64 0:7.1.23-1.ius.centos7                         php71u-json.x86_64 0:7.1.23-1.ius.centos7                       
  php71u-mbstring.x86_64 0:7.1.23-1.ius.centos7                   php71u-mysqlnd.x86_64 0:7.1.23-1.ius.centos7                    
  php71u-opcache.x86_64 0:7.1.23-1.ius.centos7                    php71u-pdo.x86_64 0:7.1.23-1.ius.centos7                        
  php71u-pecl-igbinary.x86_64 0:2.0.5-2.ius.centos7               php71u-pecl-memcached.x86_64 0:3.0.4-2.ius.centos7              
  php71u-process.x86_64 0:7.1.23-1.ius.centos7                    php71u-xml.x86_64 0:7.1.23-1.ius.centos7                        

Dependency Installed:
  apr.x86_64 0:1.4.8-3.el7_4.1          apr-util.x86_64 0:1.5.2-6.el7               fastlz.x86_64 0:0.1.0-0.1.20070619svnrev12.el7
  httpd.x86_64 0:2.4.6-80.el7.centos.1  httpd-tools.x86_64 0:2.4.6-80.el7.centos.1  libX11.x86_64 0:1.6.5-1.el7                    
  libX11-common.noarch 0:1.6.5-1.el7    libXau.x86_64 0:1.0.8-2.1.el7               libXpm.x86_64 0:3.5.12-1.el7                   
  libevent.x86_64 0:2.0.21-4.el7        libjpeg-turbo.x86_64 0:1.2.90-5.el7         libmemcached.x86_64 0:1.0.16-5.el7             
  libpng.x86_64 2:1.5.13-7.el7_2        libwebp.x86_64 0:0.3.0-7.el7                libxcb.x86_64 0:1.12-1.el7                     
  libxslt.x86_64 0:1.1.28-5.el7         mailcap.noarch 0:2.1.41-2.el7              

Complete!

 

 

 


Find php.ini

[setup@c7 ~]$ sudo find -name php.ini | grep php.ini
[setup@c7 ~]$ cd /
[setup@c7 /]$ sudo find -name php.ini | grep php.ini
./etc/php.ini
[setup@c7 /]$ nano /etc/php.ini
[setup@c7 /]$ sudo nano /etc/php.ini
[setup@c7 /]$ sudo reboot

Connection closed by foreign host.


Check php version

[setup@c7 ~]$ php -v

PHP 7.1.23 (cli) (built: Oct 16 2018 14:29:46) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.23, Copyright (c) 1999-2018, by Zend Technologies

 


Edit php.ini


[setup@c7 ~]$ sudo nano /etc/php.ini
[sudo] password for setup:
[setup@c7 ~]$ ls
composer-setup.php
[setup@c7 ~]$ cd /var
[setup@c7 var]$ ls
adm  cache  crash  db  empty  games  gopher  kerberos  lib  local  lock  log  mail  nis  opt  preserve  run  spool  tmp  www  yp
[setup@c7 var]$ ls -la
total 12
drwxr-xr-x. 20 root root  278 Nov  1 19:27 .
dr-xr-xr-x. 17 root root  224 Nov  1 18:35 ..
drwxr-xr-x.  2 root root    6 Apr 10  2018 adm
drwxr-xr-x.  6 root root   57 Nov  1 19:27 cache
drwxr-xr-x.  2 root root    6 Sep 26 13:29 crash
drwxr-xr-x.  3 root root   34 Nov  1 18:30 db
drwxr-xr-x.  3 root root   18 Nov  1 18:30 empty
drwxr-xr-x.  2 root root    6 Apr 10  2018 games
drwxr-xr-x.  2 root root    6 Apr 10  2018 gopher
drwxr-xr-x.  3 root root   18 May  9 08:48 kerberos
drwxr-xr-x. 26 root root 4096 Nov  1 19:27 lib
drwxr-xr-x.  2 root root    6 Apr 10  2018 local
lrwxrwxrwx.  1 root root   11 Nov  1 18:29 lock -> ../run/lock
drwxr-xr-x.  8 root root 4096 Nov  1 19:34 log
lrwxrwxrwx.  1 root root   10 Nov  1 18:29 mail -> spool/mail
drwxr-xr-x.  2 root root    6 Apr 10  2018 nis
drwxr-xr-x.  2 root root    6 Apr 10  2018 opt
drwxr-xr-x.  2 root root    6 Apr 10  2018 preserve
lrwxrwxrwx.  1 root root    6 Nov  1 18:29 run -> ../run
drwxr-xr-x.  8 root root   87 Nov  1 18:30 spool
drwxrwxrwt.  4 root root   53 Nov  1 19:35 tmp
-rw-r--r--.  1 root root  163 Nov  1 18:29 .updated
drwxr-xr-x.  4 root root   33 Nov  1 19:27 www
drwxr-xr-x.  2 root root    6 Apr 10  2018 yp
[setup@c7 var]$ cd www
[setup@c7 www]$ ls
cgi-bin  html
[setup@c7 www]$ git clone https://unityconstruct@bitbucket.org/unityconstruct/behatmink.git
fatal: could not create work tree dir 'behatmink'.: Permission denied
[setup@c7 www]$ cd ..
[setup@c7 var]$ ls
adm  cache  crash  db  empty  games  gopher  kerberos  lib  local  lock  log  mail  nis  opt  preserve  run  spool  tmp  www  yp
[setup@c7 var]$ ls -la
total 12
drwxr-xr-x. 20 root root  278 Nov  1 19:27 .
dr-xr-xr-x. 17 root root  224 Nov  1 18:35 ..
drwxr-xr-x.  2 root root    6 Apr 10  2018 adm
drwxr-xr-x.  6 root root   57 Nov  1 19:27 cache
drwxr-xr-x.  2 root root    6 Sep 26 13:29 crash
drwxr-xr-x.  3 root root   34 Nov  1 18:30 db
drwxr-xr-x.  3 root root   18 Nov  1 18:30 empty
drwxr-xr-x.  2 root root    6 Apr 10  2018 games
drwxr-xr-x.  2 root root    6 Apr 10  2018 gopher
drwxr-xr-x.  3 root root   18 May  9 08:48 kerberos
drwxr-xr-x. 26 root root 4096 Nov  1 19:27 lib
drwxr-xr-x.  2 root root    6 Apr 10  2018 local
lrwxrwxrwx.  1 root root   11 Nov  1 18:29 lock -> ../run/lock
drwxr-xr-x.  8 root root 4096 Nov  1 19:34 log
lrwxrwxrwx.  1 root root   10 Nov  1 18:29 mail -> spool/mail
drwxr-xr-x.  2 root root    6 Apr 10  2018 nis
drwxr-xr-x.  2 root root    6 Apr 10  2018 opt
drwxr-xr-x.  2 root root    6 Apr 10  2018 preserve
lrwxrwxrwx.  1 root root    6 Nov  1 18:29 run -> ../run
drwxr-xr-x.  8 root root   87 Nov  1 18:30 spool
drwxrwxrwt.  4 root root   53 Nov  1 19:35 tmp
-rw-r--r--.  1 root root  163 Nov  1 18:29 .updated
drwxr-xr-x.  4 root root   33 Nov  1 19:27 www
drwxr-xr-x.  2 root root    6 Apr 10  2018 yp
[setup@c7 var]$ cd www
[setup@c7 www]$ mkdir bhatmink
mkdir: cannot create directory ‘bhatmink’: Permission denied
[setup@c7 www]$ sudo mkdir bhatmink
[sudo] password for setup:
[setup@c7 www]$ rn bhatmink/ behatmink
-bash: rn: command not found
[setup@c7 www]$ mv bhatmink/ behatmink
mv: cannot move ‘bhatmink/’ to ‘behatmink’: Permission denied
[setup@c7 www]$ sudo mv bhatmink/ behatmink
[setup@c7 www]$ ls
behatmink  cgi-bin  html
[setup@c7 www]$ chmod -o setup behatmink/
chmod: cannot access ‘setup’: No such file or directory
chmod: changing permissions of ‘behatmink/’: Operation not permitted
[setup@c7 www]$ sudo chmod -o setup behatmink/
chmod: cannot access ‘setup’: No such file or directory
[setup@c7 www]$ sudo chmod -o setup behatmink
chmod: cannot access ‘setup’: No such file or directory
[setup@c7 www]$ chmod behatmink/ 777
chmod: invalid mode: ‘behatmink/’
Try 'chmod --help' for more information.
[setup@c7 www]$ sudo chmod 777  behatmink
[setup@c7 www]$ sudo chown setup behatmink
[setup@c7 www]$ ls -la
total 0
drwxr-xr-x.  5 root  root  50 Nov  1 19:41 .
drwxr-xr-x. 20 root  root 278 Nov  1 19:27 ..
drwxrwxrwx.  2 setup root   6 Nov  1 19:41 behatmink
drwxr-xr-x.  2 root  root   6 Jun 27 08:49 cgi-bin
drwxr-xr-x.  2 root  root   6 Jun 27 08:49 html


Clone BehatMink Project

[setup@c7 www]$ git clone https://unityconstruct@bitbucket.org/unityconstruct/behatmink.git
Cloning into 'behatmink'...
Password for 'https://unityconstruct@bitbucket.org':
remote: Counting objects: 350, done.
remote: Compressing objects: 100% (322/322), done.
remote: Total 350 (delta 150), reused 0 (delta 0)
Receiving objects: 100% (350/350), 17.98 MiB | 6.17 MiB/s, done.
Resolving deltas: 100% (150/150), done.


Build Composer Project

[setup@c7 www]$ ls
behatmink  cgi-bin  html
[setup@c7 www]$ cd behatmink/
[setup@c7 behatmink]$ ls
behat.yml  bin  composer.json  composer.lock  composer.phar  composer-setup.php  csmenu.bat  drush  features  in  tests
[setup@c7 behatmink]$ cd !
-bash: cd: !: No such file or directory
[setup@c7 behatmink]$ cd ~
[setup@c7 ~]$ ls
composer-setup.php
[setup@c7 ~]$ cd /var
[setup@c7 var]$ ls
adm  cache  crash  db  empty  games  gopher  kerberos  lib  local  lock  log  mail  nis  opt  preserve  run  spool  tmp  www  yp
[setup@c7 var]$ cd www
[setup@c7 www]$ ls
behatmink  cgi-bin  html

[setup@c7 www]$ sudo mkdir composer
[sudo] password for setup:

[setup@c7 www]$ sudo chmod 777 composer/

[setup@c7 www]$ cd composer/


Get Composer

[setup@c7 composer]$ curl https://getcomposer.org/installer > composer-setup.php
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  257k  100  257k    0     0   353k      0 --:--:-- --:--:-- --:--:--  353k
[setup@c7 composer]$ php composer-setup.php
All settings correct for using Composer
Downloading...

Composer (version 1.7.3) successfully installed to: /var/www/composer/composer.phar
Use it: php composer.phar

 


Composer Install

[setup@c7 composer]$ cd ../behatmink/
[setup@c7 behatmink]$ ls
behat.yml  bin  composer.json  composer.lock  composer.phar  composer-setup.php  csmenu.bat  drush  features  in  tests

[setup@c7 behatmink]$ php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 66 installs, 0 updates, 0 removals
  - Installing composer/installers (v1.6.0): Downloading (100%)         
  - Installing behat/gherkin (v4.5.1): Downloading (100%)         
  - Installing symfony/polyfill-mbstring (v1.9.0): Downloading (100%)         
  - Installing symfony/polyfill-ctype (v1.9.0): Downloading (100%)         
  - Installing symfony/dom-crawler (v4.1.6): Downloading (100%)         
  - Installing symfony/browser-kit (v4.1.6): Downloading (100%)         
  - Installing symfony/css-selector (v3.4.17): Downloading (100%)         
  - Installing behat/mink (v1.7.1): Downloading (100%)         
  - Installing behat/mink-browserkit-driver (1.3.3): Downloading (100%)         
  - Installing behat/transliterator (v1.2.0): Downloading (100%)         
  - Installing psr/container (1.0.0): Downloading (100%)         
  - Installing container-interop/container-interop (1.2.0): Downloading (100%)         
  - Installing symfony/polyfill-iconv (v1.9.0): Downloading (100%)         
  - Installing paragonie/random_compat (v2.0.17): Downloading (100%)         
  - Installing drupal/core-utility (8.6.1): Downloading (100%)         
  - Installing drupal/core-render (8.6.1): Downloading (100%)         
  - Installing symfony/event-dispatcher (v3.4.17): Downloading (100%)         
  - Installing symfony/dependency-injection (v3.4.17): Downloading (100%)         
  - Installing symfony/process (v3.4.17): Downloading (100%)         
  - Installing drupal/drupal-driver (v1.4.0): Downloading (100%)         
  - Installing instaclick/php-webdriver (1.4.5): Downloading (100%)         
  - Installing behat/mink-selenium2-driver (v1.3.1): Downloading (100%)         
  - Installing psr/http-message (1.0.1): Downloading (100%)         
  - Installing guzzlehttp/psr7 (1.4.2): Downloading (100%)         
  - Installing guzzlehttp/promises (v1.3.1): Downloading (100%)         
  - Installing guzzlehttp/guzzle (dev-master 3ff39a4): Cloning 3ff39a4d6e
  - Installing fabpot/goutte (v3.2.3): Downloading (100%)         
  - Installing behat/mink-goutte-driver (v1.2.1): Downloading (100%)         
  - Installing symfony/filesystem (v4.1.6): Downloading (100%)         
  - Installing symfony/config (v4.1.6): Downloading (100%)         
  - Installing symfony/yaml (v4.1.6): Downloading (100%)         
  - Installing symfony/translation (v4.1.6): Downloading (100%)         
  - Installing symfony/console (v4.1.6): Downloading (100%)         
  - Installing symfony/class-loader (v3.4.17): Downloading (100%)         
  - Installing behat/behat (v3.5.0): Downloading (100%)         
    Skipped installation of bin bin/behat for package behat/behat: name conflicts with an existing file
  - Installing behat/mink-extension (2.3.1): Downloading (100%)         
  - Installing drupal/drupal-extension (v3.4.1): Downloading (100%)         
  - Installing drush-ops/behat-drush-endpoint (1.0.0): Downloading (100%)         
  - Installing webmozart/assert (1.3.0): Downloading (100%)         
  - Installing phpdocumentor/reflection-common (1.0.1): Downloading (100%)         
  - Installing phpdocumentor/type-resolver (0.4.0): Downloading (100%)         
  - Installing phpdocumentor/reflection-docblock (4.3.0): Downloading (100%)         
  - Installing phpunit/php-token-stream (2.0.2): Downloading (100%)         
  - Installing sebastian/version (2.0.1): Downloading (100%)         
  - Installing sebastian/resource-operations (1.0.0): Downloading (100%)         
  - Installing sebastian/recursion-context (3.0.0): Downloading (100%)         
  - Installing sebastian/object-reflector (1.1.1): Downloading (100%)         
  - Installing sebastian/object-enumerator (3.0.3): Downloading (100%)         
  - Installing sebastian/global-state (2.0.0): Downloading (100%)         
  - Installing sebastian/exporter (3.1.0): Downloading (100%)         
  - Installing sebastian/environment (3.1.0): Downloading (100%)         
  - Installing sebastian/diff (2.0.1): Downloading (100%)         
  - Installing sebastian/comparator (2.1.3): Downloading (100%)         
  - Installing phpunit/php-text-template (1.2.1): Downloading (100%)         
  - Installing doctrine/instantiator (1.1.0): Downloading (100%)         
  - Installing phpunit/phpunit-mock-objects (5.0.10): Downloading (100%)         
  - Installing phpunit/php-timer (1.0.9): Downloading (100%)         
  - Installing phpunit/php-file-iterator (1.4.5): Downloading (100%)         
  - Installing theseer/tokenizer (1.1.0): Downloading (100%)         
  - Installing sebastian/code-unit-reverse-lookup (1.0.1): Downloading (100%)         
  - Installing phpunit/php-code-coverage (5.3.2): Downloading (100%)         
  - Installing phpspec/prophecy (1.8.0): Downloading (100%)         
  - Installing phar-io/version (1.0.1): Downloading (100%)         
  - Installing phar-io/manifest (1.0.1): Downloading (100%)         
  - Installing myclabs/deep-copy (1.8.1): Downloading (100%)         
  - Installing phpunit/phpunit (6.5.13): Downloading (100%)         
    Skipped installation of bin phpunit for package phpunit/phpunit: name conflicts with an existing file
behat/mink suggests installing behat/mink-zombie-driver (fast and JS-enabled headless driver for any app (requires node.js))
paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
symfony/event-dispatcher suggests installing symfony/http-kernel
symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration)
symfony/dependency-injection suggests installing symfony/finder (For using double-star glob patterns or when GLOB_BRACE portability is required)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
guzzlehttp/guzzle suggests installing psr/log (Required for using the Log middleware)
symfony/translation suggests installing psr/log-implementation (To use logging capability in translator)
symfony/console suggests installing psr/log-implementation (For using the console logger)
symfony/console suggests installing symfony/lock
symfony/class-loader suggests installing symfony/polyfill-apcu (For using ApcClassLoader on HHVM)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.5)
phpunit/phpunit suggests installing ext-xdebug (*)
phpunit/phpunit suggests installing phpunit/php-invoker (^1.1)
Generating autoload files

 



[setup@c7 behatmink]$ ls
behat.yml  bin  composer.json  composer.lock  composer.phar  composer-setup.php  csmenu.bat  drush  features  in  tests  vendor
[setup@c7 behatmink]$ ls -la
total 2252
drwxrwxrwx. 11 setup root     4096 Nov  1 19:50 .
drwxr-xr-x.  6 root  root       66 Nov  1 19:49 ..
-rw-rw-r--.  1 setup setup     663 Nov  1 19:43 behat.yml
drwxrwxr-x.  2 setup setup     113 Nov  1 19:43 bin
-rw-rw-r--.  1 setup setup     174 Nov  1 19:43 .buildpath
-rw-rw-r--.  1 setup setup     253 Nov  1 19:43 composer.json
-rw-rw-r--.  1 setup setup  128683 Nov  1 19:43 composer.lock
-rw-rw-r--.  1 setup setup 1875611 Nov  1 19:43 composer.phar
-rw-rw-r--.  1 setup setup  263621 Nov  1 19:43 composer-setup.php
-rw-rw-r--.  1 setup setup    2639 Nov  1 19:43 csmenu.bat
drwxrwxr-x.  3 setup setup      34 Nov  1 19:43 drush
drwxrwxr-x.  6 setup setup      75 Nov  1 19:43 features
drwxrwxr-x.  8 setup setup     163 Nov  1 19:43 .git
-rw-rw-r--.  1 setup setup       9 Nov  1 19:43 .gitignore
drwxrwxr-x.  3 setup setup      15 Nov  1 19:43 in
-rw-rw-r--.  1 setup setup     780 Nov  1 19:43 .project
drwxrwxr-x.  2 setup setup     240 Nov  1 19:43 .settings
drwxrwxr-x.  3 setup setup      19 Nov  1 19:43 tests
drwxrwxr-x. 21 setup setup    4096 Nov  1 19:51 vendor
drwxrwxr-x.  2 setup setup      27 Nov  1 19:43 .vscode

 


[setup@c7 behatmink]$ cd bin/behat
-bash: cd: bin/behat: Not a directory
[setup@c7 behatmink]$ cd bin
[setup@c7 bin]$ ls
behat  behat.bat  behat-menu.bat  phantomjs.exe  phpunit  phpunit.bat
[setup@c7 bin]$ ls -la
total 18176
drwxrwxr-x.  2 setup setup      113 Nov  1 19:43 .
drwxrwxrwx. 11 setup root      4096 Nov  1 19:50 ..
-rw-rw-r--.  1 setup setup      308 Nov  1 19:43 behat
-rw-rw-r--.  1 setup setup      122 Nov  1 19:43 behat.bat
-rw-rw-r--.  1 setup setup     3724 Nov  1 19:43 behat-menu.bat
-rw-rw-r--.  1 setup setup 18587648 Nov  1 19:43 phantomjs.exe
-rw-rw-r--.  1 setup setup      310 Nov  1 19:43 phpunit
-rw-rw-r--.  1 setup setup      124 Nov  1 19:43 phpunit.bat

Make /behat/bin Executable


[setup@c7 bin]$ chmod +x behat
 

 


Run Behat


[setup@c7 behatmink]$ bin/behat -c behat.yml
@smoke @class_test
Feature: Reflection Test Feature2
  As an user, I want to be able to perform
  reflection tests

  @smoke
  Scenario: Test Should Pass # features/smoke/ReflectionSmokeTest.feature:6
    Given Test Should Pass   # FeatureContext::testShouldPass()
    When Test Result Passes  # FeatureContext::testResultPasses()
    Then Test Case Passes    # FeatureContext::testCasePasses()

  @smoke
  Scenario: Test Should Fail # features/smoke/ReflectionSmokeTest.feature:12
    Given Test Should Pass   # FeatureContext::testShouldPass()
    When Test Result Passes  # FeatureContext::testResultPasses()
    Then Test Case Fails     # FeatureContext::testCaseFails()
      Failed asserting that false is true.

--- Failed scenarios:

    features/smoke/ReflectionSmokeTest.feature:12

2 scenarios (1 passed, 1 failed)
6 steps (5 passed, 1 failed)
0m0.06s (11.26Mb)
[setup@c7 behatmink]$ sudo shutdown
[sudo] password for setup:
Shutdown scheduled for Thu 2018-11-01 19:57:40 CDT, use 'shutdown -c' to cancel.

 


 

 

 

[setup@c7 behatmink]$ ls
behat.yml  bin  composer.json  composer.lock  composer.phar  composer-setup.php  csmenu.bat  drush  features  in  tests  vendor
[setup@c7 behatmink]$ cd bin
[setup@c7 bin]$ ls
behat  behat.bat  behat-menu.bat  phantomjs.exe  phpunit  phpunit.bat
[setup@c7 bin]$ phantomjs --webdriver 8643
-bash: phantomjs: command not found


WGET PhantomJS


[setup@c7 bin]$ wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
--2018-11-01 20:25:40--  https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
Resolving bitbucket.org (bitbucket.org)... 18.205.93.0, 18.205.93.1, 18.205.93.2, ...
Connecting to bitbucket.org (bitbucket.org)|18.205.93.0|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://bbuseruploads.s3.amazonaws.com/fd96ed93-2b32-46a7-9d2b-ecbc0988516a/downloads/396e7977-71fd-4592-8723-495ca4cfa7cc/phantomjs-2.1.1-linux-x86_64.tar.bz2?Signature=ddFMQBXVxLpbypyjF%2Bi911Odexs%3D&Expires=1541123517&AWSAccessKeyId=AKIAIQWXW6WLXMB5QZAQ&versionId=null&response-content-disposition=attachment%3B%20filename%3D%22phantomjs-2.1.1-linux-x86_64.tar.bz2%22 [following]
--2018-11-01 20:25:40--  https://bbuseruploads.s3.amazonaws.com/fd96ed93-2b32-46a7-9d2b-ecbc0988516a/downloads/396e7977-71fd-4592-8723-495ca4cfa7cc/phantomjs-2.1.1-linux-x86_64.tar.bz2?Signature=ddFMQBXVxLpbypyjF%2Bi911Odexs%3D&Expires=1541123517&AWSAccessKeyId=AKIAIQWXW6WLXMB5QZAQ&versionId=null&response-content-disposition=attachment%3B%20filename%3D%22phantomjs-2.1.1-linux-x86_64.tar.bz2%22
Resolving bbuseruploads.s3.amazonaws.com (bbuseruploads.s3.amazonaws.com)... 52.216.16.112
Connecting to bbuseruploads.s3.amazonaws.com (bbuseruploads.s3.amazonaws.com)|52.216.16.112|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 23415665 (22M) [application/x-tar]
Saving to: ‘phantomjs-2.1.1-linux-x86_64.tar.bz2’

100%[=========================================================================================>] 23,415,665  18.9MB/s   in 1.2s   

2018-11-01 20:25:42 (18.9 MB/s) - ‘phantomjs-2.1.1-linux-x86_64.tar.bz2’ saved [23415665/23415665]

 


Make PhantomJS Executable

[setup@c7 bin]$ phantomjs --webdriver 8643
-bash: phantomjs: command not found
[setup@c7 bin]$ ls
behat  behat.bat  behat-menu.bat  phantomjs-2.1.1-linux-x86_64.tar.bz2  phantomjs.exe  phpunit  phpunit.bat
[setup@c7 bin]$ cd ..
[setup@c7 behatmink]$ cd ..
[setup@c7 www]$ ls
behatmink  cgi-bin  composer  html
[setup@c7 www]$ sudo mkdir tools



[setup@c7 www]$ ls
behatmink  cgi-bin  composer  html  tools

[setup@c7 www]$ ls -la
total 4
drwxr-xr-x.  7 root  root   79 Nov  1 20:28 .
drwxr-xr-x. 20 root  root  278 Nov  1 19:27 ..
drwxrwxrwx. 11 setup root 4096 Nov  1 19:50 behatmink
drwxr-xr-x.  2 root  root    6 Jun 27 08:49 cgi-bin
drwxrwxrwx.  2 root  root   53 Nov  1 19:50 composer
drwxr-xr-x.  2 root  root    6 Jun 27 08:49 html
drwxr-xr-x.  2 root  root    6 Nov  1 20:28 tools
 

Make Setup Owner of tools

[setup@c7 www]$ sudo chown setup tools
[setup@c7 www]$ ls
behatmink  cgi-bin  composer  html  tools
[setup@c7 www]$ ls -la
total 4
drwxr-xr-x.  7 root  root   79 Nov  1 20:28 .
drwxr-xr-x. 20 root  root  278 Nov  1 19:27 ..
drwxrwxrwx. 11 setup root 4096 Nov  1 19:50 behatmink
drwxr-xr-x.  2 root  root    6 Jun 27 08:49 cgi-bin
drwxrwxrwx.  2 root  root   53 Nov  1 19:50 composer
drwxr-xr-x.  2 root  root    6 Jun 27 08:49 html
drwxr-xr-x.  2 setup root    6 Nov  1 20:28 tools
[setup@c7 www]$ chmod 777 tools
[setup@c7 www]$ ls
behatmink  cgi-bin  composer  html  tools

 


 

Install BZIP2


[setup@c7 phantomjs]$ sudo yum install bzip2
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: repos-tx.psychz.net
 * epel: mirror.compevo.com
 * extras: repos-tx.psychz.net
 * ius: dfw.mirror.rackspace.com
 * updates: repos-tx.psychz.net
Resolving Dependencies
--> Running transaction check
---> Package bzip2.x86_64 0:1.0.6-13.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================
 Package                      Arch                          Version                              Repository                   Size
===================================================================================================================================
Installing:
 bzip2                        x86_64                        1.0.6-13.el7                         base                         52 k

Transaction Summary
===================================================================================================================================
Install  1 Package

Total download size: 52 k
Installed size: 82 k
Is this ok [y/d/N]: y
Downloading packages:
bzip2-1.0.6-13.el7.x86_64.rpm                                                                               |  52 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : bzip2-1.0.6-13.el7.x86_64                                                                                       1/1
  Verifying  : bzip2-1.0.6-13.el7.x86_64                                                                                       1/1

Installed:
  bzip2.x86_64 0:1.0.6-13.el7                                                                                                      

Complete!

 


unpack PhantomJS


[setup@c7 phantomjs]$ sudo tar xjf phantomjs-2.1.1-linux-x86_64.tar.bz2
[setup@c7 phantomjs]$ ls
phantomjs-2.1.1-linux-x86_64  phantomjs-2.1.1-linux-x86_64.tar.bz2
 

Make PhantomJS executable

 

[setup@c7 bin]$ phantomjs --webdriver 8643
-bash: phantomjs: command not found

 

[setup@c7 phantomjs]$ cd phantomjs-2.1.1-linux-x86_64
[setup@c7 phantomjs-2.1.1-linux-x86_64]$ ls
bin  ChangeLog  examples  LICENSE.BSD  README.md  third-party.txt
[setup@c7 phantomjs-2.1.1-linux-x86_64]$ cd bin
[setup@c7 bin]$ ls
phantomjs

 


[setup@c7 bin]$ sudo chmod +x phantomjs
 

 


Attempt Running PhantomJS without Dependencies

 

[setup@c7 bin]$ phantomjs --webdriver 8643
-bash: phantomjs: command not found
[setup@c7 bin]$ ls
phantomjs
[setup@c7 bin]$ ls -la
total 66340
drwxr-xr-x. 2 root root       23 Jan 24  2016 .
drwxr-xr-x. 4 root root      109 Jan 24  2016 ..
-rwxr-xr-x. 1 root root 67932064 Jan 24  2016 phantomjs
[setup@c7 bin]$ cd phantomjs
-bash: cd: phantomjs: Not a directory
[setup@c7 bin]$ sudo chown setup phantomjs
[setup@c7 bin]$ sudo chmod 777 phantomjs
[setup@c7 bin]$ ls
phantomjs
[setup@c7 bin]$ phantomjs
-bash: phantomjs: command not found

 


[setup@c7 bin]$ ./phantomjs
./phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

 


Install PhantomJS Dependencies


[setup@c7 bin]$ sudo yum install fontconfig freetype freetype-devel fontconfig-devel libstdc++
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: repos-tx.psychz.net
 * epel: mirror.compevo.com
 * extras: repos-tx.psychz.net
 * ius: dfw.mirror.rackspace.com
 * updates: repos-tx.psychz.net
Package freetype-2.4.11-15.el7.x86_64 already installed and latest version
Package libstdc++-4.8.5-28.el7_5.1.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package fontconfig.x86_64 0:2.10.95-11.el7 will be installed
--> Processing Dependency: fontpackages-filesystem for package: fontconfig-2.10.95-11.el7.x86_64
--> Processing Dependency: font(:lang=en) for package: fontconfig-2.10.95-11.el7.x86_64
---> Package fontconfig-devel.x86_64 0:2.10.95-11.el7 will be installed
--> Processing Dependency: pkgconfig(expat) for package: fontconfig-devel-2.10.95-11.el7.x86_64
---> Package freetype-devel.x86_64 0:2.4.11-15.el7 will be installed
--> Processing Dependency: zlib-devel for package: freetype-devel-2.4.11-15.el7.x86_64
--> Running transaction check
---> Package expat-devel.x86_64 0:2.1.0-10.el7_3 will be installed
---> Package fontpackages-filesystem.noarch 0:1.44-8.el7 will be installed
---> Package lyx-fonts.noarch 0:2.2.3-1.el7 will be installed
---> Package zlib-devel.x86_64 0:1.2.7-17.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================
 Package                                   Arch                     Version                           Repository              Size
===================================================================================================================================
Installing:
 fontconfig                                x86_64                   2.10.95-11.el7                    base                   229 k
 fontconfig-devel                          x86_64                   2.10.95-11.el7                    base                   128 k
 freetype-devel                            x86_64                   2.4.11-15.el7                     base                   356 k
Installing for dependencies:
 expat-devel                               x86_64                   2.1.0-10.el7_3                    base                    57 k
 fontpackages-filesystem                   noarch                   1.44-8.el7                        base                   9.9 k
 lyx-fonts                                 noarch                   2.2.3-1.el7                       epel                   159 k
 zlib-devel                                x86_64                   1.2.7-17.el7                      base                    50 k

Transaction Summary
===================================================================================================================================
Install  3 Packages (+4 Dependent packages)

Total download size: 990 k
Installed size: 3.6 M
Is this ok [y/d/N]: y
Downloading packages:
(1/7): expat-devel-2.1.0-10.el7_3.x86_64.rpm                                                                |  57 kB  00:00:00     
(2/7): fontpackages-filesystem-1.44-8.el7.noarch.rpm                                                        | 9.9 kB  00:00:00     
(3/7): freetype-devel-2.4.11-15.el7.x86_64.rpm                                                              | 356 kB  00:00:00     
(4/7): zlib-devel-1.2.7-17.el7.x86_64.rpm                                                                   |  50 kB  00:00:00     
(5/7): fontconfig-2.10.95-11.el7.x86_64.rpm                                                                 | 229 kB  00:00:00     
(6/7): fontconfig-devel-2.10.95-11.el7.x86_64.rpm                                                           | 128 kB  00:00:00     
(7/7): lyx-fonts-2.2.3-1.el7.noarch.rpm                                                                     | 159 kB  00:00:00     
-----------------------------------------------------------------------------------------------------------------------------------
Total                                                                                              909 kB/s | 990 kB  00:00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : fontpackages-filesystem-1.44-8.el7.noarch                                                                       1/7
  Installing : lyx-fonts-2.2.3-1.el7.noarch                                                                                    2/7
  Installing : fontconfig-2.10.95-11.el7.x86_64                                                                                3/7
  Installing : expat-devel-2.1.0-10.el7_3.x86_64                                                                               4/7
  Installing : zlib-devel-1.2.7-17.el7.x86_64                                                                                  5/7
  Installing : freetype-devel-2.4.11-15.el7.x86_64                                                                             6/7
  Installing : fontconfig-devel-2.10.95-11.el7.x86_64                                                                          7/7
  Verifying  : freetype-devel-2.4.11-15.el7.x86_64                                                                             1/7
  Verifying  : fontconfig-2.10.95-11.el7.x86_64                                                                                2/7
  Verifying  : lyx-fonts-2.2.3-1.el7.noarch                                                                                    3/7
  Verifying  : zlib-devel-1.2.7-17.el7.x86_64                                                                                  4/7
  Verifying  : fontconfig-devel-2.10.95-11.el7.x86_64                                                                          5/7
  Verifying  : fontpackages-filesystem-1.44-8.el7.noarch                                                                       6/7
  Verifying  : expat-devel-2.1.0-10.el7_3.x86_64                                                                               7/7

Installed:
  fontconfig.x86_64 0:2.10.95-11.el7      fontconfig-devel.x86_64 0:2.10.95-11.el7      freetype-devel.x86_64 0:2.4.11-15.el7     

Dependency Installed:
  expat-devel.x86_64 0:2.1.0-10.el7_3       fontpackages-filesystem.noarch 0:1.44-8.el7       lyx-fonts.noarch 0:2.2.3-1.el7      
  zlib-devel.x86_64 0:1.2.7-17.el7         

Complete!

 


 

setup config files ( if any )

 

 

create service wrapper

/etc/init.d/phantomjs

 

 


 

 

 

 


 

Source Information to Make This Happen

You can also retrieve the init script on Gist: phantomjs init script.

/etc/init.d/phantomjs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#! /bin/sh
# Init. script for phantomjs, based on Ubuntu 12.04 skeleton.
# Author: Anthony Lapenna <lapenna.anthony@gmail.com>
 
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Phantomjs service"
NAME=phantomjs
DAEMON=/usr/bin/$NAME
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
 
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
 
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
 
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
. /lib/lsb/init-functions
 
# Overridable options section
WEBDRIVER_PORT=8190
DEBUG=false
LOG_FILE=/var/log/phantomjs.log
 
# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
 
DAEMON_ARGS="--webdriver=$WEBDRIVER_PORT --debug=$DEBUG"
 
#
# Function that starts the daemon/service
#
do_start()
{
 # Return
 # 0 if daemon has been started
 # 1 if daemon was already running
 # 2 if daemon could not be started
 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
 || return 1
 start-stop-daemon --start --background --quiet --pidfile $PIDFILE --exec /bin/bash -- -c "$DAEMON $DAEMON_ARGS > $LOG_FILE 2>&1" \
 || return 2
 # Add code here, if necessary, that waits for the process to be ready
 # to handle requests from services started subsequently which depend
 # on this one. As a last resort, sleep for some time.
}
 
#
# Function that stops the daemon/service
#
do_stop()
{
 # Return
 # 0 if daemon has been stopped
 # 1 if daemon was already stopped
 # 2 if daemon could not be stopped
 # other if a failure occurred
 start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
 RETVAL="$?"
 [ "$RETVAL" = 2 ] && return 2
 # Wait for children to finish too if this is a daemon that forks
 # and if the daemon is only ever run from this initscript.
 # If the above conditions are not satisfied then add some other code
 # that waits for the process to drop all resources that could be
 # needed by services started subsequently. A last resort is to
 # sleep for some time.
 start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
 [ "$?" = 2 ] && return 2
 # Many daemons don't delete their pidfiles when they exit.
 rm -f $PIDFILE
 return "$RETVAL"
}
 
#
# Function that sends a SIGHUP to the daemon/service
#
do_reload() {
 #
 # If the daemon can reload its configuration without
 # restarting (for example, when it is sent a SIGHUP),
 # then implement that here.
 #
 start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
 return 0
}
 
case "$1" in
 start)
 [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
 do_start
 case "$?" in
 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
 esac
 ;;
 stop)
 [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
 do_stop
 case "$?" in
 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
 esac
 ;;
 status)
 status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
 ;;
 #reload|force-reload)
 #
 # If do_reload() is not implemented then leave this commented out
 # and leave 'force-reload' as an alias for 'restart'.
 #
 #log_daemon_msg "Reloading $DESC" "$NAME"
 #do_reload
 #log_end_msg $?
 #;;
 restart|force-reload)
 #
 # If the "reload" option is implemented then remove the
 # 'force-reload' alias
 #
 log_daemon_msg "Restarting $DESC" "$NAME"
 do_stop
 case "$?" in
 0|1)
 do_start
 case "$?" in
 0) log_end_msg 0 ;;
 1) log_end_msg 1 ;; # Old process is still running
 *) log_end_msg 1 ;; # Failed to start
 esac
 ;;
 *)
 # Failed to stop
 log_end_msg 1
 ;;
 esac
 ;;
 *)
 echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
 exit 3
 ;;
esac
 
:

This file needs to have execution permissions:

1
$ sudo chmod +x /etc/init.d/phantomjs

You can define overridable options in the following file:

/etc/default/phantomjs

1
WEBDRIVER_PORT=8190

If you want the service to start at boot time, type the following command:

1
$ update-rc.d phantomjs defaults

And here you go, you can now manage phantomjs using the service start/stop/status commands. Note that the stop command will requires a few seconds to shutdown the process.

 

 


 

 


Create Tools Directory for Behat/Phantom/Composer Tools


[setup@c7 www]$ mv --help
Usage: mv [OPTION]... [-T] SOURCE DEST
  or:  mv [OPTION]... SOURCE... DIRECTORY
  or:  mv [OPTION]... -t DIRECTORY SOURCE...
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.

Mandatory arguments to long options are mandatory for short options too.
      --backup[=CONTROL]       make a backup of each existing destination file
  -b                           like --backup but does not accept an argument
  -f, --force                  do not prompt before overwriting
  -i, --interactive            prompt before overwrite
  -n, --no-clobber             do not overwrite an existing file
If you specify more than one of -i, -f, -n, only the final one takes effect.
      --strip-trailing-slashes  remove any trailing slashes from each SOURCE
                                 argument
  -S, --suffix=SUFFIX          override the usual backup suffix
  -t, --target-directory=DIRECTORY  move all SOURCE arguments into DIRECTORY
  -T, --no-target-directory    treat DEST as a normal file
  -u, --update                 move only when the SOURCE file is newer
                                 than the destination file or when the
                                 destination file is missing
  -v, --verbose                explain what is being done
  -Z, --context                set SELinux security context of destination
                                 file to default type
      --help     display this help and exit
      --version  output version information and exit

The backup suffix is '~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.
The version control method may be selected via the --backup option or through
the VERSION_CONTROL environment variable.  Here are the values:

  none, off       never make backups (even if --backup is given)
  numbered, t     make numbered backups
  existing, nil   numbered if numbered backups exist, simple otherwise
  simple, never   always make simple backups

GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
For complete documentation, run: info coreutils 'mv invocation'
[setup@c7 www]$ ls -la
total 4
drwxr-xr-x.  7 root  root   79 Nov  1 20:28 .
drwxr-xr-x. 20 root  root  278 Nov  1 19:27 ..
drwxrwxrwx. 11 setup root 4096 Nov  1 19:50 behatmink
drwxr-xr-x.  2 root  root    6 Jun 27 08:49 cgi-bin
drwxrwxrwx.  2 root  root   53 Nov  1 19:50 composer
drwxr-xr-x.  2 root  root    6 Jun 27 08:49 html
drwxrwxrwx.  2 setup root    6 Nov  1 20:28 tools
[setup@c7 www]$ mv -t tools composer
mv: cannot move ‘composer’ to ‘tools/composer’: Permission denied
[setup@c7 www]$ sudo mv -t tools composer
[sudo] password for setup:
Sorry, try again.
[sudo] password for setup:
[setup@c7 www]$ ls
behatmink  cgi-bin  html  tools
[setup@c7 www]$ cd tools
[setup@c7 tools]$ ls
composer
[setup@c7 tools]$ cd ..
[setup@c7 www]$ ls
behatmink  cgi-bin  html  tools
[setup@c7 www]$ cd behatmink/
[setup@c7 behatmink]$ cd bin
[setup@c7 bin]$ ls
behat  behat.bat  behat-menu.bat  phantomjs-2.1.1-linux-x86_64.tar.bz2  phantomjs.exe  phpunit  phpunit.bat
[setup@c7 bin]$ mv -t /var/www/tools  phantomjs-2.1.1-linux-x86_64.tar.bz2
[setup@c7 bin]$ cd ..
[setup@c7 behatmink]$ cd ..
[setup@c7 www]$ ls
behatmink  cgi-bin  html  tools
[setup@c7 www]$ cd tolls
-bash: cd: tolls: No such file or directory
[setup@c7 www]$ ls
behatmink  cgi-bin  html  tools
[setup@c7 www]$ cd tools/
[setup@c7 tools]$ ls
composer  phantomjs-2.1.1-linux-x86_64.tar.bz2
[setup@c7 tools]$ mkdir phantomjs
[setup@c7 tools]$ ls
composer  phantomjs  phantomjs-2.1.1-linux-x86_64.tar.bz2
[setup@c7 tools]$ chmod 777 phantomjs
[setup@c7 tools]$ ls
composer  phantomjs  phantomjs-2.1.1-linux-x86_64.tar.bz2
[setup@c7 tools]$ mv -t phantomjs phantomjs-2.1.1-linux-x86_64.tar.bz2
[setup@c7 tools]$ cd phantomjs/
[setup@c7 phantomjs]$ ls
phantomjs-2.1.1-linux-x86_64.tar.bz2
[setup@c7 phantomjs]$ tar xjf phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
[setup@c7 phantomjs]$ ls
phantomjs-2.1.1-linux-x86_64.tar.bz2
[setup@c7 phantomjs]$ sudo tar xjf phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

 

 


 

Install wget


[setup@c7 bin]$ sudo yum install wget
[sudo] password for setup:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: repos-tx.psychz.net
 * epel: mirror.compevo.com
 * extras: repos-tx.psychz.net
 * ius: ius.mirror.constant.com
 * updates: repos-tx.psychz.net
Resolving Dependencies
--> Running transaction check
---> Package wget.x86_64 0:1.14-15.el7_4.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================
 Package                    Arch                         Version                                  Repository                  Size
===================================================================================================================================
Installing:
 wget                       x86_64                       1.14-15.el7_4.1                          base                       547 k

Transaction Summary
===================================================================================================================================
Install  1 Package

Total download size: 547 k
Installed size: 2.0 M
Is this ok [y/d/N]: y
Downloading packages:
wget-1.14-15.el7_4.1.x86_64.rpm                                                                             | 547 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : wget-1.14-15.el7_4.1.x86_64                                                                                     1/1
  Verifying  : wget-1.14-15.el7_4.1.x86_64                                                                                     1/1

Installed:
  wget.x86_64 0:1.14-15.el7_4.1                                                                                                    

Complete!

 


Installer Script for Ubuntu 16.04

#!/bin/bash

sudo apt-get remove phantomjs
sudo unlink /usr/local/bin/phantomjs
sudo unlink /usr/local/share/phantomjs
sudo unlink /usr/bin/phantomjs

cd /usr/local/share

sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2
sudo tar xjf phantomjs-1.9.7-linux-x86_64.tar.bz2

sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/bin/phantomjs

exit 0