메뉴 건너뛰기

Bigdata, Semantic IoT, Hadoop, NoSQL

Bigdata, Hadoop ecosystem, Semantic IoT등의 프로젝트를 진행중에 습득한 내용을 정리하는 곳입니다.
필요한 분을 위해서 공개하고 있습니다. 문의사항은 gooper@gooper.com로 메일을 보내주세요.




MySQL 다운로드]
 
1)  사이트 방문하여 소스 다운로드 하기
- 각 OS 버전에 맞게 설치파일을 다운로드를 받을 수 있다.
 
http://dev.mysql.com/downloads/mysql/
(주의) 컴파일용으로 다운받기 위해서는 Platform을 "Source Code"를 선택하고 Compressed TAR Archive 를 다운받는다.)
 
2) wget으로 소스 다운로드 하기
# wget http://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.85.tar.gz
 
[MySQL 리눅스에 간단 설치하기]
 
1) usr/local/src          <-- 여기에 다운로드
2) /usr/local/src 에 압축품 (# tar zxvf mysql-5.0.85.tar.gz )
3) mysql-5.0.85 폴더 생성됨 ( /usr/local/mysql-5.0.85 )
4) ./configure --prefix=/usr/local/mysql
--localstatedir=/usr/local/mysql/data
--with-charset=utf8
--with-innodb
--with-mysqld-user=mysql
--without-debug
--enable-large-files
--with-unix-socket-path=/var/lib/mysql/mysql.sock
--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static
--without-debug
--without-docs
5) make
6) make install
또는 5) 6) make && make install 같음.
이것으로 설치는 완료 됨.
---------------------------
 
[mysql DBA 생성 및 mysql 설정]
- mysql동작을 root가 아닌 mysql유저가 하도록 하는 것이다. 보안상의 문제
 
1. dba 그룹추가 및 mysql 사용자 추가.
# groupadd dba
# useradd -M -o -r -d /usr/local/mysql -s /sbin/nologin -c "Mysql Server" -u 27 -g dba mysql >/dev/null 2>&1 || :
 
2. 설치된 폴더에 대해 권한을 부여
# chown -R root:dba /usr/local/mysql
# chown -R mysql:dba -R /var/lib/mysql
 
3. 초기 데이터를 생성.
# /usr/local/mysql/bin/mysql_install_db
 
4. data 저장 디렉토리 권한부여
# chown -R mysql:dba /usr/local/mysql/data/mysql
 
5. mysql 권한설정
chown -R mysql.mysql /usr/local/mysql
 
6. mysql 실행.
# /usr/local/mysql/bin/mysqld_safe &

 
7. root 권한 설정
# /usr/local/mysql/bin/mysqladmin -u root password 'new-password'
 
8. 라이브러리에 등록(root 권한으로).
# echo /usr/local/mysql/lib/mysql >> /etc/ld.so.conf && ldconfig
 
9. mysqld 자동 시작을 위해 다음과 같이 스크립트를 복사 및 컨피그 설정.
# cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
# chkconfig --add mysqld
# chkconfig --level 35 mysqld on (런레벨 35일때 자동 실행 된다)
 
10  support-files폴더에 있는 my.cnf파일을 /etc/my.cnf로 복사.
# cp /usr/local/src/mysql-5.0.85/support-files/my-huge.cnf /etc/my.cnf
 
11  support-files폴더에 있는 my.cnf파일을 /etc/my.cnf로 복사.
 
12. my.cnf 편집
- 아래와 같이 /etc/my.cnf 파일을 수정한다.
#cat /etc/my.cnf
...
[client]
#password       = your_password
port            = 3306
socket          = /var/lib/mysql/mysql.sock
default-character-set = euckr
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
default-character-set = euckr  # <--여기부터 3라인 추가 또는 수정
language = korean
old_passwords=1
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
...
 

13. mysql 재시작 시

# service mysqld start|stop|restart
또는
/etc/rc.d/init.d/mysqld start
------------------------
 
[기타]
[] mysql path 설정
# vi ~/.bash_profile
PATH=$PATH:/usr/local/mysql/bin 추가
# source ~/.bash_profile

 

가.

