RHCE Test Exam Study Questions, All Solved 100%
Correct |Verified Answers
How would you check default zone in firewall? - ✔✔firewall-cmd --get-default-zone
firewall-cmd --get-active-zones
What command would configure a firewall for port FWD'ing to allow TCP/443 to
TCP/22? - ✔✔firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source
address="10.0.0.2/24" forward-port port="443" protocol="tcp" to-port="22"
firewall-cmd --reload
test from client: ssh -p 443 server1
How can you make a random password? - ✔✔pwmake
What yum command would allow you to check on the group install of a web server? -
✔✔yum group info "Basic Web Server"
How would you change default port of 3306 for MariaDB to 3307? - ✔✔vi
/etc/my.cnf <-- change port 3306 to 3307
firewall-cmd --permanent --add-port=3307/tcp
firewall-cmd --reload
semanage port -a -t mysqld_port_t -p tcp 3307
semanage port -l | grep mysqld
systemctl restart mariadb
How do you create a database? - ✔✔CREATE DATABASE db_name;
Correct |Verified Answers
How would you check default zone in firewall? - ✔✔firewall-cmd --get-default-zone
firewall-cmd --get-active-zones
What command would configure a firewall for port FWD'ing to allow TCP/443 to
TCP/22? - ✔✔firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source
address="10.0.0.2/24" forward-port port="443" protocol="tcp" to-port="22"
firewall-cmd --reload
test from client: ssh -p 443 server1
How can you make a random password? - ✔✔pwmake
What yum command would allow you to check on the group install of a web server? -
✔✔yum group info "Basic Web Server"
How would you change default port of 3306 for MariaDB to 3307? - ✔✔vi
/etc/my.cnf <-- change port 3306 to 3307
firewall-cmd --permanent --add-port=3307/tcp
firewall-cmd --reload
semanage port -a -t mysqld_port_t -p tcp 3307
semanage port -l | grep mysqld
systemctl restart mariadb
How do you create a database? - ✔✔CREATE DATABASE db_name;