Ready made packages of Newscoop are available for Debian and Ubuntu GNU/Linux via secure apt. This is the recommended installation method for Newscoop, because it offers automatic updates and resolution of package dependencies. This guide assumes that you have sudo or root powers on the target server - if not, you need to ask your system administrator to install Newscoop for you.
Two components of the MySQL database management system are needed by Newscoop:
- the server
- the client programs
Depending on your requirements, you may prefer to run the MySQL database server on a separate machine from the MySQL client. The MySQL client must be installed on the same machine as Newscoop. On Debian/Ubuntu, installing the mysql-server metapackage will install the latest versions of both the server and client packages.
sudo apt-get install mysql-serverDuring the installation of MySQL, you should be prompted to set a root password for the MySQL server, which is an important security feature. Make a note of this password and keep it in a secure place, as you will need it shortly.
Note that the MySQL root user is different from the system root user, and should have a different password.
Setting up the database user and password
An existing Newscoop installation should have a named database already set up on a MySQL server, with access protected by a username and password. For a new installation of Newscoop, you will need to tell the installer to create a database to store your content in. This means you will need a MySQL user account with database creation privileges set up in advance. If you don't already have an account, you can set up a database username and password for the Newscoop installer to use with the following steps.
1. Connect to the database management system using the root account and the password that you set during the MySQL installation.
mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 34 Server version: 5.1.41-3ubuntu12.8 (Ubuntu) Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.2. The shell prompt will change to a mysql> prompt, which requires a semicolon at the end of each command. Create a user account for Newscoop to connect to the database, limiting it to connecting from the localhost if Newscoop and MySQL are to be installed on the same server. Otherwise, specify the server that Newscoop will be connecting to MySQL from. Make a note of the username (newscoop_user in the example below) and password (newscoop_user_password in the example) that you set, in a secure place. You will need these details during the Newscoop installation.
mysql> CREATE USER 'newscoop_user'@'localhost' -> IDENTIFIED BY 'newscoop_user_password'; Query OK, 0 rows affected (0.04 sec)
3. Grant access privileges to the user you just created. In this example, newscoop.* means all tables of a database called newscoop, which has not yet been created. You will need to provide this database name to the Newscoop installer, so that it can create the database later.
mysql> GRANT ALL ON newscoop.* -> TO 'newscoop_user'@'localhost'; Query OK, 0 rows affected (0.00 sec)
4. Exit from the database management system and return to the shell prompt.
mysql> quit; Bye
Setting up the secure apt repository
To add the repository that contains the Newscoop software, open the sources.list file in the nano editor with:
sudo nano /etc/apt/sources.list
Type your password, and the sources.list file will open. For Ubuntu Lucid LTS, scroll to the end of this document and add the following line:
deb http://apt.sourcefabric.org/ lucid main
For Ubuntu Maverick, substitute maverick in place of lucid. For Debian Squeeze, substitute squeeze in place of lucid. Ubuntu natty and oneiric are also supported.
Press Ctrl+O to write out the sources.list file, and Ctrl-X to quit the nano editor.
You now need to update your sources. Type:
sudo apt-get update
You will probably see an error message about a missing public key. To fix this, you need to install the sourcefabric-keyring package, which contains the package signing key:
sudo apt-get install sourcefabric-keyring
Update your sources again, to confirm that you are now using a trusted software repository:
sudo apt-get update
You should no longer see the error message about the public key.
Installing the Newscoop package
After confirming that the secure apt repository is set up, you can install the Newscoop package:
sudo apt-get install newscoop
This command will install all of the Newscoop components, plus any other packages that Newscoop requires in order to run.
The package installer will ask you a few questions about the kind of server you want to set up, such as the Apache configuration that you require.
Optionally, install XCache for optimum Newscoop performance:
sudo apt-get install php5-xcache
Configuration options for XCache are covered in the Manual installation chapter.
Finally, check that Newscoop is running. Open a web browser with the URL of the web server that you have installed, such as http://www.example.com. For a test installation accessed from the same machine, this URL might be:
If you see the Newscoop installer page, and you do not wish to adjust the default XCache settings, you can now skip the chapter Manual installation and proceed to the chapter Installation steps.
Default site still enabled
If you see a page which says "It works! This is the default web page for this server. The web server software is running but no content has been added, yet" then you need to disable Apache's default site and reload the configuration, with the commands:
sudo a2dissite default sudo invoke-rc.d apache2 reload
Then refresh your browser.
No fully qualified domain name
If Apache complains about the domain name of the server, like this:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
it probably means that you have no domain name configured for the server. For a test server on a local network, you may need to add an entry to the /etc/hosts file of the server, like this:
and a corresponding entry into the /etc/hosts file of your desktop machine on the network, like this:
where 192.168.1.2 is the IP address of your Newscoop server, and www.example.com is the name of your publication's website. For a server on a larger network or the public Internet, ask your network administrator for the correct domain names and IP addresses to use.
Administration interface not found
If you chose the 'System-wide (all vhosts)' option when installing Newscoop, and installation completed, but attempting to access the administration interface results in the error:
The requested URL /usr/share/newscoop/admin.php was not found on this server.
this means that you need to edit the file /usr/share/newscoop/.htaccess like so:
sudo nano /usr/share/newscoop/.htaccess
Add the line RewriteBase /newscoop under the line RewriteEngine On like this:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase /newscoop
Then save the file Ctrl+O, close nano with Ctrl+X, reload the Apache configuration:
sudo invoke-rc.d apache2 reload
and refresh your web browser.