Newsagent/Installing: Difference between revisions
No edit summary |
No edit summary |
||
| Line 86: | Line 86: | ||
* Linux. Windows may work, but has not been tested. | * Linux. Windows may work, but has not been tested. | ||
* MySQL 5.6. Some features are MySQL specific at this time. | * MySQL 5.6. Some features are MySQL specific at this time. | ||
* Apache 2. mod_perl is optional but strongly recommended. Other web servers may work, but have not been tested. | * Apache 2. mod_perl is optional but very strongly recommended. Other web servers may work, but have not been tested. | ||
* Perl 5. | * Perl 5.16 (note: most of Newsagent testing has been on Perl 5.18 and 5.20) | ||
* ImageMagick 6.9 | * ImageMagick 6.9 | ||
* TidyP (see [http://www.tidyp.com/]) | * TidyP (see [http://www.tidyp.com/]) | ||
| Line 100: | Line 100: | ||
=== Perl modules required === | === Perl modules required === | ||
The following required modules are often found in Linux distro repositories and should be installed from there: | The following required modules are often found in Linux distro repositories and should be installed from there: | ||
* CGI | * CGI (including CGI::Utils) | ||
* Class::Accessor | * Class::Accessor | ||
* Class::Mix | * Class::Mix | ||
| Line 141: | Line 141: | ||
{{:Newsagent/Navbox}} | {{:Newsagent/Navbox}} | ||
[[Category:Software|Newsagent]] | [[Category:Software|Newsagent]] | ||
[[Category:Newsagent|{{SUBPAGENAME}}]] | |||
<references /> | |||
Revision as of 14:38, 8 May 2015
| Newsagent | |
| |
| Author | Chris Page |
|---|---|
| Contact | Support |
| Repository | github |
| Issue tracker | github |
| OS | Neutral (web based) Will not work with IE8 or older |
| URL | Newsagent |
| Navigation | |
| |
Installing
Step 1
Before attempting to install Newsagent, ensure that your server meets the requirements listed under Environment requirements and that all the Perl modules listed under Perl modules required are installed.
Step 2
Next download the "Full Package" version of the latest release of CKEditor from the CKEditor site. For example:
cd /var/www/localhost
wget 'http://download.cksource.com/CKEditor/CKEditor/CKEditor%204.4.6/ckeditor_4.4.6_full.zip'
unzip ckeditor_4.4.6_full.zipThis will create a ckeditor directory in /var/www/localhost
Step 3
Once the software environment is prepared, you need to clone all the required repositories and set up links. The paths used are not important and are given for example only; if you use different paths, remember to adjust the instructions accordingly:
cd /var/www
git clone https://github.com/TheWatcher/webperl.git
cd /var/www/localhost
git clone https://github.com/UoMCS/newsagent.git
git clone https://github.com/TheWatcher/MultiSelect.git
git clone https://github.com/TheWatcher/mootools-datepicker.git
git clone https://github.com/twitter/twitter-text.git
cd /var/www/localhost/newsagent/templates/default/js
ln -s ../../../../MultiSelect .
ln -s ../../../../ckeditor .
ln -s ../../../../mootools-datepicker/Source datepicker
ln -s ../../../../twitter-text/js/twitter-text.js .Step 4
Now you need to create a MySQL user, an empty database, and grant all privileges on that database to the new user. Once these have been created you can initialise the database using the basic_db.sql file provided in the source. The following assumes that the new user and database are both called 'newsagent':
cd /var/www/localhost/newsagent/config
mysql -u newsagent -p newsagent < basic_db.sqlIf the database is on a remote system, be sure to specify the -h and possibly -p options as appropriate.
Once the database has been set up you will need to create a new config/site.cfg file containing the information Newsagent needs to communicate with the database:
cd /var/www/localhost/newsagent/config
cp site.cfg.dist site.cfg
nano -w site.cfgYou will minimally need to edit the database, username, and password variables on lines 3-5. Note that, to operate correctly, Newsagent currently requires a connection to a 'user data' database to support notification handling; please ask if you need information about this.
The database is created with a number of default settings that you will need to change: inspect the contents of the settings table and ensure the values are set appropriately. Important settings you will need to change are:
| Name | Default | Description |
|---|---|---|
| base | /var/www/path/to/newsagent | The filessytem path to the newsagent directory. Must be an absolute path. |
| scriptpath' | /newsagent | The web path to the newsagent system, relative to the host. If newsagent is are the root of the site set this to /, otherwise give the web path to the directory containing newsagent here. |
| logfile | If set, log messages are written to this file. Ensure it is outside the web tree, but is writable by the webserver user. | |
| Core:envelope_address | your@email.address | The email address to use as the envelope sender on 'housekeeping' emails sent by Newsagent. This is not used for notification emails (the article author's email is used for those). |
| Core:admin_email | your@email.address | The email address to show in the From: of housekeeping emails. |
| Article:upload_image_path | /var/www/path/to/newsagent/images | The filesystem location that uploaded images should be saved to. Must be writeable by the webserver user! |
| Article:upload_image_url | https://server.url/newsagent/images | The URL of the image upload path. |
| RSS:editor | your@email.addy (Your Email) | The email address to show in the <managingEditor> element of published RSS feeds. |
| RSS:webmaster | your@email.addy (Your Email) | The email address to show in the <webMaster> element of published RSS feeds. |
| RSS:title | Feed Title | The text to show in the <title> element of published RSS feeds. |
| RSS:description | The latest news and events | The text to show in the <description> element of published RSS feeds. |
| Article:logo_img_url | https://server.url/.../uom_logo.png | Location of the logo to include in emails; this should be a 154x63 image, preferably served over https. |
| httphost | https://server.url/ | The URL of the root of the server Newsagent is being served from. |
Requirements
Where specified, version numbers are the minimum versions of packages that Newsagent has been tested with. Later versions should work provided no breaking changes have been made.
Environment requirements
- Linux. Windows may work, but has not been tested.
- MySQL 5.6. Some features are MySQL specific at this time.
- Apache 2. mod_perl is optional but very strongly recommended. Other web servers may work, but have not been tested.
- Perl 5.16 (note: most of Newsagent testing has been on Perl 5.18 and 5.20)
- ImageMagick 6.9
- TidyP (see [1])
Git projects required
- https://github.com/UoMCS/newsagent.git
- https://github.com/TheWatcher/webperl.git
- https://github.com/TheWatcher/MultiSelect.git
- https://github.com/TheWatcher/mootools-datepicker.git
- https://github.com/twitter/twitter-text.git
Perl modules required
The following required modules are often found in Linux distro repositories and should be installed from there:
- CGI (including CGI::Utils)
- Class::Accessor
- Class::Mix
- Compress::Bzip2
- Date-Calc
- DBI
- Email::MIME
- Email::Sender::Simple (in Email-Sender)
- Email::Sender::Transport::SMTP (in Email-Sender)
- Email::Sender::Transport::SMTP::Persistent (in Email-Sender)
- Email::Valid
- Expect (Only required if the Webperl::AuthMethod::SSH auth method is used)
- File::Type
- HTML::Entities (in HTML::Parser)
- HTML::Scrubber
- HTML::TokeParser::Simple
- JSON
- Net::LDAPS (perl-ldap) (Only required if the Webperl::AuthMethod::LDAP OR LDAPS auth methods are used)
- Params::Classify
- Proc::Daemon
- Regexp::Common
- Try::Tiny (installed with Email-Sender)
- WWW::Mechanize
- XML::Simple
The following are usually not in repositories and will need to be installed via CPAN if not in your distro's repository:
- experimental
- DateTime::Event::Cron
- Email::MIME::CreateHTML
- HTML::FormatText
- HTML::Tidy (Requires tidyp from http://tidyp.com/ )
- Net::Twitter::Lite
- HTML::WikiConverter::Markdown
- WebService::Validator::HTML::W3C
- Crypt::Eksblowfish::Bcrypt (Only required if the Webperl::AuthMethod::Database auth method is used)
- Net::SSH::Expect (Only required if the Webperl::AuthMethod::SSH auth method is used)
- CGI::Compress::Gzip
- Lingua::EN::Sentence
| |||||||||||||||||
