Monthly Archives: December 2017

Linux_scripts splitfile

splitfile

Posted in Uncategorized | Leave a comment

TIME_ex

TIME_ex

Posted in Uncategorized | Leave a comment

firewalld_ex_def

firewalld_ex

Posted in Uncategorized | Leave a comment

def_exam_prep

def_exam_prep

Posted in Uncategorized | Leave a comment

linux del and undel exercise

del script #!/usr/bin/bash TRASH=/trash DB=/trash/db touch /trash/db mkdir ${TRASH} 2> /dev/null if (($# == 0)) then echo “usage: del ” fi FILE=`basename $1` DIR=`dirname $1` DIR=`echo $DIR|sed ‘s/\//_/g’` SUFFIX=`date +%Y_%m_%d_%H_%M_%S` FILE=${FILE}_${SUFFIX}_$DIR ID=`wc -l ${DB}|awk ‘{print $1}’` echo $ID ((ID+=1)) echo … Continue reading

Posted in Uncategorized | Leave a comment

NFS_autofs_ex

NFS_autofs

Posted in Uncategorized | Leave a comment

linux LVM_ex

LVM_ex

Posted in Uncategorized | Leave a comment

NFS_ex

NFS client and server

Posted in Uncategorized | Leave a comment

Linux exercises

NFS client and server LVM ip binding systemd SElinux nfs autofs working in the shell firewalld date and ntp scripts splitfile Cron

Posted in Uncategorized | Leave a comment

CERT_GUIDE_EX2

CERT_GUIDE_EX2_PDF

Posted in Uncategorized | Leave a comment

linux binding_ex

exmil

Posted in Uncategorized | Leave a comment

linux exercises cert-guide

CERT_GUIDE_EX_PDF

Posted in Uncategorized | Leave a comment

linux systemd_ex

create a service file: cp /lib/systemd/system/crond.service /lib/systemd/system/sleep.service vi /lib/systemd/system/sleep.service create a script to be executed vi /usr/sbin/sleep.sh #!/usr/bin/bash sleep 1000 make the script executable chmod +x /usr/sbin/sleep.sh enable the service systemctl enable sleep.service start the service systemctl start sleep.service check … Continue reading

Posted in Uncategorized | Leave a comment

linux apache virtual hosts example

Create the directory structure mkdir -p /var/www/html/www.vhost1.com mkdir -p /var/www/html/www.vhost2.com Create test web pages for each virtual host echo “vhost1” > /var/www/html/www.vhost1.com/index.html echo “vhost1” > /var/www/html/www.vhost1.com/index.html echo “vhost2” > /var/www/html/www.vhost2.com/index.html Set up ownership and permissions chown -R apache:apache /var/www/html/www.vhost1.com chown … Continue reading

Posted in Uncategorized | Leave a comment