Character set modification, Linux time synchronization, tuning file descriptors

Source: Internet
Author: User

Character

UTF-8: Non-fixed length, 1-4 bytes, widely supported, most widely used

GBK: Fixed length, double byte, not international standard, less supported systems


[Email protected] ~]# cat/etc/sysconfig/i18n

Lang= "en_US. UTF-8 "

Sysfont= "Latarcyrheb-sun16"

Backup first:

[Email protected] ~]# cp/etc/sysconfig/i18n/etc/sysconfig/i18n.wuyike.20170411

Change configuration:

[Email protected] ~]# sed-i ' s#lang= "en_US. UTF-8 "#lang=" ZH_CN. UTF-8 "#g '/etc/sysconfig/i18n

[Email protected] ~]# cat/etc/sysconfig/i18n

Lang= "ZH_CN. UTF-8 "

Sysfont= "Latarcyrheb-sun16"

[Email protected] ~]# echo $LANG

en_US. UTF-8

[Email protected] ~]# source/etc/sysconfig/i18n

[Email protected] ~]# echo $LANG

Zh_cn. UTF-8


Then change the character set in the CRT: Session option----and character encoding-->utf-8.


Time Service:

[[Email protected] ~]# Date

Saturday, March 04, 2017 18:57:16 CST

Modification Time:

[[email protected] ~]# date-s "2017/04/11 20:38"

April 11, 2017 Tuesday 20:38:00 CST

[[Email protected] ~]# Date

April 11, 2017 Tuesday 20:38:05 CST

Save time:

[Email protected] ~]# Hwclock

April 11, 2017 Tuesday 20:38 23 sec -0.344922 seconds


Sync Internet time:

[Email protected] ~]#/usr/sbin/ntpdate time.nist.gov

APR 20:41:29 ntpdate[35435]: Step time Server 216.229.0.179 offset-604646.549696 sec


Set the Internet to sync every 5 minutes on Crond

[[email protected] ~]# echo "*/5 * * * */usr/sbin/ntpdate time.nist.gov" >/dev/null 2>&1 ">>/VAR/SPOOL/CR On/root

Or start the Linux automatic synchronization Internet program:

[[email protected] ~]#/etc/init.d/ntpd start


NTP service:


650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/8F/D0/wKioL1js06-DUuMXAADYF4TrZUE929.png "style=" float : none; "title=" Time server architecture small scale. PNG "alt=" Wkiol1js06-duumxaadyf4trzue929.png "/>

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/8F/D1/wKiom1js07DSbxcrAAEHyUxPEao993.png "style=" float : none; "title=" Time server schema. PNG "alt=" Wkiom1js07dsbxcraaehyuxpeao993.png "/>




To set the timeout control for the CRT:

[Email protected] ~]# export tmout=10

[[email protected] ~]# timed out waiting for input:auto-logout

[Email protected] ~]$

Permanently set timeout control

[Email protected] ~]# echo "Export tmout=10" >>/etc/profile

[Email protected] ~]# Source/etc/profile

View:

[Email protected] ~]# echo $TMOUT

1000


Historical records Control:

History only saves 5 rows of settings:

[Email protected] ~]# histsize=5

View:

[Email protected] ~]# history

562 History

563 history=5

564 History

565 histsize=5

566 history

or modify it in the following ways:

[Email protected] ~]# export history=50

[Email protected] ~]# history

564 History

565 histsize=5

566 history

567 Export HISTORY=50

568 history

(Has been deleted)


The history is also stored in the history file to view and modify the history file:

[email protected] ~]# cat ~/.bash_history

[Email protected] ~]# histfilesize=5


To empty the existing history, use the- C parameter:

[Email protected] ~]# history

569 Cat ~/.bash

570 Cat ~/.bash_history

571 histfilesize=5

572 Cat ~/.bash_history

573 history

[Email protected] ~]# history-c

[Email protected] ~]# history

570 History

Or just delete a row, with-D:

[Email protected] ~]# history

570 History

571 echo 123456|passwd--stdin Keke

572 history

[Email protected] ~]# history-d 571

[Email protected] ~]# history

570 History

571 History

572 history-d 571

573 history


To enlarge the server file descriptor:

The file descriptor is basically an integer number (0-65535),

The process uses a file descriptor that uses it to open the file and identifies the open file

To view the default file descriptor:

[Email protected] ~]# ulimit-n

1024

Adjust file descriptors: (Modify shell resource limits)

[Email protected] ~]# Ulimit-shn 65535

[Email protected] ~]# ulimit-n

65535650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/8F/F2/wKiom1jt6A6yGrt0AAG0lb6hHyY075.png "title=" Adjusts the file descriptor. PNG "width=" height= "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:700px;height:160px;float:left; "alt=" Wkiom1jt6a6ygrt0aag0lb6hhyy075.png "/>









Character set modification, Linux time synchronization, tuning file descriptors

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.