[raspberrypi] 웹www 경로 변경 / 삼바서버 연결 윈도우 편집 환경 만들기
페이지 정보
작성자 sbLAB 댓글 0건 조회 6,232회 작성일 19-05-19 18:02본문
1. 웹www 경로 변경 var/www/html ==> /home/pi/www/html
** var 경로는 제약이 많으므로 pi 홈계정으로 www 를 변경하는 작업을 하고 이 글을 기록함.
2. [라즈베리파이 원격접속 - /etc/apache2/apache2.conf 수정]
<Directory /home/pi/www/html>
#Options Indexes FollowSymLinks <- Indexes 제거(웹 디렉토리 브라우징 막기)
Options FollowSymLinks
AllowOverride None
Require all granted
</Directory>
3. /etc/apache2/sites-available/000-default.conf 수정
4. [아파치 재시작] sudo service apache2 restart
5. 디렉토리 소유자와 소유그룹 변경(웹접근가능하게함)
6. 디렉토리 권한 변경(pi 계정에 ftp/samba 툴 접근이 가능 하도록 권한 추가[중요])
1 2 | sudo usermod -a -G www-data pi sudo chmod -R 775 /home/pi/www/html |
7. [아파치 재시작] sudo service apache2 restart
8. 웹에서 접속 여부 확인
9. 삼바서버 설치(라즈베리파이(리눅스) 공유대상 폴더를 /home/pi/www/html 로 명시)
[삼바서버 설치/기본 설정]
[패키기 정보 업데이트]
$ sudo apt-get update
[삼바 프로토콜 및 삼바서버, 클라이언트와 관련된 의존성 패키지
$sudo apt-get install samba samba-common-bin
[삼바 유저 추가 및 패스워드 설정]
$ sudo smbpasswd -a pi
[삼바설정값 변경]
$ sudo nano /etc/samba/smb.conf 에서 아래 내용(기존내용 모두 비우고)으로 Vi편집하거나, 리눅스 GUI툴에서 편집
--------아래부터----------
[global]
workgroup = WINDOWS_****
server string = raspberrypi
#user, share, server, domain
security = user
map to guest = bad user
[pi]
comment = samba server by ****-polling
path = /home/pi/www/html <=== 이부분에 리눅스 공유타켓 폴더 경로를 명시해준다.
valid users = pi
writable = yes
read only = no
browseable = yes
create mask = 0775
directory mask = 0775
--------위까지----------------
[삼바서버 재시작]
$sudo service samba restart(실패함) ==> $sudo /etc/init.d/samba restart 로 재시작
[윈도우에서 접속 탐색기 -> \\192.168.0.999\]
※ 윈도우에서 삼바접속 수정/생성 할경우 리눅스 삼바서버 세팅(smb.conf)에 775 퍼미션으로 되어 있어야함.
775가 아닐 경우 웹에서 접근 불가 하였음.
create mask = 0775
directory mask = 0775
[윈도우에서 파일 작업 시작]
[참고링크]
https://fishpoint.tistory.com/1553
- 이전글[centos] 원격데스크탑 설정 19.05.21
- 다음글Sync Linux server time with NTP (Network Time Protocol) server 19.03.07
댓글목록
등록된 댓글이 없습니다.