본문 바로가기

시스템

(32)
파워쉘 원격 접속 서버 > Enable-PSRemoting -Force-Force : 모든 설정 질문에 Y 허용된 호스트 목록 보기> Get-Item WSMan:\localhost\Client\TrustedHosts 호스트 추가> Set-Item WSMan:\localhost\Client\TrustedHosts -Value "ip" 별도의 자격증명(id) 부여> $Credential=Get-Credential "계정" 클라이언트에서 접속> Enter-PSSession -ComputerName "ip" -Credential $Credential 원격 파워쉘 명령 실행> Set-ExecutionPolicy RemoteSigned> Get-ExecutionPolicyRemotesigned 리부팅> restart-computer..
mysql 접근 ip 추가 Mysql> select host,user,password from mysql.user; Mysql> grant all privileges on *.* to 'root'@'1.1.1.1' identified by 'root-password';Mysql> grant all privileges on *.* to 'root'@'1.1.%' identified by 'root-password';Mysql> grant all privileges on *.* to 'root'@'%' identified by 'root-password';Mysql> flush privileges; 만약 my.cnf 에 bind-address 가 설정되어 있다면 해당 부분 제거 특정db와 table로 권한을 주고자 할때는 *.* 에 ..
bonding 설정 네트워크 설정 위치 $ /etc/sysconfig/network-scripts/ 네트워크 재시작 $ etc/rc.d/init.d/network restart * 본딩 디바이스 추가/etc/sysconfig/network-scripts/ifcfg-bond1 # 디바이스명 DEVICE=bond1 NAME=bond1 TYPE=Bond BONDING_MASTER=yes # ip할당 방식 : dhcp, static, none BOOTPROTO=none # ip 설정 : BOOTPROTO=dhcp 인 경우는 제외 IPADDR=10.0.1.11 GATEWAY=10.0.1.1 # 마스크설정 : 둘중에 원하는 형태로 PREFIX=24 # NETMASK=255.255.255.0 # dns DNS1= DNS2= # 본딩옵션..
MySQL Slow Log my.cnf 파일 수정[mysqld]..slow_query_log=onslow_query_log_file=/val/log/mysql/slow.loglong_query_time=5 MySQL 재시작 환경변수확인mysql> show variables like 'slow_query%'; 로그확인$> tail -f /var/log/mysql/slow.log
mysql 클러스터 구성 기본구성 mgm node : ndb_mgmd sql node : mysqld data node : ndbd red hat 과 SUSE 등은 ndb와 mgm 데몬 바이너리가 나뉘어져 있는데, 다른 플랫폼은 그냥 하나로 구성됨.SQL node : Sql 데몬인데 NDB엔진을 사용하는경우 NDB클라이언트로 동작한다.Data node : NDB. 데몬이 있는 경우 해당 데몬을 설치 할 수 있으며, 설정 등은 sql노드와 동일하다. SQL 서버 바이너리를 각 노드에 설치하는 경우 데이터노드, 관리노드는 mysql_install_db 스크립트를 실행하지 않는다. 설치설치 참조 : https://dev.mysql.com/doc/refman/5.6/en/mysql-cluster-install-linux-rpm.html..
SSH, 방화벽 관련 설정 SSH 설치# yum install -y opensshor# yum install openssh-server openssh-clients openssh-askpass SSH 시작(서비스 등록)# systemctl enable sshd.service SSH 서비스 재시작# systemctl restart sshd.service 상태보기# netstat -anp | grep LISTEN | grep sshd 기본 설정 변경 : 설정 변경후에는 서비스 재시작.$ sudo vi /etc/ssh/sshd_config # Root 권한으로 로그인 불가능 설정PermitRootLogin no # Password 필요PermitEmptyPasswords no # 포트Port 1234 # 접속 유지시간TCPKeepAli..
[CentOS7] systemd 기본사항 파일위치/etc/systemd : 기본설정/usr/lib/systemd : 바이너리/usr/lib/systemd/system : 타겟, 유닛 부팅 시간 표시# systemd-analyze 서비스별 초기화 시간# systemd-analyze blame 서비스 목록 확인# systemctl 전체 서비스# systemctl list-unit-files 서비스 정보보기# systemctl show sshd 서비스 제어부팅시 활성화 여부# systemctl disable 서비스명# systemctl enable 서비스명 시작 중지# systemctl start 서비스명# systemctl stop 서비스명# systemctl restart 서비스명# systemctl reload 서비스명# systemctl ki..
[centos7] 방화벽 설정하기 방화벽 설치# yum install firewalld# systemctl start firewalld# systemctl enable firewalld 설정파일위치/etc/firewalld/zones/public.xml 상태확인# firewall-cmd --state 재구동# firewall-cmd --reload 존목록# firewall-cmd --get-zone# firewall-cmd --list-all-zones# firewall-cmd --get-default-zone# firewall-cmd --get-active-zone 포트,서비스목록# firewall-cmd --list-ports# firewall-cmd --get-services# firewall-cmd --permanent --lis..