01. virtualbox 가상이미지생성 
02. virtualbox 네트워크 --> 어댑터에 브릿지 --> 랜카드 선택 
03. ubuntu14.04 server설치 (설치시 모두 default값 선택)
    - Full name for the new user: 입력하지 않아도 됨 (사용자의 이름)
    - host name: ubuntu / account: afewgood / password: ubuntu 
    - Encrypt your home directory? --> No 선택 
    - Partition disks 
      --> Guided - use entire disk 선택 
      --> Write the changes to disk? --> Yes선택 
    - HTTP proxy --> continue선택 
    - Software selection --> OpenSSH server / Samba file server 선택 
04. 설치 완료 후 업데이트진행 
ubuntu 버전정보 확인:
  [root@ubuntu]# lsb_release -a¶
  [root@ubuntu]# grep . /etc/*-release¶
  [root@ubuntu]# cat /etc/*-release | uniq¶
[root@ubuntu]# apt-get upgrade¶ 
05. ~/.bashrc 편집 
[root@ubuntu]# vi ~/.bashrc¶ 
약 62번째 라인 
#Modify by afewgood     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 를
PS1='${debian_chroot:+($debian_chroot)}[\u@\h \W]# ' 으로 변경
06. vi편집기 줄번호 및 한글 표시 
[root@ubuntu]# vi ~/.vimrc¶ 
set fenc=euc-kr 
set fencs=euc-kr,utf-8 
set nu
07. 서버 고정IP 설정 
[root@ubuntu]# vi /etc/network/interfaces 
iface eth0 inet dhcp 를 
iface eth0 inet static 
address 192.168.0.253 
subnetmask 255.255.255.0 
gateway 192.168.0.1 
dns-nameservers 168.126.63.1 168.126.63.2 
로 변경 
08. 사용자 ID추가 
[root@ubuntu]# useradd -m tuesday //-m 사용자 디렉토리도 같이 만든다 
[root@ubuntu]# passwd tuesday
[root@ubuntu]# userdel -rf tuesday //-r: 계정 삭제시 홈디렉토리 포함 모든정보 삭제 -f: 강제삭제
09. shell 변경 
# shell의 링크 상태 확인 
[root@ubuntu]# ls -ahl /bin/sh 
[root@ubuntu]# /bin/sh -> dash 
#shell을 bash로 링크 
[root@ubuntu]# unlink /bin/sh 
[root@ubuntu]# ln -s /bin/bash /bin/sh 
#shell 원상복구 
[root@ubuntu]# unlink /bin/sh 
[root@ubuntu]# ln -s dash /bin/sh 
※(추천) 또는 /etc/passwd 파일의 계정에 /bin/bash 추가 
ex) tuesday:x:1001:1001::/home/tuesday:/bin/bash
10. 사용자 root권한 추가 
 - sudoers 파일 수정 
[root@ubuntu]# visudo -f /etc/sudoers 
root ALL=(ALL:ALL) ALL 밑에 줄에 
tuesday ALL=(ALL:ALL) ALL 추가 
하거나 /etc/group파일에서 sudo 항목에 tuesday추가 
11. samba 설정 
- 사용자 추가: 시스템 계정(/etc/passwd)에 등록된 사용자만 등록 가능함.
 $ sudo smbpasswd -a [계정명] 
 [root@ubuntu]# smbpasswd -a tuesday
- 사용자 삭제
$ sudo smbpasswd -x [계정명]
[root@ubuntu]# smbpasswd -x tuesday
- samba 설정(변경) / 다른사람 계정 폴더 감추기 
[root@ubuntu]# vi /etc/samba/smb.conf 
[homes] 
    comment = Home Directories 
    read only = No 
    browseable = No browseable=no 
추가 
- samba서버 재시작 
$ sudo /etc/init.d/smbd restart 
 [root@ubuntu]# /etc/init.d/smbd restart 
√ 윈도우에서 리눅스장치 접근 
윈도우 버튼+R ==> \\192.168.0.XXX 
조직의 보안 정책에서 인증되지 않은 게스트 액세스를 차단하므로 이 공유 폴더에 액세스 할 수 없습니다. 
해결 방법 
Window+R gpedit.msc <확인> 
그룹정책 편집기 - 컴퓨터 구성 - 관리 템플릿 - 네트워크 - Lanman 워크스테이션 을 선택 
보안되지 않은 게스트 로그온 사용에서 더블클릭 - 설정 창이 나오면 좌측 상단의 사용을 선택 후 - 확인
12. Cross Compiler 설치
gcc 설치:  [root@ubuntu]# apt-get install gcc 
make 설치: [root@ubuntu]# apt-get install make
64bit환경에서 32bit컴파일러를 사용하기 위해서... 
[root@ubuntu]# apt-get install lib32ncurses5 lib32z1 
[root@ubuntu]# apt-get install libmpc-dev:i386
13. nfs서버 설치
mkdir /계정명/nfs 
chmod 755 /계정명/nfs 
[root@ubuntu]# sudo apt-get install nfs-common nfs-kernel-server 
- nfs서버 설정 
[root@ubuntu]# vi /etc/exports 
/home/계정명/nfs *(rw,sync,no_subtree_check,no_root_squash,insecure) 
nfs서버 재시작 
[root@ubuntu]# /etc/init.d/nfs-kernel-server restart
//장치에서 nfs서버 접속
'linux' 카테고리의 다른 글
| ssh dns disable (0) | 2022.01.12 | 
|---|---|
| EmbeddedLinux 무선랜 사용 (0) | 2021.07.20 | 
| cross compiler 설치 후 (0) | 2020.08.27 | 
| sudo 명령어 패스워드 없이 사용하기 (0) | 2019.12.30 | 
| Linux 명령어 모음 ...ing (0) | 2019.10.16 | 






