racktables
- LDAP認証が使える
- VLAN、IP管理ができる
- VLAN設定方法不明
- Duplicateは恐らくNG
DBインストール
sudo apt install -y mariadb-server
デフォルトutf8に設定する必要あり
Ubuntu20.04ならデフォルトがutf8になってるのでそのままいける。
PHP
sudo apt install -y php-gd php-mysql php-mbstring php-bcmath php-json php-snmp php-curl php-ldap
RackTables
sudo git clone https://github.com/RackTables/racktables.git /opt/racktables
sudo touch /opt/racktables/wwwroot/inc/secret.php
sudo chown -R www-data. /opt/racktables/wwwroot/inc/secret.php
sudo chmod -R 400 /opt/racktables/wwwroot/inc/secret.php
sudo mysql -u root -e "CREATE DATABASE racktables_db CHARACTER SET utf8 COLLATE utf8_general_ci;"
sudo mysql -u root -e "CREATE USER racktables@localhost IDENTIFIED BY 'racktables';"
sudo mysql -u root -e "GRANT ALL PRIVILEGES ON racktables_db.* TO racktables@localhost;"
sudo chown -R www-data. /var/run/mysqld/mysqld.sock
apache2
sudo apt install -y apache2-bin libapache2-mod-php
WSLの場合
cat << EOF | sudo tee -a /etc/apache2/apache2.conf
AcceptFilter http none
AcceptFilter https none
EOF
cat << EOF | sudo tee /opt/racktables/racktables.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
<Directory /opt/racktables/wwwroot>
DirectoryIndex index.php
Require all granted
</Directory>
Alias /racktables /opt/racktables/wwwroot
EOF
sudo systemctl restart apache2
セットアップ
初期セットアップはブラウザから実行
http://localhost/racktables
エラーが出るのでビビるが、launched hereをクリックしてセットアップ画面に移行する
Configuration error
This instance of RackTables misses a configuration file (/opt/racktables/wwwroot/inc/secret.php).
The configuration file is usually generated by RackTables installer, which can be launched here.
- step4でsecret.phpのパーミッション変更が必要
sudo chown www-data:nogroup /opt/racktables/wwwroot/inc/secret.php
sudo chmod 400 /opt/racktables/wwwroot/inc/secret.php
- step7でadminパスワードを入力
- 初期ユーザ名(固定というかデフォルトはBasic認証)
- admin
- パスワード
- 設定したもの
使ってみる
まず、VLNAの作り方が分からない・・・