(1) 마운트할 디렉토리 생성

mkdir share_public

(2) 마운트할 대상 서버 연결

sudo mount -t cifs -o username=john //110.110.110.110/share /home/john/share_public

(3) unmount 방법

sudo unmount /home/john/share_public

Posted by Marvin moon
,



새로 6월부터 오마이집 델라웨어 출발 항공편이 세계적인 배송업체인 UPS 항공을 이용하여

배송스케쥴이 빨라졌습니다.

이 스케쥴 변동으로 인하여 M 사를 비롯한 모든 배송대행지의 배송스케쥴보다 최대 4일 빠르게

한국으로 배송이 이루어집니다.

빠르고 저렴한 배송대행서비스 오마이집 경험해 보세요. 



Posted by Marvin moon
,

# apt-get install apcupsd


설정파일인 /etc/apcupsd/apcupsd.conf 


다음과 같이 변경한다.

UPSCABLE usb
UPSTYPE usb
DEVICE
LOCKFILE /var/lock
UPSCLASS standalone
UPSMODE disable


/etc/default/apcupsd 에서 ISCONFIGURED 값을 no 에서 yes 로 변경 해준뒤, /etc/init.d/apcupsd 를 실행


apcaccess를 통해 체크 

만약  apcupsd @ localhost:3551: Connection refused 와 같은 에러 메세지가 나올 경우 

(1) ps -ef | grep apcupsd 확인


(2)  서버 또는 PC를 재부팅 이나 USB 포트를 다른 포트에 꽂으면 해결된다.


Posted by Marvin moon
,

터미널을 열고 "svn  list [SVN_PATH]"라고 입력한다.

예) NJW-Mac:~ bluepin$ svn list svn://192.168.0.184/BMA
2. PC(Mac) 계정 사용자의 비밀번호를 물어보면 입력한다. (비밀번호는 입력해도 터미널에 표시되지 않음)
3. SVN의 사용자 이름(User name)과 비밀번호(Password)를 입력한다.
4. SVN 주소와 사용자이름, 비밀번호가 확인되면 아래와 같이 svn에 연결된 것을 확인할 수 있다.
branches/
tags/
trunk/
5. Xcode를 실행하고 Window > Oraganizer를 실행시켜 Repositories 탭으로 이동.
6. 좌측 하단의 +버튼을 눌러 svn에 연결하면 끝!

Posted by Marvin moon
,
SSH의 포트 공격에 대비한 22번 포트를 변경해 보도록 하겠습니다.

Ubuntu 9.10 대상입니다. 하지만 다른 버전도 똑같을 것으로 판단되니.. 그냥 하시면 되겠습니다.

ssh_config file : 클라이언트 툴의 접근에 대한 설정 파일
sshd_config file : ssh 데몬 설정을 위한 설정 파일

임의로 설정합니다. 저는 5000으로 예를 들겠습니다.
(수정될 포트의 번호는 임의로 정하셔도되며 1024번보다 상위 포트로 지정합니다)

# vi /etc/ssh/ssh_config <- ubuntu의 경우 거의 다 주석처리 되어 있으므로 패스하시면 됩니다.
Port 5000 <-- 변경
# vi /etc/ssh/sshd_config <- ubuntu의 경우 이녀석만 바꿔주면 합니다.
Port 5000 <-- 변경
ListenAddress xx.xxx.xx.xx <-- 0.0.0.0를 server ip로 변경 <- ubuntu의 경우 주석 부분임 

sshd 데몬 재실행 합니다.
1) standalone 일때
# /etc/init.d/sshd restart
2) init 일때
# /etc/init.d/xinetd restart
수정된 포트확인을 합니다.
# netstat -na|grep :5000 tcp 0 0 xx.xxx.xx.xx:5000 0.0.0.0:* LISTEN

방화벽(iptables)가 설정되어 있다면, 열어준 해당 포트를 열어 주어야 합니다

(tcp, udp 둘 다 5000를 열어 줍니다.)

외부 접근시..(공유기에 여러대의 리눅스 머신을 물려두었을때..연구실등 or 별도의 ssh 접속 프로그램을 사용 안할시...)
> ssh test@xx.xxx.xx.xx -p 5000
Password:
Last login: Mon Feb 15 00:18:56 2011 from xx.xxx.xx.xx
Hi Welcome!! xxx's...
>
Posted by Marvin moon
,
우분투에서 update와 upgrade 차이점에 대해 설명드리면

