LovdByLess is a free open source social networking software.
For the purposes of this tutorial I’ve created a cPanel account with the following domain name and username:
Domain name: lvl.bee.arvixe.com
The goal of this article to have a working LovdByLess installation when going to http://lvl.bee.arvixe.com .
1) Make sure you have SSH Access and you can login to SSH using Putty
Download the putty client from: http://www.chiark.greenend.org.uk/~sgtatham/putty/
Putty is a free SSH client which allows you to access your account using command line. Some commands will need to be run within your account to get LovdByLess fully working.
To enable shell access on Arvixe, simply contact support and have us turn on SSH for you. It is included for free with accounts.
Use SSH to login to your account and keep that window open for further use. When logging into putty, I’m asked for a Host Name. You would type in your domain name here (as long as your domain name is fully setup on your hosting account):
Then, click on Login and you are prompted for a username, type in your CPanel username. Then, type in your cPanel password. You should see this after:
2) Create a development and test database for LovdByLess
To do this, first login to the cPanel for the account. In this case, I am going to http://lvl.bee.arvixe.com/cpanel and logging in with the username lvl and the password I’ve assigned to the account.
Under MySQL Databases:
Create a database for ‘lvl’ and ‘lvltest’. Also, create a database user with the name of ‘lvl’ and add the user to both databases. Make sure to remember the password you set for the database user. In this case, I used ‘lvldbpassword’ as the password for my lvl user. This is how my MySQL databases screen looks after this step:
After this, since CPanel adds the username_ behind your databases and database users, I have the following databases and user created:
Database #1: lvl_lvl
Database #2: lvl_lvltest
Database User: lvl_lvl
Database Password: lvldbpassword
3) Create the Ruby on Rails App for LovdByLess in the cPanel
In cPanel, click on the Ruby on Rails icon to get inside this section of your control panel:
Once inside, you will need to create an application for your LovdByLess. I will name mine ‘lvl’, set the Application path to ‘public_html/lovdbyless’ and leave all other settings as default except for Environment. Set the environment to “Development”:
Check the “Load on Boot” icon so if the server restarts, your application will continue to function.
Furthermore, click on the “Create Rewrite” button to create a Rewrite for the domain to go to the right port for the Ruby on Rails App. On the following screen, click on Save leaving everything as is.
4) Upload LovdByLess under the public_html, unzip it and edit the config files
Click on Home on the top left of your screen to return to the home of CPanel. Click on File Manager and in the popup, choose to go to the Home Directory:
First, we need to delete the ‘lovdbyless’ directory already in there that cPanel’s Ruby on Rails created. Click on the folder ‘lovdbyless’ and then click on Delete at the top of the screen.
Next, you will be extracting your LovdByLess files. First, you need to upload your LovdByLess zip file. Download it from http://lovdbyless.com/download.html and place it somewhere within your computer. Then, click on “Upload” in the file manager and browse to the file you downloaded from LovdByLess. After you have uploaded the file and are back at the file manager, you should be seeing something like this:
Click on the zip file you just uploaded and click on “Extract” at the top area of the file manager. Once done, you should see a LovdByLess folder created beside your zip file:
Double click on ‘lovedbyless’ to go inside the folder. Here, you’ll see a set of files. We need to edit some configuration files to make LovdByLess know where our databases are and how our Ruby On Rails Application is setup. Double click on the “config” directory and then click on the ‘database.yml.tmp’ file. At the type, click on the “Edit” button.
On the following screen, you will see the contents of database.yml.tmp . Update it to include the proper login information for the databases you created earlier. In our case, it looks like this:
Go back to the File Manager. Then, you need to rename ‘database.yml.conf’ to ‘database.yml’. Do this by right clicking on ‘database.yml.tmp’ and clicking on Rename. Rename to database.yml (cutting off the .tmp at the end).
Double click on the ‘environments’ folder. Then, click on ‘development.rb’ and click on the “Edit” button at the top as you have done previously with the database file, edit the 2 lines that look like this:
config.action_controller.asset_host = “http://localhost:3000″
To show your domain name instead of http://localhost:3000. Our domain name is http://lvl.bee.arvixe.com so that line will be:
config.action_controller.asset_host = “http://lvl.bee.arvixe.com”
The complete file should look like this:
5) Install the required Ruby gems from within your control panel
Go back to your control panel home and look for the Ruby Gems icon:
Click on it to go inside the section. You should see a section where you can install ruby gems. Put the name ‘rflickr’ and click on Install:
You should see a similar output to this:
Go back to the Ruby Gems section and do the same for the following Gems:
6) Run the necessary commands from command line
Go back to the putty window you had opened up and logged into and input the following command:
To navigate to where you have lovdbyless extracted
Then, invoke the following command:
If you get an error with the following results:
Missing the Rails 2.2.2 gem. Please `gem install -v=2.2.2 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.
Contact Arvixe support and have them install the rails gem version 2.2.2 with ‘gem install rails -v=2.2.2
This installation of RMagick was configured with ImageMagick 6.4.8 but ImageMagick 6.5.4-4 is in use.
Contact Arvixe support and ask them to make sure the only ImageMagick installed on the system is version ImageMagick 6.4.8 . Often, the ImageMagick libraries inside /usr/local/lib need to be cleared before recompiling through cPanel’s script.
The results of a successful rake command will look like this:
After that command, run:
When doing this command you should not receive any errors. If you don’t receive any errors, please continue.
If you receive the following lines at the end -
3 tests, 12 assertions, 2 failures, 0 errors
Errors running test:integration!
Sphinx needs to be compiled by a server admin. Please contact Arvixe support and ask them to compile sphinx from http://sphinxsearch.com/downloads.html on the server and reference this blog entry.
After, inside your lovdbyless directory, run rake ts:start;rake ts:in;rake ts:start
If rake rs:start is giving you: failed to bind on 127.0.0.1:xxxx, retrying… alter config/development.sphinx.conf inside your lovdbyless directory and change the port number to 1-10 numbers higher than what is there as a different user on the system may be using that port number
If you receive the following lines at the end -
Errors running test:units, test:functionals, and test:integration!
You may have missed a step in the installation. Please go back and double check everything. If you need Support’s assistance, please contact us. We may need to start the installation from scratch however.
7) Go back to the control panel and start the LovdByLess Ruby on Rails Application
Under the Ruby on Rails icon, click on the start button. You should now be able to go to your site and view the LovdByLess installation. Go to http://Domain/login and create an account. You should be greeted with a page similar to this –
Once you create an account, it will log you in automatically.
Issue #1: If you don’t see any images or color, its possible that the rewrite .htaccess file was not setup properly by cpanel.
Open the .htaccess in your www root (public_html) and change RewriteRule ^/?$ to RewriteRule ^.*$
Issue #2: When trying to upload profile images or images in general, the entire application crashes. The following line shows up in the log/mongrel.log file: libgomp: Thread creation failed: Cannot allocate memory
Arvixe staff needs to set the maxmem variable for cPanel to 0 (Unlimited). This is done in /var/cpanel/cpanel.config -> maxmem=0 and then run /usr/local/cpanel/whostmgr/bin/whostmgr2 –updatetweaksettings . This can also be done from WHM under Server Configuration >> Tweak Settings >> System -> The maximum memory a cpanel process…
8) Set the account you just created to become the administrator of your LovdByLess Site
Go back to the home of your control panel and click on PHPMyAdmin:
Choose the _lvl database from the left drop down menu. Then click on the ‘users’ table. You should see something like this –
Then, click on the “SQL” tab and input the following in the the large text box –
UPDATE `users` SET `is_admin` = TRUE;
Then, click on Go.
Now, when you login to your LovdByLess, you should see an Admin icon on the top right. Click on that and you should see something like this –
There! Now you have a working LovdByLess installation. Read below on what this tutorial does not cover (and more tutorials may be written to cover these aspects)
This tutorial does not cover steps 6-13 from the README file (mainly configuration) listed below:
6. Edit config/initializers/exception_notifier.rb
7. Edit the config/environment.rb file and change the config.action_controller.session data
8. Edit config/environments/development.rb and production.rb to suit your tastes. (Specifically config.action_mailer.delivery_method)
9. Change the values in config/initializers/global_variables.rb to match your site and domain. (Specifically SITE_NAME, SITE, MAILER_TO_ADDRESS, MAILER_FROM_ADDRESS, REGISTRATION_RECIPIENTS)
10. Go to the section “About flickr integration” and follow the steps to either use flickr or not.
11. Edit public/404.html, public/500.html, app/views/account_mailer/*
12. Edit application.css to suite your tastes.
13. Edit app/views/home/terms.
This tutorial does not outline how to run LovdByLess in production mode. LovdByLess is running in development mode.