Skip to content

Instantly share code, notes, and snippets.

@jithatsonei
Last active June 12, 2023 07:22
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jithatsonei/b5e5e80f68980aa27a5f35cf2a9b0a62 to your computer and use it in GitHub Desktop.
Save jithatsonei/b5e5e80f68980aa27a5f35cf2a9b0a62 to your computer and use it in GitHub Desktop.
Pomf For Retards

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 fagola.
  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 node 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 --recursive https://github.com/pomf/pomf holy sSSHIT MAKE SURE YOU HAVE --recursive BECAUSE SOMEONE THOUGHT IT'D BE GREAT TO PUT THE PHP FILES IN A FUCKING SUB MODULE (LIKE THEY'RE OPTIONAL??)
  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. mysql -p. Log in with the password you made when you installed MySQL.

  4. CREATE DATABASE pomf;

  5. quit

  6. mysql -p pomf < /var/www/html/pomf/mysql_schema.sql

  7. Create a new file in /etc/apache2/sites-available/ named whatever you fucking want. Normal people use their url but i don't care.

  8. Put all of this inside it exactly. Replace [[ ]] with your shit.

<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>
  1. a2ensite filename.conf

  2. service apache2 reload Did you get an error? That means you fucked something up. Give up.

  3. Open php.ini inside /etc/php/7.0/apache2/

  4. 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.

  5. Open settings.inc.php inside /var/www/html/pomf/php/includes/

  6. Change the following to the correct details:

  7. make install DESTDIR=/var/www/html

  8. mkdir /var/www/html/files

  9. chown -R www-data:www-data /var/www/html

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment