Thursday, May 12, 2016

setup own pastebin

pastebin  is a web app that users can store plain text, code,etc and share it to other users.

pnopaste is one of its kinds.

1- install pnopaste, if you install with apt-get in ubuntu it will prompt for password for pnopaste that manage it. after provide the password, it will create database and necessary tables

$ sudo apt-get install pnopaste

2- if everything is done correctly you will configuration like below
our $dbuser='pnopaste';
our $dbpass='password';
our $basepath='';
our $dbname='pnopaste';
our $dbserver='localhost';
our $dbport='';
our $dbtype='mysql';

Alias /pnopaste /usr/share/pnopaste
<Directory /usr/share/pnopaste>
    AllowOverride   all
    AddHandler      cgi-script .pl
    Options         ExecCGI

3- and now you can access to it usering url http://server-ip/pnopaste/
then you can write your message or code, and after you finish it, you will be provided with url to view it and download it.

No comments:

Post a Comment