돌할우밤 공부방

1. Find out files owned by jack, and copy them to directory /root/findresults

1. 잭이 소유한 파일을 찾아 /root/findresults 디렉토리에 복사합니다.

더보기

find / -user jack exec cp {} /root/findresults \;

 

2. Find out all the columns that contains the string seismic within /usr/share/dict/words, then copy all these columns to /root/lines.txt in original order, there is no blank line, all columns must be the accurate copy of the original columns.

2. /usr/share/dict/words 내에 지진 문자열이 포함된 모든 열을 찾아낸 다음 이 열을 /root/lines.txt에 복사합니다.txt는 원래 순서에 따라 빈 줄이 없습니다. 모든 열은 원래 열의 정확한 복사본이어야 합니다.

 

더보기

cat /usr/share/dict/words | grep seimic > /root/lines.txt

 

3. Create a backup file named /root/backup.tar.bz2, contains the content of /usr/local, tar must use bzip2 to compress.

3. /usr/local의 내용을 포함하는 /root/backup.tar.bz2라는 백업 파일을 생성합니다. tar는 압축하려면 bzip2를 사용해야 합니다.

 

더보기

tar -jcvf /root/backup.tar.bz2 /usr/local

 

4. Create a logical volume -
Create a new logical volume as required:
Name the logical volume as database, belongs to datastore of the volume group, size is 50 PE.
Expansion size of each volume in volume group datastore is 16MB.
Use ext3 to format this new logical volume, this logical volume should automatically mount to /mnt/database

4. 논리적 볼륨을 생성합니다.
필요에 따라 새 논리적 볼륨 생성:
논리적 볼륨의 이름을 데이터베이스로 지정하고 볼륨 그룹의 데이터스토어에 속하며 크기는 50PE입니다.
볼륨 그룹 데이터스토어에 있는 각 볼륨의 확장 크기는 16MB입니다.
ext3을 사용하여 이 새 논리적 볼륨을 포맷합니다. 이 논리적 볼륨이 자동으로 /mnt/database에 마운트되어야 합니다.

 

더보기

pvcreate /dev/sdb{1..2}

vgcreate -s 16M datastore /dev/sdb{1..2}

lvcreate -l 50 -n database datastore

mkfs.ext3 /dev/datastore/database

mkdir /mnt/database

vi /etc/fstab

/dev/datasotre/database          /mnt/database          ext3          default          0 0 (:wq)

mout -a

 

5. Make a swap partition having 100MB. Make Automatically Usable at System Boot Time.

5. 100MB의 스왑 파티션을 만듭니다. 시스템 부팅 시 자동으로 사용 가능.

 

더보기

fdisk /dev/sdb - n(+100M) - t(82) - w

mkswap /ddev/sdb1

vi /etc/fstab

/deb/sdb1          swap          default           0 0(:wq)

swapon -a

 

6. One Logical Volume is created named as myvol under vo volume group and is mounted. The Initial Size of that Logical Volume is 400MB. Make successfully that the size of Logical Volume 200MB without losing any data. The size of logical volume 200MB to 210MB will be acceptable.

6. 논리 볼륨 하나가 vo 볼륨 그룹 아래에 myvol이라는 이름으로 생성되고 마운트됩니다. 해당 논리적 볼륨의 초기 크기는 400MB입니다. 데이터 손실 없이 논리 볼륨 200MB의 크기를 유지합니다. 논리 볼륨의 크기는 200MB에서 210MB까지 허용됩니다.

 

더보기

lvreduce -r -L 200M /dev/vo/myvol

 

7. We are working on /data initially the size is 2GB. The /dev/test0/lvtestvolume is mount on /data. Now you required more space on /data but you already added all disks belong to physical volume. You saw that you have unallocated space around 5 GB on your harddisk. Increase the size of lvtestvolume by 5GB.

7. /data 크기는 처음에 2GB입니다. /dev/test0/lvest 볼륨이 /data에 마운트됩니다. 이제 /data에 공간이 더 필요했지만 이미 모든 Disk가 물리적 볼륨에 속하도록 추가했습니다. 하드 디스크에 약 5GB의 할당되지 않은 공간이 있습니다. lvtest 볼륨 크기를 5GB 늘립니다.

 

더보기

lvextend -r -L +5G /dev/test-/lvestvoume

 

8. Make on data that only the user owner and group owner member can fully access.

8. 사용자 소유자 및 그룹 소유자 멤버만 완전히 액세스할 수 있는 데이터를 만듭니다.

 

더보기

find / -name "data"

chmod 770 /data

 

9. Who ever creates the files/directories on a data group owner should automatically be in the same group owner as data.

9. 데이터 그룹 소유자에게 파일/디렉토리를 생성하는 사용자는 자동으로 데이터와 동일한 그룹 소유자에 있어야 합니다.

 

더보기

chmod g+s data

 

10. Please open the ip_forward, and take effect permanently.
(답 외울것)

10. ip_foward를 열고 영구적으로 적용하십시오.

 

더보기

명령실행 sysctl -w net.ipv4.ip_forward = "1"   
확인   cat /proc/sys/net/ipv4/ip_forward 

만약 리부팅해도 적용이 안된다면 ?
vim /etc/sysctl.conf
net.ipv4.ip_forward = 1    추가 해주고 


sysctl -p /etc/sysctl.conf  실행

 

'IT_공부 > Linux' 카테고리의 다른 글

/Linux/RHCSA/12일차(예제 풀기)  (0) 2021.07.04
/Linux/RHCSA/11일차(예제 풀기)  (0) 2021.07.04
/Linux/RHCSA/9일차(예제 풀기)  (0) 2021.07.03
/Linux/RHCSA/8일차(예제 풀기)  (0) 2021.07.02
/Linux/RHCSA/7일차  (0) 2021.06.30

>