LoginSignup
7
7

More than 5 years have passed since last update.

phantomjs常駐化

Posted at

phantomjsを常駐化させた際のメモ.
initctlの簡単な使い方も記す.

環境

$ cat /etc/redhat-release 
CentOS release 6.2 (Final)

phantomjs用ファイルを作成

# vim /etc/init/phantom.conf

description "phantomjs-resident"
author "richasonson"

start on runlevel [2345]
stop on runlevel [016]

exec phantomjs --webdriver=8643 --webdriver-logfile=/tmp/phantom.log
respawn


登録されているupstartを確認

$ initctl list

起動

# initctl start phantom

停止

# initctl stop phantom

状態を確認

$ initctl status phantom
(起動時) phantom start/running, process 4098 
(停止時) phantom stop/waiting 
7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7