Skip to content

Commit

Permalink
Improved documentation. Fixed libraries download URL
Browse files Browse the repository at this point in the history
  • Loading branch information
janaya committed Apr 27, 2011
1 parent 4f606b3 commit 2231ad4
Show file tree
Hide file tree
Showing 6 changed files with 174 additions and 13 deletions.
134 changes: 134 additions & 0 deletions INSTALL.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
=========================================================
SMOB detailed installation instructions in Debian/Ubuntu
=========================================================

Getting and installing all the software
========================================

#. Install required software
Install the following packages (required dependencies will also be installed) :

$ sudo aptitude install libapache2-mod-php5 libapache2-mod-proxy-html php-mysql php5-curl mysql-server git

#. Download SMOB code from github:

$ git clone https://github.com/smob/smob.git

If you plan to contribute, you will a github account and clone the project with write permission:

$ git clone [email protected]:smob/smob.git

#. Download the required PHP libraries
Download arc2:

$ git clone https://github.com/semsol/arc2.git

Download xmlrpc from http://sourceforge.net/projects/phpxmlrpc/files/phpxmlrpc/3.0.0beta/xmlrpc-3.0.0.beta.tar.gz/download

#. Move the libraries to SMOB folder
Move arc2 into lib/arc:

$ mv /your/path/to/arc2 /your/path/to/smob/lib/arc

Extract xmlrpc into lib/xmlrpc:

$ unzip xmlrpc-3.0.0.beta.tar.gz
$ mv /your/path/to/xmlrpc-3.0.0.beta /your/path/to/smob/lib/xmlrpc

#. Make the config directory writable by your web server:

$ sudo chown www-data /your/path/to/smob/config

Configuring apache2
===================

#. Make sure that you have the required apache2 modules installed and enabled. If you run:

$ sudo ls -l /etc/apache2/mods-enabled

You will see at least:

lrwxrwxrwx 1 root root 30 Feb 22 16:51 rewrite.load -> ../mods-available/rewrite.load
lrwxrwxrwx 1 root root 27 Nov 25 11:22 php5.conf -> ../mods-available/php5.conf
lrwxrwxrwx 1 root root 27 Nov 25 11:22 php5.load -> ../mods-available/php5.load
lrwxrwxrwx 1 root root 33 Feb 22 16:38 proxy_html.conf -> ../mods-available/proxy_html.conf
lrwxrwxrwx 1 root root 33 Feb 22 16:38 proxy_html.load -> ../mods-available/proxy_html.load

If you don't have those files, you will have to enable or install the modules. To enable the modules:

$ sudo a2enmod rewrite php5

To install the modules:

$ sudo aptitude install libapache2-mod-php5 libapache2-mod-proxy-html



Configure SMOB to use HTTP basic authentication
------------------------------------------------

#. You can use the example file in auth/.htpasswd for user admin and password admin or create your custom .htpasswd file using http://www.htaccesstools.com/htpasswd-generator/ and pasting the result in a .htpasswd file.

#. Edit the file /your/path/to/smob/smob/auth/.htaccess and replace the .htpasswd file path with your own . It will look like:

AuthUserFile /your/path/to/smob/.htpasswd
AuthGroupFile /dev/null
AuthName "Restricted area !"
AuthType Basic
<Limit GET>
require valid-user
</Limit>

Configure the domain
---------------------

Using localhost
~~~~~~~~~~~~~~~~

Warning: this configuration is not recommended for production servers.

#. Change your apache default configuration virtualhost in /etc/apache2/sites-enabled/000-default. In the "<Directory /var/www/>" section change "AllowOverride None" to "AllowOverride All".

#. Move smob folder into /var/www/:

$ mv /your/path/to/smob /var/www/

#. Open http://localhost/smob in your browser. If everthing went ok, you should be able to install SMOB from your browser.


Using a custom virtual domain
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#. If you prefer to serve SMOB from a URL like http://example.com/ instead of http://example.com/smob/, comment the following line in /your/path/to/smob/.htaccess

#RewriteBase /smob/

#. Create your apache2 virtualhost file or customize the example in apache2/smob copying it to the apache2 path:

$ cp /your/path/to/smob/apache2/smob /etc/apache2/sites-available/example.com

Customize etc/apache2/sites-available/example.com

Enable the virtual domain and reload apache2:

$ sudo a2ensite example.com
$ sudo /etc/init.d/apache2 reload

