Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: getting snews to work on Ubuntu 8.04 LTS desktop  (Read 5119 times)

lessismore

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 67
getting snews to work on Ubuntu 8.04 LTS desktop
« on: June 02, 2008, 11:17:47 pm »

Subject: How to install and configure Ubuntu 8.04 LTS Desktop for sNews

1.) Install Ubuntu Desktop 8.04.

Assuming the reboot went well, I'd update the OS with:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get check (to verify you have everything right)
sudo reboot (not an absolute requirement - but I'd do it)

NOTE:

If you are doing this on an older laptop without integrated ethernet, I have found the USB to ethernet dongles work very nice.  Also, I have got ethernet PCMCIA cards to work - but only if the cards are ejected and reinserted after a reboot.

2.) Install and Configure Ubuntu to support LAMP

Setup a Static IP:
  Hit the network icon (upper right),
  change from roaming to static,
  set the IP info relevant to your network

Open a command line terminal:
  Hit Applications (upper left)
  Applications -> Accessories -> Terminal

Enter the following commands:

a.) sudo tasksel
    add LAMP, SSH thru the text based installer
    notes: LAMP prompts for a root mySQL password
           SSH is not needed for sNews, but it is
           nice to be able to remotely login in via
           SSH or putty (windows) later.
b.) sudo apt-get install phpmyadmin
    select apache2 to reconfigure
      optional: test phpmyadmin via http://localhost/phpmyadmin
        userid: root
        password: (whatever you typed in during the LAMP install)
c.) sudo apt-get install proftpd ucf
    will get prompted for "from inetd" or "standalone"
    choose standalone
      optional:
        test ftp (login with whatever acct you used during install)
        if it does not work, try:
          /etc/init.d/proftpd restart
        (mine worked without the restart)
    notes: FTP is not needed for sNews - but it is nice to have
d.) sudo a2enmod rewrite
e.) sudo /etc/init.d/apache2 force-reload
    note: don't worry about the FQDN warning
      optional:
        verify mod_rewrite is enabled:
        add this content to file to /var/www/info.php
          <?php phpinfo(); ?>
        http://localhost/info.php - search for mod_rewrite
        mod_rewrite should be under the apache2handler section
        in the "Loaded Modules" row
f.) cd /etc/apache2/sites-enabled
g.) sudo vi 000-default
    change AllowOverride from None to All in both sections:
      DocumentRoot /var/www/
      <Directory /var/www/>
    note: assumes you know vi, otherwise, try sudo gedit 000-default
h.) sudo /etc/init.d/apache2 force-reload
i.) http://localhost/phpmyadmin
      enter a name for the snews database
      select utf8_unicode_ci for collation
      hit the "create" button

3.) Download and Install sNews:

Use your preferred method to get the snews tarball on your file system.
Assuming you have your distro at: /var/www/snews - do the following:

a.) http://localhost/snews/readme.html

    Copy the SQL into your buffer.

b.) http://localhost/phpmyadmin

    Select the database you created for snews,
    hit the SQL link and paste in the SQL.

c.) Edit your snews.php file use "root" and the password
    you gave during the LAMP install.

NOTE:

If you are on a shared system or have higher security needs, using the "root" user for the database is not ideal.  You can go into phpmyadmin, create a new user, give that new user privileges to your snews database and use that new user and password combo in your snews.php file.

d.) Edit your .htaccess file to use the RewriteEngine
    and the RewriteBase of your install directory.
    Example lines in .htaccess
      ReWriteEngine On
      ReWriteBase /snews
Logged