Commentaires fermés

post config

2012
30.01
 
#!/bin/sh
 
############################
### Configuration du système
############################
 
# set root password
passwd root
 
# Mail
cd /etc/mail
make aliases
 
# Time Zone
cd /etc/
ln -s /usr/share/zoneinfo/Europe/Paris localtime
 
# cvsup
cp /usr/share/examples/cvsup/stable-supfile /usr/src/
cp /usr/share/examples/cvsup/ports-supfile /usr/src/
echo 'Edit du fichier /usr/src/stable-supfile'
echo 'modifier la ligne :'
echo 'default host=cvsup1.fr.FreeBSD.org'
read -p "Appuyer sur une touche pour continuer ..."
ee /usr/src/stable-supfile
ee /usr/src/ports-supfile
 
################################
### Copie des fichiers de config
################################
cp /etc/rc.conf /etc/rc.conf.dist
cp /etc/sysctl.conf /etc/sysctl.conf.dist
cp /boot/loader.conf /boot/loader.conf.dist
# Kernel
cd /usr/src/sys/amd64/conf/
cp GENERIC zurpatator2
 
########################
### Config système
########################
 
###################
### Security Tweaks
###################
chmod 640 /var/log/messages
 
 
############
### Ports ###
############
# met à jour les ports
portsnap fetch extract update
 
# Ports management
cd /usr/ports/ports-mgmt/portupgrade && make config-recursive && make install clean
 
# fail lors de l'install de gcc, donc install à part
cd /usr/ports/archivers/unzip && make config-recursive && make install clean
 
# Compile tools
portinstall gcc
 
# tools
portinstall wget sudo nano gzip logrotate
 
portinstall ezjail
echo 'security.jail.allow_raw_sockets=1' >> /etc/sysctl.conf
echo 'ezjail_enable="YES"' >> /etc/rc.conf
 
 
# Shells
portinstall bash
cd /bin/
ln -s /usr/local/bin/bash
echo '/bin/bash' >> /etc/shells

Les commentaires sont fermés.