Subversion Repositories ALCASAR

Rev

Rev 406 | Rev 419 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 406 Rev 411
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#  $Id: alcasar.sh 406 2011-01-03 10:37:37Z franck $ 
2
#  $Id: alcasar.sh 411 2011-01-03 21:05:11Z richard $ 
3
 
3
 
4
# alcasar.sh
4
# alcasar.sh
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 419... Line 419...
419
USERCTL=no
419
USERCTL=no
420
EOF
420
EOF
421
# Configuration du serveur de temps
421
# Configuration du serveur de temps
422
	[ -e /etc/ntp.conf.default ] || cp /etc/ntp.conf /etc/ntp.conf.default
422
	[ -e /etc/ntp.conf.default ] || cp /etc/ntp.conf /etc/ntp.conf.default
423
	cat <<EOF > /etc/ntp.conf
423
	cat <<EOF > /etc/ntp.conf
-
 
424
server 127.127.1.0   # local clock
-
 
425
fudge 127.127.1.0 stratum 10
424
server 0.fr.pool.ntp.org
426
server 0.fr.pool.ntp.org
425
server 1.fr.pool.ntp.org
427
server 1.fr.pool.ntp.org
426
server 2.fr.pool.ntp.org
428
server 2.fr.pool.ntp.org
427
restrict default nomodify notrap noquery
-
 
428
restrict $PRIVATE_NETWORK mask $PRIVATE_MASK
429
restrict $PRIVATE_NETWORK mask $PRIVATE_MASK nomodify notrap
429
restrict 127.0.0.1
430
restrict 127.0.0.1
430
driftfile /var/lib/ntp/drift
431
driftfile /var/lib/ntp/drift
431
logfile /var/log/ntp.log
432
logfile /var/log/ntp.log
432
EOF
433
EOF
433
	chown -R ntp:ntp /var/lib/ntp
434
	chown -R ntp:ntp /var/lib/ntp
Line 474... Line 475...
474
		[ -d $DIR_SAVE/$i ] || mkdir -p $DIR_SAVE/$i
475
		[ -d $DIR_SAVE/$i ] || mkdir -p $DIR_SAVE/$i
475
	done
476
	done
476
	chown -R root:apache $DIR_SAVE
477
	chown -R root:apache $DIR_SAVE
477
# Configuration et sécurisation php
478
# Configuration et sécurisation php
478
	[ -e /etc/php.ini.default ] || cp /etc/php.ini /etc/php.ini.default
479
	[ -e /etc/php.ini.default ] || cp /etc/php.ini /etc/php.ini.default
479
	$SED "s?^upload_max_filesize.*?upload_max_filesize = 20M?g" /etc/php.ini
480
	$SED "s?^upload_max_filesize.*?upload_max_filesize = 100M?g" /etc/php.ini
480
	$SED "s?^post_max_size.*?post_max_size = 20M?g" /etc/php.ini
481
	$SED "s?^post_max_size.*?post_max_size = 100M?g" /etc/php.ini
481
	$SED "s?^html_errors.*?html_errors = Off?g" /etc/php.ini
482
	$SED "s?^html_errors.*?html_errors = Off?g" /etc/php.ini
482
	$SED "s?^expose_php.*?expose_php = Off?g" /etc/php.ini
483
	$SED "s?^expose_php.*?expose_php = Off?g" /etc/php.ini
483
# Configuration et sécurisation Apache
484
# Configuration et sécurisation Apache
484
	[ -e /etc/httpd/conf/httpd.conf.default ] || cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.default
485
	[ -e /etc/httpd/conf/httpd.conf.default ] || cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.default
485
	$SED "s?^#ServerName.*?ServerName $PRIVATE_IP?g" /etc/httpd/conf/httpd.conf
486
	$SED "s?^#ServerName.*?ServerName $PRIVATE_IP?g" /etc/httpd/conf/httpd.conf