tech note

インフラ技術や車についてつぶやいていくブログ

RackTables インストール手順

f:id:tea_cat:20180816112535p:plain

リポジトリインストール

rpm -ivh http://repo.mysql.com//mysql57-community-release-el6-8.noarch.rpm

yum -y install epel-release
sed -i -e "s/enabled=1/enabled=0/g" /etc/yum.repos.d/epel.repo

rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

cat <<'EOF' >|/etc/yum.repos.d/dag.repo
[dag]
name=Dag
baseurl=http://ftp.riken.jp/Linux/dag/redhat/el$releasever/en/$basearch/dag/
enabled=0
gpgcheck=0
gpgkey=http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
EOF

もろもろインストール

yum install -y wget mysql-server httpd php php-mbstring php-pdo php-gd php-mysql php-bcmath php-snmp php-xml --enablerepo=epel,remi,remi-php56

wget http://sourceforge.net/projects/racktables/files/RackTables-0.20.13.tar.gz
tar zxf RackTables-0.20.13.tar.gz

cp -r RackTables-0.20.13/wwwroot/ /var/www/html/racktables-0.20.13
cd /var/www/html/
ln -s racktables-0.20.13/ racktables

mysqlセットアップ

Password消してます

/etc/init.d/mysqld start
grep "password is generated" /var/log/mysqld.log
mysql_secure_installation
mysql -p
SHOW VARIABLES LIKE 'validate_password%';
uninstall plugin validate_password;
set password for root@localhost = '';
\q

echo 'sql-mode="NO_ENGINE_SUBSTITUTION"' >> /etc/my.cnf
echo 'loose-log_timestamps= SYSTEM' >> /etc/my.cnf
echo 'character-set-server=utf8' >> /etc/my.cnf
echo 'innodb_buffer_pool_size = 1G' >> /etc/my.cnf

sed -i -e 's|;date.timezone =|date.timezone = "Asia/Tokyo"|g' /etc/php.ini
/etc/init.d/mysqld restart
service httpd start

初期セットアップ

画面に従い設定

f:id:tea_cat:20181023143406p:plain

touch /var/www/html/racktables/inc/secret.php; chmod 666 /var/www/html/racktables/inc/secret.php

CREATE DATABASE racktables_db CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON racktables_db.* TO racktables_user@localhost IDENTIFIED BY 'MY_SECRET_PASSWORD';

f:id:tea_cat:20181023143427p:plain
f:id:tea_cat:20181023143434p:plain

cd /var/www/html/racktables/inc
chown apache. secret.php
chmod 400 secret.php

f:id:tea_cat:20181023143448p:plain
f:id:tea_cat:20181023143455p:plain
f:id:tea_cat:20181023143531p:plain
f:id:tea_cat:20181023143538p:plain
f:id:tea_cat:20181023143510p:plain