Date and Time Setup
The date command allows the superuser to set the system date and time manually:
Change the current date.
Type the command in the following form at a shell prompt, replacing the YYYY with a four-digit year,
MM with a two-digit month, and DD with a two-digit day of the month:
For example, to set the date to 2 June 2010, type:
Change the current time. Use the following command, where HH stands for an hour,
MM is a minute, and SS is a second, all typed in a two-digit form:
For instance, to set the system clock to 11:26 PM using the UTC, type:
# date +%T -s 23:26:00 -u
You can check your current settings by typing date without any additional argument:
Tags: Date, Setup, Time
RHEL new packages: crash-gcore-command
New crash-gcore-command packages are now available for Red Hat Enterprise Linux 6.
The crash-gcore-command extension module is used to dynamically add a gcore command to a running crash utility session on a kernel dumpfile. The command will create a core dump file for a specified user task program that was running when a kernel crashed. The resultant core dump file may then be used with gdb.
This enhancement update adds the crash-gcore-command packages to Red Hat Enterprise Linux 6.
All users who require the crash-gcore-command should install these new packages
Tags: crash-gcore-command, RHEL
Useful yum Variables
The following is a list of variables you can use for both yum commands and yum configuration files (i.e. /etc/yum.conf and .repo files).
$releasever
This is replaced with the package’s version, as listed in distroverpkg. This defaults to the version of the redhat-release package.
$arch
This is replaced with your system’s architecture, as listed by os.uname() in Python.
$basearch
This is replaced with your base architecture. For example, if $arch=i686 then $basearch=i386.
$YUM0-9
This is replaced with the value of the shell environment variable of the same name. If the shell environment variable does not exist, then the configuration file variable will not be replaced.
Reference: Redhat Docs.
Tags: Useful, variables, yum
Disable Logwatch on Clients if a Logserver Exists
If your site have a central logserver which has been configured to report on logs received from all systems, then
# rm /etc/cron.daily/0logwatch
If no logserver exists, it will be necessary for each machine to run Logwatch individually.
Using a central logserver provides the security and reliability benefits discussed earlier, and also makes monitoring logs easier and less time-intensive for administrators.
Tags: Clients, Disable, Exists, Logserver, Logwatch
Plesk - how do I enable remote access to MySQL database server?
Sometimes you need to provide the remote access.
Open /etc/my.cnf and make sure that the following lines exists/commented in [mysqld] section:
[mysqld]
port = 3306
bind-address = 10.10.0.1
# skip-networking
Restart MySQL. Now you should grant access to remote IP address, login to Mysql:
# mysql -uadmin -p`cat /etc/psa/.psa.shadow` mysql
For example if you want to allow access to database called ‘foo’ for user ‘bar’ and remote IP 192.168.0.1 then you need to type following commands at “mysql>” prompt:
mysql> GRANT ALL ON foo.* TO bar@’192.168.0.1′ IDENTIFIED BY ‘PASSWORD’;
mysql> REVOKE GRANT OPTION ON foo.* FROM bar@’192.168.0.1′;
Reference: http://kb.parallels.com/
Tags: database, mySQL, plesk, remote, server