Skip to content

Manually installing NPFchan

Gen2 edited this page May 14, 2017 · 2 revisions

This is a guide intended to help you (manually) install NPFchan locally for testing. You probably shouldn't need to do this, but if install.php isn't working / you don't want to mess with it, here is the documentation.

Prerequisites:

  1. Working web server, such as Apache, NGINX, or Lighhtpd.
  2. Working MySQL installation, with access to the "root" user or a user with similar permission sets.
  3. Ubuntu 16.04 or higher, with root access.
  4. The dependencies listed in README.MD (note: You probably want to install php7.0-mcrypt

Login to the MySQL console: mysql -uroot -pmypasswordgoeshere

Create a new database for NPFchan: CREATE DATABASE npfchan;

Next, we'll add a new user and grant all permissions on the npfchan database to that user. In this example the user will be named "senpai", and senpai's password will be "senpaipass".

grant all privileges on npfchan.* to 'senpai'@'localhost' identified by "senpaipass";

flush privileges;

Exit the MySQL console by typing exit;

Copy NPFchan into your web directory using either git clone (Recommended) or cp -R (Ensure that the permissions of your web directory is correct. Not doing so could lead to errors.)

Edit inc/instance-config.php with the database information that you selected earlier.

Now, you need to import the tables into the NPFchan database.

Inside the root of your web directory, run the following command: mysql -uroot -pmypassword npfchan < install.sql

Finally, navigate to mod.php?/ and login with the credentials admin:password (remember to change these!)

If everything went well, you should be presented with the dashboard. To avoid an SQL error, delete the pre-made /b/ board by selecting [Edit] and clicking "Delete Board". After completing this, you should have a working NPFchan installation.