<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>DigitalOcean on 答えを知りたい</title><link>https://hack.ironsand.net/tags/digitalocean/</link><description>Recent content in DigitalOcean on 答えを知りたい</description><generator>Hugo -- 0.147.9</generator><language>en-US</language><lastBuildDate>Thu, 27 Mar 2014 14:23:54 +0000</lastBuildDate><atom:link href="https://hack.ironsand.net/tags/digitalocean/index.xml" rel="self" type="application/rss+xml"/><item><title>[失敗] VPS上のUbuntu12.04にHeadlessなChromeかFirefoxをインストールするためにやったこと</title><link>https://hack.ironsand.net/2014/install-headless-chrome-or-firefox-in-ubuntu-on-vps/</link><pubDate>Thu, 27 Mar 2014 14:23:54 +0000</pubDate><guid>https://hack.ironsand.net/2014/install-headless-chrome-or-firefox-in-ubuntu-on-vps/</guid><description>&lt;p>phantomjs でzipファイルをダウンロードしたかったけど、ダウンロードオプションはまだ本体には取り込まれてないようなのでheadlessなChromeかFirefoxをVPSに入れて幸せな自動化処理生活を送ろうと思ったら全然うまく行きませんでした。&lt;/p>
&lt;p>俺の苦労を返せ！&lt;/p>
&lt;h3 id="やったこと">やったこと&lt;/h3>
&lt;p>めんどくさいので説明は最低限で。&lt;/p>
&lt;p>FirefoxとChrome、それにSelenium Webdriverで使うためのChromeDriverをインストール&lt;/p>
&lt;pre class="lang:sh decode:true " >apt-get install git unzip xvfb
echo 'deb http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu precise main' &amp;gt;&amp;gt; /etc/apt/sources.list
echo 'deb-src http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu precise main' &amp;gt;&amp;gt; /etc/apt/sources.list
apt-get install firefox
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" &amp;gt;&amp;gt; /etc/apt/sources.list.d/google.list
apt-get install google-chrome-stable
wget http://chromedriver.storage.googleapis.com/2.9/chromedriver_linux64.zip
unzip chromedriver_linux64.zip
mv chromdriver /usr/local/bin&lt;/pre>
&lt;p>この時点で&lt;/p>
&lt;pre class="lang:sh decode:true " >Xvfb :1 &amp;
export DISPLAY=:1
firefox&lt;/pre>
&lt;p>すればFirefoxが立ち上がるはずだけどエラーが出てうまくいかない。&lt;/p>
&lt;p>色々と検索してみるけど結局エラーを除去する方法は見つからず。&lt;/p>
&lt;h3 id="rubyとか">Rubyとか&lt;/h3>
&lt;p>こちらはRubyを入れて&lt;code>selenium-webdriver&lt;/code>を入れるまでのよくある感じのインストールメモ。DigitalOcean上のUbuntuにrootでログインしてそのままやってます。&lt;/p></description></item><item><title>linuxで特定のファイルの最終行だけ削除する</title><link>https://hack.ironsand.net/2014/delete-list-line-of-a-file-in-linux-by-using-sed/</link><pubDate>Thu, 27 Mar 2014 11:57:07 +0000</pubDate><guid>https://hack.ironsand.net/2014/delete-list-line-of-a-file-in-linux-by-using-sed/</guid><description>&lt;p>Digital Ocean では OS を気軽に Droplet で作成して、気軽にポイポイ捨てれるのが売りですが、そのせいで &lt;code>ssh&lt;/code>で新しく繋ぎ直したホストに繋ごうとすると&lt;/p>
&lt;pre class="lang:default decode:true " >@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Please contact your system administrator.
Add correct host key in /home/ironsand/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/ironsand/.ssh/known_hosts:18
RSA host key for 107.170.114.105 has changed and you have requested strict checking.
Host key verification failed.&lt;/pre>
&lt;p>と怒られてしまう。&lt;/p></description></item></channel></rss>