-
Notifications
You must be signed in to change notification settings - Fork 10
Home
Wikinaut edited this page Nov 21, 2013
·
6 revisions
Welcome to the yubnub, a social command line for the web!
Yubnub was written by Jonathan Aquino for the Rails Day 2005 programming competition and ported to PHP in 2013.
Basically you just need a simple LAMP (Linux-Apache-MySQL-PHP) server.
- Jonathan:
- such a file
tables.sql
should be in my view part of the code. - You can use
mysqldump --no-data
(source) to create a file with your current database structure:
mysqldump --no-data -u root -p yubnub > tables.sql^and these lines can then be deleted
tables.sql
has the database table structure:
CREATE TABLE IF NOT EXISTS commands ( id int(11) NOT NULL AUTO_INCREMENT, name varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', lowercase_name varchar(255) COLLATE utf8_bin NOT NULL, url text COLLATE utf8_bin NOT NULL, description text COLLATE utf8_bin NOT NULL, uses int(11) NOT NULL DEFAULT '0', spam tinyint(4) NOT NULL DEFAULT '0', creation_date datetime NOT NULL DEFAULT '0000-00-00 00:00:00', last_use_date datetime DEFAULT '0000-00-00 00:00:00', golden_egg_date datetime DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEY name (name), KEY lowercase_name (lowercase_name) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin AUTO_INCREMENT=41842 ;
shell> mysql -u root -p mysql> CREATE USER 'yubnubuser'@'localhost' IDENTIFIED BY 'password'; CREATE DATABASE IF NOT EXISTS yubnub; GRANT ALL PRIVILEGES ON yubnub.* TO 'yubnubuser'@'localhost' IDENTIFIED BY 'password'; FLUSH PRIVILEGES; SOURCE tables.sql; EXIT;
# goto to your server document root directory cd /srv/www/htdocs git https://github.com/JonathanAquino/yubnub.git yubnub # rename the config template file cd /srv/www/htdocs/yubnub/config mv SampleConfig.php MyConfig.php
- edit
MyConfig.php
to point to your database. - point your web server to the
/srv/www/htdocs/yubnub/public/index.php
sub directory and file