shell 한글 입력

Web/Ubuntu 2010. 11. 12. 11:03

$ sudo apt-get install language-pack-ko
$ sudo apt-get install language-pack-ko-base

1. Check / etc / environment

$ sudo nano / etc / environment

LANG = "ko_KR.UTF-8"
LANG = "ko_KR.EUC-KR"
LANGUAGE = "en_US: en: en_GB: en"

2. Check / etc / default / locale
3. Check / etc / profile

$ sudo nano / etc / profile

LANG = "ko_KR.UTF-8"


4. And reboot!

$ sudo shutdown -r now



'Web > Ubuntu' 카테고리의 다른 글

iso 이미지 만들기, cd 굽기  (0) 2011.02.12
[error] E: Sub-process /usr/bin/dpkg returned an error code (1)  (0) 2011.01.26
[error] setuid  (0) 2010.05.06
싱글모드 부팅  (0) 2010.05.06
우분투(ubuntu) apt-get 사용  (0) 2010.05.06
Posted by jazzlife
,

심볼릭링크 생성

old/Linux 2010. 8. 13. 11:15

※ 리눅스에서 심볼릭링크 생성

심볼릭링크 : 다른파일(또는 디렉토리)에 대한 추상적인 위치를 가리키는 경로(Path)

하드링크 : 특정한 물리적인 데이터 경로


심볼릭링크 생성방법

$ln -s /path/to/file1.txt /path/to/file2.txt

$ls -ali


하드링크 생성방법

#ln /root/file1 /root/file2

#ls -l

 

Posted by jazzlife
,

[error] setuid

Web/Ubuntu 2010. 5. 6. 10:02
$ sudo su -
sudo: must be setuid root

# chmod 4111 /usr/bin/sudo
# chmod 0440 /etc/sudoers

'Web > Ubuntu' 카테고리의 다른 글

[error] E: Sub-process /usr/bin/dpkg returned an error code (1)  (0) 2011.01.26
shell 한글 입력  (0) 2010.11.12
싱글모드 부팅  (0) 2010.05.06
우분투(ubuntu) apt-get 사용  (0) 2010.05.06
우분투 네이트온 설치  (0) 2010.05.06
Posted by jazzlife
,

apt-get update

패키지 목록 업데이트


apt-get upgrade

최신버전으로 업그레이드


apt-get install 패키지명

패키지설치

ex) apt-get install ssh   -> ssh 설치

ex) apt-get install xinetd   -> xinetd 설치


apt-get remove 패키지명 

패키지를 삭제


apt-get autoremove 패키지명

패키지를 자동 삭제


==================================================================================

PS. 혹시 apt-get이 전혀 안먹히면 우분투 전체를 업데이트 하면 됨.(x윈도우에서 찾아보면 있음-_-)

      단, 인터넷은 되는 상태여야 겠죠?

'Web > Ubuntu' 카테고리의 다른 글

[error] setuid  (0) 2010.05.06
싱글모드 부팅  (0) 2010.05.06
우분투 네이트온 설치  (0) 2010.05.06
우분투 네트워크 설정  (0) 2010.05.06
git 설치  (0) 2010.05.06
Posted by jazzlife
,
안전하게 필요한 kde관련 의존 패키지들을 설치한다.

 - cmake
 - kdebase
 - alien
 - kdelibs4c2a
 - libqt3-mt
 
 # 첨부된 파일들은 /usr/lib에 설치
 - libartskde-386 
 - libartsc0_1.5.10-0ubuntu1~hardy1_i386
 - libarts1c2a_1.5.9-0ubuntu2_i386

 - kdelibs4-dev (3.5.7-0ubuntu1)
 - libsqlite3-dev (3.3.13-0ubuntu)
 - xorg-dev (7.2-0ubuntu11)
 - libao2

다 설치 했으면 nateon_1.0.175-20080621_i386.deb 설치!~

.deb 파일은
$dpkg -i *.deb 로 설치.

나머지는
apt-get install * 로 설치

'Web > Ubuntu' 카테고리의 다른 글

싱글모드 부팅  (0) 2010.05.06
우분투(ubuntu) apt-get 사용  (0) 2010.05.06
우분투 네트워크 설정  (0) 2010.05.06
git 설치  (0) 2010.05.06
의존성 알아보기  (0) 2010.05.06
Posted by jazzlife
,
우분투 서버 and 데스크탑 모두 해당되는 사항입니다.
데스크탑의 경우는 GUI 환경이라 간편하게 설정을 할 수 있습니다만, 서버의 경우는 콘솔이나 터미널 상에서 설정을 해야 합니다...

우분투를 설치하게되면 보통 dhcp로 자동으로 ip가 할당이 되게 되어 있습니다.
이것을 수동으로 잡아보도록 하겠습니다.

주의) 아래 네트워크 정보는 사용자 마다 다를 수 있습니다. vmware 환경에서 설정한 사항입니다.

우선 현재 네트워크 사항입니다. (dhcp로 할당된 ip 정보)
장치명 : eth1
ip : 192.168.32.131
netmask : 255.255.255.0
gateway : 192.168.32.2

위의 사항에서 ip 주소만 변경하여 보겠습니다. (고정 ip로 변경)
변경할 ip : 192.168.32.132


1. 현재 네트워크 사항을 확인해 봅니다.
windpyj@ubuntu:~$ ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:0C:29:0F:88:75
          inet addr:192.168.32.131  Bcast:192.168.32.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe0f:8875/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:296 errors:0 dropped:0 overruns:0 frame:0
          TX packets:404 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:32183 (31.4 KiB)  TX bytes:35425 (34.5 KiB)
          Interrupt:185 Base address:0x1400
windpyj@ubuntu:~$


2. ip 변경을 위해 /etc/networking/interfaces 파일을 엽니다.
windpyj@ubuntu:~$ sudo vi /etc/networking/interfaces


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth1
iface eth1 inet dhcp # 여기 설정에 보시면 eth1 장치를 dhcp로 ip가 할당되게끔 되어 있습니다. 이부분을 변경하면 됩니다.


3. ip 주소를 변경하기위해 다음과 같이 세팅을 하여 봅니다.
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth1
# iface eth1 inet dhcp # 기존 설정은 주석 처리 하였습니다, 다음 파란색 부분 처럼 세팅하시면 됩니다.
iface eth1 inet static
        address 192.168.32.132
        netmask 255.255.255.0
        network 192.168.32.0
        broadcast 192.168.32.255
        gateway 192.168.32.2


4. 세팅이 완료되었다면 저장하고 데몬을 재시작 하여 줍니다.
windpyj@ubuntu:~$ sudo /etc/init.d/networking restart


5. 데몬이 재시작되면 콘솔에서 접속하신 분들은 상관이 없지만 터미널로 접속하신 분들은 터미널 연결이 끊기게 됩니다. ip 주소를 변경해서 그렇겠죠?
그럼 터미널에서 변경한 ip 주소로 다시 접속하면 됩니다.


6. 재접속 후 ip주소를 확인해 봅니다.
확인해 보면 ip주소가 192.168.32.131 에서 192.168.32.132로 변경된 것을 확인 할 수 있습니다.
windpyj@ubuntu:~$ ifconfig eth1
eth1      Link encap:Ethernet  HWaddr 00:0C:29:0F:88:75
          inet addr:192.168.32.132  Bcast:192.168.32.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe0f:8875/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1019 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1404 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:108881 (106.3 KiB)  TX bytes:118314 (115.5 KiB)
          Interrupt:185 Base address:0x1400
