SETTING UP POMF FOR RETARDS

You're probably reading this because you're too dense to google "lamp stack setup" and read the Readme.md in the git repo. The readme sucks ass though, so if that's the reason i don't *really* blame you. For the sake of simplicity I'm going to be using Apache and Ubuntu 16.04. If you want an Nginx guide, go fuck yourself. Things in code text with gray backgrounds are code you're supposed to enter in your command line.

PREREQUISITES

A LAMP stack (Linux, Apache, MySQL, and PHP)

Node.js/NPM

GETTING THE PREREQUISITES

LAMP Stack

  1. Get a VPS/machine with Ubuntu 16.04 server version. I don't care what distro you use, but for the sake of this, I'm using Ubuntu.
  2. Log into your server you stupid sack of shit.
  3. apt-get update Make sure you're up to date.
  4. apt-get install apache2 holy shit you've got a web server now!
  5. apt-get install mysql-server Time to get MySQL. Ignore people who say "pomf should be database-less" or "SQLite pls".
  6. Follow the instructions on the fucking screen for setting up MySQL.
  7. mysql_secure_installation SECURE YOUR DB. or something. basically just say n to the first two, and y to the rest.
  8. apt-get install php libapache2-mod-php php-mcrypt php-mysql Time to get PHP.
  9. service apache2 restart for good measure.

Congratulations! Your LAMP stack is now set up. All files that will be served to the web can be found in /var/www/html/.

Node.js/NPM

  1. apt-get install nodejs nodejs-legacy npm Congratulations. You now have a fuckton of space taken up by this for "compressing" pomf, and saving about 1.5~ KB.
  2. Ask yourself, "is it really worth it"

GETTING POMF'D

Make sure you have git. Ubuntu comes with it. I don't know if your meme distro does.

  1. cd /var/www/html Navigating to your shitty web folder
  2. rm index.html get apache's shitty index out of here
  3. git clone https://github.com/pomf/pomf
  4. rm -r expiry/ rm -r moe/ Get the stupid submodules out. they don't even work. expiry doesn't even have any files.

Now is the part where I would recommend getting an FTP client. Editing all of pomf's shit via [insert favorite text editor here] is a pain.

I recommend WinSCP: https://winscp.net/eng/download.php

EDITING YOUR POMF/MySQL/APACHE

This is probably the hardest part for your 12 chromosomes to get. So hold on to your safety vest. I'll be saying "open x" because by now you should be using an FTP client to edit things.

  1. Open dist.json inside /var/www/html/pomf/.
  2. CHANGE THE FOLLOWING:
  3. If you don't want the "Malware scans are daily etc etc" banner, remove "banners/malware_scans.swig", . REMOVE THE , TOO.
    Change max_upload_size to whatever you want it to be, with the file size in MB (that's BYTES, not bits.)
    Change Sitename to whatever your shitty pomf clone is called.
    Change siteUrl to the FULL URL of your clone. i.e. https://catbox.moe/
    Make abuseContact and infoContact the same email address that you use.
    If you feel like begging for donations, you can add your urls in the right spot.
  4. mysql -p. Log in with the password you made when you installed MySQL.
  5. CREATE DATABASE pomf;
  6. quit
  7. mysql -p pomf < /var/www/html/pomf/mysql_schema.sql
  8. Create a new file in /etc/apache2/sites-available/ named whatever you fucking want. Normal people use their url but i don't care.
  9. Put all of this inside it exactly. Replace [[ ]] with your shit.
  10. <VirtualHost *:80>

    ServerName [[your domain]]

    ServerAdmin [[your email]]

    DocumentRoot /var/www/html

    #REMOVE THESE TWO LINES IF YOU WANT NO LOGGING.

    ErrorLog ${APACHE_LOG_DIR}/error.log

    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory "/var/www/html/files">

    php_flag engine off

    </Directory>

    </VirtualHost>

  11. a2ensite filename.conf
  12. service apache2 reload Did you get an error? That means you fucked something up. Give up.
  13. Open php.ini inside /etc/php/7.0/apache2/
  14. Find and change upload_max_filesize and post_max_size to what you specified in dist.json. If you get confused, read the php docs.
  15. Open settings.inc.php inside /var/www/html/pomf/static/php/includes/
  16. Change the following to the correct details:
  17. define('POMF_DB_USER', 'root');
    define('POMF_DB_PASS', '');
    define('POMF_FILES_ROOT', '/var/www/html/files/');
    define('POMF_URL', '');
  18. cd /var/www/html/pomf
  19. make
  20. make install DESTDIR=/var/www/html
  21. mkdir /var/www/html/files
  22. chown -R www-data:www-data /var/www/html
  23. Congratulations! you now have your own pomf.

    For the sake of keeping this guide as short as possible, I won't go over basic shit like changing your DNS records at your registrar, or how to add any extra shit to pomf. It's a learning experience.

    BE AWARE THAT YOUR POMF IS NOT SECURE. See the answer to this Stack Overflow question to disable PHP Execution in your files folder.

    You may want to also remove the git repo you downloaded. It's just rm -r /var/www/html/pomf/

    If you still didn't get it working, you should probably give up trying to host a public file hosting service.