In radiation therapy, Monte Carlo method was a standard procedure for absorbed dose calculations; yet it was often frustrating due to long computation requirements and complex programming. Monte Carlo method was soon revitalized since the introduction of Geant4 framework purely written in C++ object-oriented language. This study utilized opensource Geant4 codes for modeling and simulation purposes. These codes were executed to simulate the performance of an Elekta Compact linear accelerator based on available manufacturer’s specifications. A 6-MV photon beam spectrum was modeled by transporting 2 billion 6-MeV primary electrons to hit a tungsten target from a 0.5 mm gun filament radius with spatial energy of 0.127 MeV and angular distribution of ±30o. Depth-doses were computed at 1.04 to 30 cm along the central axis of a voxelized water phantom. Validity of simulated data was verified by comparison with experimental measurement. There was close agreement between simulated and measured beam data. Normalization errors were equal to 4.6% for 10 x 10 cm2 ; and 3.9% for 15 x 15 cm2 field sizes. Computing efficiency has improved when using condensed-history technique. Therefore, the Geant4 framework can create model and simulate complex geometries of a linear accelerator facility with improved reliability, accuracy, and efficiency.