{"id":7440,"date":"2024-04-18T23:10:01","date_gmt":"2024-04-18T20:10:01","guid":{"rendered":"https:\/\/sunucucozumleri.com\/?p=7440"},"modified":"2024-04-18T23:10:01","modified_gmt":"2024-04-18T20:10:01","slug":"phantomjs-nedir-windows-ve-linux-icin-phantomjs-kurulumu","status":"publish","type":"post","link":"https:\/\/sunucucozumleri.com\/blog\/phantomjs-nedir-windows-ve-linux-icin-phantomjs-kurulumu\/","title":{"rendered":"PhantomJS Nedir? Windows ve Linux \u0130\u00e7in PhantomJS Kurulumu"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Makale \u0130\u00e7eri\u011fi<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"\u0130\u00e7indekiler Tablosunu A\u00e7\/Kapat\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/sunucucozumleri.com\/blog\/phantomjs-nedir-windows-ve-linux-icin-phantomjs-kurulumu\/#PhantomJS_nedir\" >PhantomJS nedir?<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/sunucucozumleri.com\/blog\/phantomjs-nedir-windows-ve-linux-icin-phantomjs-kurulumu\/#Linux_PhantomJS_Kurulumu\" >Linux PhantomJS Kurulumu<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"PhantomJS_nedir\"><\/span>PhantomJS nedir?<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<p>PhantomJS, en basit ifadeyle, javascript API kullanan ba\u015fs\u0131z bir taray\u0131c\u0131d\u0131r (ba\u015fs\u0131z, yani GUI&#8217;siz). Bu i\u015flev, a\u015fa\u011f\u0131daki ama\u00e7larla kullan\u0131ld\u0131\u011f\u0131nda taray\u0131c\u0131y\u0131 \u00e7ok kullan\u0131\u015fl\u0131 hale getirir:<\/p>\n<p>Sayfa otomasyonu &#8211; Standart DOM API&#8217;yi veya jQuery gibi ola\u011fan k\u00fct\u00fcphaneleri kullanarak web sayfalar\u0131na eri\u015fme ve bilgi \u00e7\u0131karma.<br \/>\nEkran yakalama &#8211; SVG ve Canvas dahil olmak \u00fczere web i\u00e7eri\u011fini programl\u0131 olarak yakalama. K\u00fc\u00e7\u00fck resim \u00f6nizlemesiyle web sitesi ekran g\u00f6r\u00fcnt\u00fcleri olu\u015fturun.<br \/>\nBa\u015fs\u0131z web sitesi testi &#8211; Jasmine, QUnit, Mocha ve WebDriver \u00e7er\u00e7eveleriyle i\u015flevsel testler y\u00fcr\u00fctmek.<br \/>\nA\u011f izleme &#8211; Sayfa y\u00fckleme s\u00fcrelerinin izlenmesi ve bu bilgilerin standart HAR dosyalar\u0131 olarak d\u0131\u015fa aktar\u0131lmas\u0131. Ayr\u0131ca YSlow ve Jenkins kullanarak performans analizini otomatikle\u015ftirir<\/p>\n<p><strong>\u00d6nko\u015fullar<\/strong><br \/>\nPhantomJS&#8217;in do\u011fru \u015fekilde kuruldu\u011fundan ve \u00e7al\u0131\u015ft\u0131\u011f\u0131ndan emin olmak i\u00e7in a\u015fa\u011f\u0131daki paketlerin sistemimizde y\u00fckl\u00fc ve g\u00fcncel oldu\u011funu do\u011frulamam\u0131z gerekir:<br \/>\nglibc<br \/>\nfontconfig<br \/>\nfontconfig-devel<br \/>\nfreetype<br \/>\nfreetype-devel<br \/>\nwget<br \/>\nbzip2<br \/>\nGerekli t\u00fcm paketlerin kurulu olup olmad\u0131\u011f\u0131n\u0131 do\u011frulaman\u0131n en iyi yolu \u201cYUM kurulu paketleri listele\u201d komutunu kullanmakt\u0131r. Bunu a\u015fa\u011f\u0131daki komutu kullanarak kontrol edebiliriz:<\/p>\n<p><code><br \/>\nyum list installed<br \/>\n<\/code><br \/>\nBu komut, kurulu t\u00fcm paketleri alfabetik s\u0131rayla listeler.<\/p>\n<p>Y\u00fckl\u00fc paketlerin listesi olduk\u00e7a uzun olabilece\u011finden, list komutundan sonra verilen &#8220;more&#8221; veya &#8220;less&#8221; komutlar\u0131n\u0131 kullanmak, listede h\u0131zl\u0131 bir \u015fekilde gezinmenize olanak tan\u0131r.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Linux_PhantomJS_Kurulumu\"><\/span>Linux PhantomJS Kurulumu<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>PhantomJS geleneksel anlamda kurulum gerektirmez. Tek yapmam\u0131z gereken resmi web sitesinden en son s\u00fcr\u00fcm\u00fc indirmek ve ard\u0131ndan ar\u015fivi istenen sistem konumuna \u00e7\u0131karmak.<\/p>\n<p>\u0130leriye do\u011fru dosyay\u0131 indirmek i\u00e7in wget&#8217;i kullanabiliriz:<\/p>\n<p>[root@sunucucozumleri~]# wget https:\/\/bitbucket.org\/ariya\/phantomjs\/downloads\/phantomjs-2.1.1-linux-x86_64.tar.bz2<\/p>\n<p>\u0130ndirme i\u015flemi tamamland\u0131ktan sonra dosyalar\u0131 \u00e7\u0131karmam\u0131z gerekecek:<\/p>\n<p>[root@sunucucozumleri~]# tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2 -C \/usr\/local\/share\/<\/p>\n<p>Dosyalar \u00e7\u0131kar\u0131ld\u0131ktan sonra PhantomJS ikili dosyas\u0131 ile sistem bin dizini aras\u0131nda yumu\u015fak (veya &#8220;sembolik&#8221;) bir ba\u011flant\u0131 olu\u015fturmam\u0131z gerekecek.<\/p>\n<p>[root@sunucucozumleri~]# ln -sf \/usr\/local\/share\/phantomjs-2.1.1-linux-x86_64\/bin\/phantomjs \/usr\/local\/bin<\/p>\n<p><strong>PhantomJS Kurulumunu Do\u011frulay\u0131n<\/strong><\/p>\n<p>[root@sunucucozumleri~]# phantomjs &#8211;version<\/p>\n<p>Yeni istemde \u201cphantom.version\u201d komutunu yaz\u0131n. \u00c7\u0131kt\u0131 \u015fu \u015fekilde g\u00f6r\u00fcnmelidir:<\/p>\n<p>[root@sunucucozumleri~]# phantomjs<br \/>\nphantomjs&gt; phantom.version<br \/>\n{<br \/>\n&#8220;major&#8221;: 2,<br \/>\n&#8220;Minor&#8221;: 1,<br \/>\n&#8220;patch&#8221;: 1<br \/>\n}<br \/>\nPhantomJS&#8217;yi test edelim<\/p>\n<p>Her \u015feyin ama\u00e7land\u0131\u011f\u0131 gibi \u00e7al\u0131\u015ft\u0131\u011f\u0131ndan emin olmak i\u00e7in k\u0131sa bir .js beti\u011fi olu\u015fturaca\u011f\u0131z. A\u015fa\u011f\u0131daki sat\u0131rlar\u0131 i\u00e7eren yeni bir metin dosyas\u0131 olu\u015fturun:<\/p>\n<p>console.log(&#8216;Hello, world!&#8217;);<br \/>\nphantom.exit();<\/p>\n<p>Bunu helloworld.js olarak kaydedin ve \u00e7al\u0131\u015ft\u0131r\u0131n:<\/p>\n<p>[root@sunucucozumleri~]# phantomjs helloworld.js<\/p>\n<p>Her \u015fey d\u00fczg\u00fcn \u00e7al\u0131\u015f\u0131yorsa \u00e7\u0131kt\u0131 \u015f\u00f6yle g\u00f6r\u00fcnmelidir:<\/p>\n<p>[root@sunucucozumleri~]# phantomjs helloworld.js<\/p>\n<p>Hello, world!<\/p>\n<p>Bir ek not olarak, <strong>Ubuntu kurulumu<\/strong> yum yerine apt-get kullanmam\u0131z d\u0131\u015f\u0131nda hemen hemen ayn\u0131d\u0131r.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PhantomJS nedir? PhantomJS, en basit ifadeyle, javascript API kullanan ba\u015fs\u0131z bir taray\u0131c\u0131d\u0131r (ba\u015fs\u0131z, yani GUI&#8217;siz). Bu i\u015flev, a\u015fa\u011f\u0131daki ama\u00e7larla kullan\u0131ld\u0131\u011f\u0131nda taray\u0131c\u0131y\u0131 \u00e7ok kullan\u0131\u015fl\u0131 hale getirir: Sayfa otomasyonu &#8211; Standart DOM API&#8217;yi veya jQuery gibi ola\u011fan k\u00fct\u00fcphaneleri kullanarak web sayfalar\u0131na eri\u015fme ve bilgi \u00e7\u0131karma. Ekran yakalama &#8211; SVG ve Canvas dahil olmak \u00fczere web i\u00e7eri\u011fini programl\u0131 &hellip;<\/p>\n","protected":false},"author":1,"featured_media":7441,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-7440","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"acf":[],"_links":{"self":[{"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/posts\/7440","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/comments?post=7440"}],"version-history":[{"count":0,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/posts\/7440\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/media\/7441"}],"wp:attachment":[{"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/media?parent=7440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/categories?post=7440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sunucucozumleri.com\/blog\/wp-json\/wp\/v2\/tags?post=7440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}