LoginSignup
1
2

More than 5 years have passed since last update.

ubuntuにchromy入れるまでの手順

Last updated at Posted at 2017-08-15

Lightsail で Ubuntu のインスタンス(OSのみ)を立ち上げて、chromyが動作するまでの手順メモ。

iptables の設定

参考: ファイアウォールiptablesを簡単解説~初心者でもよくわかる!VPSによるWebサーバー運用講座(4) - さくらのナレッジ

上記とか参考に iptables の設定

# ポリシーを設定(受信と手転送は基本的に拒否/送信は基本的に許可)
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

# 自分自信からの通信を許可
iptables -A INPUT -i lo -j ACCEPT

# データを持たないパケットの接続拒否
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP

# SYNflood攻撃
iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP

# ステルススキャン
iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP

# 確立済みのtcp通信はポートに関わらず許可
iptables -A INPUT -p tcp -m state --state ESTABLISHED,RELATED -j ACCEPT

# 任意のDNSアクセス戻りパケットを許可
iptables -A INPUT -p udp --sport 53 -j ACCEPT

# 特定ipからのみssh許可
iptables -A INPUT -p tcp -s xxx.xxx.xxx.xxx/32 --dport 22 -j ACCEPT

# 特定のプロトコルとポートを許可する場合は以下に

Timezone設定

参考: Ubuntu 16.04 LTS : システムのタイムゾーンを設定する : Server World

$ sudo timedatectl
(現在のTimezone確認)

# Timezone変更
$ sudo timedatectl set-timezone Asia/Tokyo

$ sudo timedatectl
(変更結果の確認)

必要なパッケージをインストール

$ sudo apt install python make g++

nvm を入れて node.js も入れる

$ curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | sh
(反映するため一旦ログアウトしてシェルを起動しなおす必要があるかも)
$ nvm ls-remote
(バージョンを確認)
# 最新のバージョンを選択してインストール
$ nvm install v8
$ nvm ls
(インストールされたバージョンを確認)

chrome をインストール

参考: Ubuntu に apt-get で Chrome 59 インストールして --headless してみた - Qiita

$ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add
$ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
$ sudo apt-get update
$ sudo apt-get install google-chrome-stable

chromy をインストール

$ npm install -g chromy
1
2
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
1
2