웹마짱구의 블로그

728x90

mysql이 깔려있는 리눅스 콘솔에서 root 권한이나 tcpdump 실행 권한이 있는 사용자로 아래 명령을 실행한다. 

 

tcpdump -p -i eth0 -s 0 -l -w - dst port 3306 | strings --bytes=6

 

 실행되는 쿼리를 log로 남길 경우

my.cnf에

log=/database/log/mysql.log

 

구문 추가 후 mysql 리스타트를 하게 되면 모든 쿼리가 상단 화일에 저장이 됨.

centos sudo 유저 추가

CentOS2019. 1. 30. 12:13
728x90

원문 : http://devtainer.blogspot.com/2011/03/sudo-in-centos_16.html


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# chmod u+w /etc/sudoers
# vi /etc/sudoers
 
case 1. 특정 사용자가 sudo를 사용할 수 있하는 설정
devtainer       ALL=(ALL)       ALL
 
case 2. 그룹에 포함된 모든 사용자가 sudo를 사용할 수 있하는 설정
 
%wheel        ALL=(ALL)       ALL
 
case 3. 패스워드 생략 설정
 
%wheel        ALL=(ALL)       NOPASSWD: ALL
devtainer        ALL=(ALL)       NOPASSWD: ALL
 
case 4. sudo를 사용하여 cd 마운트, 언마운트 가능하도록 설정
 
%users  ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
#users 그룹의 멤버는 sudo를 사용하여 cd롬 마운트와 언마운트만 허용
 
# chmod u-w /etc/sudoers
cs


xrdp 동작여부 확인

Linux2018. 12. 24. 17:05
728x90
1
2
3
4
5
# netstat -antup | grep xrdp
 
tcp        0      0 127.0.0.1:3350          0.0.0.0:*               LISTEN      1257/xrdp-sesman
 
tcp        0      0 0.0.0.0:3389            0.0.0.0:*               LISTEN      1259/xrdp
cs

728x90

원문 : https://code.i-harness.com/ko-kr/q/196bb1c



win7에서이 명령을 실행할 수 있습니다.

box add homestead file:///c:/homestead.box

또한이 중 하나가 작동합니다 :

box add homestead file:///c:\homestead.box


728x90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$ sudo apt install php7.2-fpm
 
$ sudo apt install php7.2-curl php7.2-gd php7.2-mbstring php7.2-mysql php7.2-xml php7.2-zip (For Laravel)
 
$ sudo service php7.2-fpm restart
 
 
 
$ sudo apt install nginx
 
$ sudo ufw allow 'Nginx HTTP'
 
 
 
$ sudo apt-get install software-properties-common
 
$ sudo add-apt-repository 'deb [arch=amd64,arm64,i386,ppc64el] http://ftp.kaist.ac.kr/mariadb/repo/10.3/ubuntu xenial main'
 
$ sudo apt update
 
$ sudo apt install mariadb-server
 
$ sudo mysql_secure_installation
 
$ sudo service mariadb restart
cs

우분투 사용자 추가

Ubuntu2018. 12. 12. 17:29
728x90

$ sudo adduser tester


$ sudo adduser tester sudo


$ sudo deluser tester

원격 저장소 만들기

Git2018. 12. 7. 12:11
728x90

$ git init --bare git_folder

728x90

http://codaa.tistory.com/371


상단에 아래코드 추가


# -*- coding: utf-8 -*- 

728x90

http://steambread.tistory.com/16


1. 디스플레이 관련 옵션 끄기

설정 - 시스템 - 알림 및 작업 탭에 들어갑니다.


위의 메뉴에 들어오시면 '알림' 부분에 여러 기능들이 켜져있는 것을 확인하실 수 있습니다. 크게 사용하지 않는 기능들은 모두 꺼주시길 바랍니다.

2. 레지스트리 편집


HKEY_LOCAL_MACHINE / SYSTEM / ControlSet001 / Services / Ndu 

해당 폴더로 이동하셨다면 위와 같은 화면이 나타날텐데요. 오른쪽 목록에 나타난 아이들 중 'Start'라고 쓰여진 놈을 더블클릭 해줍니다.

값을 편집하는 창이 나오면 기존에 되어있던 '2' 의 값을 '4' 로 변경해주시고 확인을 눌러주시면 됩니다.

출처: http://steambread.tistory.com/16 [너찐빵 Blog]

열린 포트 확인

Linux2018. 9. 12. 12:03
728x90

https://zetawiki.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_%EB%A1%9C%EC%BB%AC%EC%84%9C%EB%B2%84_%EC%97%B4%EB%A6%B0_%ED%8F%AC%ED%8A%B8_%ED%99%95%EC%9D%B8



# netstat -tnlp


# nmap localhost