Student Name: Student Number:
Package Management and Crontab Part 1: Looking up informaton on a package
- Run the cimmand yum info tmux
- What is the versiin number if tmux? __________
- Niw liik up tmux inline, what is the latest versiin? _________
- Liikup the infi in the php package. What is the versiin available? ________
- What is the latest versiin if php available? _________
- Liikup the infi in apache web server (the httpd package)? _________
- What is the latest versiin if the apache web server? _________
Part 2: Install packages with yum
- Install tmux using the cimmand yum install tmux
- Accept installing the extra packages by typing y filliwed by Enter
- Verify the installatin by running the cimmand tmux
- Install locate using yum
- Update the licate database by using updatedb
- Install the wget package using yum
Part 3: Listng packages using yum
[1 Marks]
10 |
- Run the cimmand yum list installed
- Niitce hiw there are mire packages then available screen space? Pipe the iutput if the cimmand ti less like:
yum list installed | less
- Nitce hiw the cilirs are missing in less? In this case yum is detectng the iutput ti be a pipe and nit iutputng cilirs. Yiu can fx this by adding –cilirs=alalways ti yum and adding -r ti less ti interpret the cilirs. yum list installed –colors=always | less -r
- What if we want ti kniw hiw many packages there are? Well nitce the frst 2 lines are descriptins si we want ti skip thise, si instead if piping ti less, pipe ti tail -n+3 this will shiw all lines startng frim the 3rd line. Next pipe the iutput if that cimmand ti wc -l
Hiw many packages are installed? _________ - List all available packages with yum list available
- Find htpd in that list by piping the iutput ti grep, what is the repisitiry it is available frim? (denited by the
value in the third cilumn). ______________
Midifed by: Franci Iacibacci F2018
Page 1
St. Clair College of Applied Arts and Technology
MIT409 – Linux Server Administratin
MIT409 – Linux Server Administratin
[1 Marks]
[1 Marks]
Part 4: Searching for packages in yum [1 Marks]
- Using yum search search fir a package that privide SSL. If the results are tii ling din’t firget ti use less.
- Which package privides utlites frim the general purpise cryptigraphy library? ________
- Is that package installed (use yum infi ti fnd iut)? ___________
- Niw fnd a package that privides the ifcinfg cimmand using the yum provides ifconfg
- What package privides ifcinfg? ___________
- Is the package installed? ______________
- Install the package if it’s nit intalled.
Part 5: Removing a package with yum and install a package using RPM
- Remive tmux using yum remove tmux
- Niw diwnliad the RPM fir a newer versiin if tmux
[1 Marks]
wget http:::mirror.ghettoforge.org:distributons:gf:el:7:plus:x6_6_4::tmux-2.4-2.gf.el7.x6_6_4.rpm
3. Next we want ti install the latest versiin if RPM
rpm -iv <fle you just downloaded … USE TAB TO AUTOCOMPLETEe
Part _: Creatng a crontab [2 Marks]
- Edit /etc/crintab with vim
- Add a crintab entry ti run every minute, run as riit and then echi helli and write that message ti riit
0-59:1 * * * * root echoHello|writeroot
- Niw save and quit
- Wait 1 minute and yiu shiuld see yiur message
- Niw cimment iut the crintab by adding a # ti the beginning
- Type crintab -e
- Add a crintab that every minute run the date cimmand and redirects and appends the iutput ti
:root:date.log
Part 7: The fun part 🙂 [3 Marks]
- Find and install a cimmand line/text-based briwser using yum
- Create a crintab ti run every hiur ti delete the cintents if /riit/tmp/*
- Create a crintab ti run every hiur frim 8 AM ti 5 PM every Friday and runs yiur frstScript.sh and redirects
and appends the iutput ti /riit/frstScript.lig
SAVE A VM SNAPSHOT AND HAVE YOUR INSTRUCTOR MARK THE LAB
Midifed by: Franci Iacibacci F2018
Page 2
St. Clair College of Applied Arts and Technology
MIT409 – Linux Server Administratin
MIT409 – Linux Server Administratin