Difference between revisions of "TheSchwartz Setup"
m (Actually, using < is better than cat in this case.) |
(→On a Dreamhack: extra info that tripped me up) |
||
(14 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
− | + | Note: some of the below instructions may have already been covered in [[Dreamwidth Scratch Installation]] | |
− | In <code>etc/config- | + | To run any jobs that require queueing, such as the journal content importer and the sending of email (if you have email set up to send through TheSchwartz), you'll need to set up TheSchwartz. This requires that you set up the database and define it in <code>etc/config-private.pl</code>. |
+ | |||
+ | Note: this page is about setting up TheSchwartz. For using it from Dreamwidth code, see [[TheSchwartz]]. | ||
+ | |||
+ | TheSchwartz initialization dump can be found at https://raw.github.com/saymedia/TheSchwartz/master/doc/schema.sql | ||
+ | |||
+ | = On your own install = | ||
+ | |||
+ | In <code>etc/config-private.pl</code>, find the following block of code: | ||
<source lang="perl"> | <source lang="perl"> | ||
Line 9: | Line 17: | ||
dsn => 'dbi:mysql:dw_schwartz;host=localhost', | dsn => 'dbi:mysql:dw_schwartz;host=localhost', | ||
user => 'dw', | user => 'dw', | ||
− | pass => | + | pass => 'password', # CHANGETHIS |
}, | }, | ||
); | ); | ||
</source> | </source> | ||
− | In this block of code, ''dw_schwartz'' represents the database name used by TheSchwartz, and ''dw'' represents the username. If you wish, you can change these to different values - but it's probably best not to use the same database as your main Dreamwidth installation uses, just in case. | + | In this block of code, ''dw_schwartz'' represents the database name used by TheSchwartz, and ''dw'' represents the username. If you wish, you can change these to different values - but it's probably best not to use the same database as your main Dreamwidth installation uses, just in case. You should change the 'password' setting to a new database password used only for TheSchwartz. |
− | (The rest of this page assumes that you're not changing | + | (The rest of this page assumes that you're not changing the database name and username.) |
− | You | + | You then need to create the database. Run the following two commands, changing ''databasepass'' to the password you created above, and entering the MySQL root password when prompted: |
<source lang="bash"> | <source lang="bash"> | ||
Line 25: | Line 33: | ||
</source> | </source> | ||
− | Then, initialise the database, | + | Then, initialise the database, entering the MySQL root password when prompted: |
<source lang="bash"> | <source lang="bash"> | ||
Line 31: | Line 39: | ||
</source> | </source> | ||
− | + | The initial setup of TheSchwartz is now complete. To actually *use* TheSchwartz you'll need to run the [[Workers|workers for whatever jobs you need]], and in the case of the importer you'll need to run the import scheduler too. More information on using the importer can be found at [[Importer Testing]]. | |
− | + | = On a Dreamhack = | |
− | + | ||
− | + | To set up TheSchwartz on a Dreamhack, see [[Dreamhack_Getting_Started#A_note_about_workers|Dreamhack Getting Started]]. Note that on a Dreamhack, by default, TheSchwartz and the main installation use the same database. | |
− | + | ||
− | + | ||
− | + | [[Category: Dreamwidth Installation]] | |
+ | [[Category: Dreamhack]] |
Latest revision as of 16:27, 14 May 2016
Note: some of the below instructions may have already been covered in Dreamwidth Scratch Installation
To run any jobs that require queueing, such as the journal content importer and the sending of email (if you have email set up to send through TheSchwartz), you'll need to set up TheSchwartz. This requires that you set up the database and define it in etc/config-private.pl
.
Note: this page is about setting up TheSchwartz. For using it from Dreamwidth code, see TheSchwartz.
TheSchwartz initialization dump can be found at https://raw.github.com/saymedia/TheSchwartz/master/doc/schema.sql
On your own install
In etc/config-private.pl
, find the following block of code:
# Schwartz DB configuration @THESCHWARTZ_DBS = ( { dsn => 'dbi:mysql:dw_schwartz;host=localhost', user => 'dw', pass => 'password', # CHANGETHIS }, );
In this block of code, dw_schwartz represents the database name used by TheSchwartz, and dw represents the username. If you wish, you can change these to different values - but it's probably best not to use the same database as your main Dreamwidth installation uses, just in case. You should change the 'password' setting to a new database password used only for TheSchwartz.
(The rest of this page assumes that you're not changing the database name and username.)
You then need to create the database. Run the following two commands, changing databasepass to the password you created above, and entering the MySQL root password when prompted:
echo "create database dw_schwartz" | mysql -uroot -p echo "grant all on dw_schwartz.* to 'dw'@'localhost' identified by 'databasepass'" | mysql -uroot -p
Then, initialise the database, entering the MySQL root password when prompted:
mysql -uroot -p dw_schwartz < $LJHOME/cvs/TheSchwartz/doc/schema.sql
The initial setup of TheSchwartz is now complete. To actually *use* TheSchwartz you'll need to run the workers for whatever jobs you need, and in the case of the importer you'll need to run the import scheduler too. More information on using the importer can be found at Importer Testing.
On a Dreamhack
To set up TheSchwartz on a Dreamhack, see Dreamhack Getting Started. Note that on a Dreamhack, by default, TheSchwartz and the main installation use the same database.