Internal Pages

Login to access

WebBibtexInstallation

From KOVAN

Contents

REQUIREMENTS

Installing WebBibTeX to your web-server requires you to have PHP and MySQL installed on your machine.

DOWNLOAD

You can download WebBibTeX from here.

INSTALLATION

After downloading the .tgz file, copy the file to the destination where you want WebBibTeX to be on your web-server. Then unzip and untar the file (keeping the permissions of files and directories using -p option of tar). Suppose you want it to be on "/var/www/html/wbt/", then you should do the following:

$ cp wbt-1.0.tgz /var/www/html/
$ cd /var/www/html/
$ tar -pzxvf wbt-1.0.tgz

Now your WebBibTeX files will be in "/var/www/html/wbt/". But before you can use it you should also create a database that WebBibTeX can use, and a 'globals' file that will contain some global variables. As we have said, you must have MySQL installed and running.

Actually there are two ways of doing all these. One is the easy way: using the 'install.php' file coming with WebBibTeX. You will supply the necessary information, and install.php will create the database tables, entries, and files for you. Second way is doing all these by yourself. We will try to explain both methods here. First the 'easy' one.

Using install.php For Installation

You should go to the directory you will install WebBibTeX to; that is "/var/www/html/wbt/" keeping on with the above example.. First of all change this directory's permissions accordingly, so that the php script can write to files. Then open install.php in your browser. You will see something like:

Here the first field asks your 'MySQL root password' to create new databases. The second field asks your preference for the to-be-created database name. The third and fourth fields again asks your preference for the to-be-created database password. What you supply to the fifth field will be used in encoding the user passwords when they are being stored into the WebBibTeX users database. The sixth and seventh fields asks for your preference for the WebBibTeX Administrator password. (You will login as admin with login name 'Administrator', and this password to create new users, and modify, delete entries even if they are not yours.) Lastly, you must supply the directory WebBibTeX will be working under. Then hit the 'Go!' button. The script will inform you about the progress, and try to give information if it can not achieve to do all the things it should.

After you are done with install.php don't forget to move it to another directory out of your web-root (or delete it), so that no one can reach it from the internet.

Doing All By Hand

You can also do these changes yourself. First of all, you must create a database and a table with the appropriate fields. Here is how you can do this:

First login to MySQL as root:

$ mysql -u root -p
Enter password:
mysql>

Now create a database (that you will give a name) and create your Wbt table inside this db, and give appropriate permissions for WebBibTeX to use it:

mysql> create database ;
Query OK, 1 row affected (0.00 sec)
mysql> use ;
mysql> CREATE TABLE Wbt (reftype varchar(20), address varchar(150), author varchar(150), booktitle varchar(150), chapter int(5), edition int(5), editor varchar(150), howpublished varchar(150), institution varchar(150), journal varchar(150), month int(2), note varchar(150), number int(5), organization varchar(150), pages varchar(12), publisher varchar(150), school varchar(150), series varchar(150),title varchar(150), type varchar(150), url varchar(150), volume int(5), year year(4), crossrefkey varchar(50), keywords varchar(50), summary text, abstract text, mykey varchar(20), projectname varchar(50), owner varchar(30), fileStatus varchar(20), date varchar(10));
Query OK, 0 rows affected (0.01 sec)
mysql> GRANT ALL PRIVILEGES ON Wbt TO 'wbt'@'localhost' IDENTIFIED BY WITH GRANT OPTION;

So, you created your database, a table to keep your entries in, and a user('wbt') to use it. But you shoul also create a table for the users of WebBibTeX. You can do this like:

mysql> CREATE TABLE users (name varchar(20), surname varchar(30), loginID varchar(40), permission varchar(15), password blob);
mysql>GRANT ALL PRIVILEGES ON users TO 'wbt'@'localhost' IDENTIFIED BY WITH GRANT OPTION;
mysql>insert into users (name, surname, loginID, permission, password) values ('WebBibTeX', 'Admin', 'Administrator', 'epaws', ENCODE(,));

Here make sure that is the same one with the one you supplied before for the table 'Wbt'. The will be your administrator password, so that you can login to WebBibTeX using this password and the login name 'Administrator'. The is used to encode user passwords before they are inserted to the database. You can supply any string for this.

Now, there is one thing left to do. That is, you should change your myglobals.inc file so that WebBibTeX will be aware of what you supplied as , and . Go to your WebBibTeX directory, open the file myglobals.inc, and change the values of the variables $DB and $Passwd such that $DB=, $Passwd= and $passwd_enc=. Also you must set the $wbtDir variable to the path that WebBibTeX will be in; e.g. if you installed WebBibTeX to /var/www/html/wbt/ then you should change the $wbtDir variable so that $wbtDir="/var/www/html/wbt/". Save your changes to the file.

Now, you are ready to use WebBibTeX.

USING WebBibTeX FOR DIFFERENT PROJECTS

Assume you have several different projects going on, for which you want to make different entries, so that an entry you make in one won't appear in another. To achieve this just open the myglobals.inc file and add the new project names to the $projects array. Initially the array will have just one value 'general' in it. And if you want to add projects P1 and P2 then your $projects variable shall look like $projects=array("general","P1","P2");. Now you can mark the entries by projectnames also, and view them accordingly.

This page was last modified on 24 December 2009, at 12:10. This page has been accessed 5,106 times.