{"id":7,"date":"2012-05-24T16:57:01","date_gmt":"2012-05-24T16:57:01","guid":{"rendered":"http:\/\/blog.law.gmu.edu\/webservices\/?p=7"},"modified":"2012-05-24T16:57:01","modified_gmt":"2012-05-24T16:57:01","slug":"red-hat-training","status":"publish","type":"post","link":"https:\/\/sls.gmu.edu\/web\/2012\/05\/24\/red-hat-training\/","title":{"rendered":"Red Hat Training"},"content":{"rendered":"<p>Notes from <a href=\"http:\/\/www.redhat.com\/training\/courses\/rh124\/\">Red Hat System Administration I (RH124)<\/a> from April 2-6, 2012<\/p>\n<h2>Day 1<\/h2>\n<p><strong>Covered:<\/strong><br \/>\nInstalling Red Hat 6, which took almost half a day.<br \/>\nUsing GNOME graphical desktop.<br \/>\nEditing files with gedit.<br \/>\nManaging files with Nautilus.<br \/>\nGetting help with manuals (F1 for help)<br \/>\nManaging system clock.<br \/>\nConfiguring printers.<\/p>\n<p><strong>Command Lines:<\/strong><br \/>\nuname -r (find out what version of Red Hat)<br \/>\n$ su &#8211; (log in as substitute user)<br \/>\n# useradd visitor (add username &#8220;visitor&#8221;)<br \/>\n# passwd visitor (add password to &#8220;visitor&#8221;)<br \/>\n# ip addr show eth0 (show ip address)<br \/>\n# ls \/usr\/share\/doc (documentations)<br \/>\n# man man (access manual)<br \/>\n# man -k print (-k is for keyword)<\/p>\n<h2>Day 2<\/h2>\n<p><strong>Introduced to Bash <\/strong><\/p>\n<p>Commands entered at the shell prompt have three basic parts:<br \/>\n# chmod +x gedit demo.txt<br \/>\n[command] [options] [arguments]<\/p>\n<p><strong>Command lines:<\/strong><br \/>\n# pwd (path you&#8217;re currently in)<br \/>\n# history<br \/>\nUsing the tab key (&#8220;tab&#8221; &#8220;tab&#8221;) for completion<br \/>\n# scp filename user@ip-address:\/ (copy file from local folder to virtual server)<\/p>\n<p>Introduced to managing physical storage using the graphical interface<br \/>\nLearned to manage logical volumes<br \/>\nIntroduced to monitoring system resources<\/p>\n<h2>Day 3<\/h2>\n<p><strong>Yum<\/strong><br \/>\n# yum list (get the list of .rpm, which stands for RPM Package Manager)<br \/>\n# yum search kernel (kernel is the name of the package)<br \/>\n# yum install kernel<br \/>\n# yum update kernel<br \/>\n# yum remove kernel<\/p>\n<p><strong>Network<\/strong><br \/>\n# ip addr show eth0 (eth0 is the name of the network)<br \/>\n# more \/etc\/sysconfig\/network-scripts\/ifcfg-eth0<br \/>\n# service network restart<br \/>\n# system-config-network<br \/>\n# ip route<br \/>\n# host visualgui.com<br \/>\n# dig visualgui.com<\/p>\n<p><strong>Users and Groups<\/strong><br \/>\n# useradd donny<br \/>\n# passwd donny<br \/>\n# vipw (let&#8217;s one user edit at the same time)<\/p>\n<p><strong>Manage Files<\/strong><br \/>\n# echo $PATH<br \/>\n# pwd (current path)<br \/>\n# ls \/home\/{dir1,dir2} (show more two directories)<br \/>\n# ln file1 file2 (link file 1 to file 2)<br \/>\n# ln -s file1 file2 (symbolic link)<br \/>\n# su &#8211; username (change user)<br \/>\n# cp -av \/dir\/to\/copy \/dir\/destination<\/p>\n<p><strong>Permission<\/strong><br \/>\nr (view content)<br \/>\nw (change the content)<br \/>\nx (requires r to execute the content)<\/p>\n<p>rw-rw-rw-<br \/>\nrw-r&#8211;r&#8211;<br \/>\numask 002<\/p>\n<p>u+s (suid=4: file executes as the user that owns the file, not the user that ran the file<br \/>\ng+s (sgid=2: file executes as the group that owns the file<br \/>\no+t (sticky=1: no effect)<\/p>\n<h2>Day 4<\/h2>\n<p>Administer remote system including remote shell access, remote file transfer, using SSH keys<\/p>\n<p>Managing physical storage including filesystem, partition and swap space<\/p>\n<p>Install Linux with Anaconda.<\/p>\n<p><strong>SSH<\/strong><br \/>\n# scp original-file new-file<br \/>\n# rsync -a \/home\/student demo:\/tmp<br \/>\n-a=all<\/p>\n<p><strong>Archive<\/strong><br \/>\n# tar -cvf target\/to\/archive source\/to\/archive<br \/>\n-c=create<br \/>\n-x=extract<br \/>\n-t=test (tell)<br \/>\n-v=verbose<br \/>\n-f=filename<\/p>\n<p><strong>Using SSH<\/strong><br \/>\n# ssh-keygen<br \/>\n# ssh-copy-id example.com<\/p>\n<p># service crond status<br \/>\n# chkconfig &#8211;list crond<\/p>\n<p># vi \/etc\/ssh\/sshd_config<br \/>\nPermissionRootLogin no<br \/>\nPassordAuthentication no<br \/>\n# service sshd restart<\/p>\n<h2>Day 5<\/h2>\n<p><strong>FTP<\/strong><br \/>\n# service vsftpd status<br \/>\n# service vsftpd start<br \/>\n# chkconfig vsftpd on<br \/>\n# chkconfig vsftpd &#8211;list<\/p>\n<p><strong>httpd<\/strong><br \/>\n# ll \/var\/www\/<br \/>\n# ln -s \/var\/ftp\/pub \/var\/www\/html\/pub<br \/>\n# cat &gt; \/var\/ftp\/pub\/index.html<br \/>\nHello World!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Notes from Red Hat System Administration I (RH124) from April 2-6, 2012 Day 1 Covered: Installing Red Hat 6, which took almost half a day. Using GNOME graphical desktop. Editing files with gedit. Managing files with Nautilus. Getting help with manuals (F1 for help) Managing system clock. Configuring printers. Command Lines: uname -r (find out &hellip; <a href=\"https:\/\/sls.gmu.edu\/web\/2012\/05\/24\/red-hat-training\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Red Hat Training&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[5],"tags":[20,26],"class_list":["post-7","post","type-post","status-publish","format-standard","hentry","category-command-lines","tag-linux","tag-red-hat"],"_links":{"self":[{"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/posts\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/comments?post=7"}],"version-history":[{"count":0,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/posts\/7\/revisions"}],"wp:attachment":[{"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/media?parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/categories?post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sls.gmu.edu\/web\/wp-json\/wp\/v2\/tags?post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}