The reddit open source fork powering SaidIt
SaidIt is a reddit open source continuation and fork with:
SaidIt customizations include:
There are two ways to set up a saidit server: on a standalone physical server, or through a Virtual Machine environment (running within another OS such as linux, MacOS, or Windows) for development and testing purposes.
From this point forward you can start your VM with Start -> Headless Start and connect via ssh as user 'reddit' if you wish, using a program like PuTTY. Don't forget to shut down your VM by right clicking it and choosing Close -> ACPI Shutdown before shutting down your host OS or you may corrupt your VM.
From this point forward physical access to the server is no longer needed and you can ssh in as the 'reddit' user remotely if you wish, using a program like PuTTY.
To use your reddit server, you are expected to be able to resolve reddit.local and https://reddit.local. First, find the ip address of your saidit server by running:
$ ifconfig # note the 'inet addr' for device 'eth0' or similar
Then update your
hostsfile on your development machine/host OS. For example, on linux with saidit server ip 192.168.1.20 run:
$ sudo sed -i '1i 192.168.1.20 reddit.local' /etc/hosts
For Windows and MacOS see https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/
SSH into your saidit server
$ ssh [email protected]
$ wget https://raw.github.com/libertysoft3/saidit/master/install-reddit.sh $ chmod +x install-reddit.sh $ sudo ./install-reddit.sh
You should see success message "Congratulations! reddit is now installed." Do not proceed if the installation failed with an error.
Visit https://reddit.local and create accounts for users 'reddit' and 'automoderator'. Alternatively, you can install some default/sample data including users 'reddit' and 'automoderator' (with password 'password'), subs, posts, and comments with:
$ reddit-run ~/src/reddit/scripts/inject_test_data.py -c 'inject_test_data()'
SaidIt is now fully functional aside from search and optional chat. The SaidIt Admin Guide has instructions for changing your site configuration.
SaidIt comes pre-configured for Solr search, but Solr and Tomcat are not installed yet.
$ cd ~ $ sudo apt-get install tomcat7 tomcat7-admin software-properties-common $ wget http://archive.apache.org/dist/lucene/solr/4.10.4/solr-4.10.4.tgz $ tar -xvzf solr-4.10.4.tgz $ sudo mv solr-4.10.4 /usr/share/solr $ sudo chown -R tomcat7:tomcat7 /usr/share/solr/example
Setup Solr, install Reddit schema
$ sudo cp /usr/share/solr/example/webapps/solr.war /usr/share/solr/example/solr/ $ sudo cp /usr/share/solr/example/lib/ext/* /usr/share/tomcat7/lib/ $ sudo cp /usr/share/solr/example/resources/log4j.properties /usr/share/tomcat7/lib/ $ sudo cp src/reddit/solr/schema4.xml /usr/share/solr/example/solr/collection1/conf/schema.xml $ sudo chown tomcat7:tomcat7 /usr/share/solr/example/solr/collection1/conf/schema.xml
Setup Tomcat for Solr
$ sudo nano /usr/share/tomcat7/lib/log4j.properties # edit to set: solr.log=/usr/share/solr
$ sudo nano /etc/tomcat7/Catalina/localhost/solr.xml
have tomcat use port 8983 ('solr_port' in example.ini), port 8080 is haproxy
sudo nano /etc/tomcat7/server.xml
edit to set:
Start solr:$ sudo service tomcat7 restart # any errors logged must be fixed $ sudo cat /var/log/tomcat7/catalina.out # verify working, these should return html pages: $ wget 127.0.0.1:8983 $ wget 127.0.0.1:8983/solr
Index site content and test:$ sudo start reddit-job-solr_subreddits $ sudo start reddit-job-solr_links # do a search on the site, verify working