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.
Solution:
# yum install -y httpd
# chkconfig httpd on
# cd /var/www/html
# wget http://ip/dir/example.html
# cp example.com index.html
# vim /etc/httpd/conf/httpd.conf
NameVirtualHost 192.168.0.254:80
DocumentRoot /var/www/html/
ServerName station.domain40.example.com
Does this meet the goal?
Correct Answer:A
Configure /var/tmp/fstab Permission.
Copy the file /etc/fstab to /var/tmp/fstab. Configure var/tmp/fstab permissions as the following:
Owner of the file /var/tmp/fstab is Root, belongs to group root
File /var/tmp/fstab cannot be executed by any user
User natasha can read and write /var/tmp/fstab
User harry cannot read and write /var/tmp/fstab
All other users (present and future) can read var/tmp/fstab.
Solution:
cp /etc/fstab /var/tmp/
/var/tmp/fstab view the owner setfacl -m u:natasha:rw- /var/tmp/fstab setfacl -m u:haryy:---
/var/tmp/fstab
Use getfacl /var/tmp/fstab to view permissions
Does this meet the goal?
Correct Answer:A
SELinux must be running in the Enforcing mode.
Solution:
getenforce // Check the current mode of SELinux // SELinux runs in enforcing mode // Check
getenforce 1
getenforce
vim /etc/selinux/config selinux=enforcing // To temporarily enable SELinux
wg
sestatus
Does this meet the goal?
Correct Answer:A
Create a volume group, and set the size is 500M, the size of single PE is 16M. Create logical volume named lv0 in this volume group, set size is 20 PE, make it as ext3 file system, and mounted automatically under data.
Solution:
fdisk /dev/vda
pvcreate /dev/vda3
vgcreate –s 16M vg0 /dev/vda3
lvcreate –n lv0 –l 20 vg0
mkfs.ext3 /dev/mapper/vg0-lv0
mkdir /data
/etc/fstab:
/dev/mapper/vg0-lv0 /data ext3 defaults 0 0
mount –a
mount | grep data
Does this meet the goal?
Correct Answer:A
Please open the ip_forward, and take effect permanently.
Solution:
vim /etc/sysctl.conf net.ipv4.ip_forward = 1
sysctl –w (takes effect immediately)
If no “sysctl.conf” option, use these commands:
sysctl –a |grep net.ipv4
sysctl –P net.ipv4.ip_forward = 1
sysctl -w
Does this meet the goal?
Correct Answer:A