windpyj@ubuntu:~$

'Web > Ubuntu' 카테고리의 다른 글

우분투(ubuntu) apt-get 사용  (0) 2010.05.06
우분투 네이트온 설치  (0) 2010.05.06
git 설치  (0) 2010.05.06
의존성 알아보기  (0) 2010.05.06
root 패스워드 지정  (0) 2010.05.06
Posted by jazzlife
,

git 설치

Web/Ubuntu 2010. 5. 6. 09:59
기본 패키지 설치
$sudo apt-get build-dep git-core git-doc

http://kernel.org/pub/software/scm/git/
  사이트에서 git소스를 다운 받는다.

다운을 받았으면 make한다.

$./configure --prefix=/usr/local/git
$make
$sudo make install

'Web > Ubuntu' 카테고리의 다른 글

우분투 네이트온 설치  (0) 2010.05.06
우분투 네트워크 설정  (0) 2010.05.06
의존성 알아보기  (0) 2010.05.06
root 패스워드 지정  (0) 2010.05.06
패키지 설치 방법  (0) 2010.05.06
Posted by jazzlife
,
의존성 검사

1. 우분투 사이트에서 알아보자
http://packages.ubuntu.com/

2. apt-cache로 알아보자
$ apt-cache depends *

'Web > Ubuntu' 카테고리의 다른 글

우분투 네트워크 설정  (0) 2010.05.06
git 설치  (0) 2010.05.06
root 패스워드 지정  (0) 2010.05.06
패키지 설치 방법  (0) 2010.05.06
Ubuntu 기본 메뉴얼  (0) 2010.05.06
Posted by jazzlife
,
#sudo passwd root
사용자입력
사용자비밀번호입력
 
root에게 부여될 패스워드 입력

'Web > Ubuntu' 카테고리의 다른 글

git 설치  (0) 2010.05.06
의존성 알아보기  (0) 2010.05.06
패키지 설치 방법  (0) 2010.05.06
Ubuntu 기본 메뉴얼  (0) 2010.05.06
백그라운 명령 수행  (0) 2010.04.14
Posted by jazzlife
,
(1) .deb 파일의 경우
     $dpkg -i '.deb 파일'

(2) apt-get 사용
     apt-get install '패키지명'

(3) rpm 파일의 경우
     rpm파일은 deb 파일로 변환 후 설치.

     먼저 alien이 없다면 설치.
     $apt-get update
     $apt-get install alien   

     rpm파일을 deb파일로 변환
     $alien -k --script '.rpm 파일'
   
     $dpkg -i '.deb 파일'

'Web > Ubuntu' 카테고리의 다른 글

의존성 알아보기  (0) 2010.05.06
root 패스워드 지정  (0) 2010.05.06
Ubuntu 기본 메뉴얼  (0) 2010.05.06
백그라운 명령 수행  (0) 2010.04.14
server version에 gui 설치  (0) 2010.03.10
Posted by jazzlife
,

우분투는 무료로 배포되는 컴퓨터 운영체제(Operating System: OS)이며 훌륭한 철학을 가진 도구입니다. 훌륭한 도구를 무료로 받은 만큼 우리말 설명서도 무료로 여러분과 나누고자 합니다.

이 길라잡이는 교육적 목적으로 초보자를 대상으로 데스크탑용 우분투를 일반 가정과 일반 사무용으로 쓰는 경우에 한정해 설명합니다. 이 길라잡이는 배포처(myubuntu.tistory.com )를 표기하는 조건으로 비영리로 자유롭게 배포하실 수 있습니다. 작성과 관련해 도움말과 응원, 인용허락을 해주신 분들에게 감사드립니다. - Mike Sierra


1)사용에 앞서 알아둘 사항들:
  • 인터넷: 우분투는 인터넷과 연결된 상태여야 원할하게 설치할 수 있습니다. 유선연결 상태에서 설치를 강력히 권장합니다.
  • 게임: 오락용으로 PC를 사용한다면, MS윈도우를 사용하는 것이 더 낫습니다.
  • 버추얼머신: 우분투상에서 MS윈도우를 '버추얼머신' 프로그램을 이용해 설치/사용할 수 있습니다.

2) 설명서 활용하기:

기존 우분투 사용자: "4.2 파일관리자 '노틸러스' 110% 활용하기" 부터 읽으세요.
초보 우분투 사용자: "1.1 우분투 리눅스는 이런 것이다." 부터 읽으세요.

[파란색 글씨]는 마우스로 메뉴를 찾아 누르라는 의미입니다. 예) [파일]-[내보내기]
설정 내용은 하늘색 상자 안에 표시, 변경 내용은 붉은색으로 표시했습니다. 예)내용 => 바꿀 부분
참고사항은 옅은 녹색 안에 표시했습니다.  예) 우분투를 얄라성~하는 방법
터미널 명령어는 녹색 글씨로 굵게 표시했습니다. 예) sudo apt-get install 개념
설명서 작성자가 제안하는 내용은 옅은 노란색 안에 표시했습니다. 예) 자기 나라말을 잘해야 강국 

3) 저작권 표기와 안내

이 길라잡이는 Ubuntu documentation team이 관리하는 help.ubuntu.com의 일부 내용을 참고했으며 myubuntu.tistory.com 이용자와 지인들이 ubuntuda@gmail.com으로 보내준 내용을 포함하고 있습니다.

Ubuntu, kubuntu, Xubuntu, Edubuntu, Gobuntu는 Canonical사의 등록상표 입니다. 설명서는 the Creative Commons ShareAlike 2.5 License (CC-BY-SA)아래 배포됩니다. 작성자는 설명서의 내용이 사용자에게 유용하기를 희망하나 내용과 실행결과에 대해 어떠한 보장과 보증도 하지 않습니다.

설명서 작성에 여러모로 기여해주신 분은 다음과 같습니다.
newbie님 - 우분투 CD 마련하기 중 오류지적, su님, 海바라기님, newbie님 – 반편이 한글 문제 해결법 제시, 김훈님-노틸러스 입력불가문제 해결/ 시냅틱에서 테마 더하기, 랜덤여신님- 압축파일 관리자 한글깨짐 문제 해결, Neither님-그놈룩 적용문제 발생시 대처방법, xa님 -'주분투' 표기 오류지적, galmaegu님-판과 별명 보충설명, 떠돌이님-우분투 판과 별명, Lonnie Best님-Firestarter아이콘표시  Ian Backer님-노틸러스활용, George Norman님-우분투 속도 높이기팁 일부. Narayan님-우분투 속도 높이기 팁일부, 초보리눅서님-템플릿폴더활용

제1장 우분투 리눅스 알아두기

1.1 우분투 리눅스는 이런 것이다.
1.2 우분투의 자매들과 친척들
1.3 우분투는 어떻게 구성돼 있나
1.4 우분투의 판과 별명
1.5 우분투의 장점과 단점

제2장 설치 전에 준비사항

2.1 우분투 부트 CD 마련하기
2.2 우분투 Live-CD 기능과 활용
2.3 OS와 함께 설치되는 프로그램들
2.4 다른 OS또는 우분투로 자료 옮기기

