Ceci est une ancienne révision du document !
Post-installation "Titux" distribution Debian
sudo apt update -y && sudo apt full-upgrade -y && sudo apt autoremove -y sudo dpkg-reconfigure locales sudo dpkg-reconfigure tzdata sudo apt install git unzip make tree bridge-utils net-tools whois pv rsync byobu rlwrap curl ca-certificates zsh fonts-powerline sshguard fail2ban rkhunter dialog htop vbetool psmisc cdparanoia alsa-utils mpg123 vorbis-tools abcde cd ~/ && curl 'https://www.titux.org/tech/lib/exe/fetch.php?media=telechargements:comptebasetitux.tar' -o - 2>/dev/null|tar -xf - && chown -R $USER:$USER .oh-my-zsh .shell.tux .zshrc # Pour l'environnement kde plasma retirer 'im-config' <code> sudo apt remove im-config
cat > ~/.shell.tux « EOF #!/usr/bin/bash ##———————————————————————————- alias zshconfig=“nano -cl ~/.zshrc” ##———————————————————————————- ## fontions utiles ############################################################### # function g() {
grep $@ | grep -v grep
}
function créerCompteBaseTitux.tar() {
cd ~/
tar -cf compteBaseTitux.tar .zshrc
tar --append -f compteBaseTitux.tar .shell.tux
tar --append -f compteBaseTitux.tar .oh-my-zsh
}
function lancer_agent_ssh() {
memo_ssh="/run/user/$(id -u)/env_ssh"
[ -e $memo_ssh ] && {
eval $(cat $memo_ssh) >/dev/null
} || {
mkdir -p /run/user/$(id -u)
ssh-agent >$memo_ssh
eval $(cat $memo_ssh) >/dev/null
ssh-add
}
} memo_ssh=“/run/user/$(id -u)/env_ssh” [ -e $memo_ssh ] && lancer_agent_ssh ##———————————————————————————- ##———————————————————————————- [ -e $HOME/bin ] && export PATH=$HOME/bin:/usr/local/bin:$PATH # ##———————————————————————————- ## alias ########################################################################### # alias lsc=“/bin/ls –color –group-directories-first -p” alias ls=“/usr/bin/ls” alias ll=“ls -l –color” alias la=“lsc -lah” alias l=“ls -1”
alias rm=“/bin/rm -i” alias cp=“/bin/cp -i” alias mv=“/bin/mv -i”
alias f=“clear” alias h=“cd;clear” alias pps='ps -eo pid,ppid,user,args'
alias écran_éteindre='sudo vbetool dpms off' alias écran_allumer='sudo vbetool dpms on' alias écran_réinitialiser='sudo vbetool post' ##———————————————————————————- ##———————————————————————————- #
################################################################################################### #export PATH=/home/linuxbrew/.linuxbrew/bin:$PATH
EOF
## en tantque root curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh sh setup-repos.sh apt-get install webmin –install-recommends apt-get install –install-recommends ./webmin-current.deb
cat >/etc/sysctl.conf «EOF net.ipv4.ip_forward=1 net.ipv4.conf.all.proxy_arp=1 EOF
################################################################################################### cat >.shell.tux«EOF #!/usr/bin/bash ##———————————————————————————- alias zshconfig=“nano -cl ~/.zshrc” ##———————————————————————————- ## fontions utiles ############################################################### # function g() {
grep $@ | grep -v grep
} # function lancer_agent_ssh() {
memo_ssh="/run/user/$(id -u)/env_ssh"
[ -e $memo_ssh ] && {
eval $(cat $memo_ssh) >/dev/null
} || {
mkdir -p /run/user/$(id -u)
ssh-agent >$memo_ssh
eval $(cat $memo_ssh) >/dev/null
ssh-add
}
} memo_ssh=“/run/user/$(id -u)/env_ssh” [ -e $memo_ssh ] && lancer_agent_ssh ##———————————————————————————- ##———————————————————————————- [ -e $HOME/bin ] && export PATH=$HOME/bin:/usr/local/bin:$PATH # ##———————————————————————————- ## alias ########################################################################### # alias ls=“/bin/ls –color –group-directories-first -p” alias ll=“ls -l –color” alias la=“ls -lah” alias l=“ls -1” alias rm=“/bin/rm -i” alias cp=“/bin/cp -i” alias mv=“/bin/mv -i” alias f=“clear” ##———————————————————————————- ##———————————————————————————- # ################################################################################################### EOF
cat >.zshrc«EOF
##———————————————————————————- echo $PATH|grep $HOME/bin: >/dev/null; [ $? -ne 0 ] && [ -e $HOME/bin ] && export PATH=$HOME/bin:$PATH # ##———————————————————————————- ## Constantes environnement ############################################################### # export LANG=fr_FR.UTF-8 export LANGUAGE=fr_FR export ARCHFLAGS=“-arch x86_64” # ##———————————————————————————- ## oh-my-zsh ########################################################################### # export ZSH=“$HOME/.oh-my-zsh/”
zstyle ':omz:update' mode auto # update automatically without asking
plugins=(git colored-man-pages zsh-navigation-tools zsh-autosuggestions)
export EDITOR=nano
#source /usr/share/powerline/bindings/zsh/powerline.zsh export ZSH_THEME=“agnoster” export LANG=fr_FR.UTF-8 export LANGUAGE=fr_FR
source $ZSH/oh-my-zsh.sh
export PROMPT=“%{%f%b%k%} $(build_prompt)
”
alias zshconfig=“nano -cl ~/.zshrc” ##———————————————————————————- source ~/.shell.tux ##———————————————————————————-
################################################################################################### EOF
[ -e /etc/ssh/sshd_config.origine ] || cat /etc/ssh/sshd_config>/etc/ssh/sshd_config.origine
cat >/etc/ssh/sshd_config_titux.org «EOF ################################################################################################### ChallengeResponseAuthentication no UsePAM no X11Forwarding yes PrintMotd yes AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server IgnoreRhosts yes IgnoreUserKnownHosts no StrictModes yes PubkeyAuthentication yes RSAAuthentication yes PermitRootLogin without-password PermitEmptyPasswords no PasswordAuthentication no GatewayPorts no AllowTcpForwarding yes KeepAlive yes Protocol 2 EOF
cat /etc/ssh/sshd_config_titux.org >/etc/ssh/sshd_config systemctl restart sshd
rsync -va /home/$(grep 1000 /etc/passwd|cut -d: -f1)/.ssh /root/ chown -R root:root /root/.ssh
</code>
