From a previous post we talked about installing a VM and the basic configurations. From this post I’m going to show you how to create a local repository on a VM and how to connect to that local repo from another VM. This is known as a http repo.
- First on one of the VM’s create a new directory.
- Then mount the RHEL 6.7 ISO file to the directory.
mount -o loop /dev/cdrom /localrepository
- Now we should create a .repo file at /etc/yum.repos.d/
- Now clean all. Then update and check the repolist.
- To check your local repo install httpd using yum.
yum install httpd
- Now you can create a symbolic link to the local repo inside /var/www/html/
ln -s /localrepository /var/www/html/
- Now try to access the symlink from your local machine’s browser. httpd service should be running and the iptables should be stopped as well.
- Next go to the next VM. Here we are going to create a http repo.
- Inside /etc/yum.repos.d/ directory create a .repo file with following details.
- Again clean all, update and check the repo list.
- Now your http repo is running. So you can use yum commands here as well.
- To check that let’s install dos2unix on 2nd VM.
yum install dos2unix
WHAT IS SWAPPINESS?
The swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap disk. Because disks are much slower than RAM, this can lead to slower response times for system and applications if processes are too aggressively moved out of memory.
- Now let’s configure the swappiness.
- Go to /etc/sysctl.conf and do the following change. It should be between 0 and 100.
- Next restart to take the change in to effect.
OPEN FILE COUNT AND NUMBER OF PROCESS LIMITS.
Also we can configure the open file count and the process limits on a VM as well.
- Go to /etc/security/limits.conf and do the following changes.
- Also /etc/security/limits.d/90-nproc.conf you need to change as well.
- Then using following commands you can check the configurations.
ADD A DNS SERVER
Now let’s check how to add a DNS server to your VM and how to use nslookup check.
- Go to /etc/resolv.conf and do the following changes.
- Now using nslookup we can check the DNS resolving as follows.
Hope now you have a clear idea on repos, swappiness, open file configurations and DNS configurations. See you soon with another important topic. Thank You!