제3장 일곱 단계로 진행하는 설치과정

3.1 설치 1~3단계, 언어, 시간대/거주지, 키보드 선택하기
3.2 설치 4단계 설치장소 선택과 판나누기
3.3 설치 5~7단계, 가져올 정보설정, 사용자와 열쇠글 설정, 최종확인

제4장 우분투를 사용하기 위해 알아야할 것들

4.1 우분투에서 프로그램 설치와 제거
4.2 파일관리자 '노틸러스' 110% 활용하기
4.3 리눅스의 그 유명한 터미널 사용방법
4.4 소프트웨어 소스(저장소) 설정하기

제5장 설치 후 다듬기

5.1 설치 후 사용환경을 다듬자
5.2 인터넷 연결: 무선 네트워크
5.3 방화벽 설치와 설정: FireStarter
5.4 한글 환경 설정: 한글 표시/ 입력문제 해결
5.5 글꼴 설정: 글꼴 추가와 글꼴 사용하기
5.6 모양새 꾸미기- '모양새'를 이용한 설정
5.7 모양새와 효과넣기- 컴피즈 퓨전
5.8 프린터/PDF프린터 설치와 활용
5.9 글쇠로 바로가기 설정과 활용
5.10 우분투 속도를 높이자

제6장 프로그램활용

6.1 우리집 컴퓨터들로 네트워크 만들기! 삼바 설정
6.2 웹사이트를 돌아보자! 불여우 설정과 기능추가
6.3 동영상을 보자! 음악을 듣자! 토템
6.4 DVD/VCD를 보자! gXine
6.5 자료 내려받기 Torrent
6.6 내 컴퓨터에서 여러가지 OS를 사용해보자: VirtualBox

'Web > Ubuntu' 카테고리의 다른 글

root 패스워드 지정  (0) 2010.05.06
패키지 설치 방법  (0) 2010.05.06
백그라운 명령 수행  (0) 2010.04.14
server version에 gui 설치  (0) 2010.03.10
freenx 설치  (0) 2010.03.10
Posted by jazzlife
,

gcc 옵션

old/Linux 2010. 3. 25. 14:30
 

디렉토리구조에 이어 오늘은 gcc 컴파일 옵션에 대해 알아보겠습니다.


제 경험상 학교에서는 기본적인 -o 옵션정도, 회사에서는 Makefile 에 의한 자동 컴파일을 하기때문에 많은 분들이 컴파일 옵션을 잘 모르시는것 같습니다.
(컴파일옵션을 잘 모르시면 프로그램이 어떻게 동작하는지, 그리고 실행화일을 만들기 위해 어떤것들이 필요하며 디버깅은 어떻게 하는지 등을 모를수 있습니다. )
 

쉘에서 man gcc 해보시면 gcc 및 옵션에 대해 친절하지도, 그렇다고 쉽지도 않은 영어 설명이 나옵니다. 휴~


이렇게 많은 옵션중에서 반드시 필요한 몇개만 알아보도록 하겠습니다. 오늘 알아볼 옵션은 -v, -I,

-o, -D 정도입니다. (그외의 옵션은 Makefile 시간과 필요시에 그때그때 알아보도록 하겠습니다..^^)


컴파일 옵션 설명을 위해 간단한 C 소스를 하나 작성하겠습니다. 모두 잘 아시는 Hello, World 소스입니다


--------------------------------------------------------------
  #include <stdio.h>

  int main(int argc,char** argv)
  {
    printf("Hello, World\n");

    return 0;
  }
--------------------------------------------------------------


위 소스를 helloworld.c 로 저장한후에 gcc helloworld.c 실행하면 해당디렉토리에 a.out 실행화일이 생성됩니다.


 

[그림 1]


[1] -v 옵션 (컴파일 과정을 보여주는 옵션입니다)
그럼 여기서 질문하나 할까요? 컴파일과정, 즉 현재 사용하는 gcc 버젼 및 소스에서 삽입한 stdio.h 가 어느 디렉토리에 있는지등의 정보를 보려면 어떤 옵션을 사용할까요?

바로 -v  옵션입니다. -v 옵션을 사용해 컴파일 하면 컴파일러 버젼 정보, include 디렉토리, 에셈블러정보, 실행화일 형식등의 많은 정보를 보실수 있습니다. 다음 그림과 같이 gcc -v helloworld.c 를 해보고 위 [그림 1]과 비교해 보겠습니다.



[그림2]


[그림 2] 에서 보듯이 -v 옵션을 적용하면 다양한 컴파일과정이 출력됩니다. gcc 컴파일러 버젼은 3.2.2 이고 gcc 가 stdio.h 등의 헤더파일을 찾아가는 경로는 /usr/local/include, /usr/include,

/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include 입니다.


[2] -o 옵션 (출력파일의 이름 지정하는 옵션입니다)

위에서 보듯이 출력파일의 이름을 특별히 지정하지 않으면 모든 이름은 a.out 으로 나타납니다. 실행파일의 이름을 주고 싶을땐 -o 옵션을 주시면 됩니다 (숫자 0 이 아닌 알파벳 o 입니다...). 즉, gcc -o <실행파일이름> <소스파일이름> 또는 gcc <소스파일이름> -o <실행파일이름> 으로 지정하시면 됩니다..중요한것은 -o 다음에는 반드시 출력파일이름이 와야합니다. 실수로 gcc -o <소스파일이름> <출력파일이름> 하시면 대재앙입니다....


다음은 출력파일의 이름을 helloworld 로 주는경우를 나타내 보았습니다



[그림3]


