wKioL1glkbfwk6F8AAD8nCqKs4I639.jpg-wh_50


 1、安装lamp环境

yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-develglibcglibc-devel glib2 lib2-devel
bzip2 bzip2-devel ncursesncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidnlibidn-devel opensslopenssl-devel make patch pcre-devel
cd /root
wget http://downloads.sourceforge.net/project/racktables/RackTables-0.20.6.tar.gz?r=http%3A%2F%2Fracktables.org%2F&ts=1388393599&use_mirror=jaist
tar zxvf RackTables-0.20.6.tar.gz

mysql


#yum -y install httpd php mysql mysql-server php-mysql

httpd



#yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql

php


#yum -y install php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-snmp php-bcmath

下载RackTables

# cd /tmp
# wget https://sourceforge.net/projects/racktables/files/RackTables-0.20.11.tar.gz# tar -xvzf RackTables-0.20.8.tar.gz
# sudo cp -r RackTables-0.20.8/wwwroot/ /var/www/racktables
# sudo mv RackTables-0.20.8/wwwroot/ /var/www/html/racktables

2.配置mysql

 



# service mysqld start
# mysql -uroot -p (进入mysql数据库,空密码)
# exit



# mysqladmin -u root password 'new-password'          --newpassword为新密码。
# mysql -uroot -pnew-password

mysql>    (以下命令在mysql下执行)
create database racktables;
grant all on racktables.* to root;
grant all on racktables.* to root@localhost;
grant all on racktables.* to rackuser;
grant all on racktables.* to rackuser@localhost;
set password for rackuser@localhost=password('rackpw');
exit


3、在web下配置racktables(共7步)

# service httpd restart

在浏览器下访问http://IP/racktables/

wKioL1gllfiSnRtbAABbMbSBQVk296.jpg-wh_50

点 here 继续


wKiom1gllfiAhPCHAAAuwWaGF48461.jpg-wh_50

wKiom1gllfnBpuj0AADflEvmUQk182.jpg-wh_50

在racktables安装检测页面有时会报缺少pcntl,(可以不装,直接继续)


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



wKioL1gllfmAT0MMAABvFp2pZfg856.jpg-wh_50

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

wKiom1gllfnBMIBcAAAi3gVvFFA941.jpg-wh_50


wKioL1gllfrSKdw8AACh4iEmH-w777.jpg-wh_50


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




wKiom1gllfuRlB2nAACiqw6y9ZQ538.jpg-wh_50

wKioL1gllwWzwx1-AAAZi0eAK_w841.jpg-wh_50




# cd /var/www/html/racktables/inc/

# chown apache:apache secret.php

# chmod 400 secret.php   (权限只要保证其他用户只读即可)




+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

wKioL1gllfuDe-cqAAA-xSm-3K8560.jpg-wh_50




+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

wKioL1gllfvxfbpIAAAoOdsbtAk935.jpg-wh_50

输入管理员密码:

wKiom1gllfyRAosYAAAoyRnhMmk989.jpg-wh_50

wKioL1gllfzQxr6xAABN76rTDAA408.jpg-wh_50

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

完成,使用admin 账号登陆