Debian Installation Instructions
From Newscloud
Try the beta instructions for our new package installer: Debian_Installation_Instructions_v2 Please post your experience/feedback with it to the Developer Forum.
From your SSH shell, the steps below should properly configure your system. For this exercise, we use Debian 3.1 Stable (formerly Sarge). I wrote these instructions using an account at JVDS (StandardLinux1 VPS for $20/mo).
You can also browse our sample configuration files in /static/platforms/debian. We have example files here for php.ini, httpd.conf and custom.conf. We don't recommend copying these but they may be helpful for comparison via diff.
Contents |
General System Requirements
- Apache/1.3.33
- MySQL 4.x
- PHP 4.x
See also
- Release Notes: These instructions were tested with the January 2007b release.
- NewsCloud Hosting Options
Configure the NewsCloud environment
The following procedures demonstrate how to update your Debian packages and configure Apache, MySQL, Smarty, PHP, cron and NewsCloud.
Get packages
#refresh debian packages apt-get update
#install helpful tools apt-get install sudo apt-get install apt-show-versions
#set up Apache 1.3, MySQL 4.1x, PHP4, GD, PEAR and Smarty apt-get install apache apt-get install mysql-server-4.1 apt-get install libapache-mod-php4 php4-mysql php4-gd php4-pear apt-get install smarty apt-get install postfix pear install HTTP HTTP_Download HTTP_Header HTTP_Request pear install HTML_Common pear install HTML_QuickForm
# set up CVS apt-get install cvs
Install NewsCloud
# get newscloud source from SourceForge # place code in staging directory /code mkdir /code cd /code # unzip the download to /code # copy the source code from the staging directory (CVS sync location) to the live Apache Web tree mkdir /var/www/newscloud cp -r src/newscloud/ /var/www/ # double check that the .htaccess file now exists in /var/www/newscloud
Configure MySQL
# set the MySQL password mysqladmin -u root password 'yourmysqlpassword' # Import the sample NewsCloud database into MySQL mysql -uroot -p create database newscloud; quit; cd /code/newscloud/database gunzip newscloud.sql.gz mysql -uroot -p newscloud < /code/newscloud/database/newscloud.sql
Configure Apache
#Set up a custom.conf file in /etc/apache/conf.d cd /etc/apache/conf.d nano custom.conf
Listen 80 NameVirtualHost * # if you use a different domain, be sure to change the domain used in .htaccess in the root as well as in /static/redirect <VirtualHost *:80> ServerName newscloud.com ServerAlias *.newscloud.com DocumentRoot /var/www/newscloud/ <Directory /var/www/newscloud > AllowOverride All </Directory> </VirtualHost> # eventually we will change this in the code base # but in the meantime you can global replace image.commonmedia.org with your own image.yourdomain.com #<VirtualHost *:80> # ServerName image.commonmedia.org # ServerAlias image.commonmedia.org # DocumentRoot /var/www/newscloud/image_files/ #</VirtualHost>
# Edit httpd.conf in /etc/apache cd /etc/apache nano httpd.conf # Make the changes below
DocumentRoot /var/www/newscloud
<Directory />
Options SymLinksIfOwnerMatch
AllowOverride None
</Directory>
<Directory /var/www/newscloud>
Options Indexes Includes FollowSymLinks MultiViews
Order allow,deny
Allow from all
</Directory>
<IfModule mod_alias.c>
# Alias /icons/ /usr/share/apache/icons/
# <Directory /usr/share/apache/icons>
# Options Indexes MultiViews
# AllowOverride None
# Order allow,deny
# Allow from all
# </Directory>
# Alias /images/ /usr/share/images/
# <Directory /usr/share/images>
# Options MultiViews
# AllowOverride None
# Order allow,deny
# Allow from all
# </Directory>
</IfModule>
=== Configure PHP ===
# And for PHP 4.x, use:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
# Edit php.ini in /etc/php4/apache cd /etc/php4/apache nano php.ini # Uncomment and modify the following lines include_path = ".:/usr/share/php:/var/www/newscloud" extension=mysql.so extension=gd.so
# Set up newscloud.ini include file (changed from earlier versions of separate .inc files) # To prevent abuse, we use this include files for installation-specific passwords # and keys. This file should be placed one directory above your root directory # e.g. If you're web server directory for NewsCloud is /var/www/newscloud. Place this file in /var/www. cd /var/www/newscloud cp newscloud.ini ../ cd /var/www nano newscloud.ini
[db] database="newscloud" username="yourusername" password="yourpasswd" hostname="" [crypt] pwCrypt="anystrongstring" apiCrypt="anystrongstring" // if you want to use edit group amazon features amazonAssociateId="commonmediaor-20" // or your associate id amazonKey="youramazonkey" [api] apiKey="yourapikey"
Configure Cache directory
# set up the cache directory for html and js and css packages
cd /var/www/newscloud mkdir cache chmod 775 /var/www/newscloud/cache
Configure Smarty
# Set up Smarty directories
cd /var/www/newscloud mkdir static/smarty/templates mkdir /var/www/smarty mkdir /var/www/smarty/templates_c mkdir /var/www/smarty/configs mkdir /var/www/smarty/cache chown www-data:www-data /var/www/smarty/templates_c chown www-data:www-data /var/www/smarty/cache chmod 775 /var/www/smarty/templates_c chmod 775 /var/www/smarty/cache
# Set up Feed Creator Directory # Feed creator needs a dir called 'rss' at the root of the workspace
cd /var/www/newscloud mkdir ./rss chmod 777 ./rss
Configure cron
# Copy sample CRON script to your CRON directory cp /code/newscloud/src/cron/newscloud.cron /etc/cron.d # Edit newscloud.cron to include your api key from above or cron jobs will fail cd /etc/cron.d nano newscloud.cron
#Restart Apache /usr/sbin/apachectl restart
Miscellaneous
# Remember, the default superuser account in the distribution database # is newsmonkey@gmail.com with password NewsCloud
# Read more on Administrating NewsCloud # Read more on Optimizing Your NewsCloud Server
# Configure the newscloud.log file > touch /var/log/newscloud.log > chown www-data:www-data /var/log/newscloud.log
