Set the default language for the CentOS server system

Source: Internet
Author: User
Tags i18n local time locale centos server

Use your favorite editor, such as VI, to open the/etc/sysconfig/i18n file

# vi/etc/sysconfig/i18n
Lang= "en_US. UTF-8 "
Sysfont= "Latarcyrheb-sun16"

Another way is to change the environment variable Lang

#export lang= "en_US. UTF-8 "

But such a reboot is not, so to add to the/etc/profile inside, so a boot will run this variable.

Lang= "en_US. UTF-8 "

Export PATH USER LOGNAME MAIL HOSTNAME histsize inputrc LANG

Ok... It's OK to log off. "~!

After modification, reboot and check the environment variables with locale

If the execution locale has the following error

root@158137:/etc# locale
Locale:cannot set LC_CTYPE to default locale:no such file or directory
Locale:cannot set Lc_messages to default locale:no such file or directory
Locale:cannot set Lc_all to default locale:no such file or directory
Lang=en_us. UTF-8
Language=en_us:en
。。。。。。

can perform Locale-gen en_US. UTF-8 Repair

root@158137:/etc# Locale-gen en_US. UTF-8
Generating locales ...
en_US. UTF-8 ... done
Generation complete.


Check the health status of the hard drive under the Linux system
Linux, detecting hard drive, hard drive status
In Linux a detection of the state of the hard drive we often use SDA to check, but some systems are not supported SDA, I would like to give you a detailed introduction

About the SDA and SDA detection of hard disk State of the specific methods, the need for students to refer to.

Smart is compatible with the corresponding function on the motherboard BIOS
To use smart, you must first enter the BIOS setup inside the motherboard to start the relevant settings
Typically, motherboards from the Pentium2 level support smart
After the BIOS starts, it's the operating system level.
Unfortunately, Windows does not have a built-in smart tool (Third-party tool software is required)
Well, on Linux, there was a smart support early on.
If you install Linux on a virtual machine such as VMware, you can see a service startup error when the system starts: SMARTD
This server is the daemon process for smart (because VMware virtual machine hard drive does not support smart, so the error)

You can use the following command to confirm that the hard drive is turned on smart support


You should normally get the following information

[Root@localhost ~]# smartctl-i/DEV/SDA
Smartctl version 5.38 [I686-redhat-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

= = = START of Information section = = =
Model family:seagate Barracuda 7200.10 Family
Device model:st3160815as
Serial Number:5ra6a1k9
Firmware Version:4.aab
User capacity:160,041,885,696 bytes
Device is:in smartctl Database [for details use:-P show]
ATA Version Is:7
ATA Standard is:exact ATA Specification Draft version not indicated
local time Is:sat June 7 17:18:02 CST
Smart Support Is:available–device has smart capability.

Here, if you see the smart support is:disabled, it means that smart is not enabled

If we need to execute the following command, start Smart:
Smartctl–smart=on–offlineauto=on–saveauto=on/dev/sda

View the current health status of your hard disk using the following command

First, through the Linux server through the smart to detect your hard drive and disk array.

The status of the hard drive:

Smartctl-i/DEV/SDA

The health status of the hard drive:

Smartctl-h/DEV/SDA

Attention

Result: passed, which indicates that the hard drive is in good health
If failure is shown here, then it is best to replace the hard drive immediately to the server

You can see detailed parameters by executing the following command:

Smartctl-a/dev/hdb

Output full Result:

Smartctl-a/dev/hdb

It is troublesome to log on to the server regularly to run SMARTCTL, Linux provides a system process SMARTD
To edit a configuration file:

Vi/etc/smartd.conf

Most of this configuration file may be commented out, only to the current hard disk related to write the correct line:
/dev/hdb-h-M test@scanmon.com

The configuration above indicates that SMARTD works in a silent state and ignores when the smart report passed
Once the failure appears, notify the user of the specified mailbox immediately by mail
To restart the service after modifying the configuration:

/etc/init.d/smartd

To complete all configuration of smart

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.