=> useradd 계정명

=> passwd

=> 패스워드입력

=> 재입력


=> vi /etc/pam.d/su

#auth required pam_wheel.so use_uid

주석해제


=> vi /etc/group

wheel:x:10:root,계정명

=> vi /etc/ssh/sshd_config
#PermitRootLogin yes
주석 풀고 no / PermitRootLogin no


/etc/rc.d/init.d/sshd restart

로그인 유지 상태로 새로운 푸티 실행

root 계정 접속 시도 ,  => Access denied
새로운 계정명 접속 시도 , 
=> su -
=> 비밀번호 재입력.




find 경로 -mtime +0 -type f -name "파일명" -exec rm {} \;

# fdisk -l

=> 디스크 목록 확인 

Device

Boot

Start

End

Blocks

 Id

System

/dev/xvda1

64 

 512000

83 

Linux 

/dev/xvda2

 

64

13055 

104344576 

8e 

Linux LVM 

Partition 1 does not end on cylinder boundary.


Disk /dev/xvdb: 214.7 GB, 214748364800 bytes

255 heads, 63 sectors/track, 26108 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

=> 빨간 이름이 디스크이름 xvdb가 추가 디스크



# fdisk /dev/xvdb

Command (m for help):  p (빈 디스크인지 확인* 파티션 확인) => 

n => 

  e   extended
  p   primary partition (1-4)

p => 

Partition number (1-4) = 1(1이있다고 하면 2 )

First cylinder (1-130, default 1): 1

Last cylinder, +cylinders or +size{K,M,G} : +500M (전체 사용시 엔터 )

정상 일 경우 커맨드로 돌아 옴 . 다시 P를 통해 파티션 확인



Command (m for help): n =>

e

Selected partition : 2 (위 Partition number 와 일치)

First cylinder : 디폴트 값

Last cylinder, +cylinders or +size{K,M,G} : 디폴트 값

커맨드에서 p 파티션 확인


위와 동일 하게 로지컬 파티션도 만듬 * 입력 값은 모두 디폴트


(정상 저장 메세지)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.




# mkfs.ext4 /dev/xvdb

== 정상 처리 메세지 ==

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

== 정상 처리 메세지 ==


# cd /

# mkdir /data

# mount /dev/xvdb /data

# df -h


// mount 삭제 시 

# cd ~

# umount /dev/xvdb

# cd /

# rm -r xvdb




재부팅 시 재등록 해야 되는 경우


# vi /etc/fstab

/dev/xvdb    /home     ext4    defaults        1 2

위 구문 추가 후 재부팅 해볼 것 



# php 자료형

1. ctype_alnum(string) : [A-Za-z] or 숫자인지 확인

   ex) 'AbCd1zyZ9' -> true

         'foo!#$bar' -> false


2. ctype_alpha(string) : [A-Za-z]인지 확인

   ex) 'KjgWZC' -> true

        'arf12' -> false


3. ctype_digit(string) : 숫자인지 확인

   ex) '1820.20' -> false

        '10002' -> true

        'wsl!12' -> false

1. root 권한

 

2. vi /root/.bashrc

 

3. 제일하단 부 추가 export LS_COLORS="di=01;38"

 

4. source /root/.bashrc

cd /home/

useradd webber

passwd webber

vi /etc/passwd

=> webber:x:501:501::/home/webber:/bin/false



SHOW VARIABLES LIKE 'char%'

SQL에서 명령어 날린 후 문자열이 utf-8이 아닌 경우..



#vi /etc/my.cnf

// 아래부분 추가하기

[client]

default-character-set=utf8


[mysqld]

character-set-server=utf8

collation-server=utf8_general_ci



'공부 > Linux' 카테고리의 다른 글

VM , 리눅스 저장장치(스토리지) 추가 시  (0) 2017.02.14
putty사용 시 디렉토리 파란색 변경  (0) 2017.01.12
Linux Mail 계정 생성  (0) 2017.01.11
Linux - SVN 설치 하기 .  (0) 2017.01.03
특정 포트 열어주기.  (0) 2017.01.03

/* 선팝업 */

* HTML

<body onload="Popup();">


* JavaScript

<script>

/*

 // URL 부분엔 원하는 URL 입력
 // 변경 사이즈가 있을 경우 w = width(넓이,가로) , h = height(높이,세로) 변경

*/

function Popup(){

var w = window.document.body.offsetWidth;

var h = window.document.body.offsetHeight;

window.open("URL","_blank","top=0,left=0,width="+w+",height="+h+",toolbar=0,status=0,scrollbars=1,resizable=0");}

</script>


* jQuery

$(window).load(function() { 


});


/* 후팝업 */

* HTML

<body onunload="Popup();">
 

* JavaScript

<script>

/*

 // URL 부분엔 원하는 URL 입력
 // 변경 사이즈가 있을 경우 w = width(넓이,가로) , h = height(높이,세로) 변경

*/

function Popup(){

var w = window.document.body.offsetWidth;

var h = window.document.body.offsetHeight;

window.open("URL","_blank","top=0,left=0,width="+w+",height="+h+",toolbar=0,status=0,scrollbars=1,resizable=0");}

</script>


* jQuery

$(window).unload(function() { 


});

 

* 처리순서
1 또는 2 ( 같이 사용 됨 ) => 3

3번은 중복 사용할 경우 모두 실행
2번은 중복 사용할 경우 마지막 코드만 실행



*jQuery = ready() 와 *JavaScript onload 차이점

 

1. ready는 페이지가 로딩되면 즉시 실행된다.
 onload는 페이지의 모든 컨텐츠가 로딩된 후 실행된다.

2. ready는 여러 개를 중복 사용해도 모두 실행된다.

 onload는 여러 개를 중복 사용하면 마지막 onload만 실행된다.

3. ready와 onload(또는 <body onload="">)는 같이 실행된다.(ready => onlaod 순으로 실행)

 onload와 <body onload="">는 같이 실행되지 않는다.(body의 onload만 실행)

 


위와 같이 테이블이 겹치는 경우.

스타일 적용.

border-collapse:collapse;

#yum install subversion


#mkdir /home/svn

/* 루트 저장소 */


#cd /home/svn


#svnadmin create --fs-type fsfs webber

/* 사용 저장소 이름 */


#svnserve -d -r /home/svn/

/* svn 실행 포트 3690, 방화벽 확인*/

/*  

#iptables -I INPUT 1 -p tcp --dport 3690 -j ACCEPT 

#iptables -I OUTPUT 1 -p tcp --dport 3690 -j ACCEPT 

#service iptables save

#/etc/init.d/iptables restart

=> 확인 방법
# netstat -tnlp

*/


#svn checkout svn://IP/webber

/* 설정 상태 확인*/


#vi /home/svn/webber/conf/svnserve.conf

anon-access = none

auth-access = write

password-db = passwd 

=> 3 곳 주석 해제.


#vi /home/svn/webber/conf/passwd

/* 아이디 = 패스워드 추가 */


#chmod -R 760 /home/svn/*



/* 파일 경로 이동 */

경로 생성

=> mkdir /home/w-data

#cd /home/svn/webber/hooks

#cp post-commit.tmpl post-commit

#vi post-commit






#ps -ef | grep svn
=> svn pid 확인 


#kill -9 svn pid


#svnserve -d -r /home/svn

=> SVN 재시작.


svn을 통한 체크아웃 주소

=> svn://IP/webber


서버 재부팅 시 데몬 실행

=> vi /etc/rc.d/rc.local

=> svnserve -d -r /home/svn






+ Recent posts