// mysql root password 등록 [root@linux mysql]# mysql -u root -p mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 1 to server version: 4.0.23-Max Type 'help;' or 'h' for help. Type 'c' to clear the buffer. mysql> update user set password=password('비밀번호입력') where user='root'; Query OK, 2 rows affected (0.00 sec) Rows matched: 2 Changed: 2 Warnings: 0 mysql> flush privileges; <== mysql 재시동 Query OK, 0 rows affected (0.00
mysql 컴파일시 에러 error : checking for termcap functions library... configure: error: No curses/termcap library found (termcap 라이브러리를 찾을수 없어서 에러가 발생) * libtermcap 라이브러리는 libtermcap-devel 패키지에 포함되어 있다. termcap , libtermcap, libtermcap-devel이 설치되어 있는지 확인한다. 없는 패키지를 설치하고 컴파일한다.
// mysql root password 등록 [root@linux mysql]# mysql -u root -p mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 1 to server version: 4.0.23-Max Type 'help;' or 'h' for help. Type 'c' to clear the buffer. mysql> update user set password=password('비밀번호입력') where user='root'; Query OK, 2 rows affected (0.00 sec) Rows matched: 2 Changed: 2 Warnings: 0 mysql> flush privileges; <== mysql 재시동 Query OK, 0 rows affected (0
포워딩 하기 <script>location.replace('도메인 및 경로');</script>
sendmail에서 mqueue의 처리상황 확인하는 명령어 root@51s:/var/spool/mqueue# sendmail -bp /var/spool/mqueue/q19 is empty /var/spool/mqueue/q16 is empty /var/spool/mqueue/q12 is empty /var/spool/mqueue/q5 is empty /var/spool/mqueue/q28 is empty /var/spool/mqueue/q6 is empty /var/spool/mqueue/q9 is empty /var/spool/mqueue/q13 is empty /var/spool/mqueue/q10 is empty /var/spool/mqueue/q8 is empty /var/spool/mqueue/q11 is empty /var/spool/mqueue/q27 is empty /var/spool/mqueue/q23 is empty /var/spool/mqueue/q2 is empty /var/spool/mqueue/q29 is empty /var/spool/mqueue/q17 is empty /var/spool/mqueue/q1 is empty /var/
/etc/skel 디렉토리는 사용자 계정 생성(useradd)시에 환경 설정 파일들이 저장되어 있는 디렉토리다.이 파일들은 useradd 명령어로 계정 생성시에 /etc/skel 이라는 디렉토리에 존재하는 파일들을 그대로 복사해온다.새로생성되는 사용자의 홈디렉토리로 복사 되어진다. root@web:/etc# ll skeltotal 20drwxr-xr-x. 2 root root 4096 Dec 25 07:51 .drwxr-xr-x. 82 root root 4096 Jan 2 03:24 ..-rw-r--r--. 1 root root 18 May 11 2012 .bash_logout-rw-r--r--. 1 root root 176 May 11 2012 .bash_profile-rw-r--r--. 1 root root 124 May 11 2012 .bashrcroroot@web:/# useradd KY root@web:/# passwd hky Changing password for user hky.New password: passwd: all authentication tokens updated successfully.ot@web:/# ll /home/KY tot
w 명령어 현재 접속중인 사용자들의 정보를 보는 명령어이다. 명령어의 위치 : /usr/bin/w - 서버의 현재 시각 정보 - 서버 부팅이후 시스템 작동시간 - 서버 접속자의 총 수 - 접속자별 서버 평균 부하율 정보 - 접속자별 서버 접속 계정명 - 접속자 별 접속 TTY명 - 접속자 별 접속한 IP명 - 접속자 별 로그인 시각 정보 - 접속자 별 CPU 사용 정보(JCPU, PCPU) - 접속자별 현재 사용 명령어 정보 -JCPU: tty필드에서 사용하는 징치명에서 사용하는 모든 프로세스의 CPU사용시간을 나타냄. 이때 지난 background로 실행되는 시간제외.현재실행되는 background 작업시간은 포함. -PCPU: 해당 w결과 값에서 WHAT필드에 나타나는 프로세스명에서 사용하는 CPU의 총시간을 나타냄 옵션 -h : head 정보(uptime정보와 필드 제목 정보)를 출력하지않고 좀 더 간단한 정보 출력. -s : JCPU, PCPU의 정보를 생략하고 결과 출력한다. -f : 고정된 형식의 FROM필드의 값(접근한 사용자의 ip주소 정보)을 생략하고 보여준다. 예 [root@web ~]# w 10:44:37 up 1 min, 2 us
active, stanby 구분 [root@~]# pstree ├─pulse───lvsd───2*[nanny]  // active [root@~]# pstree ├─pulse // stanby <LVS1> eth0 123.45.123.20 eth0:1 123.45.123.59 [root@~]# ipvsadm -L // 현재 로드밸런싱 되고 있는 리스트 IP Virtual Server version 1.2.1 (size=4096) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn TCP 123.45.123.59:http wlc persistent 1800 // 59 VIP → 75 VIP -> 123.45.123.75:http Route 1 131 20 → 77 VIp -> 123.45.123.77:http Route
runleve 중, 1=single-user모드는 별도의 로그인 과정 없이 root 계정으로 시스템을 사용할 수 있는 모드 이 모드로 부팅하면 root 패스워드를 변경할 수 있다. ※ 콘솔모드에서만 된다. <GRUB 메뉴가 나올경우> 1. 부팅해서 아래 커널선택 후 e키를 입력 2. Kernel 로 시작하는 줄에서 e키를 한번 더 입력 3. 끝부분에 "1" 또는 "single" 입력하고 Enter 누르면 2번의 화면으로 돌아오게 되는데 b키 입력 4. "passwd" 명령어 사용해서 패스워드 변경하고 reboot <선택메뉴만 나올경우> 1. Ctrl + X 를 누름 2. linux single 를 입력 후 엔터 3. 명령프롬프트가 나오면 passwd 를 누른뒤 암호를 변경
◎ /etc/passwd와 /etc/shadow 필드 설명 [/etc/passwd] root : x : 0 : 0 : root : /root : /bin/bash 필드 1 2 3 4 5 6 7 1 : 사용자명2 : 패스워드3 : 사용자 계정 uid4 : 사용자 계정 gid5 : 사용자 계정 이름6 : 사용자 계정 홈 디렉토리7 : 사용자 계정 로그인 쉘 [/etc/shadow] root : $1$9L2L0oTwd : 12751 : 0 : 99999 : 7 : : :필드 1 2 3 4 5 6 7 8 9 1 : 사용자명2 : 암호화된 패스워드3 : 암호 최종 변경일4 : 암호 변경 최소일수5 : 암호 변경 최대일수6 : 암호 변경 경고일 수7 : 암호 비활성화 기간8 : 계정 사용 종료일9 : 예약 필드
현재 랜카드 전송속도 구하기 sar -n DEV 2 3 2초간 총 3번 조사하고, 평균값 마지막 출력하기 참고 http://perso.wanadoo.fr/sebastien.godard/use_sar.html
두개, 세개의 아이피를 동시에 사용하려면 위와 같은 방식으로 계속 추가하면 되겠다. 추가한 아이피를 삭제할 경우엔 해당 이더넷을 다운시키면 된다. ifconfig eth0:0 down 으로 삭제할 수 있다.