Editing
IT Wiki
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Configuration== ===VisualEditor installation=== VisualEditor is a MediaWiki extension written in PHP. It is located in <code>/var/www/html/extensions</code>. MediaWiki's configuration file is <code>/var/www/html/LocalSettings.php</code>. MediaWiki has been configured to load VisualEditor, and to access the Parsoid via http://localhost:8000. VisualEditor is not loaded by default for each user. They must elect to edit with Visual Editor. It requires Parsoid, a Node.js package. Node.js runs independently of Apache. The VisualEditor uses an API via HTTP on port 8000 to interact with Parsoid. This traffic is not encrypted because it does not leave the host. Parsoid's configuration file is located at <code>/usr/local/lib/node_modules/parsoid/config.yaml</code>. It is copied from the default packaged configuration at config-example.yaml. The CES wiki API is not at the default address, https://ces-wiki.fas.harvard.edu/w/api.php. The Parsoid configuration has been updated to reflect the correct address, [[Api.php|https://ces-wiki.fas.harvard.edu/api.php]]. Because the wiki is private, Parsoid cannot access the wiki API without a password. Permissions have been updated to be public for the localhost and private for the rest of the world. It does not test for the literal "localhost" but rather the server's IP address, 192.241.158.155. MediaWiki was updated to 1.33 because VisualEditor was not compatible with 1.30. To start Parsoid, navigate to <code>/usr/local/lib/node_modules/parsoid</code>, and run <code>npm start</code>. This process will end as soon as the terminal is closed, causing VisualEditor to fail to load. ===PM2=== To run Parsoid as a daemon, the Node.js package pm2 was installed. To start Parsoid as a service, run the following: <code>pm2 start /usr/local/lib/node_modules/parsoid/bin/server.js</code> ===Backing up the databases=== The databases can be backed up using the following command: <code>mysqldump --all-databases > ~/Backups/$(date +%F)_wiki_db_backup.sql</code> Backups are stored in <code>/home/peterstevens/Backups</code>. Old backups do not clear out. Additionally, DigitalOcean backs up the entire server image once a week. ===Updating MediaWiki=== Always back up the database and the image assets before updating. MediaWiki can be updated by creating new directory <code>/var/www/html_upgrade</code> and unzipping the latest copy of MediaWiki there. Then, copy the following files and directories from <code>/var/www/html</code>: *<code>LocalSettings.php</code> *<code>images</code> *<code>skins</code> *<code>resources/assets/Blocks_RGB_160.png</code> *<code>resources/assets/favicon-16x16.png</code> Set <code>html_upgrade</code> permissions to 755. Rename <code>html</code> to <code>html_old</code>, and rename <code>html_upgrade</code> to <code>html</code>. At this point, requests to the server will likely fail, because the database schema has not been updated. Change directory to <code>/var/www/html/maintenance</code>, and run the following command: <code>php update.php</code> If the schema hasn't been changed, a rollback is as simple as renaming <code>html</code> back to <code>html_upgrade</code>, and <code>html_old</code> back to <code>html</code>. If the schema has changed, the database will need to be blown up and recreated using the latest backup. ===Job runner=== There is a bash script at <code>/usr/local/bin/mwjobrunner</code> which runs MediaWiki maintenance scripts every ten seconds. It is based on this webpage: https://www.mediawiki.org/wiki/Manual:Job_queue#Simple_service_to_run_jobs. There is no service to run it at startup. ===Cron jobs=== The database is backed up once a day at midnight. Let's Encrypt renews its certificate every three months. ===Restarting=== If you restart the server, the necessary daemons may not run at startup. Apache, MySQL, and Parsoid may need to be started manually. ===Mail=== In order for MediaWiki to send mail, [[Peter Stevens]] installed PEAR, Mail, and Net_SMTP. It is currently configured to send from peterstevens@fas.harvard.edu. This will be updated with a new address. The configurations for the SMTP server are located in <code>/var/www/html/LocalSettings.php</code>. Mail and Net_SMTP are PHP packages located in <code>/usr/share/php/</code>.
Summary:
Please note that all contributions to CES IT Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
CES IT:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Main Page
How-to's
Add Users to Wiki
Renew certificate
Edit Event Request Form
Signage information
Automated Sign-in Sheet
Crimson Print Information
Event Recording setup
Updating CES listservs
Record new voicemail menus
Crimson Print Network Access
Tiles & Editing for recorded events
SharePoint sharing
Constant Contact Handling / Updates
Social Media sharing/Configuring Global & Content SEO
Zotero + Obsidian / citations plugin interaction with AI
Website How-to's
Editing the Directions Button on Events
Double Booking Notification
UAT Testing Site
Lists
Computers
Licenses and Accounts
Listservs
Monitors
Network devices
Offices
Phones
Printers
Rooms
Routines
CMS Website Update
Imarc website update
CMS Website updates
Service Contracts
Ricoh Service Contract
Server Management
Upgrade Older Ubuntu Versions
Add a New User to Digital Ocean SSH
Tools
What links here
Related changes
Page information
Navigation
Special pages