{"id":288954,"date":"2023-12-16T21:09:57","date_gmt":"2023-12-16T13:09:57","guid":{"rendered":"https:\/\/lrxjmw.cn\/pxzlhjxwdyxp.html"},"modified":"2023-12-16T21:09:57","modified_gmt":"2023-12-16T13:09:57","slug":"pxzlhjxwdyxp","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/pxzlhjxwdyxp.html","title":{"rendered":"phantomjs linux \u4e0b\u8f7d Linux\u73af\u5883\u4e0b\u7a33\u5b9a\u8fd0\u884cPhantomJS\u7684\u7ec8\u6781\u6307\u5357"},"content":{"rendered":"

\u4eb2\u7231\u7684\u7528\u6237\uff0c\u6211\u4eec\u5f88\u8363\u5e78\u7ed9\u60a8\u6df1\u5165\u8bb2\u89e3PhantomJS\uff0c\u8fd9\u662f\u4e00\u6b3e\u57fa\u4e8e\u5f00\u6e90\u7684WebKit\u5f15\u64ce\u7684\u65e0\u754c\u9762\u6d4f\u89c8\u5668\uff0c\u4e13\u95e8\u7528\u4e8e\u7f51\u9875\u81ea\u52a8\u5316\u6d4b\u8bd5\u3002\u4e3a\u4e86\u4fdd\u8bc1\u5728Linux<\/a>\u73af\u5883\u4e0b\u7a33\u5b9a\u8fd0\u884cphantomjs linux \u4e0b\u8f7d<\/strong>\uff0c\u8bf7\u60a8\u7279\u522b\u5173\u6ce8\u5982\u4e0b\u91cd\u8981\u4e8b\u9879:<\/p>\n

1.\u9009\u62e9\u5408\u9002\u7684\u7248\u672c<\/b><\/p>\n

\u6839\u636e\u60a8\u4f7f\u7528\u7684\u64cd\u4f5c\u7cfb\u7edf<\/a>phantomjs linux \u4e0b\u8f7d<\/strong>\uff0c\u6211\u4eec\u63a8\u8350\u9002\u5b9c\u7684 PhantomJS \u7248\u672c\u3002\u8bf7\u6ce8\u610f\uff0cLinux \u7684\u5404\u4e2a\u7248\u672c\uff08\u5982 Ubuntu \u548c CentOS\uff09\u7684\u914d\u5957\u8f6f\u4ef6\u5305\u7ba1\u7406\u5de5\u5177\u53ef\u80fd\u7565\u6709\u4e0d\u540c\u3002\u4e3a\u786e\u4fdd PhantomJS \u5e73\u7a33\u8fd0\u884c\uff0c\u656c\u8bf7\u786e\u4fdd\u4e0b\u8f7d\u7684\u7248\u672c\u4e0e\u5b9e\u9645\u9700\u6c42\u76f8\u5339\u914d\u3002<\/p>\n

2.\u4e0b\u8f7d\u5730\u5740<\/b><\/p>\n

\u60a8\u53ef\u4ee5\u524d\u5f80 \u7684\u5b98\u65b9\u4e0b\u8f7d\u7ad9\u70b9\uff0c\u9009\u62e9\u9002\u5408 Linux \u7cfb\u7edf\u7684\u7248\u672c\uff0c\u7136\u540e\u76f4\u63a5\u4e0b\u8f7d PhantomJS \u7684\u538b\u7f29\u5305\u5373\u53ef\u3002<\/p>\n

3.\u89e3\u538b\u5b89\u88c5<\/b><\/p>\n

\u5c0a\u656c\u7684\u7528\u6237\u6df1\u5ea6linux\uff0c\u9996\u5148\u8bf7\u5c06\u6536\u5230\u7684\u538b\u7f29\u5305\u5728\u6307\u5b9a\u6587\u4ef6\u5939\u4e2d\u89e3\u538b\u7f29\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u4f7f\u7528PhantomJS\u3002\u4e3a\u4e86\u4fdd\u8bc1\u60a8\u7684\u65b9\u4fbf\u6027\uff0c\u6211\u4eec\u5efa\u8bae\u60a8\u9009\u62e9\u5c06\u89e3\u538b\u540e\u7684\u6587\u4ef6\u4fdd\u5b58\u81f3\u7cfb\u7edf\u7684\u5168\u5c40\u8def\u5f84\u3002<\/p>\n

4.\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/b><\/p>\n

\u4e3a\u4fbf\u4e8e\u7528\u6237\u5728\u7ec8\u7aef\u4eab\u53d7\u9ad8\u6548\u7684PhantomJS\u6307\u4ee4\u4f7f\u7528\u4f53\u9a8c\uff0c\u5efa\u8bae\u5c06\u89e3\u538b\u540e\u7684PhantomJS\u76ee\u5f55\u8def\u5f84\u6dfb\u52a0\u5165\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u5f53\u4e2d\u3002\u7136\u540e\u6253\u5f00\u7ec8\u7aef\u5e94\u7528\u7a0b\u5e8f\uff0c\u5bfb\u627e\u540d\u79f0\u4e3a\".bashrc\"\u6216\u8005\".profile\"\u7684\u6587\u4ef6\u3002\u5728\u8be5\u6587\u4ef6\u5185\u6dfb\u52a0\u5982\u4e0b\u8bbe\u7f6e\u5373\u53ef\uff1a<\/p>\n

```<\/p>\n

\u82e5\u613f\u66f4\u65b9\u4fbf\u5730\u4f7f\u7528 PhantomJS\uff0c\u5efa\u8bae\u5c06\u5f53\u524d\u73af\u5883\u53d8\u91cf$PATH\u9002\u5f53\u8c03\u6574\u4e3a$PATH:\/\/path\/to\/phantomjs\/bin\u3002<\/p>\n

\u4fdd\u5b58\u5e76\u9000\u51fa\uff0c\u7136\u540e\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4<\/a>\u4f7f\u4fee\u6539\u751f\u6548\uff1a<\/p>\n

source ~\/.bashrc<\/p>\n

source ~\/.profile<\/p>\n

5.\u6d4b\u8bd5\u5b89\u88c5\u7ed3\u679c<\/b><\/p>\n

\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u9a8c\u8bc1PhantomJS\u662f\u5426\u5b89\u88c5\u6210\u529f\uff1a<\/p>\n

phantomjs --version<\/p>\n

\u795d\u8d3a\u60a8\u83b7\u5f97\u4e86\u865a\u5e7b\u955c\u50cf\u5904\u7406\u7a0b\u5e8f\uff08PhantomJS\uff09\u7684\u51c6\u786e\u7248\u672c\u4fe1\u606f\uff0c\u8fd9\u8868\u660e\u5df2\u7ecf\u6210\u529f\u5730\u5b8c\u6210\u4e86\u5b89\u88c5\u64cd\u4f5c\u3002<\/p>\n

6.\u9047\u5230\u95ee\u9898\u600e\u4e48\u529e\uff1f<\/b><\/p>\n

\u82e5\u5728\u4e0b\u8f7d\u6216\u5b89\u88c5\u4e2d\u6709\u7591\u95ee\uff0c\u656c\u8bf7\u8bbf\u95ee\u5b98\u7f51\u67e5\u770b\u8be6\u7ec6\u6559\u7a0b\u548c\u89e3\u7b54\u3002\u6b64\u5916\uff0c\u8fd8\u53ef\u4ee5\u524d\u5f80\u76f8\u5173\u6280\u672f\u4ea4\u6d41\u533a\u627e\u5bfb\u4e13\u4e1a\u8d44\u6e90\u83b7\u53d6\u5e2e\u52a9\u54e6\uff01<\/p>\n

7.\u5b9a\u671f\u66f4\u65b0\u7248\u672c<\/b><\/p>\n

\u656c\u8bf7\u5173\u6ce8\u6211\u4eec\u7684PhantomJS\u9879\u76ee\uff0c\u8fd9\u662f\u4e00\u4e2a\u6301\u7eed\u53d1\u5c55\u7684\u5f00\u6e90\u9879\u76ee\u3002\u6211\u4eec\u7ecf\u9a8c\u4e30\u5bcc\u7684\u7814\u53d1\u56e2\u961f\u4e0d\u65ad\u63a8\u51fa\u65b0\u7248\u672c\uff0c\u8865\u5145\u65b0\u529f\u80fd\u3001\u4fee\u590d\u6f0f\u6d1elinux\u8fd0\u7ef4\u535a\u5ba2\uff0c\u4ee5\u63d0\u5347\u7528\u6237\u4f53\u9a8c\u548c\u786e\u4fdd\u6700\u4f73\u7cfb\u7edf\u6027\u80fd\u3002\u656c\u8bf7\u60a8\u7559\u610f\u5b98\u65b9\u7f51\u7ad9\u7684\u66f4\u65b0\u4fe1\u606f\uff0c\u9002\u65f6\u5347\u7ea7\u5230\u6700\u65b0\u7684\u7248\u672c\uff0c\u611f\u8c22\u60a8\u5bf9\u6211\u4eec\u4ea7\u54c1\u7684\u652f\u6301\uff01<\/p>\n

\u671f\u671b\u60a8\u80fd\u6309\u7167\u4e0a\u8ff0\u8be6\u7ec6\u6b65\u9aa4\u6210\u529f\u4e0b\u8f7d\u5e76\u987a\u5229\u5730\u5728Linux\u7cfb\u7edf\u4e0a\u90e8\u7f72PhantomJS\u3002\u795d\u60a8\u4f7f\u7528\u6109\u5feb\u54e6\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5e73\u7a33\u8fd0\u884c\uff0c\u656c\u8bf7\u786e\u4fdd\u4e0b\u8f7d\u7684\u7248\u672c\u4e0e\u5b9e\u9645\u9700\u6c42\u76f8\u5339\u914d\u3002\u4e3a\u4e86\u4fdd\u8bc1\u60a8\u7684\u65b9\u4fbf\u6027\uff0c\u6211\u4eec\u5efa\u8bae\u60a8\u9009\u62e9\u5c06\u89e3\u538b\u540e\u7684\u6587\u4ef6\u4fdd\u5b58\u81f3\u7cfb\u7edf\u7684\u5168\u5c40\u8def\u5f84\u3002PhantomJS\uff0c\u5efa\u8bae\u5c06\u5f53\u524d\u73af\u5883\u53d8\u91cf$PATH\u9002\u5f53\u8c03\u6574\u4e3a$PATH:\/\/path\/to\/phantomjs\/bin\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-288954","post","type-post","status-publish","format-standard","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/288954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=288954"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/288954\/revisions"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=288954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=288954"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=288954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}