sudo apt-get update
패키지 목록을 갱신하는 명령어

sudo apt-get upograde
업그레이드할 패키지를 체크하여 해당 모듈을 Upgrade 함.

Posted by Marvin moon
,

특별한 이유로 FTP로 다른 디렉토리를 접근하려고 아래와 같이 심볼릭 링크를 만들었습니다.

prompt> cd /home/ftpdata
prompt> ln -s /home/dykim/mydata

FTP로 접근해서 mydata를 접근하려면 아래와 같은 에러만 발생합니다.

ftp> cd mydata
550 /Mp3: No Such file or directory

보안상의 이유로 많은 FTP 서버가 심볼릭 링크를 허락하지 않는다고 합니다.


해결방법

이런 경우 단순히 심볼릭링크로 되지 않고 FTP가 접근할 수 있는 디렉토리에 내가 접근할 디렉토리를 마운트하면 가능합니다. 이럴 경우 root에 상응하는 권한이 필요합니다.

prompt> cd /home/ftpdata
prompt> mkdir mydata
prompt> sudo mount -o bind /home/dykim/mydata /home/ftpdata/mydata
Posted by Marvin moon
,
새 하드디스크 추가후 파티션과 포멧을 진행 한 후 /etc/fstab 파일에
부팅시 자동으로 마운트 되도록 mount 정보를 추가해야 한다.
여기서 중요한 것이 새로 추가된 HDD의 UUID 정보를 정확하게 입력해야만 한다.

다음과 같은 명령어로 UUID 값을 얻어 올 수 있다.

#sudo blkid /dev/sd1(device name)


Posted by Marvin moon
,
하드디스크 새로 설치할때 사용하는 방법입니다.
아래 방법은 Console로 작업시 유용한 방법이며, 쉬운 방법은 gparted를 사용하여 설치하는 방법입니다.
gparted 설치 방법은 추후 포스팅 하도록 하겠습니다.

 

디스크 및 파티션 정보 보기

sudo fdisk -l
Disk /dev/sda: 18.3 GB, 18351959040 bytes
255 heads, 63 sectors/track, 2231 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 12 96358+ 83 Linux
/dev/sda2 13 255 1951897+ 82 Linux swap / Solaris
/dev/sda3 256 2231 15872220 83 Linux

Disk /dev/sdb: 73.4 GB, 73407900160 bytes
255 heads, 63 sectors/track, 8924 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 8924 71681998+ 8e Linux LVM <--- 한개도 안잡혀있는 sdb1 디스크

파티션 할당하기

  sudo fdisk /dev/sdb1
root@ubuntu:/var# fdisk /dev/sdb1
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 8923.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help):

 

Command (m for help): n
Command action
e extended
p primary partition (1-4)

Partition number (1-4): 1
First cylinder (1-8923, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-8923, default 8923): 8923
Command (m for help): w

리부팅

디스크 정보 할당을 위하여 리부팅한다.

 reboot

파티션 포맷

  sudo mkfs.ext3 /dev/sdb1
 
root@ubuntu:/var# mkfs.ext3 /dev/sdb1
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
8962048 inodes, 17920499 blocks
896024 blocks (5.00%) reserved for the super user
First data block=0
547 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424

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

This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

마운트할 위치 만들기

mkdir /home1

마운트하기

mount /dev/sdb1 /home1

자동 마운트 설정

  /etc/fstab 파일을 편집
 [파티션] [마운트] ext3 defaults,errors=remount-rw 0 1
  #
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/sda3 / ext3 defaults,errors=remount-ro 0 1
/dev/sda1 /boot ext3 defaults 0 2
/dev/sda2 none swap sw 0 0
/dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/sdb1 /home1 ext3 defaults,erros=remount-rw 0 1
/dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

 

정보 새로고침

 sudo mount -a

GUI로 된 디스크관리 매니저를 설치

 sudo apt-get install gparted
Posted by Marvin moon
,

(1) 실행하고자 하는 스크립 파일을 /etc/init.d 디렉토리에 생성한다
/etc/init.d/ xxx.sh 생성

(2) 해당 스크립파일의 퍼미션 변경
sudo chmod 755 xxx.sh

(3) 해당 스크립파일을 부팅시 실행되도록 등록한다.
update rc.d xxx.sh defaults
Posted by Marvin moon
,