Enable EPEL Repository on CentOS 6
The most updated information for enabling EPEL should always be at the Fedora Project's Wiki.
In that page's section "How can I use these extra packages?", there are links to the latest versions for CentOS 6 (and CentOS 5).
In that page, download the .noarch
file, for example:
wget http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
Then, install with yum
:
yum install epel-release-*.noarch
ntpdate
Troubleshooting no server suitable for synchronization
If you have a cron jon periodically running ntpdate
to update the
time on a system, you might at some point hit the no server suitable
for synchronization
error. You can gain some insight into the problem
with running ntpdate
with the -d
option, which will show debugging
output from the actions of ntpdate
, without actually changing the
time on the system.
One example cause of this issue is that the value of strata exceeds
a maximum value, in which case the NTP server is rejected by the system
as being too far from its own source. You should then focus on either
fixing the NTP server itself, or changing your ntpdate
target to
another system.
Enable logging in MySQL
These are some haphazardly written notes on logging in MySQL. For consistency,
create a new subdirectory in /var/log/
and assign ownership to the user under
which your MySQL server is running - by default that would be the mysql
user:
mkdir /var/log/mysqld/
chown mysql:mysql /var/log/mysqld
I like to name the directory mysqld
instead of mysql
, to clarify
that the logs in that directory are those of the MySQL Server and
not those of the MySQL Client.
Slow Query Log
The slow query log contains queries the execution of which took more
than the value of the long_query_time
variable, which by default is
10 seconds.
To enable the slow query log on the next start of mysqld
, add the
following line in your MySQL server's configuration file (/etc/my.cnf
by default), in the [mysqld]
section:
slow-query-log
slow_query_log_file=/var/log/mysqld/slow-queries.log
Create the file and assign ownership to the mysql
user:
touch /var/log/mysqld/slow-queries.log
chown mysql:mysql /var/log/mysqld/slow-queries.log
Finally, either restart the server to enable the logging, or enable it on the already running server with:
mysql> SET GLOBAL slow_query_log_file='/var/log/mysqld/slow-queries.log';
mysql> SET GLOBAL slow_query_log=1;
In any of those cases, the values of the global variables
slow_query_log
and slow_query_log_file
, should change from the
default:
mysql> show variables like 'slow_query_log%';
+---------------------+----------------------------------+
| Variable_name | Value |
+---------------------+----------------------------------+
| slow_query_log | OFF |
| slow_query_log_file | /var/run/mysqld/mysqld-slow.log |
+---------------------+----------------------------------+
To:
mysql> show variables like 'slow_query_log%';
+---------------------+----------------------------------+
| Variable_name | Value |
+---------------------+----------------------------------+
| slow_query_log | ON |
| slow_query_log_file | /var/log/mysqld/slow-queries.log |
+---------------------+----------------------------------+
openDCIM
openDCIM is an open source application for DataCenter Infrastructure Management.
See also
hpacucli
hpacucli
allows control of the RAID array controllers on HP servers.
Installation on CentOS
- Download RPM from HP's website (free account required).
Install, e.g:
yum install hpacucli-9.40-12.0.x86_64.rpm
Usage
Status of All Controllers
To display the status of all RAID controllers:
hpacucli ctrl all show status
Example output:
Smart Array P410i in Slot 0 (Embedded)
Controller Status: OK
Cache Status: OK
Battery/Capacitor Status: OK
Configuration of All Controllers
To display the configuration of all RAID controllers:
hpacucli ctrl all show config
Example output:
Smart Array P410i in Slot 0 (Embedded) (sn: 5001438001AD7D90)
array A (SAS, Unused Space: 0 MB)
logicaldrive 1 (136.7 GB, RAID 1, OK)
physicaldrive 1I:1:1 (port 1I:box 1:bay 1, SAS, 146 GB, OK)
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, SAS, 146 GB, OK)
SEP (Vendor ID PMCSIERA, Model SRC 8x6G) 250 (WWID: 5123432101AB8D8F)
Status of Logical Drives
To display the status of all logical drives on a specific controller:
hpacucli ctrl slot=0 ld all show status
Example output:
logicaldrive 1 (136.7 GB, 1): OK
Status of all physical drives
To display the status of all physical drives on a specific controller:
hpacucli ctrl slot=0 pd all show status
Example output:
physicaldrive 1I:1:1 (port 1I:box 1:bay 1, 146 GB): OK
physicaldrive 1I:1:2 (port 1I:box 1:bay 2, 146 GB): OK
See Also
Champions of Regnum
Champions of Regnum is a free-to-play MMORPG, available for Linux, Windows and MAC OS X.