To get a list of packages installed locally do this in your terminal:
dpkg --get-selections | grep -v deinstall
To save that list to a text file called packages on your desktop do this in your terminal:
dpkg --get-selections | grep -v deinstall > ~/Desktop/packages
Source: eric-couchelou.net
En annexe du paramétrage basique de votre serveur web, il se peut que vous soyez confronté à la nécessité ou l’envie de placer une interdiction d’accès Géolocalisée.
Mais avant de procéder à ce type d’installation, gardez à l’esprit plusieurs choses :
- Si vous avez plusieurs sites sur le même serveur, tous seront concernés par vos règles, soyez donc sûr et certain qu’aucun d’entre eux n’ait pour cible l’un des pays que vous aller blacklister,
- La très grande majorité des internautes des pays que vous pouvez considérer comme à risque (Russie, Chine, Taiwan, Roumanie, Brésil…) n’ont pas de mauvaises intentions, vous vous priverez donc volontairement d’une source de trafic potentiel.
- Internet est ainsi fait que cette solution est loin d’être fiable à 100%, et les filtres géolocalisés facilement contournables
Bref, le jeu en vaut-il la chandelle? Si vous êtes convaincu que oui, alors ce petit tutoriel est fait pour vous. Je vous proposer d’installer le module de surveillance GEOIP.
1 – Installation du programme :
apt-get install libapache2-mod-geoip
2- Configuration du programme :
vi etc/apache2/mods-available/geoip.conf
Et Mettre :
GeoIPEnable On
GeoIPDBFile /usr/share/GeoIP/GeoIP.dat
SetEnvIf GEOIP_COUNTRY_CODE CN BlockCountry=1
SetEnvIf GEOIP_COUNTRY_CODE RU BlockCountry=1
SetEnvIf GEOIP_COUNTRY_CODE RO BlockCountry=1
SetEnvIf GEOIP_COUNTRY_CODE TW BlockCountry=1
Deny from env=BlockCountry
Chaque ligne de type SetEnvIf GEOIP_COUNTRY_CODE XX BlockCountry=1 correspond à une restriction d’accès pour un pays où XX définit le code du pays concerné par la règle. Pour info vous trouverez les différents codes pays (FR, DE, etc.) à cette adresse:
http://www.maxmind.com/app/iso3166
Redémarrez Apache :
/etc/init.d/apache2 restart
C’est en place!
Pour la mise à jour, téléchargez les dernières définitions d’IPs (une fois par mois pour la version gratuite) à cette adresse :
http://www.maxmind.com/app/geolitecountry
et remplacer celles existantes dans
/usr/share/GeoIP/GeoIP.dat
J’attire votre attention sur le fait que le blacklistage géolocalisé présenté ci-dessus fonctionne pour Apache, c’est à dire que vous devrez faire des paramétrages supplémentaires si vous voulez interdire les accès aux serveurs email par exemple. Nous verrons cela plus tard…
Source: nixCraft
Whenever a Linux system CPU is occupied by a process, it is unavailable for processing other requests. Rest of pending requests must wait till CPU is free. This becomes a bottleneck in the system. Following command will help you to identify CPU utilization, so that you can troubleshoot CPU related performance problems.
Finding CPU utilization is one of the important tasks. Linux comes with various utilities to report CPU utilization. With these commands, you will be able to find out:
* CPU utilization
* Display the utilization of each CPU individually (SMP cpu)
* Find out your system’s average CPU utilization since the last reboot etc
* Determine which process is eating the CPU(s)
Old good top command to find out Linux cpu load
The top program provides a dynamic real-time view of a running system. It can display system summary information as well as a list of tasks currently being managed by the Linux kernel.
The top command monitors CPU utilization, process statistics, and memory utilization. The top section contains information related to overall system status – uptime, load average, process counts, CPU status, and utilization statistics for both memory and swap space.
Top command to find out Linux cpu usage
Type the top command:
$ top
Output:

You can see Linux CPU utilization under CPU stats. The task’s share of the elapsed CPU time since the last screen update, expressed as a percentage of total CPU time. In a true SMP environment (multiple CPUS), top will operate in number of CPUs. Please note that you need to type q key to exit the top command display.
The top command produces a frequently-updated list of processes. By default, the processes are ordered by percentage of CPU usage, with only the « top » CPU consumers shown. The top command shows how much processing power and memory are being used, as well as other information about the running processes.
Lire la suite…