[3] -D 옵션 (외부에서 #define 을 정의하는 옵션입니다)

-D 옵션을 알아보기 위해 처음 제시한 helloworld.c 소스를 약간 수정해보겠습니다. 즉, 소스에 #ifdef ~ #endif 를 추가했습니다.


--------------------------------------------------------------
  #include <stdio.h>

  int main(int argc,char** argv)
  {

    #ifdef   TEST
    printf("Hello, World\n");

    #else

    printf("Hello, New World\n");

    #endif


    return 0;
  }
--------------------------------------------------------------

소스에서 보듯이 TEST 가 정의되어 있으면 Hello, World 를 출력하고, 정의되어 있지 않으면 Hello, New World 를 출력하는 소스입니다. 이렇게 조건부컴파일을 할때 유용하게 사용되어 지는 것이 -D 옵션입니다. (실무에서 개발중일때는 DEBUG  라는 매크로를 사용하다가 실제 출시할때는 정의하지 않응 방식을 사용합니다.)


사용방법은 다음과 같습니다.

gcc -D<매크로이름>


다음 그림 4는 -D 옵션을 사용하지 않고 컴파일/실행한 화면입니다. 결과에서 보듯이 'Hello, New World' 가 출력되었습니다



[그림 4]


다음 그림5는 -D 옵션을 사용하여 컴파일/실행한 화면입니다. 밑줄에 표시된 부분처럼 컴파일시에

-DTEST 가 정의되어 있고 실행시 'Hello, World' 가 출력됩니다



[그림 5]


[4] -I 옵션 (컴파일러가 헤더파일을 탐색할 디렉토리지정 옵션입니다)

일반적으로 C 소스에서 "AAA.h" 라고 하면 현재 작업디렉토리에서 AAA.h 를 찾고 <BBB.h> 라고 하면 컴파일러가 참조하는 디렉토리를 탐색해서 해당파일을 찾습니다. -v 옵션에서 보았듯이 gcc 컴파일러는 헤더파일의 디렉토리를 /usr/include, /usr/local/include, /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include 로 부터 탐색합니다. 그러나 실무에서는 특정디렉토리에 회사 고유의 헤더파일을 만들어 보관합니다. 이럴때 컴파일러로 하여금 특정 디렉토리를 기존의 디렉토리와 함께 탐색할수 있게 해 주는 옵션이 -I 입니다. 사용법은 다음과 같습니다

(영어 대문자 I 입니다..숫자 1이 아닙니다..)


gcc -I<디렉토리경로>


이해를 쉽게 하기 위해 helloworld.c 소스를 약간 수정해보겠습니다.

--------------------------------------------------------------
  #include <stdio.h>

  #include <myheader.h>


  int main(int argc,char** argv)
  {
    P("Hello, World\n");

    return 0;
  }
--------------------------------------------------------------

myheader.h 는 현재 디렉토리아래의 common 이라는 디렉토리에 넣어두겠습니다. 그리고 myheader.h 에는 다음과 같은 구문이 정의 되어 있습니다.


#define  P  printf



[그림 6]


위 결과에서 보듯이 참조하는 디렉토리에 /home/thelegend/test/common 이 추가되었습니다. 즉, gcc -I/home/thelegend/test/common  에서 지정한 옵션입니다..


이제 컴파일 옵션 개념을 잡으셨죠? 보셨듯이 전혀 어렵지 않습니다. 추가 옵션은 다음 Makefile 이야기 할때 추가하도록 하겠습니다..


그럼 언제나 즐거운 시간 되세요...

'old > Linux' 카테고리의 다른 글

g++ 과 gdb 사용법  (0) 2010.03.25
프로그램 내에서 쉘 명령어 수행  (0) 2010.03.25
윈도우 파일시스템 마운트  (0) 2010.03.25
fdisk 사용법  (0) 2010.03.25
vi 설정  (0) 2010.03.25
Posted by jazzlife
,
 

1. 우분투설치. 안드로이드 개발 기준이 되는 OS는 우분투와 MacOSX 입니다. http://www.ubuntu.com/ 부터 설치합니다.

2. 소스받기. 안드로이드에서 소스 트리를 주욱 다운 받아봅니다. http://source.android.com/download

일단 받고 나서 디렉토리를 살펴보면 저 방대한 소스 트리중 대체 어디서 부터 봐야 하는 것인가라는 생각이 들게 됩니다.

3. 시작하기. development\pdk\docs 에 있는 Android Porting Guide를 읽어봅니다. 최신 소스와는 차이가 있지만 어디서부터 시작을 해야 하는지 방향을 잡아줍니다. 이 숨겨져(?) 있는 문서가 안드로이드 포팅을 위한 소스 분석의 시작포인트입니다.

1, 2번을 생략하고 일단 Document를 읽어보시고 싶으신 분은 웹에서(http://git.source.android.com/) snapshot을 받아서 보실 수 있습니다.

대략적인 소스 구성에 대한 설명을 볼 수 있습니다. 그리고 거기서 나오는 디바이스들 중 비디오, 키, 오디오 정도의 순서로 소스를 따라들어가면 될듯 합니다.

소스를 보고 있으면 가끔 우주를 헤메는 기분이 들고 그게 정상입니다..


Get source

For information about current problems and fixes, see Known issues.

This document describes how to set up your local work environment, how to use Repo to get the Android files, and how to build the files on your machine.

Related reading:
  • For an overview of the entire code-review and code-update process, see Workflow.
  • For reference details about Repo, see Using Repo and Git.

What's in the source?

For a description of all the projects that make up the Android source code, see Project layout. To see snapshots and histories of the files available in the public Android repositories, visit theGitWeb web interface.
The source is approximentely 2.1GB in size. You will need 6GB free to complete the build.

Setting up your machine

To build the Android source files, you will need to use Linux or Mac OS. Building under Windows is not currently supported.

Linux

The Android build is routinely tested on recent versions of Ubuntu (6.06 and later), but reports of successes or failures on other distributions are welcome.

Ubuntu Linux (i386)

To set up your Linux development environment, make sure you have the following:
  • Git 1.5.4 or newer and the GNU Privacy Guard.
$ sudo apt-get install git-core gnupg
  • JDK 5.0, update 12 or higher.
$ sudo apt-get install sun-java6-jdk
  • The following packages: flex, bison, gperf, libsdl-dev, libesd0-dev, libwxgtk2.6-dev (optional), build-essential, zip, curl.
$ sudo apt-get install flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zipcurl libncurses5-dev zlib1g-dev
  • You might also want Valgrind, a tool that will help you find memory leaks, stack corruption, array bounds overflows, etc.
$ sudo apt-get install valgrind

Ubuntu Linux (amd64)

This has not been as well tested. Please send success or failure reports to repo-discuss@googlegroups.com.

The Android build requires a 32-bit build environment as well as some other tools:
  • Git, JDK, flex, and the other packages as listed above in the i386 instructions:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl
  • Get a 32-bit version of the JVM:

    $ sudo apt-get install sun-java6-jdk # JDK tools (javac, etc)
    $ sudo apt-get install ia32-sun-java6-bin # JRE (java itself)
    $ sudo update-java-alternatives -s ia32-java-6-sun

  • Pieces from the 32-bit cross-building environment:
$ sudo apt-get install lib32z1-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs

Ubuntu doesn't have packages for the X11 libraries, but that can be worked around with the following command:

$ sudo ln -s /usr/lib32/libX11.so.6 /usr/lib32/libX11.so

Other Linux

There's no reason why Android cannot be built on non-Ubuntu systems. Please send any success or failure reports to repo-discuss@googlegroups.com. In general you will need:

Anything missing from this list? Please let us know!


Mac OS

Requirements:

  • To build the Android files in a Mac OS environment, you need an Intel/x86 machine. The Android build system and tools do not support the obsolete PowerPC architecture.
  • Android must be built on a case-sensitive file system.
    • We recommend that you build Android on a partition that has been formatted with the "Case-sensitive Journaled HFS+" file system:
      • A case-sensitive file system is required because the sources contain files that differ only in case.
      • Journaled systems are more robust. (This is optional, but recommended.)
      • HFS+ is required to successfully build Mac OS applications such as the Android Emulator for OS X.
    • If you want to avoid partitioning/formatting your hard drive, you can use a case-sensitive disk image instead.
      • To create the image:
        • launch /Applications/Utilities/Disk Utility
        • select "New Image"
        • size: 8 GB (this will work, but you can choose more if you want to)
        • volume format: case sensitive, journaled
      • This will create a .dmg file which, once mounted, acts as a drive with the required formatting for Android development. For a disk image named "android.dmg" stored in your home directory, you can add the following to your ~/.bash_profile to mount the image when you execute "mountAndroid":

        # command to mount the android file image
        function mountAndroid { hdiutil attach ~/android.dmg -mountpoint /Volumes/android; }

        Once mounted, you'll do all your work in the "android" volume. You can eject it (unmount it) just like you would with an external drive.
To set up your Mac OS development environment, follow these steps:
  1. Install the XCode version 2.4 or later from http://developer.apple.com . We recommend version 3.0 or newer.
  2. Install MacPorts. To do this:
    1. Download the tar file from http://www.macports.org/ and untar the files.
    2. Run the following:
      $ ./configure
      $ make
      $ sudo make install
      $ sudo port selfupdate
    3. View your path:
      $ echo $PATH
      Make sure that /opt/local/bin is in your path before /usr/bin. If not, edit $HOME/.bash_profile and add the line "export PATH=/opt/local/bin:$PATH" (or the equivalent for other shells) after any other PATH-related lines. To verify that your path is now correct, open a new terminal and run echo $PATH again.
  3. Upgrade GNU make to 3.81 or later by running
    $ sudo port install gmake
    $ sudo ln -s gmake /opt/local/bin/make
  4. Install libsdl by running
    $ sudo port install libsdl
  5. Set an appropriate per-process file descriptor limit. To do this, add the following lines to your .bash_profile file:
    # set the number of open files to be 1024
    ulimit -S -n 1024
  6. Install Git and the GNU Privacy Guard:
    $ sudo port install git-core gnupg
    (You will need Git 1.5.4 or newer.)
  7. Install these optional packages, if you want to:
    $ sudo port install xemacs +sumo
    $ sudo port install gimp
Note: If you get errors from port install, prefix your commands with POSIXLY_CORRECT=1, for example:
$ POSIXLY_CORRECT=1 sudo port install package-name


Installing Repo

Repo is a tool that makes it easier to work with Git in the context of Android. For more information about Repo, see Using Repo and Git.

To install, initialize, and configure Repo, follow these steps:

  1. Make sure you have a ~/bin directory in your home directory, and check to be sure that this bin directory is in your path:
    $ cd ~
    $ mkdir bin
    $ echo $PATH
  2. Download the repo script and make sure it is executable:
    $ curl http://android.git.kernel.org/repo >~/bin/repo
    $ chmod a+x ~/bin/repo
  3. Create an empty directory to hold your working files:
    $ mkdir mydroid
    $ cd mydroid
  4. Run repo init to bring down the latest version of Repo with all its most recent bug fixes. You must specify a URL for the manifest:
    $ repo init -u git://android.git.kernel.org/platform/manifest.git
  5. When prompted, configure Repo with your real name and email address. If you plan to submit code, use an email address that is associated with a Google account.
A successful initialization will end with a message such as
repo initialized in /mydroid


Your client directory should now contain a .repo directory where files such as the manifest will be kept.


What will my name and email be used for?

To use the Gerrit code-review tool,
you will need an email address that is connected with a registered Google account (which does not have to be a Gmail address). Make sure this is a live address at which you can receive messages. The real name that you provide here will show up in attributions for your code submissions.

What is a manifest file?

The Android source files are divided among a number of different repositories. A manifest file contains a mapping of where the files from these repositories will be placed within your working directory when you synchronize your files.


Getting the files

To pull down files to your working directory from the repositories as specified in the default manifest, run

$ repo sync

For more about repo sync and other Repo commands, see Using Repo and Git.

The Android source files will be located in your working directory under their project names.


Building the code

To build the files, run make from within your working directory:
$ cd ~/mydroid
$ make

If your build fails, complaining about a missing "run-java-tool", try setting the ANDROID_JAVA_HOME env var to $JAVA_HOME before making. E.g.,

$ export ANDROID_JAVA_HOME=$JAVA_HOME

Using an IDE

Troubleshooting

ImportError: No module named readline

Mac users getting this should install Python 2.5.2.

Linux users that installed Python from source, make sure the dependencies for libreadline are installed, and rebuild Python.

What's next?

To learn about reporting an issue and searching previously reported issues, see Report bugs. For information about editing the files and uploading changes to the code-review server, see Contribute.

'old > Build Serv' 카테고리의 다른 글

adb driver setting for ubuntu  (0) 2010.03.12
Ubuntu Build Machine Install  (0) 2010.02.04
Posted by jazzlife
,

On windows:

If you’re developing on Windwos (32-bit only), you need to install the USB driver for adb:

1.  Download the driver ZIP file and unzip it.

2. Connect your Android device via USB. When the Found New Hardware Wizard appears, you’ll be asked if you’d like Windows Update to search for software, select No, not this time and click Next.

3. Select Install from a list or specified location and clieck Next.

4. Select Search for the best driver in these locations. Browse and select the unzipped file.

5. Click Finish. You’re all set.

On Ubuntu Linux

1.
Plug-in your device then exec command ‘lsusb’ then you will see the list of current usb devices

Bus 003 Device 023: ID 18d1:d00d

We will see a device is appeared when it plug-in and disappeared when it plug-out. That device is we wanted and take my environment as an example it is located at line 1, “Bus 003 Device 023: ID 18d1:d00d”, without device provider.

2. Login as root and create this file: /etc/udev/rules.d/50-android.rules

For Gusty/Hardy, edit the file to read:

SUBSYSTEM==”usb”, SYSFS(idVendor)==”18d1“, MODE=”0666″

For Dapper, edit the file to read:

SUBSYSTEM==”usb_device”, SYSFS(idVendor)==”18d1“, MODE=”0666″

P.S. the “18d1” is hard coded in android/kernel/drivers/usb/gadget/android_adb.c
#define DRIVER_VENDOR_ID

2. Nwx execute:

chmod a+rx /etc/udev/rules.d/50-android.rules

3. Restart udev to make the rule active.

 sudo /etc/init.d/udev restart

To construct the Android develop environment in Windows

October 28, 2008 at 3:33 pm | In android | Leave a Comment
Tags:
,

1. Create folder. Ex: C:\Android

2. Download Android SDK. Decompress it and put it in C:\Android\android_sdk

3. Download eclipse  3.4 (Ganymede). Decompress it and put it in C:\eclipse

4. Download and install Java SE Development Kit (JDK 5 or JDK 6).

5. Add the jre path to your path of environment variable. Ex: C:\Program Files\Java\jre1.6.0_05\bin

6. Install Android Eclipse Plugin ADT (Android Development Tools)

7. Installing the Eclipse Plugin (ADT)

  • Decompress it and put it in C:\Android\ADT\
  • Eclipse -> Help -> Software Updates… -> Add site -> Local -> select C:\Android\ADT\ -> OK -> OK
  • Press the check box of C:\Android\ADT and press install
  • Restart Eclipse.

8. Assign the path of Android SDK. Eclipse-> Window -> Preferences -> Android -> SDK Location -> C:\Android\android_sdk.

9. Now, you can create the Android project.

If Console display “Failed to get the adb version: Cannot run program “C:\Android\android_sdk\tools\adb.exe”: CreateProcess error=3″, you can ignore it.

'old > Build Serv' 카테고리의 다른 글

ubuntu android 설치  (0) 2010.03.12
Ubuntu Build Machine Install  (0) 2010.02.04
Posted by jazzlife
,

freenx 설치

Web/Ubuntu 2010. 3. 10. 15:14

다음 순서로 설치 후

 

# sudo dpkg -i nxclient_3.4.0-5_i386.deb
# sudo dpkg -i nxnode_3.4.0-11_i386.deb
# sudo dpkg -i nxserver_3.4.0-12_i386.deb

 

혹시 cups를 참조 할 수 없다는 메시지가 나오면

# sudo chmod 755 /usr/lib/cups/backend/ipp

입력

==========================================
[Ubuntu amd64 64bits]에서는 호환되는 서버를 사용해야한다.

Install Neatx  server on Ubuntu 10.04

sudo apt-get install python-software-properties && sudo add-apt-repository ppa:freenx-team

Then Update Apt

sudo apt-get update

At this point, the repository is added and apt is updated, then install the neatx-server package (using Aptitude to install extra needed packages).

sudo apt-get install neatx-server

'Web > Ubuntu' 카테고리의 다른 글

백그라운 명령 수행  (0) 2010.04.14
server version에 gui 설치  (0) 2010.03.10
파일시스템에 대한 내용  (0) 2010.03.10
리눅스 계정관리  (0) 2010.03.08
libstdc++-libc6.2-2.so.3 없을 때  (0) 2010.02.26
Posted by jazzlife
,

fsck    리눅스 파일 시스템을 점검하고 수리한다.

설명: fsck 은 리눅스 파일 시스템을 점거하고 필요에 따라 수리할 때 사용한다.

      파일 시스템은 장치명(예, /dev/hda1, /dev/sdb2)이거나 파일 시스템이 마운트 된

      마운드 포인트 (예, /, /usr, /home 등)이다. 서로 다른 물리적 드라이브 상의

      여러 파일 시스템을 점검하는 경우 병렬 처리가 가능한다. 병렬 처리를 사용하므로

      점검에 드는 시간을 절약할 수 있다.

 

옵션:           -f      무조건 검사
                -A      /etc/fstab에 등록된 내용을 참고하여 모든 디스크 검사

                -R      -A와 같이 사용될 때 루트 파일 시스템은 제외

                -N      실행하지는 않고 어떤 작업을 수행할지만 보여줌
                -a      에러가 있으면 물어봄 없이 자동으로 처리
                -b      수퍼블록에 손상이 있을 때.

                -r      파일 시스템 복구시 질문. 이 옵션은 단지 호환성 때문에 제공

mkfs   리눅스 파일 시스템 만들기

        mkfs -t <시스템유형> <파티션>
                -c      베드블록이 있는지 꼼꼼하게 검사
                -m <용량> root를 위한 예비공간을 용량만큼 남겨둔다.


        mke2fs <파티션>         ext2 파일시스템을 만든다.
        mke2fs /dev/hda7        hda7 파티션을 ext2파일시스템으로 만든다.

mount   마운트시키기
        mount 라고만 치면 현재 마운트됨 정보를 보여준다.
        mount /dev/fd0 /mnt/floppy              플로피 마운트
        mount /dev/cdrom /mnt/cdrom             시디롬 마운트
        mount /dev/hda5 /mnt/win                윈도파일시스템 마운트

unmount 마운트제거하기
        umount /dev/cdrom
        umount /mnt/cdrom

※umount 되지않을 때
        fuser -km /mnt/cdrom       /mnt/cdrom/ 이하에 있는 프로세서를 모두 죽인다.
        umount /mnt/cdrom

'Web > Ubuntu' 카테고리의 다른 글

server version에 gui 설치  (0) 2010.03.10
freenx 설치  (0) 2010.03.10
리눅스 계정관리  (0) 2010.03.08
libstdc++-libc6.2-2.so.3 없을 때  (0) 2010.02.26
deb, rpm, bin 설치  (0) 2010.02.26
Posted by jazzlife
,

▶ 일반사용자 슈퍼권한 할당 방법

1) root 권한으로 visudo명령을 이용하여 /etc/sudoers 파일을 열어본다.

아래는 design 이라는 일반계정을 root 권한으로 부여해 줘보자.

16 # User privilege specification
17 root    ALL=(ALL) ALL    # root 사용자에 대한 모든 권한
18 design  ALL=/sbin/shutdown,     /file_design/design # whell 그룹에 대한 루트 권한
19 %test   ALL=(ALL) ALL    # 일반 사용자에 대한 특정권한
위와 같이

2). sudo 명령어
형식 : $ sudo 명령어
$ sudo shutdown -r now
password :

