FAQs on the Ops Road

Source: Internet
Author: User
Tags i18n xms

Meet the See, long-term update ~ ~ ~

1.linux garbled problem

[Email protected] software]# vi/etc/sysconfig/i18n

lang= ' Zh_cn.utf8 '

Sysfont=latarcyrheb-sun16

Supported= "ZH_CN. Utf-8:zh_cn:zh "

where lang variable is the abbreviation of language, a slightly English-based user can see that the variable is the default language of the system, that is, the system's menu, the program's toolbar language, input method default language and so on.

Sysfont is the abbreviation for system font, which determines which font is used by default.

The supported variable determines the language that the system supports, i.e. the language that the system can display.

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

2. Time synchronization

[Email protected]/]# crontab-l

* * * */usr/sbin/ntpdate cn.pool.ntp.org; hwclock-w >>/dev/null 2>&1

hwclock-w Sync to hardware clock

3. View 80 connections

[Email protected]/]# netstat-n|grep:80 | awk '/^tcp/{++s[$NF]} END {for (a in S) print A, s[a]} '

Time_wait 2

Close_wait 136

Established 3

4. Mirroring issues

Error:cannot retrieve Metalink for Repository:epel. Verify its path and try again

Workaround: Edit the/etc/yum.repos.d/epel.repo, comment out the base restore, the address of the mirror

#baseurl

Mirrorlist

Change into

BaseURL

#mirrorlist

5.yum not available, missing bag

[email protected] lib]# Yum install fping

There was a problem importing one of the Python modules

required to run yum. The error leading to this problem was:

Libcurl.so.4:cannot Open Shared object file:no such file or directory

Install a package which provides this module, or

Verify the module is installed correctly.

It ' s possible that the above module doesn ' t match the

Current version of Python, which is:

2.6.6 (r266:84292, Jan, 09:42:36)

[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]

If You cannot solve this problem yourself and go to

The Yum FAQ at:

Http://yum.baseurl.org/wiki/Faq

https://pkgs.org/centos-6/centos-x86_64/libcurl-7.19.7-52.el6.x86_64.rpm.html

libcurl-7.19.7-52.el6.x86_64.rpm

zlib-1.2.3-29.el6.x86_64.rpm

6. Install the graphical interface

Yum-y Groupinstall Desktop

Yum-y groupinstall "X window System"

Yum-y Groupinstall Chinese-support

StartX

7.java environment variable Settings

[[Email protected] ~] #yum-y install java-1.7.0-openjdk*

[Email protected] ~]# java-version

Java Version "1.7.0_111"

OpenJDK Runtime Environment (rhel-2.6.7.2.el6_8-x86_64 U111-B01)

OpenJDK 64-bit Server VM (build 24.111-b01, Mixed mode)

[[Email protected] ~] #export java_home=/usr/lib/jvm/java-1.7.0-openjdk.x86_64

Java environment variable settings http://blog.csdn.net/u010440155/article/details/51544282

8.tomcat Java Memory settings

Catalina.sh:

Java_opts= '-server-xms10240m-xmx10240m-xx:newsize=512m-xx:maxnewsize=512m-xx:permsize=128m-xx:maxpermsize=128m ‘

XMS:JVM boot Memory default is 1/64 of physical memory

XMX:JVM the maximum memory allocated during the run

If the memory is less than 40%,JVM the value of the heap to the XMX setting is increased, the memory remaining more than 70%,JVM will reduce the heap to XMS setting value.

if XMS exceeds the XMX value, or if the sum of the heap maximum and the non-heap maximum exceeds the physical memory or the maximum operating system limit, the server will not start up.

set newsize, Maxnewsize equal, "new" should not be larger than the size of "old" half, because the old area if not enough to trigger the "main" GC frequently, greatly reducing the performance

9. Manually release memory

http://lizhenliang.blog.51cto.com/7876557/1657448

Sync

echo 1 >/proc/sys/vm/drop_caches

the value of drop_caches can be a number between 0-3 and represents a different meaning:

0: Not released (system default)

1: Free page cache

2: Release dentries and Inodes

3: Release all caches

Linux Verbose logging user actions

http://369369.blog.51cto.com/319630/1732164

Modify the/etc/profile file and add the following at the end:

#history

Export histtimeformat= "[%y%m%d-%h%m-:%s]"

user_ip= ' who-u am I 2>/dev/null| awk ' {print$nf} ' |sed-e ' s/[()]//g '

Histdir=/var/log/history

If [-Z $USER _ip]

Then

User_ip= ' hostname '

Fi

if [!-D $HISTDIR]

Then

Mkdir-p $HISTDIR

chmod 777 $HISTDIR

Fi

if [!-D $HISTDIR/${logname}]

Then

Mkdir-p $HISTDIR/${logname}

chmod $HISTDIR/${logname}

Fi

Export histsize=1000

dt= ' Date +%y%m%d_%h%m%s '

Export histfile= "$HISTDIR/${logname}/${user_ip}.hist. $DT"

chmod $HISTDIR/${logname}/*.hist* 2>/dev/null

#history End

How does Linux mount a shared directory under Windows?

mount-t cifs-o username=windows login account, password= "password corresponding to Windows account"//16.187.190.50/test/mnt/linux destination folder

or Muout.cifs//natively IP address/test/mut/linux destination folder-o username= "Windows login account", password= "password for Windows account "


This article is from the "unplug the Operational Space" blog, please be sure to keep this source http://zhangdj.blog.51cto.com/9210512/1879467

FAQs on the Ops Road

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.