Month: March 2012

How to mount a Windows share from Linux

To access a Microsoft Windows share from a CentOS Linux server there are a few commands that worked for this configuration: Microsoft Windows Server 2003 and CentOS 5.8. This is a quick and dirty guide assumes that a Windows share already exists and uses root. In a production environment, an alternate user would be more appropriate. From the Linux server….

Read More »

Use forefiles.exe and 7zip to archive files older than X number of days

On a Microsoft Windows server, there is a folder that contains 1000s of logfiles. Each logfile varies by name and size. I wanted a script that would compress all logfiles into a single zip file that were older than seven days. After the compression is completed and the zip file is created, all logs older than seven days will be…

Read More »

Install Java JDK on CentOS without prompts using an automated script!

If you have ever installed Java Development Kit (“JDK”) on a Red Hat Enterprise Linux (“RHEL”) 5.x or CentOS 5.x operating system (“OS”), then you are aware of how manual the installation can be. Prompt after prompt to install. After a lot of research and testing, here is a completely automated script to install JDK on a CentOS or RHEL…

Read More »

Map a drive or access a CentOS Samba Share from Windows

The goal is to create a network share on a Linux server using Samba that will be available to a Windows workstation with the ability to map a drive to that Linux share. There are many, many articles with a procedure, most are dated and incomplete, however, here is a procedure that worked for this test using CentOS 5.7 and…

Read More »