Teknotit Snipet Manager



Api 2 Git 1 aleatoire 2 animation 1 apache2 4 bash 9 cache 1 css 17 curl 1 fastcgi 2 fichier 1 fonctions 10 html 5 inspiration 1 javascript 17 linux 17 mobile 2 mysql 2 nginx 3 php 21 postfix 2 repertoire 3 ssh 9 swap 1 sysadmin 13 taille 1 ubuntu 7 wordpress 8

.

sysadmin

swap

fallocate -l 1G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
sysctl vm.swappiness=20

nano /etc/fstab
/swapfile swap swap defaults 0 0

nano /etc/sysctl.conf => vm.swappiness=10



sysctl vm.vfs_cache_pressure=50

nano /etc/sysctl.conf => vm.vfs_cache_pressure=50

linux swap sysadmin

https://linuxize.com/post/how-to-add-swap-space-on-debian-9/

<iframe width="100%" height="488" src="http://snipet.teknotit.com/index.php?embed=5d0cfdfee2c09" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 11/03/2021

verouiller un fichier

#Vérouiller

chattr +i filename

# Dévéruiller

chattr -i filename


# Vérouiller avec option ajout uniquement

chattr +a filename


#Vérivier si y a un vérrou

lsattr filename


ssh sysadmin

https://www.howtoforge.com/linux-chattr-command/

<iframe width="100%" height="524" src="http://snipet.teknotit.com/index.php?embed=5bc314672d854" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 03/04/2020

Stop services for optimisation

/etc/init.d/spamassassin stop
/etc/init.d/clamav-freshclam stop
/etc/init.d/clamav-daemon stop




/etc/init.d/clamav-daemon stop
/etc/init.d/clamav-freshclam stop
/etc/init.d/amavis stop

update-rc.d -f clamav-daemon remove
update-rc.d -f clamav-freshclam remove
update-rc.d -f amavis remove

update-rc.d -f spamassassin remove

sysadmin

https://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-disable-spamfilter-and-antivirus-functions-in-ispconfig-3/

<iframe width="100%" height="488" src="http://snipet.teknotit.com/index.php?embed=5a6047a0cefc6" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 18/01/2018

cluebringer

sender rate limits to prevent spam, using cluebringer

postfix sysadmin

http://uname.pingveno.net/blog/index.php/post/2015/03/11/Configure-sender-rate-limits-to-prevent-spam,-using-cluebringer-(policyd)-with-Postfix

<iframe width="100%" height="200" src="http://snipet.teknotit.com/index.php?embed=568389382d74f" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 30/12/2015

pflogsumm

Monitoring email

ssh sysadmin

https://www.howtoforge.com/mailgraph_pflogsumm_debian_etch

<iframe width="100%" height="200" src="http://snipet.teknotit.com/index.php?embed=5682beb1355e4" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 29/12/2015

Postfix : delete all email From: a domain or one email address

To delete all email in the queue from a domain run this command as root:

postqueue -p | tail -n +2 | awk 'BEGIN { RS = "" } /@example\.com/ { print $1 }' | tr -d '*!' | postsuper -d -

To delete all email in the queue From: a specific email address run this command as root:

postqueue -p | tail -n +2 | awk 'BEGIN { RS = "" } /username@example\.com/ { print $1 }' | tr -d '*!' | postsuper -d -

postfix sysadmin

<iframe width="100%" height="308" src="http://snipet.teknotit.com/index.php?embed=568096dbbff43" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 28/12/2015

Swap

#raccourcis commande qui fait tout en un

---------------
sudo install -o root -g root -m 0600 /dev/null /swapfile
dd if=/dev/zero of=/swapfile bs=1k count=2048k
mkswap /swapfile
swapon /swapfile
echo "/swapfile       swap    swap    auto      0       0" | sudo tee -a /etc/fstab
sudo sysctl -w vm.swappiness=10
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
---------------





#Désactiver swap 
swapoff -a

#Activer swap
swapon -a



Articles :

http://geekeries.de-labrusse.fr/?p=1806
https://meta.discourse.org/t/create-a-swapfile-for-your-linux-server/13880

linux sysadmin ubuntu

https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-12-04

