Using netstat utility in Linux it is possible to see not only opened connections, but also to see which ports are open at current connection.
To do so, type: netstat –nap
use netstat –help for more information.
Using netstat utility in Linux it is possible to see not only opened connections, but also to see which ports are open at current connection.
To do so, type: netstat –nap
use netstat –help for more information.
To check open ports on your Linux system you will need following package: nmap
Debian/Ubuntu got his package in standard repository already for ages.
Installing the nmap.
To have simple check play with your local host IP, usually it’s 127.0.0.1. To do so, type: nmap -sS -O 127.0.0.1
In this example it’s clear which port are open:
22/tcp open ssh
139/tcp open netbios-ssn
445/tcp open microsoft-ds
3306/tcp open mysql
10000/tcp open snet-sensor-mgmt
The information about what you typed is continuously stored in most Linux distributions. If it is BASH than it stored in .bash_history file in your current user folder.
The easiest way to delete the history is to type the following command:
history –c
All records from the file .bash_history will disappear.
There are many files could be stored in /tmp folder which are needed by running software on your Linux system. Removing them could cause you data loss.
However there is a safe way to do this.
Use the following command:
TMPTIME=0
This will remove all files from tmp folder.
However there is more elegant solution, but possible less stable. Use TMPFS for /tmp folder. That means that everytime you reboot, you get clean /tmp folder, as all file are stored in RAM of your system.
To see how setup TMPFS follow this link: TMPFS
The answer looks to be very simple. It depends on the Linux distribution you are using. The best is to use built-in version into your distribution.
I do not recommend to build own version especially for production server, leave it to who got time for this.
What to do if your distribution got old version of MySQL like it usually happens with CentOS ? Use another good known repositories repositories. It is more safe than to build your own MySQL.
Another thing you have pay attention is that version from version new features might be not functional with you previous configurations.
Usually MySQL config file store in /etc/my.cnf; This file could contain your own config settings, but after update they could be not functional with new version, so it’s better to backup this file and to remove it form /etc location and use generic file, by adding one by one parameters from your previously saved my.cnf file.
As for me I use Les RPM de Remi as repository for CentOS to install MySQL. It is always fresh and tuned there and I never had any problem with update or remove of MySQL with this repository.