▶ X-win 에서 사용자 계정 관리
1). system-config-users 실행
- Alt+F2 키를 눌러 실행 창에서 system-config-users 명령 입력


▶ 그룹 관리
1). 그룹생성
usage: groupadd [-g gid [-o]] [-r] [-f] group
[옵션]
-g : 그룹의 고유 ID
-o : 그룹의 고유 ID를 500이하의 값으로 지정하는 경우 사용
-r : 그룹의 ID를 500 이하의 값으로 자동 지정
-f : 강제로 그룹을 추가하는 옵션

ex)
# groupadd test
# groupadd -g 801 test2

2). 그룹 속성 변경
사용법: groupmod [-g gid(그룹 아이디) [-o]] [-n 이름] 그룹명
[옵션]
-g : 그룹의 고유 ID
-o : 그룹의 고유 ID를 500이하의 값으로 지정하는 경우 사용
-n : 변경될 그룹명

ex)
# groupmod -n test imsi
# groupmod -g 802 test

3). 그룹 삭제
ex)
# groupdel test

▶ 로그인 관리
[1]
1). 특정계정 로그인 허용 및 불허 정책(실행 레벨 2, 3번에서 사용)
/etc.pam.d/login 파일의 맨 윗줄 수정(추가)
auth       required /lib/security/pam_listfile.so item=user sense=allow file=/etc/loginuser onerr=succeed

