Centos7

CentOS7: 04-PhantomJS systemd Service Wrapper

  • systemd makes simple services so much easier to deal with

 

Create phantomjs.service

touch /etc/systemd/system/phantomjs

 

[setup@c7 ~]$ cd /etc/systemd
[setup@c7 systemd]$ ls
bootchart.conf  coredump.conf  journald.conf  logind.conf  system  system.conf  user  user.conf
[setup@c7 systemd]$ cd system


[setup@c7 system]$ sudo touch phantomjs.service
[sudo] password for setup:

 

CentOS7: 04-PhantomJS Service Wrapper

 

 


create phantomjs service script

/etc/init.d/phantomjs

[setup@c7 ~]$ cd /etc
[setup@c7 etc]$ cd init.d
[setup@c7 init.d]$ ls
functions  netconsole  network  README
[setup@c7 init.d]$ touch phantomjs
touch: cannot touch ‘phantomjs’: Permission denied
[setup@c7 init.d]$ sudo touch phantomjs

sudo chmod +x phantomjs

 

 


create phantomjs config script

/etc/default/phantomjs

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

 

 

CentOS7: 02-VM Behat Mink

create /var/www/behatmink

mkdir /var/www/behatmink

 

chown behatmink to setup user

[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

 

 

git 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.

 

CentOS7: RDP Support ( xRDP )

CentOS 7 Gnome Install

https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-gnome-gui-on-centos-7-rhel-7.html

List yum packages

# yum group list
# yum groupinstall "GNOME Desktop" "Graphical Administration Tools"

Enable GUI on start

# ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
# reboot

 

xRDP Installation

https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-xrdp-on-centos-7-rhel-7.html

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum -y install xrdp tigervnc-server

Start xrdp & check its listener

Tags
Subscribe to Centos7