돌할우밤 공부방

1. Configure your Host Name, IP Address, Gateway and DNS. Host name: station.domain40.example.com
1. 호스트 이름, IP 주소, 게이트웨이 및 DNS를 구성합니다. 호스트 이름: station.domain40.example.com
안의 파일이 /
/etc/sysconfig/network
hostname=abc.com
hostname abc.com
되어 있다 가정 

IP Address:172.24.40.40/24 -

Gateway172.24.40.1 -

DNS:172.24.40.1 -

이렇게 바꾸시오 

 

더보기

hostnamectl set-hostname station.domain40.example.com

nmcli  con mod ens33 ipv4.adresses  172.24.40.40/24 ipv4.gateway 172.24.40.1 ipv4.dns  172.24.40.1

nmcli con up



2. Create a catalog under /home named admins. Its respective group is requested to be the admin group. The group users could read and write, while other users are not allowed to access it. The files created by users from the same group should also be the admin group.

2. /home named admins 아래에 카탈로그를 생성합니다. 해당 그룹은 관리자 그룹이어야 합니다. 그룹 사용자는 읽고 쓸 수 있지만 다른 사용자는 액세스할 수 없습니다. 동일한 그룹의 사용자가 생성한 파일도 관리자 그룹이어야 합니다.

 

더보기

mkdir /home/admins

groupadd admin

chown .admin /home/admins

chmod 2770 /home/admins



3.Configure a task: plan to run echo hello command at 14:23 every day. 

3.작업 구성: 매일 14시 23분에 echo hello 명령을 실행할 계획입니다.

더보기

 crontab -e

23 14 * * * /usr/bin/echo "hello"



4.Find the files owned by harry, and copy it to catalog: /opt/dir

4.해리가 소유한 파일을 찾아 카탈로그에 복사합니다: /opt/dir

 

더보기

(useradd harry - 해리라는 사용자가없으므로)

find / -user harry exec cp {} /apt/dir \;



5. Find the rows that contain abcde from file /etc/testfile, and write it to the file/tmp/testfile, and the sequence is requested as the same as /etc/testfile.

5. /etc/test 파일에서 abcde가 포함된 행을 찾아 파일/tmp/test 파일에 기록하면 /etc/test 파일과 동일하게 시퀀스가 요청됩니다. -다시 복습할 것.

 

cat /etc/testfile | grep "abcde" > /tmp/testfile



6. Configure a HTTP server, which can be accessed through
http://station.domain40.example.com.
Please download the released page from http://ip/dir/example.html.

6. 다음을 통해 액세스할 수 있는 HTTP 서버를 구성합니다.
http://station.domain40.example.com.
공개된 페이지를 http://ip/dir/example.html에서 다운로드하십시오.

 

더보기

yum -y install http

systemctl enable --now httpd

wget http://ip/dir/example.html

 

vi /etc/httpd/conf/httpd.conf

#ServerName 에 주석 제거

station.domain40.example.com. 추가

 



7. Configure autofs to make sure after login successfully, it has the home directory autofs, which is shared as /rhome/ldapuser40 at the ip: 172.24.40.10. and it also requires that, other ldap users can use the home directory normally.

-따로 한번 알아보겠습니다-

 


8.Configure the system synchronous as 172.24.40.10(안배운거)

9. Create a volume group, and set 16M as a extends. And divided a volume group containing 50 extends on volume group lv, make it as ext4 file system, and mounted automatically under /mnt/data.

9. 볼륨 그룹을 생성하고 16M을 확장으로 설정합니다. 또한 볼륨 그룹 lv에서 확장자가 50개인 볼륨 그룹을 분할하여 ext4 파일 시스템으로 만들고 /mnt/data 아래에 자동으로 마운트합니다.

-혼자서 할 수 있지만 순서를 헷갈려함 다시 숙지

더보기

pvcreate /dev/sdb{1..2}

vgcreate vg1 -s 16M /dev/sdb1 /dev/sdb2

lvcreate  vg1 -l 50 -n lv1 vg1

mkfs.ext4 /dev/lv1/vg1

mkdir /mnt/data

vi /etc/fstab

/dev/lv1/vg1          /mnt/data          ext4           default          0 0 (:wq)

mount -a

 

 


10. Create a 512M partition, make it as ext4 file system, mounted automatically under /mnt/data and which take effect automatically at boot-start.
10. 512M 파티션을 생성하고 이를 ext4 파일 시스템으로 만들어 /mnt/data 아래에 자동으로 마운트되며 부팅 시작 시 자동으로 적용됩니다.

 

더보기
fdisk /dev/sdbn -> p -> 3 -> +512M -> w
mkfs.ext4 /dev/sdb3
vi /etc/fstab
/dev/sdb3          /mnt/data          ext4          default          0 0 (:wq)mount -a

 

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

/Linux/RHCSA/10일차(예제 풀기)  (0) 2021.07.03
/Linux/RHCSA/9일차(예제 풀기)  (0) 2021.07.03
/Linux/RHCSA/7일차  (0) 2021.06.30
/Linux/RHCSA/6일차  (0) 2021.06.28
/Linux/RHCSA/5일차  (0) 2021.06.27

>