/var/lib/mysql 혹은 /usr/local/mysql에 접근할 수 없다는 메세지가 나오면

mkdir mysql한후 sudo mv mysql /var/lib/ 혹은 /usr/local/하여 디렉토리를 만들어주면 현재 계정으로 만들수 있음

 

나. /usr/local/mysql/bin/mysqld_safe &를 수행후 $mysql -u root -p로 들어가서

   create user gooper;을 실행하여 사용자를 만들고 create database hadoop;을 수행하여 hadoop용 database를 생성한다.

  이어서

  grant all privileges on hadoop.* to gooper@'localhost' identified by 'gooper';를 수행하여 gooper계정에게 hadoop데이타베이스의

  권한을 부여한다.

 

다. root의 패스워드 변경

 $mysql  -u root로 들어가서

 mysql>SET PASSWORD FOR root@localhost=PASSWORD('rubberchicken');로 패스워드를 변경함

  (패스워드 변경후에는 $mysql -u root -p로 접근하여 패스워드를 입력해야 접근가능함)

번호 제목 글쓴이 날짜 조회 수
60 [Cloudera 6.3.4, Kudu]]Service Monitor에서 사용하는 metric중에 일부를 blacklist로 설정하여 모니터링 정보 수집 제외하는 방법 gooper 2022.07.08 31
59 Cloudera Manager의 Java Heap Size변경하는 방법 gooper 2022.06.27 31
58 federated query 예제 총관리자 2017.01.19 31
57 [KTS Cluster의 Key Trustee Server]self-signed 인증서 발급및 설정 방법 gooper 2023.06.27 29
56 [oozie]oozie ssh action으로 패스워드 없이 다른 서버에 ssh로그인 하여 shellscript호출하는 설정하는 방법 gooper 2022.11.10 29
55 [CDP7.1.7]Impala Query의 Memory Spilled 양은 ScratchFileUsedBytes값을 누적해서 구할 수 있다. gooper 2022.07.29 29
54 Could not authenticate, GSSException: No valid credentials provided (Mechanism level: Failed to find any kerberos tgt) 총관리자 2022.04.28 27
53 Oracle RAC 구성된 DB서버에 대한 컴포넌트별 설정 방법 총관리자 2022.02.12 27
52 [vi]블럭 및 문서내 복사등에 관련된 명령어 총관리자 2017.02.17 27
51 Error: IO_ERROR : java.io.IOException: Error while connecting Oozie server 총관리자 2022.05.02 26
50 kudu table와 impala(hive) table정보가 틀어져서 테이블을 읽지 못하는 경우(Error Loading Metadata) 조치방법 gooper 2023.11.10 25
49 클러스터내의 전체 workflow및 coordinator현황을 사용자별로 추출하는 방법 총관리자 2021.11.25 25
48 oracle 접속 방식에 따른 --connect 지정 방법 총관리자 2022.02.11 24
47 hadoop에서 yarn jar ..를 이용하여 appliction을 실행하여 정상적으로 수행되었으나 yarn UI의 어플리케이션 목록에 나타나지 않는 문제 총관리자 2017.05.02 24
46 magento2 샘플데이타 설치 총관리자 2017.01.31 24
45 [Ranger]RangerAdminRESTClient Error gertting pplicies; Received NULL response!!, secureMode=true, user=rangerkms/node01.gooper.com@ GOOPER.COM (auth:KERBEROS), serviceName=cm_kms gooper 2023.06.27 23
44 [Solr in Cloudera]Solr Data Directory변경 방법/절차 gooper 2023.04.21 23
43 vuestorefrontui.io를 이용한 front end project 생성하기 총관리자 2022.02.06 23
42 not leader of this config: current role FOLLOWER 오류 발생시 확인방법 총관리자 2022.01.17 23
41 [impala]insert into db명.table명 select a, b from db명.table명 쿼리 수행시 "Memory limit exceeded: Failed to allocate memory for Parquet page index"오류 조치 방법 gooper 2023.05.31 22

A personal place to organize information learned during the development of such Hadoop, Hive, Hbase, Semantic IoT, etc.
We are open to the required minutes. Please send inquiries to gooper@gooper.com.

위로