Since nobody is being serious ITT and I have been curious about this before, here's a serious answer.
You will need 3 things:
>A host server
>An imageboard
>A MySQL, NoSQL, or MongoDB (don't use this) server
First things first, you are gonna need somewhere to experiment in, to see what works and what doesn't. To do that you're gonna need to start up a virtual machine, and use a good, stable Linux distribution to run it on. I recommend Debian stable, but anything should work. Just for god's sake don't use Ubuntu. Once you have that installed and running, open a terminal and install LAMP. Here's a step by step tutorial on how to do it from digital ocean. I'm sure someone on /tech/ will find some reason why this is literally terrible, but don't worry about it.
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-debian
Okay, so now let's move on to the fun part, finding an imageboard that you would like to base it off of. Examples include Tinyboard (old, don't use this), ViChan (less old, still don't use this), infinity (old version of 8chan), OpenIB (current version of 8chan), and Lynxchan, although other, less popular, boards do exist, these are the most common and well documented.
When I set my board up I used ViChan, but any of these should work in theory.
I'll assume that you are using OpenIB at this point, most of it should be similar if you want to use another type of imageboard. If so, you are going to need to open this link to see the information regarding installation and the latest version. https://github.com/OpenIB/OpenIB
Download it into your /var/www/html/ directory, and then follow the Installation instructions found in the README.md
At this point in theory everything should be up and running! You can see it running by opening a web browser in your virtual machine and typing localhost in the URL bar.
In reality, you will almost certainly hit a snag along the way and need help. If this is the case, the only place I have found that has any help is lainchan.org's tech board. Make sure to use the catalog and search for a thread about imageboards as there should probably be one somewhere on there. Other then that, if you post ITT asking for help I can help you as much as I can.