Install DOSBox on CentOS 7

There are so many websites and YouTube videos that indicate and demonstrate that it is possible to install and use DOSBox on CentOS 7.  I tried many different things which all seemed to roadblock at the prerequisite for Ranging from building from source that one specific prerequisite, where the build was apparently successful, the prerequisite still remained.  A build of DOSBox was of no level of success for me.  I decided to download and enable every repository I could find hoping that some combination of them would provided the necessary packages to allow for a successful install of DOSBox on CentOS 7 linux.  That logic was not only sound, but it worked!

The CentOS instance is a minimal install with the following groupinstall.

yum groupinstall "Server with GUI" --exclude=libreoffice\* --exclude=unoconv\*

centos7I'm not gonna bore you with all the repositories I tried, but here is the combination that worked.

yum install -y
yum install -y
yum install -y

centos7reposWhen done, install dosbox.  You will note that three repositories are needed to install dosbox.

yum install -y dosbox

dosboxreposWhile this will work, I wanted to save the RPMs for future reference to avoid having to go through all these motions in the future. To save the files to cache, change the keepcache value from 0 to 1 in /etc/yum.conf. Then run the command above to install dosbox.

[root@localhost dosbox]# cat /etc/yum.conf

To demonstate clean the cache.

[root@localhost 7]#yum clean all
[root@localhost 7]# pwd
[root@localhost 7]# find . -type f -name "*.rpm"

Then install dosbox

yum install -y dosbox

Repeating the step above, check out the RPMs in the yum cache.

[root@localhost 7]# pwd
[root@localhost 7]# find . -type f -name "*.rpm"

Take this a step farther, the rpms could be copied into a directory and tar'ed.  Add a shell script into the mix.

yum install -y dosbox-0.74-13.el7.centos.x86_64.rpm \
libmikmod-3.2.0-21.el7.x86_64.rpm \
libmodplug- \
lzma-sdk457-4.57-8.el7.centos.x86_64.rpm \
physfs-2.0.3-4.el7.centos.x86_64.rpm \
SDL_net-1.2.8-6.el7.centos.x86_64.rpm \

By using makeself, a self-extracting binary installer can be created.  Basically, all the RPMs and the executable (chmod +x) are in a directory. Navigate back one directory and run this command with makeself to generate a binary.  Then make the binary an executable. ./dosbox ./install-dosbox.bin "" ./

To test the script, remove the dosbox install and it's dependencies. For overkill clean the yum cache again.

yum remove -y SDL_sound SDL_net libmikmod lzma-sdk457 physfs libmodplug dosbox
yum clean all


Install dosbox with the newly created binary.  Notice that the repositories have changed to reflect the source of the files as being local.



Once installed, type dosbox to run.



In fairness, this example is using MobaXterm Professional.  So the behavior is expected. An attempt with Putty did not present the expected behavior.