2). /etc/loginuser 파일 생성 및 로그인 가능 계정 추가
이 파일안에 로그인 가능한 계정만 추가
# 반대인 경우 1). 번에서 sense=deny file 부분을 nologinuser로 한다음 2).번에서 nologinuser를 생성

->혹 사용자는 로그인 불허하는 방법으로 제일 쉬운 방법을 /etc/passwd 에서 그 계정에 해당하는 쉘종류를 /bin/bash 에서 /bin/false로 변경하는 거라고 한다.
-> 또한 잠깐동안 못쓰게 할려면 /etc/passwd 에서 그 계정의 두 번째 컬럼 부분의 x에 해당하는 부분은 * 로 잠깐 바꾸는 법이다.

- PAM에 의한 계정의 로그인 허용과 불허 방법은 콘솔, 텔넷, FTP, SSH에서 모두 적용 가능.
- X-win로 접속할 때는 적용 되지 않는다.

[2]
su - 명령 사용자 제한
1). /etc/pam.d/su 파일 수정
auth suuficent /lib/security/pam_rootok.so
auth requried  /lib/security/pam_wheel.so use_uid
이 두부분을 주석 제거 한다.

2). /etc/group 의 wheel그룹에 su 명령 사용가능한 계정추가
ex) wheel:x:10:root,계정명 이런식으로 수정한다.

% 추가로 로그 기록을 위한 debug옵션 추가를 한다.
auth required /lib/security/pam_wheel.so debug use_uid
%verify 하는 법
tail /var/log/messages


▶ 사용자 계정 바꾸기
# su -
-> root의 열쇠글 입력
# su test
-> test의 열쇠글 입력

"-" 이부분이 들어가게 되면 시스템 정보도 함께 갖고 오게됨,

