This page is for developers who are interested in making changes to the Newscoop code. The development environment is not only good for developing Newscoop; it can also be used by people interested in testing the latest builds hot off the Git repository. Once the development environment is installed, users can easily pull down the very latest code from the Git server and run it with minimal effort.
The following steps set up a development environment on a clean Ubuntu installation (version 11.04 and newer).
There are currently two different ways of installing Newscoop and setting up the development environment. It depends on how you get the sources, so:
First option, and most recommended for developers, is by fetching from Git. You get all Newscoop files but you don't get any dependencies, you have to install the dependencies by yourself, making sure you have all those before installing Newscoop.
Second option is to download either the tarball or zip file from Sourceforge. This package does include all required dependencies.
We will try to explain in this guide what to do in both cases to get Newscoop running...
See this page for a number of developer tools you need to get.
Install GIT if you dont have it yet:
sudo apt-get install git-core
You can get the development sources from our public repository at github by doing only this:
git clone git://github.com/sourcefabric/Newscoop.git cd Newscoop git checkout next cd ..
Now copy the files to the web root like so
sudo cp -r Newscoop/newscoop /var/www/newscoop-4.0 sudo cp -r Newscoop/plugins /var/www/newscoop-4.0/plugins sudo chown -R www-data /var/www/newscoop-4.0
We use Sourceforge to distribute Newscoop files. Find the latest version here: http://sourceforge.net/projects/newscoop/
After you download, type the following into your command line:
tar -xvzf newscoop-4.0-RC2.tar.gz sudo mv newscoop-4.0-RC2 /var/www/newscoop-4.0 sudo chown -R www-data /var/www/newscoop-4.0
Open a terminal, and copy and paste the following command into it.
A few of these packages are in the "universe" and "multiverse" repository. If either of these is disabled, then you can enable it either in Synaptic, or by manually editing the file /etc/apt/sources.list (as root).
Updated package list for Ubuntu 11.04 (and up):
The version of Zend framework required by Newscoop is 1.11.5 or newer. This version is not available on Ubuntu 10.04, so to get Newscoop running on it you have two options.
You might face conflicts if you have some of these dependencies installed in your system. If you get a blank white screen, check /var/log/apache2/error.log for redeclare errors.
In this case you need to remove(or tweak the path of) the conflicting packages from your system or the newscoop directory. We will deal with this in a smarter way soon so that you do not have to worry about it
sudo apt-get install php5 libapache2-mod-php5 apache2 mysql-client mysql-client-5.1 mysql-server \ mysql-server-5.1 mysql-server-core-5.1 php5-cli php5-mysql php5-gd php5-curl
Go to /etc/php5/apache2, and edit php.ini as root.
sudo gedit /etc/php5/apache2/php.ini
5.1) PHP "tmp" directory
Find the line:
and set it to:
upload_tmp_dir = /tmp
5.2) Setting the timezone
We also need to set the timezone that the apache webserver is in. Find the line date.timezone, remove the semi-colon in front, and add your timezone to the end. For example:
date.timezone = "America/Toronto"
You can find the correct timezone value for your location by clicking here.
Create the file /etc/apache2/sites-available/newscoop-4.0,
sudo gedit /etc/apache2/sites-available/newscoop-4.0
and copy in the information below.
<VirtualHost *:80> DocumentRoot /var/www/newscoop-4.0/newscoop ServerName localhost ServerAdmin firstname.lastname@example.org <Directory /var/www/newscoop-4.0/newscoop> DirectoryIndex index.php AllowOverride all Order allow,deny Allow from all </Directory> </VirtualHost>
and then from the command line:
sudo a2dissite 000-default sudo a2ensite newscoop-4.0 sudo a2enmod rewrite php5 sudo service apache2 restart
Newscopp installer needs permissions for some directories, you can easly fix this with:
sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx /var/www/newscoop-4.0/newscoop/ sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx /var/www/newscoop-4.0/newscoop/
Installing Sympfony with Composer
cd /var/www/newscoop-4.0/newscoop/ sudo curl -s https://getcomposer.org/installer | php php composer.phar install --no-dev
Open a web browser and navigate to "http://localhost". If you see the Newscoop installer page, you are ready to proceed through the installation steps.
Newscoop Manual has a detailed guide on Installation that you can also check out in case you get into issues you can't resolve with this guide. This is the URL http://en.flossmanuals.net/newscoop3journalists_en/command-line-installation/.
If you are upgrading your Newscoop installation, please refer to the UPGRADE.txt file in the Newscoop sources for more info about this.
Some common issues with Newscoop Installation: