# useradd -s /sbin/nologin -c "RackTables User" -m -d /home/racktables racktables # id racktables uid=1784(racktables) gid=1784(racktables) groups=1784(racktables) |
# service mysqld start Starting mysqld: [ OK ] # mysql -u root -p Enter password: (type password) Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.1.73 Source distribution Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> create database racktables; Query OK, 1 row affected (0.00 sec) mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | observium | | racktables | | test | +--------------------+ 5 rows in set (0.00 sec) |
mysql> grant all privileges on racktables.* TO 'rtadmin'@'localhost' identified by 'rtpasswd'; Query OK, 0 rows affected (0.00 sec) |
mysql> exit Bye # mysql -u rtadmin -prtpasswd Welcome to the MySQL monitor. Commands end with ; or \g. |
# sudo su - -s /bin/bash racktables [racktables@comp ~]$ pwd /home/racktables [racktables@comp ~]$ tar -zxvf /tmp/RackTables-0.20.10.tar.gz [racktables@comp ~]$ exit logout |
[root@comp ~]# mv /home/racktables/RackTables-0.20.10/wwwroot /var/www/racktables [root@comp ~]# ls -la /var/www/racktables total 36 drwxrwxr-x. 6 racktables racktables 4096 Jan 25 2015 . drwxr-xr-x. 7 root root 4096 Aug 1 00:30 .. drwxrwxr-x. 2 racktables racktables 4096 Jan 25 2015 css drwxrwxr-x. 2 racktables racktables 4096 Jan 25 2015 inc -rw-rw-r--. 1 racktables racktables 9556 Jan 25 2015 index.php drwxrwxr-x. 3 racktables racktables 4096 Jan 25 2015 js drwxrwxr-x. 3 racktables racktables 4096 Jan 25 2015 pix |
mysql> show tables; +---------------------------+ | Tables_in_racktables | +---------------------------+ | Atom | | Attribute | | AttributeMap | | AttributeValue | | CachedPAV | | CachedPNV | | CachedPVM | | CactiGraph | | CactiServer | | Chapter | | Config | | Dictionary | | EntityLink | | File | | FileLink | | IPv4Address | | IPv4Allocation | | IPv4LB | | IPv4Log | | IPv4NAT | | IPv4Network | | IPv4RS | | IPv4RSPool | | IPv4VS | | IPv6Address | | IPv6Allocation | | IPv6Log | | IPv6Network | | LDAPCache | | Link | | Location | | Molecule | | MountOperation | | MuninGraph | | MuninServer | | Object | | ObjectHistory | | ObjectLog | | ObjectParentCompat | | PatchCableConnector | | PatchCableConnectorCompat | | PatchCableHeap | | PatchCableHeapLog | | PatchCableOIFCompat | | PatchCableType | | Port | | PortAllowedVLAN | | PortCompat | | PortInnerInterface | | PortInterfaceCompat | | PortLog | | PortNativeVLAN | | PortOuterInterface | | PortVLANMode | | Rack | | RackObject | | RackSpace | | RackThumbnail | | Row | | Script | | TagStorage | | TagTree | | UserAccount | | UserConfig | | VLANDescription | | VLANDomain | | VLANIPv4 | | VLANIPv6 | | VLANSTRule | | VLANSwitch | | VLANSwitchTemplate | | VLANValidID | | VS | | VSEnabledIPs | | VSEnabledPorts | | VSIPs | | VSPorts | +---------------------------+ 77 rows in set (0.00 sec) |
[root@comp inc]# pwd /var/www/racktables/inc [root@comp inc]# chmod 400 secret.php [root@comp inc]# chown apache:apache secret.php |