sudo vi /usr/lib/systemd/system/v3net.service



[Unit]

Description=v3net service


[Service]

Type=forking

ExecStart=/usr/local/v3net/v3net.sh start

ExecStop=/usr/local/v3net/v3net.sh stop


[Install]

WantedBy=multi-user.target



sudo systemctl daemon-reload

sudo systemctl list-unit-files

sudo systemctl stop v3net

sudo systemctl start v3net

sudo systemctl enable v3net

sudo systemctl status v3net

'Binary' 카테고리의 다른 글

Centos 7 Plex Media Server 설치  (0) 2019.12.03
Seafile Community 버전을 Seafile Pro 버전으로 up! up! upgrade!  (0) 2019.12.02
CentOS 7 seafile 설치  (0) 2019.12.01
Centos 7 transmission 설치  (0) 2019.11.28
Centos 7 samba 설치  (0) 2019.11.28
블로그 이미지

나노지식

,

CentOS 7 seafile 설치

Binary 2019. 12. 1. 23:00

1. MariaDB 설치 및 서비스 자동실행

더보기

[genius@localhost ~]$ sudo yum install mariadb mariadb-server
[sudo] genius의 암호:
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: data.aonenetworks.kr
 * extras: data.aonenetworks.kr
 * updates: data.aonenetworks.kr
...............
Total download size: 33 M
Installed size: 147 M
Is this ok [y/d/N]: y
Downloading packages:
...............
Complete!
[genius@localhost ~]$
[genius@localhost ~]$
[genius@localhost ~]$ sudo service mariadb start
Redirecting to /bin/systemctl start mariadb.service
[genius@localhost ~]$ sudo systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[genius@localhost ~]$

묻는 거 나오면 'y'

# yum install mariadb mariadb-server : mariadb 설치

# service mariadb start : mariadb 시작

# systemctl enable mariadb : mariadb 자동실행 등록

 

 

2. mariaDB 보안 설정

더보기

[genius@localhost bin]$ sudo /bin/mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): //패스워드 설정을 안했으므로 그냥 Enter
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password: //새로운 패스워드 입력
Re-enter new password: //새로운 패스워드 다시 입력
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!
[genius@localhost bin]$

설명은 생략... 

 

3. MariaDB에서 seafile 관련 사항 설정

더보기