<iframe width="100%" height="686" src="http://snipet.teknotit.com/index.php?embed=5632442eec130" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 29/10/2015

Redirection Email Postfix Sans dovecot

#Add this line to the bottom of /etc/aliases:

root: your_email@domain.com

# RUN
newaliases

# TEST

echo test | mail -s "test message" root

sysadmin

http://blog.dastrup.com/?p=53

<iframe width="100%" height="362" src="http://snipet.teknotit.com/index.php?embed=553c9c151e5d7" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 26/04/2015

Install apache & php

apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-gd php5-mysql php5-imap  php5-cli php5-cgi php5-curl libapache2-mod-fcgid apache2-suexec php-pear php-auth php5-mcrypt mcrypt php5-imagick imagemagick libapache2-mod-suphp 

sysadmin ubuntu

<iframe width="100%" height="218" src="http://snipet.teknotit.com/index.php?embed=5440a6434f505" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 17/10/2014

Ftp commande "lft"

# Lorsqu'on souhaite juste mettre un fichier sur le serveur distant, c'est la fonction put qu'il faut utiliser : 

lftp ftp://identifiant:mot_de_passe@site_de_connexion -e "put -O /repertoire/fichier/distant/ /chemin/local/du/fichier; quit" 



#Si l'on souhaite rapatrier un fichier, c'est la fonction get :
lftp ftp://identifiant:mot_de_passe@site_de_connexion -e "get /repertoire/fichier/distant/ -o /chemin/local/du/fichier; quit"

linux sysadmin

http://doc.ubuntu-fr.org/lftp

<iframe width="100%" height="326" src="http://snipet.teknotit.com/index.php?embed=5440a5a0549b4" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 17/10/2014

Apache - commande

#Activation module:

a2enmod / a2dismod 

#Action/Disaction (site)

a2ensite / a2dissite 

#Recherche Module

apt-cache search libapache2*



apache2 sysadmin ubuntu

https://library.linode.com/web-servers/apache/installation/ubuntu-12.04-precise-pangolin

<iframe width="100%" height="434" src="http://snipet.teknotit.com/index.php?embed=5440a4d2c0852" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 17/10/2014

Pure ftp

#Ajout d'un group et d'un utilisateur

sudo groupadd ftpgroup
useradd -g ftpgroup -d /dev/null -s /usr/sbin/nologin ftpuser

# L'utilisateur ftp (test)
pure-pw useradd test -u ftpuser -g ftpgroup -d /home/www/test

# Rgénéré la liste mot de passe après un ajout
pure-pw mkdb


#Une seule fois (création du liens symbolique
sudo ln -s /etc/pure-ftpd/conf/PureDB /etc/pure-ftpd/auth/50pure 




Source :http://doc.ubuntu-fr.org/pure-ftp

http://www.webactus.net/coin-du-geek/991-installer-et-configurer-pureftpd-avec-des-utilisateurs-virtuels-et-gestion-de-quotas/


http://download.pureftpd.org/pub/pure-ftpd/doc/README.Virtual-Users



pour l'utilisateur www-data, 
il faut modifier /etc/pure-ftpd/conf/MinUID, et mettre 32



Changer mot de passe  / supprimer utilisateur

pure-pw passwd someuser
pure-pw mkdb

https://wiki.archlinux.org/index.php/Pure-FTPd


Lister les utilisateurs :
pure-pw list

linux sysadmin

http://www.webactus.net/coin-du-geek/991-installer-et-configurer-pureftpd-avec-des-utilisateurs-virtuels-et-gestion-de-quotas/

<iframe width="100%" height="938" src="http://snipet.teknotit.com/index.php?embed=5440a1f30113d" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 06/11/2019

Replacing Big Fat Bash with Dash for Scripting

apt-get install dash
dpkg-reconfigure dash

linux sysadmin ubuntu

<iframe width="100%" height="218" src="http://snipet.teknotit.com/index.php?embed=5440a1b481bb7" type="text/html"></iframe>

Texte seul - Permalink - Snippet public posté le 17/10/2014

Flux RSS de cette page


Teknotit Snipet Manager 1.84 par Bronco - Page générée en 0.005 s