SHARE
TWEET
Reddit Open Source - Admin Guide
a guest
Mar 24th, 2018
30
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- ## reddit jobs
- reddit cron file: `sudo nano /etc/cron.d/reddit`
- Run paster/cron jobs:
- cd /home/reddit/src/reddit/r2
- paster run run.ini -c 'import r2.lib.providers.search.solr as cs; cs.rebuild_subreddit_index()'
- Scripts:
- the installation guide has an example of running the test data importer in `reddit/scripts`, but there are other scripts that can be run / documented
- ## Make commands
- Available make commands, to be run from /home/reddit/src/reddit/r2 only
- * make
- * make all
- * make build/static-buildstamp
- * make build/mangle-buildstamp (and more)
- * make clean_css
- * make clean_js
- * make clean_static
- * make clean_i18n
- * make clean_names
- * make clean
- * make clean_ini
- * make clean_pyx
- * make css
- * make development.ini
- * make i18n
- * make Makefile.defs
- * make pyx
- * make ini
- * make names
- * make r2/lib/generated_strings.py
- * make js
- * make plugin_static
- * make static
- ### Update css
- make build/mangle-buildstamp
- make clean_css
- make css
- sudo reddit-restart
- ### Force rebuild everything
- If something just wont update, not ideal and requires 5m downtime (.html.py files are fully ported and removed from our codebase, don't have to worry about those anymore):
- /home/reddit/src/reddit/r2
- sudo reddit-stop
- sudo reddit-flush
- python setup.py build
- sudo python setup.py develop
- make clean
- make
- sudo reddit-start
- ## Official documentation
- https://github.com/reddit-archive/reddit/wiki
- ## Installer guide
- Congratulations! reddit is now installed.
- The reddit application code is managed with upstart, to see what's currently
- running, run
- sudo initctl list | grep reddit
- Cron jobs start with "reddit-job-" and queue processors start with
- "reddit-consumer-". The crons are managed by /etc/cron.d/reddit. You can
- initiate a restart of all the consumers by running:
- sudo reddit-restart
- or target specific ones:
- sudo reddit-restart scraper_q
- See the GitHub wiki for more information on these jobs:
- * https://github.com/reddit/reddit/wiki/Cron-jobs
- * https://github.com/reddit/reddit/wiki/Services
- The reddit code can be shut down or started up with
- sudo reddit-stop
- sudo reddit-start
- And if you think caching might be hurting you, you can flush memcache with
- reddit-flush
- Now that the core of reddit is installed, you may want to do some additional
- steps:
- * Ensure that reddit.local resolves to this machine.
- * To populate the database with test data, run:
- cd /home/der/src/reddit
- reddit-run scripts/inject_test_data.py -c 'inject_test_data()'
- * Manually run reddit-job-update_reddits immediately after populating the db
- or adding your own subreddits.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
