프로그래밍/AWS

AWS (Amazon Web Service)에서 자주 썼던 설정 모음

깔삼 2016. 10. 4. 16:48

AWS (Amazon Web Service)에서 자주 썼던 설정 모음



<MySQL 원격 접속 허용>

INSERT INTO USER(host,user,password,ssl_cipher,x509_issuer,x509_subject) VALUES('%','root',password('1234'),'','','');

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';

FLUSH PRIVILEGES;


<MySQL DB-Replication (Master-Slave)>

# Master에서 (ip: 10.0.0.101)

use mysql;

grant replication slave on *.* to 'slave'@'10.0.0.201' identified by '1234';

FLUSH PRIVILEGES;

# Slave 에서 (ip: 10.0.0.201)

change master to master_host='10.0.0.101', master_user='slave', master_port=3306, master_password='1234', master_log_file='mysql-bin.000006', master_log_pos=1861;


<MySQL 대소문자 구분 X>

lower_case_table_names=1


<리눅스 한국 표준시(KST)로 변경>

date

mv /etc/localtime /etc/localtime_bak

ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime

date

<TOMCAT 로그 시간 변경>

(startup.sh 파일 맨 위에 아래 내용을 추가)

export CATALINA_OPTS=-Duser.timezone=GMT+09:00


<Service 자동 시작>

chkconfig --add tomcat

chkconfig --list

chkconfig --del tomcat


<root 계정 활성화> - ssh 접속 시 public/private key를 이용하지 않고 root 계정으로 접속

sudo passwd root

> pw 설정

sudo vi /etc/ssh/sshd_config

> PermitRootLogin yes


sudo mkdir /root/.ssh

sudo cp /home/centos/.ssh/authorized_keys /root/.ssh

sudo service sshd restart


<SQL Server> - Windows 영문판에서 MS-SQL 한글 설정

setup.exe 

/QUIET 

/ACTION=REBUILDDATABASE 

/SQLCOLLATION=Korean_Wansung_CI_AS 

/INSTANCENAME=MSSQLSERVER 

/SQLSYSADMINACCOUNTS=Administrator