0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ZabbixでSeleniumを使った監視するため、環境を構築してみる。

Posted at

✅ AlmaLinux に Selenium 実行環境を準備する

1. Python3 と pip

bash
sudo dnf install -y python3 python3-pip

2. Google Chrome または Chromium

AlmaLinux の標準リポジトリには Chromium が無いので、EPEL や Google公式リポジトリから入れます。

Google Chrome

bash
sudo dnf install -y wget
sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
sudo dnf install -y ./google-chrome-stable_current_x86_64.rpm

3. ChromeDriver

Google Chrome のバージョンに対応した ChromeDriver を公式からダウンロードして配置します。

bash
CHROME_VERSION=$(google-chrome --version | awk '{print $3}')
wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${CHROME_VERSION}/linux64/chromedriver-linux64.zip
unzip chromedriver-linux64.zip
sudo mv chromedriver-linux64/chromedriver /usr/local/bin/
sudo chmod +x /usr/local/bin/chromedriver

4. Selenium ライブラリをインストール

bash
pip3 install selenium
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?