▶ 계정 사용자 정보 변경
# su - (su 뒤에 - 또는 -l 붙이지 않으면 완전한 root권한을 얻지 못한다.)
-> 슈퍼유저(root)의 열쇠글 입력
# usermod -s /bin/tcsh test
# cat /etc/passwd | grep test

usage: usermod  [-u uid [-o]] [-g group] [[-a] -G group,...]
                [-d 홈 디렉토리 [-m]] [-s 쉘] [-c 적요사항] [-l 새_이름]
                [-f 비활성화] [-e 만기] [-p 패스워드] -L|-U] 이름

-c : 내용
-d : 홈디렉토리
-e : 만료일
-G : 그룹
-s : 기본 쉘
-u : UID
-l : 사용자 계정명 변경


▶ 계정 열쇠글 지정 및 변경
1) /etc/passwd 파일을 직접 열어서 열쇠글 변경(비추천)
2) 시스템 관리자에 의한 사용자 계정 열쇠글 변경
ex)
# useradd test
# passwd test
- test 사용자 비밀번호를 두 번 입력
3) 사용자가 직접 열쇠글 변경
$ passwd
- 자신의 현재 비밀번호를 입력한 후, 다시 자신의 비밀번호를 두 번 입력한다.

4) Shadow 열쇠글 시스템
# cat /etc/passwd | grep root
# pwunconv   # 열쇠글 필드에 x대신 열쇠글이 나타나도록 설정.
# cat /etc/passwd | grep root
# pwconv     # Shadow 열쇠글 시스템 적용.
# cat /etc/passwd | grep root
# pwunconv 상태에선 사용자 비밀번호 변경이 불가함.

5) /etc/shadow
1계정명:2열쇠글:3최정변경일:4변경취소일수:5변경유예기간:6변경경고일수:7사용불가날짜:8만료일:9예약

6) chage 를 이용한 계정 열쇠글 관리
사용법: chage [-l] [-m 최소일수] [-M 최대일수] [-W 경고일수]
        [-I 무효일수] [-E 만료일수] [-d 새 패스워드 변경일] 사용자명

# chage -M 15 -E 2009/03/25 test
# chage -l test

'Web > Ubuntu' 카테고리의 다른 글

freenx 설치  (0) 2010.03.10
파일시스템에 대한 내용  (0) 2010.03.10
libstdc++-libc6.2-2.so.3 없을 때  (0) 2010.02.26
deb, rpm, bin 설치  (0) 2010.02.26
리눅스 삼바 서버 - 리눅스 삼바 클라이언트 접속 방법  (0) 2010.02.09
Posted by jazzlife
,

QuickSynergy

old/Linux 2010. 2. 26. 18:01
http://gtko.springnote.com/pages/2774338?print=1


[Linux]

- server

1. QuickSynergy를 설치한다.
2. share 메뉴에서 모니터 설정에 ID를 할당한다.
3. /etc/hosts 설정
    (ex)
    192.168.0.1    windows
    192.168.0.2    linux
4. system-preferences-startup application에 등록하여 시작시 실행되게 한다.

- client

1. QuickSynergy를 설치한다.
2. share 메뉴에서 모니터 설정에 ID를 할당한다.
3. use 메뉴에서 서버의 IP와 ID를 입력한다.
3. /etc/hosts 설정
    (ex)
    192.168.0.1    windows
    192.168.0.2    linux
4. system-preferences-startup application에 등록하여 시작시 실행되게 한다.


[Windows]

1. Synergy를 설치하고 한글 패치를 한다.
2. Client와 Host의 설정을 변경한다.
3. C:\windows\system32\drivers\etc\hosts 설정
    (ex)
    192.168.0.1    windows
    192.168.0.2    linux
4. Autostart로 설정.

'old > Linux' 카테고리의 다른 글

하드웨어 정보 확인  (0) 2010.03.25
기본 명령어  (0) 2010.03.25
Linux Partition  (0) 2010.03.25
tar 사용법  (0) 2010.03.25
RPM 사용법  (0) 2010.03.25
Posted by jazzlife
,

우분투에서
realvncview(vnc-4_1_3-x86_linux.tar.gz)를 실행했을때
"libstdc++-libc6.2-2.so.3: cannot open shared object file: No such file or directory"
위의 에러가 뜨면

libstdc++2.10-glibc2.2/download
1. 위의 링크중에서 빠른 지역 서버를 눌러 libstdc++2.10-glibc2.2_2.95.4-24_i386.deb를 받는다.
2. sudo dpkg --force-architecture -i libstdc++2.10-glibc2.2_2.95.4-24_i386.deb
이명령어로 패키지를 설치한다.

apt에는 libstdc++2.10버전이 사라졌으며
cd /usr/lib
ln -s  libstdc++.so.지금버전  libstdc++-libc6.2-2.so.3

하면 라이브러리 호환성이 떨어질수도...

'Web > Ubuntu' 카테고리의 다른 글

파일시스템에 대한 내용  (0) 2010.03.10
리눅스 계정관리  (0) 2010.03.08
deb, rpm, bin 설치  (0) 2010.02.26
리눅스 삼바 서버 - 리눅스 삼바 클라이언트 접속 방법  (0) 2010.02.09
Samba install & Setting  (0) 2010.02.08
Posted by jazzlife
,
파일공유 및 프린터 공유를 위해 samba를 설치하도록 한다.
$ sudo apt-get install samba smbfs

그룹 추가
$ sudo groupadd smbusers

그룹 확인
$ sudo cat etc/group

계정생성
$ sudo useradd -d /home/spnick -g smbusers -s /bin/bash -m -k /etc/skel spnick

생성한 계정에 패스워드 부여
$ sudo passwd spnick

삼바는 별도로 패스워드를 관리한다.
삼바용 패스워드를 설정해준다.
(윈도우에서 공유폴더에 접근이 편하게 하려면 윈도우 계정과 동일한 패스워드로 설정하는게 좋다)
$ sudo smbpasswd -a spnick

모든 계정이 접근 가능한 폴더를 생성해주자.
$ sudo mkdir /home/share

생성한 폴더의 그룹을 smbuser로 변경해준다.
$ sudo chgrp smbusers /home/share

권한은 1775로 준다. (sticky bit를 적용한다)
$ sudo chmod 1775 /home/share

sticky bit 를 사용하면 파일 또는 디렉토리를 지우는것은 그 파일 또는 디렉토리를 생성한 사람만 가능하게 된다.

적용후 확인해보면 다음과 같이 권한 끝이 t 로 되어 있다.
------------------------------------------------------------------------------
4 drwxrwxr-t  2 root   smbusers  4096 2008-12-31 21:34 share
------------------------------------------------------------------------------

samba 설정 파일을 편집 한다.
$ sudo vi /etc/samba/smb.conf

공유 디렉토리 접근시 계정과 패스워드를 입력받도록 하기 위해
security = user 부분을 찾아서 주석을 해제해준다.

각 계정의 자신의 홈 디렉토리가 공유되도록 해준다.
;[homes] 부분을 찾아서 주석을 해제해준다.

