Thursday, April 7, 2011

How To Install Managing News On Ubuntu

Managing News is an RSS/Atom based news tracker with search, republishing and mapping. This tutorial shows how to install Managing News on an Ubuntu server.

Create database:

mysqladmin create [database]

Access MySQL:

mysql -u root -p[password]

Grant manipulation privileges to the database:

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER
ON [database].*
TO '[database_username]'@'localhost' IDENTIFIED BY '[password]';

Flush the grant tables (same as reload):

flush privileges;

Type this command:

wget http://managingnews.com/files/managingnews-1.2.zip

After download has finished, extract the file by typing this command:

unzip managingnews-1.2.zip

After finish extracting the file, move the file to /var/www/ folder by typing:

mv managingnews-1.2/* /var/www/

Go to the /var/www/sites/default/ folder and copy the default.settings.php to settings.php:

cd /var/www/sites/default/
cp default.settings.php settings.php

Then, change write permission of settings.php:

chmod a+w settings.php

In the same folder (/var/www/sites/default/ folder), create a files directory:

mkdir files

Then, change write permission of files directory:

chmod a+w files

Open your browser and type: http://YOURIPADDRESS/install.php

Choose profile: Click on install Managing News.

Set up database: Fill in the name of the database you created, database username and the database password.

Then, click "Save and continue" button.

Go to the /var/www/sites/default/ folder and remove write permission of settings.php:

cd /var/www/sites/default/
chmod a-w settings.php

Then, go back to the previous folder which is /var/www/sites/ folder and remove write permission of default folder:

cd ..
chmod a-w default

Configure site: Fill in Site name and Site e-mail address in "Site Information"section.

Configure site: Fill in Username, E-mail address, Password, Confirm password in "Administration account" section.

Configure site: Select for Default time zone, click Enabled for Clean URLs, and click Check for updates automatically for Update notifications in "Server settings" section.

Then, click "Save and continue" button.



View the original article here


This post was made using the Auto Blogging Software from WebMagnates.org This line will not appear when posts are made after activating the software to full version.

HowtoForge Has Now Its own Facebook Page

We at HowtoForge are proud to announce that our new Facebook page is now available under http://www.facebook.com/howtoforge. As most of you probably have a Facebook account, we want to use this additional channel to post updates and get feedback from you. Therefore we would like you to "Like" our page, share it with your friends, post comments, etc. :-)



View the original article here


This post was made using the Auto Blogging Software from WebMagnates.org This line will not appear when posts are made after activating the software to full version.

How To Install Apache-Solr And Use It With Drupal And ISPConfig (OpenSUSE/Debian)

Solr is the popular, blazing fast open source enterprise search platform from the Apache Lucene project. Its major features include powerful full-text search, hit highlighting, faceted search, dynamic clustering, database integration, and rich document (e.g., Word, PDF) handling. I use this on OpenSUSE and Debian (minor tweaks on Debian, just paths to correct but it's almost the same). Packages from 4 of March 2011.

Install Drupal. And use ISPConfig 2.

Use this .htacess file in the root of your Drupal installation:

 
RewriteEngine on
#RewriteBase /  
RewriteCond %{REQUEST_FILENAME} !-f  
RewriteCond %{REQUEST_FILENAME} !-d  
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]  
#RewriteCond %{REQUEST_URI} !=/favicon.ico

Alter the .htacess file in /web/sites/default/files and comment:

#SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
#Options None

Install Drupal. This tutorial doesn't cover full Drupal installation.

Log in as root or sudo as you wish.

Install some dependencies Drupal needs:

pecl install uploadprogress
pecl install json
pecl install apc
pecl install -n solr-beta

Also install Java 1.5 (gives error if 1.6) on your server. (This tutorial doesn't cover Java installation.)

Open your php.ini...

nano -w /etc/php5/apache2/php.ini

... and paste the following extensions uploadprogress, apc and solr so the extensions load with PHP:

; Directory in which the loadable extensions (modules) reside.
extension_dir = /usr/lib64/php5/extensions
extension=uploadprogress.so
extension=apc.so
extension=solr.so

Save your file and restart webserver:

/etc/init.d/apache2 restart

cd /tmp
wget http://mirrors.ukfast.co.uk/sites/ftp.apache.org/lucene/solr/1.4.1/apache-solr-1.4.1.zip
unzip apache-solr-1.4.1.zip
mv apache-solr-1.4.1 apache-solr
cp -r apache-solr /usr/share/apache-solr

Copy configuration from your Drupal installation, in my case /srv/www/web11/web:

cp /srv/www/web11/web/sites/all/modules/apachesolr/solrconfig.xml /usr/share/apache-solr/example/solr/conf/solrconfig.xml
cp /srv/www/web11/web/sites/all/modules/apachesolr/schema.xml /usr/share/apache-solr/example/solr/conf/schema.xml

cd apache-solr/example
java -jar start.jar

In your browser, test it (remember to open in ISPConfig firewall port 8983):

http://yourwebsite.com:8983/solr/admin/

TEST OK!

ctrl+c in your terminal and apache-solr ends... But never mind.

Let's make a start script so it starts solr when system boots:

nano -w /etc/init.d/solr

And paste this script:

#!/bin/sh -e

# Starts, stops, and restarts solr

SOLR_DIR="/usr/share/apache-solr/example"
JAVA_OPTIONS="-Xmx1024m -DSTOP.PORT=8079 -DSTOP.KEY=stopkey -jar start.jar"
LOG_FILE="/var/log/solr.log"
JAVA="/usr/bin/java"

case $1 in
start)
echo "Starting Solr"
cd $SOLR_DIR
$JAVA $JAVA_OPTIONS 2> $LOG_FILE &
;;
stop)
echo "Stopping Solr"
cd $SOLR_DIR
$JAVA $JAVA_OPTIONS --stop
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}" >&2
exit 1
;;
esac

Make it executable:

chmod a+rx /etc/init.d/solr

Check what is booting:

chkconfig --list

Oh no! solr is not booting. Of course not!

chkconfig --add solr

Then try to stop it:

service solr stop

Oh. It's not working? Let's try to start it:

service solr start

Test on your browser. 

http://yourdomain.com:8983/solr/admin/

It's ALIVE! apache-solr, search on steroids!

Now you can reboot your server, too, and see apache-solr working. :)



View the original article here


This post was made using the Auto Blogging Software from WebMagnates.org This line will not appear when posts are made after activating the software to full version.