System environment:
The new Debin8, the source of Zhong Ke
Fast deployment of common lamp
Apt-get install-y apache2 php5 mysql-server php5-mysql unzip vim service MySQL restartservice apache2 restartecho ' <? PHP echo mysql_connect (' localhost ', ' root ', ' Your_mysql_password ')? Success ":" Fail "; echo phpinfo (); ?> ' >/var/www/html/index.php
Access Test http://your_server_ip/index.php
The environment required for rapid deployment of itop based on lamp
Apt-get install-y php5 php5-mysql php5-ldap php5-mcrypt php5-cli php5-json graphviz php5-gd curlapt-get install-y ldap-u TILs OpenSSL libpam-ldapservice apache2 restart
Download Itop Latest Version
wget https://sourceforge.net/projects/itop/files/latest/download
Extract
MV Download Itop.zipunzip itop.zipmv web/*/var/www/html/
Creating a itop dependent environment
Cd/var/www/htmlmkdir logmkdir env-productionmkdir confmkdir datachown-r www-data:./*
Turn on SSL
A2enmod ssla2ensite default-sslservice apache2 Restart
Start installation, browser access
https://your_server_ip/
After the installation is complete, back up the database immediately, the Web page file
Cd/var/www/html;mysqldump-p--databases itop_2_2_1 > ITOP_2_2_1.SQLCD/VAR/WWW/;TAR-ZCF html_itop_2_2_1.tar.gz htm L/CD/VAR/WWW/HTML;RM-RF ITOP_2_2_1.SQLMV html_itop_2_2_1.tar.gz/home/
Change root password
[Email protected]:/var/www/html# passwd root[email protected]:/var/www/html# mkdir-pv/root/.ssh[email protected]:/ var/www/html# echo "My key" >/root/.ssh/authorized_keys[email protected]:/var/www/html# exit[email protected]:~$ Exit
Log in to the Itop server from a working machine
SSH [email protected]userdel-r the user created during the initial installation of the system
Do not allow root login with password
grep Permitrootlogin/etc/ssh/sshd_configpermitrootlogin without-password# The setting of "Permitrootlogin Without-password ".
Iptables rules, only allow 22,80,443
iptables -a input -p tcp --dport 22 - j accept iptables -a output -p tcp --sport 22 -j Accept iptables -a input -p tcp --dport 80 -m state --state new,established -j accept iptables -a output -p tcp -- Sport 80 -m state --state new,established -j accept iptables -a input -p tcp --dport 443 -m state --state new,established - j accept iptables -a output -p tcp --sport 443 -m state --state new,established -j accept iptables -p input drop iptables -P FORWARD DROP iptables -P OUTPUT Dropiptables -l -n
Save Iptables rules to a file
Iptables-save >/etc/iptables.up.rules
Automatic load iptables rule on boot
vim/etc/init.d/start-iptables#! /bin/shiptables-restore </etc/iptables.up.ruleschmod +x/etc/init.d/start-iptables
This article is from the "Soul Bucket" blog, please be sure to keep this source http://990487026.blog.51cto.com/10133282/1766577
DEBIN8 Quick Installation Itop 2.2.1