다음과 같이 세팅
------------------------------------------------------------------------------
[homes] # 리눅스 홈 디렉토리 접근 설정
   comment = Home Directory # 설명
   browseable = no # 공유 목록(homes)이 보이지 않게 한다. 홈디렉토리만 보인다.
   valid users = @smbusers # 접근 가능 유저 설정
   path = /home/%S # 홈 디렉토리 경로 지정
   read only= yes # 읽기 전용으로 설정
   write list = %S # 자신만 write 가능하도록 한다.
   create mask = 0644 # 생성 파일 디폴트 퍼미션
   directory mask = 0755 # 생성 디렉토리 디폴트 퍼미션
   hide dot files = yes # .으로 시작하는 파일이 안보이게 한다.
   veto files = /.?*/ # .으로 시작하는 파일 생성을 차단한다.
------------------------------------------------------------------------------

그룹내 모든 계정이 접근 가능한 디렉토리 설정
------------------------------------------------------------------------------
[share] # 접속시 보여지는 공유 폴더 이름
   comment = Share Directory # 설명
   browseable = yes # 공유 목록(share)이 보이게 한다.
   valid users = @smbusers # 접근 가능 유저 설정
   path = /home/share # 디렉토리 경로 지정
   read only = no # 쓰기 가능
   create mask = 0644 # 생성 파일 디폴트 퍼미션
   directory mask = 0755 # 생성 디렉토리 디폴트 퍼미션
------------------------------------------------------------------------------

프린터 공유는 기본적으로 세팅되어 있기 때문에
프린터 드라이버 설치만 끝나면 더이상 손대지 않아도 된다.
만약 윈도우즈에서 프린터 공유 완료후에
프린터 상태가 액세스 거부로 표시되거나
프린터 큐 확인이 안되는경우에는
[printers] 항목을 찾아서 다음 내용을 추가한다.
------------------------------------------------------------------------------
use client driver = yes
------------------------------------------------------------------------------

설정 저장후 설정이 제대로 되었는지 체크해본다.
$ sudo testparm

설정이 정상적으로 완료되었다면 samba 재시작.
$ sudo /etc/init.d/samba restart 


// public 공유 폴더를 만들자 //

#/etc/samba/smb.conf
[public]
        comment = Public Campusnet Shares
        browsable = yes
        path = /data/pub
        public = yes
        writable = no
        write list = dawuss
        guest ok = yes

[global]
        #...
        guest account = nobody
        map to guest = bad user














# smbpasswd -an nobody






2. 환경설정

[global]
# 삼바에서의 한글 입/출력
preserve case = yes
short preserve case = yes
dos charset = CP949
unix charset = CP949
display charset = CP949


# 윈도우 NetBios 이름 (네트워크 드라이브 연결시 이름)
server string = SAMBA-SERVER

# 삼바 방화벽 (xxx는 허용할 IP 대역 입력)
hosts allow = 127. 192.168. xxx.xxx.xxx.

3. 서비스 등록 및 시작
/sbin/service smb restart

/sbin/chkconfig --level 3 smb on

4. 삼바 사용자 및 패스워드 추가
smbpasswd -a 사용자계정 => 사용자의 삼바용 패스워드 추가
smbpasswd -x 사용자계정 => 사용자의 삼바 계정 삭제
smbpasswd -d 사용자계정 => 사용자의 삼바 계정을 사용중지

'Web > Ubuntu' 카테고리의 다른 글

deb, rpm, bin 설치  (0) 2010.02.26
리눅스 삼바 서버 - 리눅스 삼바 클라이언트 접속 방법  (0) 2010.02.09
turn off beep sound  (0) 2010.02.08
Ubuntu GUI Install  (0) 2010.02.08
Fastest Ubuntu Repository  (0) 2010.02.08
Posted by jazzlife
,

turn off beep sound

Web/Ubuntu 2010. 2. 8. 11:05
[.profile]

echo -ne '\033[11;0]'

'Web > Ubuntu' 카테고리의 다른 글

deb, rpm, bin 설치  (0) 2010.02.26
리눅스 삼바 서버 - 리눅스 삼바 클라이언트 접속 방법  (0) 2010.02.09
Samba install & Setting  (0) 2010.02.08
Ubuntu GUI Install  (0) 2010.02.08
Fastest Ubuntu Repository  (0) 2010.02.08
Posted by jazzlife
,

Ubuntu GUI Install

Web/Ubuntu 2010. 2. 8. 10:13

GUI Setting for Ubuntu Server Edition

Ubuntu Server 에디션을 설치하게 되면, Desktop 에디션과 달리 GUI 환경이 기본적으로 설치되지 않는다.

검은 바탕에 글자들이 보이고, 커서가 깜빡깜빡한 상태로 보이게 된다.

이 상황하에서 GUI를 볼 수 있는 방법을 소개하고자 한다.

 

Ubuntu Version

  • Ubnutu-9.04-server-i386
 

네트워크 설정 확인

  • GUI를 설치하기 위해서는 “apt-get”명령을 사용해야 한다.
  • “apt-get” 명령은 네트워크를 이용하여 외부의 파일을 가져와서 설치하는 것이므로, 네트워크가 제대로 설치된 것인지 확인이 필요하다.
  • “ping” 명령을 통하여 네트워크 설정이 잘 되었는지 확인토록 한다.
  • 네트워크가 안 된다면, 아래의 네트워크 설정 부분을 참고하여 설정토록 한다.
 

네트워크 설정

빌드 서버라면, 아래와 같이 고정 IP 세팅을 해준다.

 

IP 주소 입력

  • /etc/network/interfaces 파일 수정
    $ sudo vi /etc/network/interfaces
    auto eth0
    iface eth0 inet static
    address XXX.XXX.XXX.XXX (ip주소)
    netmask 255.255.255.0   (넷마스크)
    gateway XXX.XXX.XXX.XXX  (게이트웨이)
 

DNS 설정

  • /etc/resolv.conf 파일 수정
    $ sudo vi /etc/resolv.conf
    nameserver 165.243.137.34   (1차 도메인 서버 주소)
    nameserver 165.243.137.23   (2차 도메인 서버 주소)
 

네트워크 설정 적용

    $ sudo /etc/init.d/networking restart

Reference for This Setting

 

GUI 설치

  • 우선 update가 필요하다. update하지 않으면, “apt-get” 명령이 제대로 작동하지 않기도 한다.
    $ sudo apt-get update
    $ sudo aptitude install -- no-install-recommends ubuntu-desktop
  • reboot을 하게 되면, GUI가 보이게 된다.
      $ sudo reboot
    

'Web > Ubuntu' 카테고리의 다른 글

deb, rpm, bin 설치  (0) 2010.02.26
리눅스 삼바 서버 - 리눅스 삼바 클라이언트 접속 방법  (0) 2010.02.09
Samba install & Setting  (0) 2010.02.08
turn off beep sound  (0) 2010.02.08
Fastest Ubuntu Repository  (0) 2010.02.08
Posted by jazzlife
,

/etc/apt/sources.list

%s/kr.archive.ubuntu.com/ftp.daumkakao.com/g


'Web > Ubuntu' 카테고리의 다른 글

deb, rpm, bin 설치  (0) 2010.02.26
리눅스 삼바 서버 - 리눅스 삼바 클라이언트 접속 방법  (0) 2010.02.09
Samba install & Setting  (0) 2010.02.08
turn off beep sound  (0) 2010.02.08
Ubuntu GUI Install  (0) 2010.02.08
Posted by jazzlife
,