#. Open http://example.com in your browser. If everthing went ok, you should be able to install SMOB from your browser.



Troubleshooting
==================

#. The MySQL database is created but the tables aren't
Check if you have arc library inside SMOB folder under lib/arc

#. When you try to access any other page except the index.php (Example: Deleting a post, RSS, Other, RDF), you will get an File not found error in the apache logs
Check whether you have enabled the rewrite module
Check the line "RewriteBase /smob/" in the /your/path/to/smob/.htaccess file

#. Authentication not working. (Internal Server Error: 500)
Check whether the file /your/path/to/smob/auth/.htaccess is edited properly


1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Installation

3. Enjoy

For more details see INSTALL.rst

Copyright
---------
Expand Down
24 changes: 24 additions & 0 deletions apache2/smob
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<VirtualHost *:80>
DocumentRoot /var/www/yoursmobpath
ServerName yourdomain.com
ServerAlias www.yourdomain.com

# Logs
LogLevel warn
ErrorLog /var/www/yoursmobpath/var/log/error.log
CustomLog /var/www/yoursmobpath/var/log/access.log combined
RewriteEngine on
RewriteLog "/var/www/yoursmobpath/var/log/rewrite.log"

# To enable PHP logs
#php_flag log_errors on
#php_value error_reporting 6143
# To write the log to a file
#php_value error_log /var/www/yoursmobpath/php.log

<Directory /var/www/yoursmobpath/>
AllowOverride AuthConfig Indexes Limit FileInfo
Options +SymLinksIfOwnerMatch +MultiViews
</Directory>
</VirtualHost>

23 changes: 12 additions & 11 deletions auth/.htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
#SSLOptions +StdEnvVars
#SSLOptions +ExportCertData

# If you want a simple .htaccess authentication, uncomment the following
# lines and create a corresponding htpasswd file, containing
# login:pass
# see http://www.htaccesstools.com/htpasswd-generator/ for generation
# If you don't want basic HTTP authentication, comment the following
# lines. Otherwise, uncoment them and create a corresponding .htpasswd file,
# containing login:pass
# See http://www.htaccesstools.com/htpasswd-generator/ for generation
# Or use the example auth/.htpasswd provided for user admin and password admin

# AuthUserFile /path/to/.htpassed
# AuthGroupFile /dev/null
# AuthName "Restricted area !"
# AuthType Basic
# <Limit GET>
# require valid-user
# </Limit>
AuthUserFile /path/to/.htpasswd
AuthGroupFile /dev/null
AuthName "Restricted area !"
AuthType Basic
<Limit GET>
require valid-user
</Limit>
1 change: 1 addition & 0 deletions auth/.htpasswd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
admin:$apr1$qH6rJ/..$az3eEQSNmQ43SrfvmsRh31
4 changes: 2 additions & 2 deletions lib/smob/SMOBInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ private function core() {
Before starting, you must ensure that you have met the following requirements:
</p>
<ul>
<li>Download <a href="http://arc.semsol.org/download">ARC2</a> and unzip it in the current <code>lib</code> folder and rename it from to <code>arc</code>;</li>
<li>Download <a href="http://phpxmlrpc.sourceforge.net/">XML-RPC for PHP</a>, unzip it in the current <code>lib</code> folder and rename it from <code>xmlrpc-version</code> to <code>xmlrpc</code>;</li>
<li>Download <a href="https://github.com/semsol/arc2/archives/master">ARC2</a> and unzip it in the current <code>lib</code> folder and rename it from to <code>arc</code>;</li>
<li>Download <a href="http://sourceforge.net/projects/phpxmlrpc/files/phpxmlrpc/">XML-RPC for PHP</a>, unzip it in the current <code>lib</code> folder and rename it from <code>xmlrpc-version</code> to <code>xmlrpc</code>;</li>
<li>Make the <code>config</code> directory writable by your web server;
<li>If your SMOB hub is not in the <code>/smob</code> directory of your website, please edit the <code>.htaccess</code> file accordingly;</li>
<li>Edit the <code>auth/.htaccess</code> file for authentication purposes. If you use <code>htpasswd</code> authentication, do not forget to create this file. You can use the <a href="http://www.htaccesstools.com/htpasswd-generator/">htpasswd generator here</a>.</li>
Expand Down

0 comments on commit 2231ad4

Please sign in to comment.