RHCE(RHEL7) Lab Step 4
November 10, 2017 | Author: dunderhead | Category: N/A
Short Description
Download RHCE(RHEL7) Lab Step 4...
Description
2/28/2015
RHEL7: Set up a local repository for a lab. CertDepot
CertDepot Everything you need to pass your RHCSA, RHCE, LFCS, LFCE & VCP exams.
Go
search here … Home
About
RHEL6
RHEL7
VCP5DCV
RHEL7: Set up a local repository for a lab. Last updated on November 30, 2014 (1,489 views) — No Comments ↓
Upcoming Events MAR
6 Fri
Share this link
To be able to quickly deploy new VMs, you need a local repository.
MAR
13 Fri
Install the Apache package: # yum group install ‐y "Basic Web Server" Create the directories for the CentOS distribution and the updates:
6:00 pm View Details vanVugt: Free online class on SELinux issues 6:00 pm View Details vanVugt: Free online class on NFS Kerberos
MAR
6:00 pm 20 View Details Fri vanVugt: # cd /var/www/html Free # mkdir ‐p conf repo/CentOS/7 online class on # cd repo/CentOS/7 ACLs # mkdir ‐p centosplus/x86_64 extras/x86_64 os/x86_64 updates/x86_64
In the software requirements, it was specified to download the DVD version or the Everything version of the CentOS 7 http://www.certdepot.net/rhel7setlocalrepositorylab/
1/7
2/28/2015
RHEL7: Set up a local repository for a lab. CertDepot
distribution. It is now time to use it. Mount the previously downloaded iso and copy it into the right place:
APR
3 Fri
6:00 pm View Details vanVugt: Free online class on Apache
# mount ‐o loop CentOS‐7.0‐1406‐x86_64‐DVD.iso /mnt # cd /mnt # tar cvf ‐ . | (cd /var/www/html/repo/CentOS/7/os/x86_64; tar xvf ‐) APR 6:00 pm View # cd /; umount /mnt Details
10 Fri
In order to prepare the centosplus, extras and updates repositories, install the createrepo package:
APR
15 # yum install createrepo Prepare the centosplus, extras and updates repositories:
Wed
vanVugt: Free online class on troubleshooting 6:00 pm View Details vanVugt: Free online class on iSCSI
# cd /var/www/html/repo/CentOS/7/centosplus/x86_64; createrepo . APR 6:00 pm # cd ../../extras/x86_64; createrepo . 24 View # cd ../../updates/x86_64; createrepo . Details Fri vanVugt: Free online Go into the directory where the repository configuration is: class on remote logins # cd /etc/yum.repos.d Create the local.repo file and paste the following lines:
RHCSA6: Task of the day
[os] name=master ‐ Base baseurl=http://192.168.1.5/repo/CentOS/$releasever/os/$basearch/ gpgcheck=1 Allowed time: 10 gpgkey=file:///etc/pki/rpm‐gpg/RPM‐GPG‐KEY‐CentOS‐7 minutes. Set up a default [updates] configuration HTTP name=master ‐ Updates server with SELinux in baseurl=http://192.168.1.5/repo/CentOS/$releasever/updates/$basearch/ Enforcing mode and gpgcheck=1 active iptables. gpgkey=file:///etc/pki/rpm‐gpg/RPM‐GPG‐KEY‐CentOS‐7 http://www.certdepot.net/rhel7setlocalrepositorylab/
2/7
2/28/2015
RHEL7: Set up a local repository for a lab. CertDepot
[extras] name=master ‐ Extras baseurl=http://192.168.1.5/repo/CentOS/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=file:///etc/pki/rpm‐gpg/RPM‐GPG‐KEY‐CentOS‐7 Allowed time: 15 minutes. [centosplus] Set up a httpd virtual name=master ‐ CentosPlus server called "dummy" baseurl=http://192.168.1.5/repo/CentOS/$releasever/centosplus/$basearch/ with DocumentRoot gpgcheck=1 assigned to /opt. gpgkey=file:///etc/pki/rpm‐gpg/RPM‐GPG‐KEY‐CentOS‐7
RHCE6: Task of the day
Note: A yum update command will update the system with what the local Apache server’s got. Copy the local.repo file into the /var/www/html/conf directory to make it available to the new VMs: # cp local.repo /var/www/html/conf Assign the SELinux attributes to the files: # restorecon ‐R /var/www/html
Twitter Tweets
Follow
Jastis4Ever @Jastis4Ever
6h
How to Configure tigervnc server on Centos 7: How to Configure tigervnc server on Centos 7 bit.ly/1BLEAfI Retweeted by CertDepot Expand
Tweet to @CertDepot
Activate the Apache server at boot and start it:
# systemctl enable httpd && systemctl start httpd
Add the Apache service to the firewall configuration:
# firewall‐cmd ‐‐permanent ‐‐add‐service=http success Reload the firewall configuration: # firewall‐cmd ‐‐reload http://www.certdepot.net/rhel7setlocalrepositorylab/
Recently Updated Pages RHEL7 Free available resources RHEL7: Use yum transaction history. RHEL7: Install 3/7
2/28/2015
RHEL7: Set up a local repository for a lab. CertDepot
success Clean up the yum configuration:
# yum clean all Check the yum configuration:
# yum repolist all Loaded plugins: fastestmirror, langpacks
Red Hat Enterprise Linux systems as virtual guests. RHEL7 RHCSA Exam objectives RHEL7: Update the kernel package appropriately to ensure a
bootable system. centosplus | 2.9 kB 00:00 RHEL7: Locate, extras | 2.9 kB 00:00 read, and use os | 3.6 kB 00:00 system updates | 2.9 kB 00:00 documentation (1/2): os/7/x86_64/group_gz | 157 kB 00:00 including man, (2/2): os/7/x86_64/primary_db | 4.9 MB 00:00 info, and files in Loading mirror speeds from cached hostfile /usr/share/doc. repo id repo name status RHEL7: How to centosplus/7/x86_64 master ‐ CentosPlus enabled: 0 deal with HTTPD extras/7/x86_64 master ‐ Extras enabled: 0 SELinux policy. os/7/x86_64 master ‐ Base enabled: 8,465 SELINUX: Use updates/7/x86_64 master ‐ Updates enabled: 0 boolean settings repolist: 8,465 to modify system SELinux settings. SELINUX: Finally, you need an extra step to regularly update your lab local repository. Create a Bash script called /root/rsync.sh and paste the following lines (where mirror.ovh.net/ftp.centos.org/7/ is the url of a close CentOS repository): #!/bin/bash
Diagnose and address routine SELinux policy violations. RHEL7: How to install a Nginx & PHP service.
/usr/bin/rsync ‐av ‐‐delete ‐‐delete‐excluded ‐‐exclude "local" ‐‐exclude "isos" ‐‐exclu
Give the execution permissions: # chmod u+x /root/rsync.sh
Recent Comments mfsid on RHEL6
Put this script into the root crontab (# crontab e): http://www.certdepot.net/rhel7setlocalrepositorylab/
LFCS Exam 4/7
2/28/2015
RHEL7: Set up a local repository for a lab. CertDepot
00 02 * * * /root/rsync.sh Note: The first synchronization will last a while but, after, it will be quick. After synchronization, you will get this kind of result: # yum repolist all Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile
objectives CertDepot on Final call for RHCSA 6 & RHCE 6 exams. konrad on Final call for RHCSA 6 & RHCE 6 exams. CertDepot on
Website news. CertDepot on repo id repo name status RHEL7 RHCSA centosplus/7/x86_64 master ‐ CentosPlus enabled: 70 Exam objectives extras/7/x86_64 master ‐ Extras enabled: 44 os/7/x86_64 master ‐ Base enabled: 8,465 updates/7/x86_64 master ‐ Updates enabled: 866 repolist: 9,445
Leave a Reply You must be logged in to post a comment.
Poll for favorite book What is your favorite book to prepare RHCSA & RHCE exams? Damian Tommasino’s book Michael Jang’s book Asghar Ghori’s book Others None Vote View Results
http://www.certdepot.net/rhel7setlocalrepositorylab/
5/7
View more...
Comments