sleed Posted May 6, 2014 Report Posted May 6, 2014 (edited) Buna. Am facut acest script bash pentru a putea instala mai usor un server LAMP pentru Ubuntu / Debian. Casa il faceti sa mearga tot ce trebuie sa faceti este sa copiati codul intr un fisier , sa redenumiti fisierul .sh , exemplu : sleed.sh , apoi sa il faceti rulabil fisierul prin comanda : chmod +x sleed.sh , apoi il rulati cu ./sleed.sh.#!/bin/bash# sleed Script LAMP Installer # Romanian Security Teamecho "Romanian Security Team - The essence of future is the digital core !!!"echo -e "\e[92mWebserver Script for Debian/Ubuntu Script by sleed [ Romanian Security Team] - RSTFORUMS.COM"sleep 1echo "====Show CPU INFO / MEMORY / RELEASE /...===="cat /etc/*-releasesleep 1echo "///////////////////Show Who are logged in////////////////////////////"wsleep 1echo "///////////Show kernel/////////////////"uname -ahead -n1 /etc/issuesleep 1cat /proc/partitionsecho "////////////////Show Partitions/////////////"sleep 1grep MemTotal /proc/meminfoecho "///////////////Show Ram seen by system///////////////////"sleep 1grep "model name" /proc/cpuinfoecho "////////////////Show proc name///////////"sleep 1ifconfig | grep inet | awk '{ print $3 }'echo "///////////////Find IP Broadcast & IPV6 Adress////////////"sleep 1ifconfig | grep inet | awk '{ print $2 }'echo "//////////Find Ipv4 Adress////////////"sleep 1cat /etc/hostsecho "//////////Find Hosts//////////"STRING="Starting upgrade & update"#print variable on a screen# ---- Upgrade & Update -------- echo $STRINGSTRING2="UPDATE Done..."/usr/bin/apt-get -v updateecho $STRING3sleep 1/usr/bin/apt-get -v dist-upgrade STRING3="Upgrade Done..."#End of Upgrade & Update#Install LAMP/usr/bin/apt-get install -v apache2 php5 libapache2-mod-php5 -vsleep 10/usr/bin/apt-get install -v mysql-server libapache2-mod-auth-mysql php5-mysqlsleep 10echo "WRITE YOUR MYSQL ROOT PASSWORD, press enter, write your password and press 3 times enter!"/usr/bin/mysql_secure_installationsleep 5/usr/bin/apt-get install -v php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xslsleep 1/etc/init.d/apache2 startsleep 1/etc/init.d/mysql restartsleep 1# Apache Minimal Securityecho "#Apache Minimal Security"echo "ServerTokens prod" >> /etc/apache2/conf.d/securityecho "ServerSignature Off" >> /etc/apache2/conf.d/securityecho "FileETag none" >> /etc/apache2/conf.d/securityecho "ServerSignature Off" >> /etc/apache2/conf.d/securityecho "TraceEnable Off" >> /etc/apache2/conf.d/securityecho "LimitRequestBody 25000" >> /etc/apache2/apache2.confecho "LimitRequestFields 40" >> /etc/apache2/conf.d/securityecho "LimitRequestFieldSize 4000" >> /etc/apache2/apache2.confecho "LimitRequestLine 4000" >> /etc/apache2/conf.d/security/etc/init.d/apache2 reload echo "#########Thank You########"Gata l-am modificat, e un miny script sa i spunem asa.. Edited June 23, 2014 by sleed 2 Quote
quantum Posted May 7, 2014 Report Posted May 7, 2014 # Open Web to view if php working ...Merge chrome si alte browsere pe un server fara mod grafic ? Ma cam indoiesc Quote
sleed Posted May 7, 2014 Author Report Posted May 7, 2014 Porneste 100 %.Mie pe firefox mi a mers sa imi porneasca sa vada daca merge info.php ... Quote
Raoul Posted June 22, 2014 Report Posted June 22, 2014 Ar fi ok un asemenea auto installer pt Centos 6.5, cu nginx, mysql 5.6 (care e bine optimizat), php-fpm, si phpmyadmin. Quote
sleed Posted June 22, 2014 Author Report Posted June 22, 2014 Ok am sa fac si pentru Centos cand voi avea vreme, mysql il optimizezi tu cum vrei, eu nu ma bag peste load balancingu care vrei sa ti-l personalizezi tu .. Quote
aelius Posted June 22, 2014 Report Posted June 22, 2014 (edited) Scriptul nu respecta niciun standard. Mai mult:- Sterge log-urile acelea inutil- Instaleaza extensii php aiurea- Adauga in apache2.conf o gramada de variabile care nu respecta layout-ul default (Ar trebui puse in '/etc/apache2/conf.d/security' si dat cu replace, sa nu fie de doua ori)- MaxRequestsPerChild 10000 cauzeaza incarcarea excesiva a proceselor (ele nu se mai regenereaza)- Nu are niciun fel de statement sa verifice daca exista sau nu un fisier (exemplu: 3 incercari de a deschide un browser si alte 3 de a da kill)- Succesiune de comenzi non sense precum:touch /var/www/info.phpecho "<?php phpinfo(); ?>" >> /var/www/info.phpSau intai se face print la o variabila si apoi este setata ?!echo $STRING4STRING4="Clear LOGS"- 50 de secunde timp pierdut cu sleep-uri.Bash scripting facut pe calapod Edited June 22, 2014 by aelius Quote
scorpio2k2 Posted June 22, 2014 Report Posted June 22, 2014 +toata partea asta care e degeaba. nu folosesti nici o informatie de aiciecho "====Show CPU INFO / MEMORY / RELEASE /...===="cat /etc/*-releasesleep 7echo "///////////////////Show Who are logged in////////////////////////////"wsleep 7echo "///////////Show kernel/////////////////"uname -ahead -n1 /etc/issuesleep 7cat /proc/partitionsecho "////////////////Show Partitions/////////////"sleep 7grep MemTotal /proc/meminfoecho "///////////////Show Ram seen by system///////////////////"sleep 7grep "model name" /proc/cpuinfoecho "////////////////Show proc name///////////"sleep 7ifconfig | grep inet | awk '{ print $3 }'echo "///////////////Find IP Broadcast & IPV6 Adress////////////"sleep 7ifconfig | grep inet | awk '{ print $2 }'echo "//////////Find Ipv4 Adress////////////"sleep 7cat /etc/hostsecho "//////////Find Hosts//////////" 1 Quote