[CentOS] Actions de postinstall pour une workstation
Il m’arrive d’installer dans le cadre personnel des stations de travail en CentOS 7. Partant de la version minimale, il y a quelques actions à faire afin de pouvoir commencer à travailler. En voici les plus importantes :
# Mise en place d’EPEL
yum -y install epel-release && yum clean all
# Installation des paquets de base
yum install -y vim net-tools bash-completion
# Installation du graphique
yum groupinstall -y « X Window System »
yum groupinstall -y « MATE Desktop »
# Graphique par defaut au boot
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
# De quoi travailler
yum install terminator guake -y
# Un prompt correct
echo « PS1=’\[\033[1;32m\]\u\033[0;36m@\033[1;33m\H:\[\033[0;37m\]\w\$\[\033[00m\] ‘ » >> ~/.bashrc
# Nom de la machine
hostnamectl set-hostname w-laptop
# Guake au demarrage
ln -s /usr/share/applications/guake.desktop /etc/xdg/autostart/
# Depot Nux pour VLC et autres
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
yum clean all && yum install -y vlc
# Base pour le NTP, envoyer des mails et lire les PDF
yum install -y chronyc mailx okular
# Desactivation de IPV6 et SELinux
echo « net.ipv6.conf.all.disable_ipv6 = 1 » >> /etc/sysctl.conf
echo « net.ipv6.conf.default.disable_ipv6 = 1 » >> /etc/sysctl.conf
sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/g’ /etc/selinux/config
sed -i ‘s/inet_protocols = all/inet_protocols = ipv4/g’ /etc/postfix/main.cf
# Generation d’une paire de cle SSH et envoi de la publique
ssh-keygen
cat ~/.ssh/id_rsa.pub | mail -s « Nouvelle Cle SSH » johan@slashroot.fr
# Conf git
git config –global user.email johan@slashroot.fr
git config –global user.name Johan
git config –global push.default simple