[genius@localhost ~]$ sudo mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 15
Server version: 5.5.64-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>
MariaDB [(none)]>
MariaDB [(none)]> create database `ccnet-db` character set = 'utf8mb4';
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> create database `seafile-db` character set = 'utf8mb4';
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> create database `seahub-db` character set = 'utf8mb4';
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]>
MariaDB [(none)]> create user 'seafile'@'localhost' identified by 'p@ssw0rd';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]>
MariaDB [(none)]> GRANT ALL PRIVILEGES ON `ccnet-db`.* to `seafile`@localhost;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON `seafile-db`.* to `seafile`@localhost;
Query OK, 0 rows affected (0.01 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON `seahub-db`.* to `seafile`@localhost;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> Ctrl-C -- exit!
Aborted

# mysql -u root -p : Mariadb 접속, 아까 생성한 root 계정 패스워드 입력

# create database `ccnet-db` character set = 'utf8mb4';  : 데이터베이스 생성
# create database `seafile-db` character set = 'utf8mb4';  : 데이터베이스 생성
# create database `seahub-db` character set = 'utf8mb4';  : 데이터베이스 생성
# create user 'seafile'@'localhost' identified by '새로운 패스워드'; : mariadb의 seafile계정이 사용할 패스워드
# GRANT ALL PRIVILEGES ON `ccnet-db`.* to `seafile`@localhost; : 권한설정
# GRANT ALL PRIVILEGES ON `seafile-db`.* to `seafile`@localhost; : 권한설정
# GRANT ALL PRIVILEGES ON `seahub-db`.* to `seafile`@localhost; : 권한설정

 

4. 파이선 등 관련 라이브러리 설치

더보기

[genius@localhost ~]$ sudo yum -y install epel-release

[genius@localhost ~]$ sudo rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro

 

[genius@localhost ~]$ sudo yum -y install python-imaging MySQL-python python-distribute python-memcached python-ldap python-urllib3 ffmpeg ffmpeg-devel python-requests

 

5. seafile Linux 계정 생성

더보기

[genius@localhost ~]$ sudo useradd -m -d /home/seafile seafile
[genius@localhost ~]$ sudo passwd seafile
seafile 사용자의 비밀 번호 변경 중
새  암호:
잘못된 암호: 암호에 어떤 형식으로 사용자 이름이 포함되어 있습니다
새  암호 재입력:
passwd: 모든 인증 토큰이 성공적으로 업데이트 되었습니다.

[genius@localhost ~]$ su - seafile
암호:
[seafile@localhost ~]$ cd ~
[seafile@localhost ~]$ pwd
/home/seafile

# useradd -m -d /home/seafile seafile : seafiel 계정 생성

# passwd seafile : seafile 계정 패스워드 설정

# su - seafile : seafile 계정으로 전환

# cd ~ : seafile의 홈디렉토리로 이동

# pwd : 현재 위치 확인

 

6. seafile 다운로드 및 압축 해제

더보기

[seafile@localhost ~]$ wget https://download.seadrive.org/seafile-server_7.0.5_x86-64.tar.gz 
[seafile@localhost ~]$ tar xvf seafile-server_7.0.5_x86-64.tar.gz

wget이 안되면 root로 전환해서 yum으로 wget을 설치하자.

#su

root 패스워드 입력

#yum install wget

 

7. seafile 설치

더보기

[seafile@localhost ~]$ cd seafile-server-7.0.5/
[seafile@localhost seafile-server-7.0.5]$ ./setup-seafile-mysql.sh
Checking python on this machine ...
  Checking python module: python-mysqldb ... Done.

-----------------------------------------------------------------
This script will guide you to setup your seafile server using MySQL.
Make sure you have read seafile server manual at

        https://github.com/haiwen/seafile/wiki

Press ENTER to continue
-----------------------------------------------------------------


What is the name of the server? It will be displayed on the client.
3 - 15 letters or digits
[ server name ] 사용할서버이름입력 

What is the ip or domain of the server?
For example: www.mycompany.com, 192.168.1.101
[ This server's ip or domain ] 리눅스ip입력

Where do you want to put your seafile data?
Please use a volume with enough free space

[ default "/home/seafile/seafile-data" ] 데이경로입력(또는엔터)

Which port do you want to use for the seafile fileserver?
[ default "8082" ] 8082

-------------------------------------------------------
Please choose a way to initialize seafile databases:
-------------------------------------------------------

[1] Create new ccnet/seafile/seahub databases
[2] Use existing ccnet/seafile/seahub databases

[ 1 or 2 ] 2

What is the host of mysql server?
[ default "localhost" ] 엔터

What is the port of mysql server?
[ default "3306" ] 엔터

Which mysql user to use for seafile?
[ mysql user for seafile ] 엔터

What is the password for mysql user "seafile"?
[ password for seafile ] mariadb의 seafile 패스워드(3번 참조)

verifying password of user seafile ...  done

Enter the existing database name for ccnet:
[ ccnet database ] ccnet-db

verifying user "seafile" access to database ccnet-db ...  done

Enter the existing database name for seafile:
[ seafile database ] seafile-db

verifying user "seafile" access to database seafile-db ...  done

Enter the existing database name for seahub:
[ seahub database ] seahub-db

verifying user "seafile" access to database seahub-db ...  done

---------------------------------
This is your configuration
---------------------------------

    server name:            ㅁㅁㅁㅁㅁ 
    server ip/domain:       192.168.xxx.xxx 

    seafile data dir:       /....../seafile-data
    fileserver port:        8082

    database:               use existing
    ccnet database:         ccnet-db
    seafile database:       seafile-db
    seahub database:        seahub-db
    database user:          seafile



---------------------------------
Press ENTER to continue, or Ctrl-C to abort
---------------------------------

Generating ccnet configuration ...

done
Successly create configuration dir /home/seafile/ccnet.
Generating seafile configuration ...

Checking python on this machine ...
  Checking python module: python-mysqldb ... Done.

-----------------------------------------------------------------
This script will guide you to setup your seafile server using MySQL.
Make sure you have read seafile server manual at

        https://github.com/haiwen/seafile/wiki

Press ENTER to continue
-----------------------------------------------------------------


What is the name of the server? It will be displayed on the client.
3 - 15 letters or digits
[ server name ]
The setup process is aborted

8. 방화벽 개방

더보기

[seafile@localhost seafile-server-7.0.5]$ exit
logout
[genius@localhost home]$ sudo firewall-cmd --permanent --add-port=8000/tcp
[sudo] genius의 암호:
success
[genius@localhost home]$ sudo firewall-cmd --permanent --add-port=8002/tcp
success
[genius@localhost home]$ sudo firewall-cmd --reload
success
[genius@localhost home]$ [genius@localhost home]$ sudo firewall-cmd --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: enp3s0
  sources:
  services: samba
  ports: 22/tcp 9091/tcp 8000/tcp 8002/tcp
  protocols:
  masquerade: no
  forward-ports:
  source-ports:
  icmp-blocks:
  rich rules:

# exit : seafile 계정을 관리자계정이 아니라서 firewall을 설정하기 위해 exit로 원래 관리자계정으로 돌아감

방화벽 설정 후 8000, 8002 포트 개방되었나 확인

 

9. ip변경 후 서비스 실행

더보기

[seafile@localhost ~]$ vi ~/conf/gunicorn.conf

bind = "192.168.x.x:8000"   //127.0.0.1:8000 -> 자신의ip:8000으로 변경

 


[seafile@localhost ~]$
[seafile@localhost ~]$ cd ./seafile-server-latest/
[seafile@localhost seafile-server-latest]$ ls
check_init_admin.py  reset-admin.sh  runtime  seaf-fsck.sh  seaf-fuse.sh  seaf-gc.sh  seafile  seafile.sh  seahub  seahub.sh  setup-seafile-mysql.py  setup-seafile-mysql.sh  setup-seafile.sh  sql  upgrade
[seafile@localhost seafile-server-latest]$ ./seafile.sh start

[12/01/19 22:41:41] ../common/session.c(132): using config file /home/seafile/conf/ccnet.conf
Starting seafile server, please wait ...
** Message: seafile-controller.c(718): No seafevents.

Seafile server started

Done.
[seafile@localhost seafile-server-latest]$ ./seahub.sh start

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 ...

----------------------------------------
It's the first time you start the seafile server. Now let's create the admin account
----------------------------------------

What is the email for the admin account?
[ admin email ] 메일주소

What is the password for the admin account?
[ admin password ] 새로운패스워드입력

Enter the password again:
[ admin password again ] 새로운패스워드입력



----------------------------------------
Successfully created seafile admin
----------------------------------------




Seahub is started

Done.

[seafile@localhost seafile-server-latest]$

이제 윈도우에 브라우져에서

http://ip:8000 접속

 

10. 서비스 등록

더보기

[genius@localhost wd2t]$ cd /usr/lib/systemd/system

[genius@localhost system]$ sudo vi seafile.service

[Unit]

Description=Seafile

# add mysql.service or postgresql.service depending on your database to the line below

After=network.target mariadb.service

 

[Service] Type=forking

ExecStart=/var/lib/seafile/seafile-server-latest/seafile.sh start

ExecStop=/var/lib/seafile/seafile-server-latest/seafile.sh stop

User=seafile

Group=seafile

 

[Install]

WantedBy=multi-user.target

 


[genius@localhost system]$ sudo vi seahub.service

[Unit]

Description=Seafile hub

After=network.target seafile.service

 

[Service] Type=forking

# change start to start-fastcgi if you want to run fastcgi

ExecStart=/var/lib/seafile/seafile-server-latest/seahub.sh start

ExecStop=/var/lib/seafile/seafile-server-latest/seahub.sh stop

User=seafile Group=seafile

 

[Install]

WantedBy=multi-user.target

 

[genius@localhost system]$ sudo systemctl enable seafile
Created symlink from /etc/systemd/system/multi-user.target.wants/seafile.service to /usr/lib/systemd/system/seafile.service.
[genius@localhost system]$ sudo systemctl enable seahub
Created symlink from /etc/systemd/system/multi-user.target.wants/seahub.service to /usr/lib/systemd/system/seahub.service.

재부팅 후 확인한다.

블로그 이미지

나노지식

,

Centos 7 samba 설치

Binary 2019. 11. 28. 22:03

1. samba에 사용할 계정을 생성한다.

[genius@localhost ~]$ sudo useradd -Mn smbuser 
[genius@localhost ~]$ cat /etc/passwd 
root:x:0:0:root:/root:/bin/bash

......
smbuser:x:1001:100::/home/smbuser:/bin/bash 
[genius@localhost ~]$ sudo passwd smbuser 
smbuser 사용자의 비밀 번호 변경 중 
새  암호: 
잘못된 암호: 암호는 8 개의 문자 보다 짧습니다 
새  암호 재입력: 
passwd: 모든 인증 토큰이 성공적으로 업데이트 되었습니다. 

# useradd -Mn smbuser : smbuser라는 계정을 생성

-Mn : samba 접속시에 사용할 계정이므로 home 디렉토리 생성안함. 그룹도 생성하지 않음

# passwd smbuser : 패스워드 생성

 

2. smaba 설치 및 계정 등록

[genius@localhost ~]$ sudo yum install samba

..........

[genius@localhost ~]$ sudo smbpasswd -a smbuser 
New SMB password: 
Retype new SMB password: 
Added user smbuser.

# yum install samba : samba 패키지 설치(중간에 물어보는 거 나오면 "y" 누르삼)

# smbpasswd -a smbuser : samba에 사용될 계정 패스워드 설정(1번에서 만든 계정 패스워드와는 다름)

 

3. smb.conf 수정

[genius@localhost ~]$ sudo cp /etc/samba/smb.conf /etc/samba/smb.conf_20191128 
[genius@localhost ~]$ sudo vi /etc/samba/smb.conf 
[global] 
        workgroup = SAMBA 
        security = user 
        passdb backend = tdbsam 
        printing = cups 
        printcap name = cups 
        load printers = yes 
        cups options = raw 

[public] 
        comment = Tao Nas public directory 
        path = /data/public 
        write list = smbuser 
        create mask = 0664 
        directory mask = 0775 
        writable = yes 
        printable = no 
        public = no

# cp /etc/samba/smb.conf /etc/samba/smb.conf_20191128 : 혹시 모르니 smb.conf 화일 백업

# vi /etc/samba/smb.conf : smb.conf 파일 수정

vi로 화일을 열고 

[global] 
        workgroup = SAMBA 
        security = user 
        passdb backend = tdbsam 
        printing = cups 
        printcap name = cups 
        load printers = yes 
        cups options = raw 

[public] 
        comment = Tao Nas public directory 
        path = /data/public : 여기가 제일 중요 공유할 디렉토리
        write list = smbuser : 접속할 계정 1번에서 생성한 계정 등록
        create mask = 0664
        directory mask = 0775 
        writable = yes 
        printable = no 
        public = no

이렇게 수정. 다른 부분은 딱히 필요하지 않으므로 다 삭제해도 무방하고 남겨도 무방함.

 

4. firewall 등록

[genius@localhost ~]$ sudo firewall-cmd --list-all 
public (active) 
  target: default 
  icmp-block-inversion: no 
  interfaces: enp3s0 
  sources: 
  services: dhcpv6-client ssh 
  ports: 
  protocols: 
  masquerade: no 
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules:

[genius@localhost ~]$ sudo firewall-cmd --permanent --add-service=samba --zone=public 
success 

[genius@localhost ~]$ sudo firewall-cmd --reload 
success 
[genius@localhost ~]$ sudo firewall-cmd --list-all 
public (active) 
  target: default 
  icmp-block-inversion: no 
  interfaces: enp3s0 
  sources: 
  services: dhcpv6-client samba ssh 
  ports: 
  protocols: 
  masquerade: no 
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules:

# firewall-cmd --list-all : 현재 개방된 서비스 확인

# firewall-cmd --permanent --add-service=samba --zone=public : samba 서비스 등록

# firewall-cmd --reload : 방화벽 재로드(이거 안하면 적용 안됨)

 

5. samba 서비스 실행 및 자동실행 등록

[genius@localhost ~]$ sudo service smb restart 
Redirecting to /bin/systemctl restart smb.service 
[genius@localhost ~]$ sudo systemctl enable smb 
Created symlink from /etc/systemd/system/multi-user.target.wants/smb.service to /usr/lib/systemd/system/smb.service. 
[genius@localhost ~]$ sudo service smb status 
Redirecting to /bin/systemctl status smb.service 
● smb.service - Samba SMB Daemon 
   Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled) 
   Active: active (running) since 목 2019-11-28 21:29:41 KST; 1min 1s ago 
     Docs: man:smbd(8) 
           man:samba(7) 
           man:smb.conf(5) 
 Main PID: 2759 (smbd) 
   Status: "smbd: ready to serve connections..." 
   CGroup: /system.slice/smb.service 
           ├─2759 /usr/sbin/smbd --foreground --no-process-group 
           ├─2761 /usr/sbin/smbd --foreground --no-process-group 
           ├─2762 /usr/sbin/smbd --foreground --no-process-group 
           ├─2763 /usr/sbin/smbd --foreground --no-process-group 
           └─2766 /usr/sbin/smbd --foreground --no-process-group 

11월 28 21:29:41 localhost.localdomain systemd[1]: Starting Samba SMB Daemon... 
11월 28 21:29:41 localhost.localdomain smbd[2759]: [2019/11/28 21:29:41.587739,  0] ../lib/util/become_daemon.c:138(daemon_ready) 
11월 28 21:29:41 localhost.localdomain smbd[2759]:   daemon_ready: STATUS=daemon 'smbd' finished starting up and ready to serve connections 
11월 28 21:29:41 localhost.localdomain systemd[1]: Started Samba SMB Daemon. 

# service smb restart : 삼바 서비스 시작(재시작)

# systemctl enable smb : 삼바 서비스 자동시작 등록

# service smb status : 삼바 서비스 상태 확인

여기까지 완료되면 같은 네트워크의 윈도에서 "\\ip"(ex \\192.168.1.6)을 입력해서...

"public" 디렉토리가 나오는지 확인

나온다면 정상.. 안나오면 어딘가 오류가 있음

나온다면 centos를 재부팅해서 삼바 서비스가 정상적으로 실행되는지 확인

 

6. selinux 설정

윈도우에 "public"가 나왔는데.. 떠블클릭하니.. 더이상 접속이 안되고 액세는할 수 없다고 나오는 경우...

selinux를 설정해야 함.

selinux문제인지 아닌지를 먼저 확인하려면

[genius@localhost ~]$ sudo setenforce 0

# setenforce 0 : selinux를 permissive 모드로 전환

이렇게 했더니 잘 접속이 되면 selinux 문제이다.. 다시 selinux를 enforcing모드를 전환하자.

[genius@localhost ~]$ sudo setenforce 1 

# setenforce 1 : selinux를 enforcing모드로 전환

이렇게 하고 다시 윈도우에서 접속하면 아까처럼 액세스 불가 메시지가 나온다.

 https://www.lesstif.com/pages/viewpage.action?pageId=6979732 selinux 관련 참고 블로그

 

CentOS SELinux 설정 및 해제하기

SELinux 에 대한 체계적인 사용법은 "바쁜 개발자를 위한 웹 서비스 보안" 중 SELinux 항목 을 참고하세요.

www.lesstif.com

selinux를 사용안하려면 위의 블로그를 참고해서 설정하자.. 그럼 끝...

하지만 나는 selinux를 사용하고 싶다... 

[genius@localhost ~]$ sudo chcon -t samba_share_t /data/public 
[sudo] genius의 암호: 
[genius@localhost ~]$ ls -Z /data/ 
drwxr-xr-x. root root unconfined_u:object_r:samba_share_t:s0 public 
[genius@localhost ~]$ sudo /usr/sbin/setsebool -P samba_export_all_rw on 

설명은 생략한다.. 나도 잘 모르니까... 

https://mikki.tistory.com/entry/Centos-7-Samba-%EC%84%A4%EC%B9%98 이 블로그를 참고했다.

 

 

Centos 7 Samba 설치

Centos 7 에서 SAMBA 설치 태스트용 서버는 리눅스 이지만 개인pc는 윈도우라는 환경 때문에 파일 공유하기가 힘들다. 물론 ftp같은 서비스도 있지만 SAMABA를 깔아보기로 했다. samba 설정을 해놓으면 윈도우 pc..

mikki.tistory.com

여기까지 하면 접근은 되는데.. 쓰기가 안된다... ㅠ,.ㅠ

이제 권한을 부여해보샂.

 

7. samba로 공유할 디렉토리 권한 설정

[genius@localhost ~]$ cd /data 
[genius@localhost data]$ ls 
public 
[genius@localhost data]$ sudo chown -R smbuser.100 ./public/ 
[sudo] genius의 암호: 
[genius@localhost data]$ ll 
합계 0 
drwxr-xr-x. 4 smbuser users 31 11월 27 20:46 public

# cd /data : /data 디렉토리로 이동

# sudo chown -R smbuser.100 ./public/ : ./public 및 서브디렉토리까지.. 사용자 및 그룹 변경

이제 윈도우에서 다시 접속해서... 디렉토리(폴더)와 파일을 생성해보자..

그리고 권한 맞게 생서되는지 확인하자.

[genius@localhost data]$ cd public/ 
[genius@localhost public]$ ll 
-rw-rw-r--. 1 smbuser users    0 11월 28 21:54 새 텍스트 문서.txt 
drwxrwxr-x. 2 smbuser users    6 11월 28 21:53 새 폴더 

"새 텍스트 문서.txt"의 퍼미션는 "-rw-rw-r--"

"새 폴더"의 퍼미션은 "drwxrwxr-x"

퍼미션도 맞게 되는 듯 하다..

이제 윈도우에서 네트워크 드라이브로 연결해서 사용하자.

 

끝.

 

 

#centos7, #linux, # samba

'Binary' 카테고리의 다른 글

CentOS 7 seafile 설치  (0) 2019.12.01
Centos 7 transmission 설치  (0) 2019.11.28
Hyper-v Linux 가상머신 디스크 늘이기  (2) 2018.04.27
간단한 Linux 명령어  (3) 2018.02.21
Google 에드센스 Pin 등록  (0) 2013.05.03
블로그 이미지

나노지식

,


파티션 삭제 후 추가된 용량을 더해서 파티션 재생성

파티션 타입 8e(linux LVM)으로 변경

파티션 저장

리부팅

pvresize /dev/sda2

pvscan

swapoff /dev/centos/swap

lvextend -L+2048M /dev/centos/swap

mkswap /dev/centos/swap

swapon /dev/centos/swap

free -m

lvextend -l +100%FREE /dev/centos/root

fsadm resize /dev/centos/root

'Binary' 카테고리의 다른 글

Centos 7 transmission 설치  (0) 2019.11.28
Centos 7 samba 설치  (0) 2019.11.28
간단한 Linux 명령어  (3) 2018.02.21
Google 에드센스 Pin 등록  (0) 2013.05.03
du 디렉토리 용량체크  (0) 2011.11.22
블로그 이미지

나노지식

,

du 디렉토리 용량체크

Binary 2011. 11. 22. 14:57

du -hs --apparent-size ./

-s : 서브디렉토리 포함

--apparent-size : 화일사이즈가 아니 할당된 용량

-c : 여러개의 디렉토리를 동시에...
      ex)  
du -hs --apparent-size ./d1 ./d2 ./d3


참고 : 
http://qaos.com/viewtopic.php?topic=5798&forum=4
 
        http://mwultong.blogspot.com/2006/11/unix-linux-directory-size.html

'Binary' 카테고리의 다른 글

간단한 Linux 명령어  (3) 2018.02.21
Google 에드센스 Pin 등록  (0) 2013.05.03
RSS FEED  (0) 2011.11.16
ActiveX 오남용 공화국  (0) 2009.03.14
컴퓨터 청소는 쉽고 간편하게..  (0) 2009.03.13
블로그 이미지

나노지식

,