'프로그램 및 소스' 카테고리의 다른 글
| 디자이너가 추천하는 무료 폰트 8개.jpg (0) | 2020.02.11 |
|---|---|
| Putty SSH Ctrl+S Lock (0) | 2017.02.02 |
| 각 은행별 영문명, 영문주소, SWIFT (B.I.C) 코드 (0) | 2016.06.23 |
| Adobe 프로그램 재설치시 경로문제 (0) | 2015.07.14 |
| Eclipse Remote System Explorer Content Assist (0) | 2015.06.16 |
| 디자이너가 추천하는 무료 폰트 8개.jpg (0) | 2020.02.11 |
|---|---|
| Putty SSH Ctrl+S Lock (0) | 2017.02.02 |
| 각 은행별 영문명, 영문주소, SWIFT (B.I.C) 코드 (0) | 2016.06.23 |
| Adobe 프로그램 재설치시 경로문제 (0) | 2015.07.14 |
| Eclipse Remote System Explorer Content Assist (0) | 2015.06.16 |
The link above provides detailed explanation with screenshots. It also has some other simple methods that could be tried before doing this manually. Since it is not accessible from some regions let me describe the method that worked for me.
Search String field, leaving everything else as is, then click "Search!".0x to it! This means that, for example, you have to search for 0x6AF0E1940624A220 instead of 6AF0E1940624A220.pub section. This should take you to page containing the key. The page's heading should be similar to Public Key Server -- Get "0x6AF0E1940624A220"-----BEGIN PGP PUBLIC KEY BLOCK-----) and save it in a file (e.g. key1).Once you have the file, run the following command
sudo apt-key add key1
You will get an "OK" response.
And you are done. Repeat the procedure of other keys that might be missing.
에러메시지에 보면 마지막 PUBLIC KEY 하고 뒤에 키값이 나온다....
OpenPGP Public Key Server 링크 클릭 후 그 키 값 앞에 0x 를 붙여서 검색..
그리고 나온 링크를 클릭하면 key 값이 나오는데 그걸 복사해서 저장한다.
그리고 sudo apt-key add 키파일명 을 해주고 apt-get update 를 다시 실행.
| history 명령 재 실행 (0) | 2016.09.06 |
|---|---|
| SSL 웹서버 시작시 암호 입력 안하기 (0) | 2016.08.01 |
| -bash: ./test.sh: /bin/bash^M: bad interpreter: 그런 파일이나 디렉토리가 없음 (0) | 2016.07.05 |
| CentOS 7 로케일 변경 (0) | 2016.06.28 |
| CentOS7 MRTG Install (0) | 2016.06.27 |
vim 에서
vim에서는 dos mode의 화일을 읽어도 화면에 ^M을 표시하지 않습니다.
대신 밑에 [dos] 라고 나타납니다.
다음과 같이 해서 unix mode로.. 즉 ^M을 빼는것입니다.
:set fileformat=unix
반대로 unix mode에서 dos mode로 바꾸고 싶다면
:set fileformat=dos
| SSL 웹서버 시작시 암호 입력 안하기 (0) | 2016.08.01 |
|---|---|
| [Ubuntu] W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: (0) | 2016.07.11 |
| CentOS 7 로케일 변경 (0) | 2016.06.28 |
| CentOS7 MRTG Install (0) | 2016.06.27 |
| Short Tip: Get UUID of Hard Disks [Update] (0) | 2016.06.24 |
MySQL Database의 경우 Oracle 이나 MS SQL Server에 비해서 대용량의 자료를 처리하는 경우가 적기에 튜닝에 필요성이 적은 것 같습니다. 그러나 웹이라는 환경은 많은 사용자가 동시에 접속을 할 수 있기에 항상 모니터링과 최적화는 기본이라고 생각합니다.
본 강좌에서는 기본적인 모니터링 방법과 Connection과 Memory 부분에 대한 튜닝 방법을 소개하도록 하겠습니다.
가. 모니터링 및 초기화 명령어
나. Connection 튜닝
1. status
2. system variables
그외에 status 또는 system variables 값은 참고의 Mysql 메뉴얼을 참조해 주십시요.
mysql> show variables like '%max_connection%'; |
다. Memory 튜닝
1. status
2. system variables
mysql> show status like '%key%'; |
라. 적용
system variables은 my.cnf 또는 my.ini 파일을 수정 후 MySQL Server 를 재시작 해 주십시요.
[www@smson www]$ vi /etc/my.cnf # The MySQL server |
출처 : http://www.albumbang.com/board/board_view.jsp?board_name=free&no=139
| 실수로 용량이 큰 테이블에 OPTIMIZE TABLE을 실행 했을 때 (0) | 2022.11.23 |
|---|---|
| [MySQL] Where In & SubQuery 는 최악! JOIN & MAX & GROUP BY 사용 (0) | 2022.09.29 |
| Running a syntax check on /etc/my.cnf (0) | 2016.06.29 |
| mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead [duplicate] (0) | 2016.05.11 |
| MYSQL에서 랜덤으로 데이터 읽어오기 (0) | 2015.10.01 |
Usually, I update variables on the fly using something like:
mysql> SET GLOBAL max_connections = 150; |
… and then modify /etc/my.cnf to make the change persistent.
The problem in doing this is that you’re not verifying that your /etc/my.cnf is correct and can only hope that a restart doesn’t encounter any problems.
Fortunately, Sai emailed us a great little tip to verify the syntax. You can run the following which will report errors in /etc/my.cnf:
# /usr/libexec/mysqld --help --verbose 081009 9:55:36 [ERROR] /usr/libexec/mysqld: unknown variable 'mmax_connections=150' # |
Perfect. Just what the doctor ordered.
하지만 난 mysqld가 저 경로에 없었다..
#mysqld --help --verbose
또는..
#which mysqld 한 뒤에..
/usr/sbin/mysqld 이 위치라는걸 보고
#/usr/sbin/mysqld --help --verbose 를 했다.
| 실수로 용량이 큰 테이블에 OPTIMIZE TABLE을 실행 했을 때 (0) | 2022.11.23 |
|---|---|
| [MySQL] Where In & SubQuery 는 최악! JOIN & MAX & GROUP BY 사용 (0) | 2022.09.29 |
| MySQL 기본적인 모니터링 방법과 Connection과 Memory 튜닝 방법 (0) | 2016.06.29 |
| mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead [duplicate] (0) | 2016.05.11 |
| MYSQL에서 랜덤으로 데이터 읽어오기 (0) | 2015.10.01 |
CentOS 7 에서 로케일 변경하는 방법입니다.
현재 사용가능한 한글관련 로케일
# localectl list-locales | grep -i ko
ko_KR
ko_KR.euckr
ko_KR.utf8
kok_IN
kok_IN.utf8
korean
korean.euc
ru_RU.koi8r
ru_UA.koi8u
tg_TJ.koi8t
uk_UA.koi8u
utf8 로 변경
# localectl set-locale LANG=ko_KR.utf8
수동으로 변경시는 /etc/locale.conf 파일을 만들어 아래 내용 추가
LANG=ko_KR.utf8
서버 부팅 후 로케일 설정 확인
# locale
LANG=ko_KR.utf8
LC_CTYPE="ko_KR.utf8"
LC_NUMERIC="ko_KR.utf8"
LC_TIME="ko_KR.utf8"
LC_COLLATE="ko_KR.utf8"
LC_MONETARY="ko_KR.utf8"
LC_MESSAGES="ko_KR.utf8"
LC_PAPER="ko_KR.utf8"
LC_NAME="ko_KR.utf8"
LC_ADDRESS="ko_KR.utf8"
LC_TELEPHONE="ko_KR.utf8"
LC_MEASUREMENT="ko_KR.utf8"
LC_IDENTIFICATION="ko_KR.utf8"
LC_ALL=
# cat /etc/locale.conf
LANG=ko_KR.utf8| [1] | |
| [2] | Install MRTG, SNMP. |
| [root@dlp ~]#
yum -y install net-snmp net-snmp-utils mrtg |
| [3] | Configure SNMP (Simple Network Management Protocol). |
|
[root@dlp ~]#
vi /etc/snmp/snmpd.conf # line 41: comment out # com2sec notConfigUser default public # line 74,75: uncomment and change # change to your local network for "mynetwork" section # change comunity name except public or private com2sec local localhost
Serverworld com2sec mynetwork 10.0.0.0/24
Serverworld # line 78,79: uncomment and change group MyRWGroup v2c localgroup MyROGroup v2c mynetwork# line 85: uncomment view all included .1 80 # line 93,94: uncomment and change access MyROGroup "" v2c noauth
exact all none noneaccess MyRWGroup "" v2c noauth
exact all all all# show status (replace the "Serverworld" to your comunity name) [root@dlp ~]# snmpwalk -v2c -c Serverworld localhost system SNMPv2-MIB::sysDescr.0 = STRING: Linux dlp.srv.world 3.10.0-229.4.2.el7.x86_64 #1 SMP Wed May..... SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (91954) 0:15:19.54 SNMPv2-MIB::sysContact.0 = STRING: Root <root@localhost> (configure /etc/snmp ..... ..... SNMPv2-MIB::sysORUpTime.9 = Timeticks: (4) 0:00:00.04 SNMPv2-MIB::sysORUpTime.10 = Timeticks: (4) 0:00:00.04 |
| [4] | Configure MRTG. |
| [root@dlp ~]#
cfgmaker --snmp-options=:::::2 --ifref=descr --ifdesc=descr Serverworld@10.0.0.30 > /etc/mrtg/mrtg.cfg [root@dlp ~]#
vi /etc/mrtg/mrtg.cfg # line 8: add WorkDir: /var/www/mrtg # line 16: uncomment Options[_]: growright, bits # near line 75: uncomment all from the line & change MaxBytes value Target[10.0.0.30_eth0]: \eth0:Serverworld@10.0.0.30:::::2 noHC[10.0.0.30_eth0]: yes SetEnv[10.0.0.30_eth0]: MRTG_INT_IP="10.0.0.30" MRTG_INT_DESCR="eth0" MaxBytes[10.0.0.30_eth0]: 125000000 Title[10.0.0.30_eth0]: eth0 -- dlp.srv.world PageTop[10.0.0.30_eth0]: <h1>eth0 -- dlp.srv.world</h1> ..... ..... # execute mrtg 3 times (display warnings until 3 times) [root@dlp ~]# for (( i=1 ; i <= 3 ; i++ )); do env LANG=C mrtg /etc/mrtg/mrtg.cfg; done 2015-06-16 19:54:12, Rateup WARNING: /usr/bin/rateup could not read the primary log file for 10.0.0.30_eth0 2015-06-16 19:54:12, Rateup WARNING: /usr/bin/rateup The backup log file for 10.0.0.30_eth0 was invalid as well 2015-06-16 19:54:12, Rateup WARNING: /usr/bin/rateup Can't rename 10.0.0.30_eth0.log to 10.0.0.30_eth0.old updating log file # generate index file [root@dlp ~]# indexmaker --columns=1 /etc/mrtg/mrtg.cfg > /var/www/mrtg/index.html # add in Cron [root@dlp ~]#
vi /etc/cron.d/mrtg */5 * * * * root LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok |
| [5] | Configure httpd to access MRTG site from other hosts. |
|
[root@dlp ~]#
vi /etc/httpd/conf.d/mrtg.conf # line 10: uncomment and add access permission, line 11: add DirectoryIndex Require ip 10.0.0.0/24 DirectoryIndex index.html systemctl start httpd |
| [6] | Access to the "http://(MRTG hostname or IP address)/mrtg/" from a client with HTTP, then it's possible to see MRTG site. |
![]() |
![]() |
출처 : http://www.server-world.info/en/note?os=CentOS_7&p=mrtg
| -bash: ./test.sh: /bin/bash^M: bad interpreter: 그런 파일이나 디렉토리가 없음 (0) | 2016.07.05 |
|---|---|
| CentOS 7 로케일 변경 (0) | 2016.06.28 |
| Short Tip: Get UUID of Hard Disks [Update] (0) | 2016.06.24 |
| yum update or yum install fails with package conflict between 64 bit and 32 bit package architectures ? (0) | 2016.06.17 |
| CentOS 저장장치(HDD) 추가 하기 (0) | 2016.06.17 |
There is an update to this post available: UUIDs and Linux: Everything you ever need to know.
The Universally Unique Identifier can be used to identify a device independent form its mount point or device name. This is more and more important as many devices today support hot-plugging or are external anyway. Therefore it makes sometimes sense to access a device (for example in fstab) not by device name but by the UUID.
There are several ways to get the UUID. The first one uses the /dev/ directory. While you are on is you might want to check other by-* directories, I never knew of them.
|
1
2 |
$ ls -l /dev/disk/by-uuidlrwxrwxrwx 1 root root 10 11. Okt 18:02 53cdad3b-4b01-4a6c-a099-be1cdf1acf6d -> ../../sda2 |
Another way to get the uuid by usage of the tool blkid:
|
1
2 |
$ blkid /dev/sda1/dev/sda1: LABEL="/" UUID="ee7cf0a0-1922-401b-a1ae-6ec9261484c0" SEC_TYPE="ext2" TYPE="ext3" |
There you also get the label and other information. Quite usefule.
Btw., if you wonder how “unique” this unique is, here a quote from Wikipedia:
1 trillion UUIDs would have to be created every nanosecond for 10 billion years to exhaust the number of UUIDs.
Pretty unique.
Thanks to Linux By Examples for the initial howto.
| CentOS 7 로케일 변경 (0) | 2016.06.28 |
|---|---|
| CentOS7 MRTG Install (0) | 2016.06.27 |
| yum update or yum install fails with package conflict between 64 bit and 32 bit package architectures ? (0) | 2016.06.17 |
| CentOS 저장장치(HDD) 추가 하기 (0) | 2016.06.17 |
| Unfinished transactions remaining - yum-complete-transaction (0) | 2016.06.17 |