In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
What you see, update for a long time.
1.linux garbled problem
[root@vps software] # vi / etc/sysconfig/i18n
LANG='zh_CN.utf8'
SYSFONT=latarcyrheb-sun16
SUPPORTED= "zh_CN.UTF-8:zh_CN:zh"
LANG variable is the abbreviation of language. Users with a little English foundation can see that this variable determines the default language of the system, that is, the menu of the system, the toolbar language of the program, the default language of input method, and so on.
SYSFONT is short for system font, which determines which font the system uses by default.
The SUPPORTED variable determines the language that the system supports, that is, the language that the system can display.
[root@vps software] # source / etc/sysconfig/i18n
two。 Time synchronization
[root@vps /] # crontab-l
01 01 * / usr/sbin/ntpdate cn.pool.ntp.org; hwclock-w > > / dev/null 2 > & 1
Hwclock-w synchronization to hardware clock
3. View 80 connections
[root@vps /] # netstat-n | grep: 80 | awk'/ ^ tcp/ {+ + S [$NF]} END {for (an in S) print a, S [a]}'
TIME_WAIT 2
CLOSE_WAIT 136
ESTABLISHED 3
4. Mirror image problem
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
Solution: edit / etc/yum.repos.d/epel.repo, comment out the basic recovery and the address of the image
# baseurl
Mirrorlist
Change to
Baseurl
# mirrorlist
5.yum cannot be used, lack of package
[root@Monitor 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
Please install a package which provides this module, or
Verify that 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 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
If you cannot solve this problem yourself, please 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 setting
[root@Monitor ~] # yum-y install java-1.7.0-openjdk*
[root@Monitor ~] # 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)
[root@Monitor ~] # export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk.x86_64
The java environment variable sets 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 startup memory defaults to 1x64 of physical memory
Maximum memory allocated during Xmx:jvm operation
If the remaining memory is less than 40%, the JVM will increase the heap to the value set by Xmx, and if the remaining memory is more than 70%, the JVM will reduce the heap to the value set by Xms.
If the Xms exceeds the XMX value, or if the sum of the heap maximum and non-heap maximum exceeds the physical memory or operating system maximum limit, the server will not start.
Set NewSize and MaxNewSize to be equal, and the size of "new" should not be more than half of that of "old". This is because if the old area does not trigger the "main" GC frequently, the performance will be greatly reduced.
9. Manually free 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 and 3, representing different meanings:
0: no release (system default)
1: release the page cache
2: release dentries and inodes
3: release all caches
10. Linux records user actions in detail
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 300$ HISTDIR/$ {LOGNAME}
Fi
Export HISTSIZE=1000
DT= `date +% Y% m% dice% H% M% S`
Export HISTFILE= "$HISTDIR/$ {LOGNAME} / ${USER_IP} .hist. $DT"
Chmod 600$ HISTDIR/$ {LOGNAME} / * .hist* 2 > / dev/null
# history end
11. How does linux mount the 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 / / native IP address / test / mut/linux destination folder-o username= "windows login account", password= "password corresponding to the windows account"
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.