archive-com.com » COM » T » TECHOTOPIA.COM

Total: 1018

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Sharing Files between RHEL 6 and Windows Systems with Samba - Techotopia
    conf file Samba is a highly flexible and configurable system that provides many different options for controlling how resources are shared on Windows networks This flexibility can lead to the sense that Samba is overly complex to work with In reality however many of the configuration options are not needed by the typical installation and the learning curve to set up a basic configuration is actually quite short For the purposes of this chapter we will look at joining an RHEL 6 system to a Windows workgroup and setting up a directory as a shared resource that can be accessed by a specific user The first step therefore is to gain root privileges and to load the etc samba smb conf file into a suitable editor for example su gedit etc samba smb conf Configuring the global Section The smb conf file is divided into sections The first section is the global section where settings can be specified that apply to the entire Samba configuration Whilst these settings are global each option may be overridden within other sections of the configuration file The first task is to define the name of the Windows workgroup on which the RHEL 6 resources are to be shared This is controlled via the workgroup directive of the global section which by default is configured as follows workgroup MYGROUP Begin by changing this to the actual name of the workgroup For example if the workgroup is named WORKGROUP the default for most Windows networks workgroup workgroup Configuring a Shared Resource The next step is to configure a shared resource in other words a resource that will be accessible from other systems on the Windows network In order to achieve this the section is given a name by which it will be referred to when shared For example if we plan to share the tmp directory of our RHEL 6 system we might entitle the section tmp In this section a variety of configuration options are possible For the purposes of this example however we will simply define the directory that is to be shared indicate that the directory is browsable and writable and declare the users that are allowed to access the shared resource in this case a user named demo tmp path tmp writeable yes browseable yes valid users demo Creating a Samba User Any user that requires access to a Samba shared resource must be configured as a Samba User and assigned a password This task is achieved using the smbpasswd command line tool In our example smb conf file we stated the user demo is entitled to access the tmp directory of our RHEL 6 system In order to fulfill this requirement therefore we must add demo as a samba user as follows su smbpasswd a demo New SMB password Retype new SMB password Added user demo Now that we have completed the configuration of a very basic Samba server it is time to test our configuration file and then start the

    Original URL path: http://www.techotopia.com/index.php/Sharing_Files_between_RHEL_6_and_Windows_Systems_with_Samba (2016-02-13)
    Open archived version from archive


  • Configuring an RHEL 6 Based Web Server - Techotopia
    then the next step obviously is to install it This can be performed either from the command line or using the Add Remove Software tool To use this tool open the System Administration desktop menu and select Add Remove Software Enter your root password if prompted to do so Select the Search tab and search for httpd After the search completes the Apache HTTP Server should be listed in the search results Click on the toggle next to the httpd server Finally click on the Apply button to begin the installation To install Apache from the command line start a terminal window Applications System Tools Terminal and run the following commands at the command prompt su yum install httpd Starting the Apache Web Server Once the Apache server is installed the next step is to verify that the server is running and if it is not yet running to start it The status of the server can be verified from the command line or via the GUI Service Configuration tool To check the status of the Apache httpd service from the command line enter the following command in a Terminal window sbin service httpd status If the above command indicates that the httpd service is not running it can be launched from the command line as follows su sbin service httpd start If you would like the Apache httpd service to start automatically when the system boots for example when booting to runlevel 3 this can be achieved by running the following command sbin chkconfig level 3 httpd on For more information on runlevels refer to the chapter entitled Configuring RHEL 6 Runlevels and Services To configure the Apache service using the Service Configuration tool select the System Administration Services menu option and scroll down the list of services until you find httpd Select the item in the list and click on the Start button Testing the Web Server Once the installation is complete the next step is to verify the web server is up and running To do this fire up the web browser by clicking on the web browser icon in the top desktop panel and enter 127 0 0 1 in the address bar 127 0 0 1 is the loop back network address which tells the system to connect to the local machine The browser should load the Red Hat Enterprise Linux Test Page Congratulations you have now installed the web server and served up what will hopefully be the first of many web pages Configuring the Apache Web Server for Your Domain The next step in setting up your web server is to configure it for your domain name This is performed in the etc httpd directory To configure the web server open a terminal window and change directory to etc httpd In this directory you will find a number of sub directories Change directory into the conf sub directory where you will find an httpd conf file which contains the configuration settings for the

    Original URL path: http://www.techotopia.com/index.php/Configuring_an_RHEL_6_Based_Web_Server (2016-02-13)
    Open archived version from archive

  • Configuring an RHEL 6 Postfix Email Server - Techotopia
    Others such as Pine and Basla do not This can be a source of confusion to the Linux beginner SMTP SMTP is an acronym for Simple Mail Transport Protocol This is the protocol used by the email systems to transfer mail messages from one server to another This protocol is essentially the communications language that the MTAs use to talk to each other and transfer messages back and forth Configuring an RHEL Email System Many systems use the Sendmail MTA to transfer email messages and on many Linux distributions this is the default Mail Transfer Agent Sendmail is however a complex system that can be difficult for beginner and experienced user alike to understand and configure It is also falling from favor because it is considered to be slower at processing email messages than many of the more recent MTAs available Many system administrators are now using Postfix or Qmail to handle email Both are faster and easier to configure than Sendmail For the purposes of this chapter therefore we will look at Postfix as an MTA because of its simplicity and popularity If you would prefer to use Sendmail there are many books that specialize in the subject and that will do the subject much more justice than we can in this chapter Postfix Pre Installation Steps The first step before installing Postfix is to make sure that Sendmail is not already running on your system You can check for this using the following command sbin service sendmail status If sendmail is not installed the tool will display a message similar to the following sendmail unrecognized service If sendmail is installed but not running the following output will be displayed sendmail is stopped If sendmail is running you will see the following sendmail pid 2138 is running If sendmail is running on your system it is necessary to stop it before installing and configuring Postfix To stop sendmail run the following command as super user sbin service sendmail stop The next step is to ensure that sendmail does not get restarted automatically when the system is rebooted The first step is to find out which run levels will automatically start sendmail To do this we can use the chkconfig command line tool as follows sbin chkconfig list grep sendmail The above command will typically result in output similar to sendmail 0 off 1 off 2 on 3 on 4 on 5 on 6 off This means that if the system boots into runlevels 2 3 4 or 5 then the sendmail service will automatically start To turn off sendmail we can once again use the chkconfig command as follows sbin chkconfig sendmail off The chkconfig tool defaults to changing the settings for runlevels 2 3 4 and 5 You can configure for specific runlevels using the levels command line option if necessary To verify the settings run chkconfig one more time as follows sbin chkconfig list grep sendmail And check that the output is as follows sendmail 0 off

    Original URL path: http://www.techotopia.com/index.php/Configuring_an_RHEL_6_Postfix_Email_Server (2016-02-13)
    Open archived version from archive

  • Installing KVM Virtualization on RHEL 6 - Techotopia
    full and para virtualization KVM supports only full virtualization As such KVM can only be used on CPUs that support either Intel VT or AMD V extensions If your processor does not have Intel VT or AMD V support you will still be able to install guest operating systems though this will be implemented using the QEMU environment instead of KVM virtualization QEMU uses emulation to run guest operating systems and as such results in slower performance than the hardware assisted full virtualization offered by KVM For a more detailed explanation of virtualization techniques read Virtuatopia com s An Overview of Virtualization Techniques http www virtuatopia com index php An Overview of Virtualization Techniques KVM Hardware Requirements Before proceeding with this chapter we need to take a moment to discuss the hardware requirements for running virtual machines within a KVM environment Firstly KVM virtualization is only available on certain processor types These processors include either Intel VT or AMD V technology To check for Intel VT support run the following command in a terminal window to check for the presence of vmx grep vmx proc cpuinfo flags fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx lm constant tsc pni monitor ds cpl vmx est tm2 cx16 xtpr lahf lm To check for AMD V support run the following command which checks for the presence of svm grep svm proc cpuinfo flags fpu tsc msr pae mce cx8 apic mtrr mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr opt rdtscp lm 3dnowext 3dnow pni cx16 lahf lm cmp legacy svm cr8 legacy Note that while the above commands only report whether the processor supports the respective feature it does not indicate whether the feature is currently enabled in the BIOS In practice virtualization support is typically disabled in the BIOS of most systems It is recommended therefore that you check your BIOS settings to ensure the appropriate virtualization technology is enabled before proceeding with this tutorial Unlike a dual booting environment a virtualized environment involves the running of two or more complete operating systems concurrently on a single computer system This means that the system must have enough physical memory disk space and CPU processing power to comfortably accommodate all these systems in parallel Before beginning the configuration and installation process check on the minimum system requirements for both RHEL 6 and your chosen guest operating systems and verify that your system has sufficient resources to handle the requirements of both systems 32 bit Support for KVM on RHEL 6 Whilst previous versions of RHEL supported KVM on both 32 bit and 64 bit systems as of RHEL 5 4 support for KVM virtualization is only available for 64 bit x86 64 architecture versions of the operating system Preparing RHEL 6 for KVM Virtualization Unlike Xen it is not necessary to run a special version of the kernel in

    Original URL path: http://www.techotopia.com/index.php/Installing_KVM_Virtualization_on_RHEL_6 (2016-02-13)
    Open archived version from archive

  • Creating an RHEL 6 KVM Networked Bridge Interface - Techotopia
    RX bytes 19628565 18 7 MiB TX bytes 687049 670 9 KiB Memory fe3e0000 fe400000 lo Link encap Local Loopback inet addr 127 0 0 1 Mask 255 0 0 0 inet6 addr 1 128 Scope Host UP LOOPBACK RUNNING MTU 16436 Metric 1 RX packets 8 errors 0 dropped 0 overruns 0 frame 0 TX packets 8 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 0 RX bytes 480 480 0 b TX bytes 480 480 0 b virbr0 Link encap Ethernet HWaddr 62 C1 46 30 92 37 inet addr 192 168 122 1 Bcast 192 168 122 255 Mask 255 255 255 0 UP BROADCAST RUNNING MULTICAST MTU 1500 Metric 1 RX packets 0 errors 0 dropped 0 overruns 0 frame 0 TX packets 24 errors 0 dropped 0 overruns 0 carrier 0 collisions 0 txqueuelen 0 RX bytes 0 0 0 b TX bytes 4187 4 0 KiB In the above output the entry for eth0 represents a physical network adaptor on the host computer This is the connection currently used by this host to access the external network The virbr0 entry represents the virtual network to which guest operating systems will connect if configured to do so In order to provide the option for guest operating systems to share the eth0 connection of the host it is necessary to establish a network bridge between eth0 and the virtual machines Begin the bridge creation process by gaining root access and changing directory to the etc sysconfig network scripts directory su cd etc sysconfig network scripts If the interface to be bridged is currently running it should be taken down before proceeding ifdown eth0 The next step is to modify the script file for the physical network device In this example the device is eth0 so we need to edit the ifcfg eth0 file to add a BRIDGE line For the purposes of this example we will name the interface bridge0 DEVICE eth0 BOOTPROTO dhcp HWADDR 00 13 72 0B 14 57 IPV6INIT yes IPV6 AUTOCONF yes NM CONTROLLED yes ONBOOT yes BRIDGE bridge0 The next step is to create a script file for the bridge interface The name of this file must take the form ifcfg bridgename where bridgename matches the name of the bridge defined in the BRIDGE directive outlined above Given this requirement we will name the file ifcfg bridge0 The contents of this file for this example will read as follows DEVICE bridge0 TYPE Bridge BOOTPROTO dhcp ONBOOT yes DELAY 0 Note that the DEVICE line must refer to the bridge name previously specified i e bridge0 in this instance Save the file and then start up both interfaces ifup eth1 ifup bridge0 Using the ifconfig command the new bridge interface should now be visible bridge0 Link encap Ethernet HWaddr 00 13 72 0B 14 57 inet addr 192 168 2 18 Bcast 255 255 255 255 Mask 255 255 255 0 inet6 addr fe80 213 72ff fe0b 1457 64

    Original URL path: http://www.techotopia.com/index.php/Creating_an_RHEL_6_KVM_Networked_Bridge_Interface (2016-02-13)
    Open archived version from archive

  • Creating an RHEL 6 KVM Virtual Machine - Techotopia
    toolbar or right click on the hypervisor entry and select New from the resulting menu to display the first screen of the New VM wizard In the Name field enter a suitably descriptive name for the virtual system On this screen also select the location of the media from which the guest operating system will be installed This can either be a CD or DVD drive an ISO image file accessible to the local host a network install using HTTP FTP NFS or PXE or the disk image from an existing virtual machine google RHEL6BOX google Note that beneath the Name field the dialog displays the connection type QEMU KVM in this case If the connection on your system is displayed as QEMU your system either does not have Intel VT or AMD V support or these features have been disabled in the BIOS That being the case your guest operating system will run inside QEMU based emulation and will not use the faster KVM hardware based virtualization Configuring the KVM Virtual System Clicking Forward will display a screen seeking additional information about the installation process The screen displayed and information required will depend on selections made in the preceding screen For example if a CD DVD or ISO was selected this screen will ask for the specific location of the ISO file or physical device This screen also asks that you specify the type and version of the guest operating system to be installed for example Windows 7 or Ubuntu Linux Once these settings are complete click Forward to configure CPU and memory settings The optimal settings will depend on the number of CPUs and amount of physical memory present in the host and the requirements of other applications and virtual machines that will run in parallel with the new virtual machine The last item to configure before creating the virtual machine is the storage space for the guest operating system and corresponding user data This takes the form of a virtual disk image or pre existing storage A virtual disk drive is essentially an image file hosted on the file system of the host computer which is seen by the virtual machine as a physical disk drive Options are available to create an image disk of a specified size select a pre existing volume or to create a storage volume of a specified format raw vmdk iso etc Unless you have a specific need to use a particular format for example you might need to use vmdk to migrate to a VMware based virtualization environment at a later date or need to use a dedicated disk or partition it is generally safe to simply specify a size on this screen The option is also available to pre allocate the space now If you choose not to pre allocate the space space will be allocated up to the specified maximum only as it is needed by the guest operating system This has the advantage that space on the host

    Original URL path: http://www.techotopia.com/index.php/Creating_an_RHEL_6_KVM_Virtual_Machine (2016-02-13)
    Open archived version from archive

  • Creating RHEL 6 Hosted KVM Virtual Machines with virt-install and virsh - Techotopia
    install from location disk DISKOPTS Specifies media to use as storage for the guest with various options disk opt1 val1 opt2 val2 To specify media one of the following options is required path A path to some storage media to use existing or not Existing media can be a file or block device If installing on a remote host the existing media must be shared as a libvirt storage volume Specifying a non existent path implies attempting to create the new storage and will require specifyng a size value If the base directory of the path is a libvirt storage pool on the host the new storage will be created as a libvirt storage volume For remote hosts the base directory is required to be a storage pool if using this method pool An existing libvirt storage pool name to create new storage on Requires specifying a size value vol An existing libvirt storage volume to use This is specified as poolname volname device Disk device type Value can be cdrom disk or floppy Default is disk If a cdrom is specified and no install method is chosen the cdrom is used as the install media bus Disk bus type Value can be ide scsi usb virtio or xen The default is hypervisor dependent since not all hypervisors support all bus types perms Disk permissions Value can be rw Read Write ro Readonly or sh Shared Read Write Default is rw size size in GB to use if creating new storage sparse whether to skip fully allocating newly created storage Value is true or false Default is true do not fully allocate The initial time taken to fully allocate the guest virtual disk spare false will be usually by balanced by faster install times inside the guest Thus use of this option is recommended to ensure consistently high performance and to avoid I O errors in the guest should the host filesystem fill up cache The cache mode to be used The host pagecache provides cache memory The cache value can be none writethrough or writeback writethrough provides read caching writeback provides read and write caching See the examples section for some uses This option deprecates file file size and nonsparse f DISKFILE file DISKFILE Path to the file disk partition or logical volume to use as the backing store for the guest s virtual disk This option is deprecated in favor of disk s DISKSIZE file size DISKSIZE Size of the file to create for the guest virtual disk This is deprecated in favor of disk nonsparse Fully allocate the storage when creating This is deprecated in favort of disk nodisks Request a virtual machine without any local disk storage typically used for running Live CD images or installing to network storage iSCSI or NFS root w NETWORK network NETWORK Connect the guest to the host network The value for NETWORK can take one of 3 formats bridge BRIDGE Connect to a bridge device in the host called BRIDGE Use this option if the host has static networking config the guest requires full outbound and inbound connectivity to from the LAN Also use this if live migration will be used with this guest network NAME Connect to a virtual network in the host called NAME Virtual networks can be listed created deleted using the virsh command line tool In an unmodified install of libvirt there is usually a virtual network with a name of default Use a virtual network if the host has dynamic networking eg NetworkManager or using wireless The guest will be NATed to the LAN by whichever connection is active user Connect to the LAN using SLIRP Only use this if running a QEMU guest as an unprivileged user This provides a very limited form of NAT If this option is omitted a single NIC will be created in the guest If there is a bridge device in the host with a physical interface enslaved that will be used for connectivity Failing that the virtual network called default will be used This option can be specified multiple times to setup more than one NIC b BRIDGE bridge BRIDGE Bridge device to connect the guest NIC to This parameter is deprecated in favour of the network parameter m MAC mac MAC Fixed MAC address for the guest If this parameter is omitted or the value RANDOM is specified a suitable address will be randomly generated For Xen virtual machines it is required that the first 3 pairs in the MAC address be the sequence 00 16 3e while for QEMU or KVM virtual machines it must be 54 52 00 nonetworks Request a virtual machine without any network interfaces vnc Setup a virtual console in the guest and export it as a VNC server in the host Unless the vncport parameter is also provided the VNC server will run on the first free port number at 5900 or above The actual VNC display allocated can be obtained using the vncdisplay command to virsh or virt viewer 1 can be used which handles this detail for the use vncport VNCPORT Request a permanent statically assigned port number for the guest VNC console Use of this option is discouraged as other guests may automatically choose to run on this port causing a clash sdl Setup a virtual console in the guest and display an SDL window in the host to render the output If the SDL window is closed the guest may be unconditionally terminated nographics No graphical console will be allocated for the guest Fully virtualized guests Xen FV or QEmu KVM will need to have a text console configured on the first serial port in the guest this can be done via the extra args option Xen PV will set this up automatically The command virsh console NAME can be used to connect to the serial device noautoconsole Don t automatically try to connect to the guest console The default behaviour is to launch a VNC client

    Original URL path: http://www.techotopia.com/index.php/Creating_RHEL_6_Hosted_KVM_Virtual_Machines_with_virt-install_and_virsh (2016-02-13)
    Open archived version from archive

  • Configuring a New RHEL 6 KVM Virtual Network - Techotopia
    KVM virtual network is to use the virt manager tool This tool may be launched by selecting the Applications System Tools Virtual Machine Manager desktop menu item Once loaded select the Edit Host Details menu option and on the resulting dialog select the Virtual Networks tab as illustrated in the following figure google RHEL6BOX google As we can see from the information provided by virt manager the only virtual network currently available is named default It uses the virtual device named virbr0 has an IP address space defined by 192 168 122 0 with a subnet mask of 24 The DHCP server is configured to allocated IP addresses between 192 168 122 2 and 192 168 122 254 Forwarding to the external network is handled using NAT The virtual network is currently active and is configured to start on system boot The buttons beneath the list of networks can be used to start stop or delete the currently selected network In addition the button displaying the sign can be used to create a new virtual network a topic that will be covered in the next section of this chapter Creating a New KVM Virtual Network on an RHEL 6 Host To create a new KVM virtual network on an RHEL host click on the button located beneath the list of virtual networks on the Virtual Networks details screen outlined in the previous section The Create a new virtual network wizard will appear After reading the introductory screen click on the Forward button and enter a name for the new virtual network For the purposes of this example we will use the name virtualnet1 Having defined the name click the Forward button to proceed to the address space configuration screen Either select the default setting or specify an alternative if a specific address space is required before proceeding to the next screen where the DHCP address range must be defined The wizard will pre populate start and end address for the DHCP server based on the IP address space specified on the preceding screen Unless a guest OS is configured with a static IP address it will be assigned an IP address from the range specified on this screen when it is started up On the next screen the network may be configured to be an isolated network or for data to be forwarded to a physical network In the case of an isolated network guests connected to this virtual network can see each other but have absolutely no connectivity to the external physical network If the Forwarding to a physical network option is selected a specific physical network device on the host system may be selected or the system can be left to select any available networking device Lastly the forwarding mode may be configured to use NAT or Routed forwarding After the network connectivity options have been defined the final screen displays a summary of the selections made on the preceding screens Review the information provided and assuming the

    Original URL path: http://www.techotopia.com/index.php/Configuring_a_New_RHEL_6_KVM_Virtual_Network (2016-02-13)
    Open archived version from archive



  •