Example catalogueWhen you download SVOCat you get it preconfigured with the properties of an example catalogue. The idea is that you can get, as fast as posible, a working version of SVOCat so that you can see it at work and get tips on how to configure your own catalogue. This example catalogue is made using a very small subset of the CMC15 data. As a very brief summary: In the data-csv/cmc15n2-part1.csv file you have the data in csv format.
These data are equivalent to a table with 5000 lines and 11 columns.
Create a MySQL database (vocats) We need to create a MySQL table with that structure and then load the data into it (you could want to take a look at the MySQL database configuration). First, we need a database that you must create in your own way. A typical command to create a database is: mysqladmin -u root -p create vocats If you decide to use other name for the database, please go to the administration application and change it too in the Mysql section. Create a MySQL user (catuser) Creating a mysql user is a little more tricky. If you don't know how to do it you should probably ask for some help from your system administrator. In any case, we give you a simplified example. You first open the MySQL command line interface: mysql -u root -p The, under the mysql prompt, you select the "mysql" database: mysql> use mysql; then you create a user named "catuser" with all privileges in the 'vocats' database and password "catp@ss" mysql> grant all privileges on vocats.* to 'catuser'@'locahost' identified by 'catp@ss'; and you exit the mysql interface: mysql> quit; But take this as just a tip. You maybe want to be more restrictive about catuser permissions. Create a MySQL table (mycat) We now must create a table to contain the catalogue data. In the work/ folder you have a file work/create_table.my with the mysql instructions to create a table named "mycat".
you can use this file to create the table in the database as:
cd /var/www/catalogues/mycat/
mysql -u catuser -p vocats < work/create_table.my (where "catuser" must be a mysql-user allowed to create a table). You can also create the table by your own means (using phpMyAdmin, by the command line mysql interface or by any other way that you are used to). Just use the same table definition shown above. Load data into the table The last step is loading the catalogue data into the table. To do this you have work/cmc15n2-part1.csv.my which is a quite ugly file with instructions to load the data line by line:
You can use this script to load the data in the table as:
cd /var/www/catalogues/mycat/
mysql -u catuser -p vocats < work/cmc15n2-part1.csv.my If everything has gone right, you should have now a database table containing the catalogue data. You should be able to go to: http://www.mylab.org/catalogues/mycat/ where, remember, http://www.mylab.org/catalogues/mycat/ should be the main URL that corresponds to your installation. (if you are trying to install this in a laptop or any other computer without a real internet address, try http://localhost/catalogues/mycat/) And search for data in the "Data Retrieval" section. The catalogue is small. To get a results try for instance:
|