Talk:Installation/DreamHost: Difference between revisions

From diaspora* project wiki
(Rough in progress of sorting this out)
 
No edit summary
 
Line 1: Line 1:
You need to create a new database for diaspora from dreamhost panel. Bundler
''This is what I have so far. There are some bits I haven't worked out and maybe check over the order of the install.''


To install Bundler, run the following:


  $ gem install bundler
The Dreamhost VPS is Ubuntu/Precise without root access. If you reference this document, it will help to highlight the specific needs of this platform.
https://wiki.diasporafoundation.org/Installation/Ubuntu/Precise


''$ gem install bundler
Use a prompt that helps you locate where you are
ERROR:  While executing gem ... (Errno::EACCES)
[server]$ PS1='$(hostname):$(pwd) > '
    Permission denied - /var/lib/gems
[ps581744]$ gem install bundler
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied - /var/lib/gems
''


Grab Diaspora for later...
[server]:/home/[user directory] > git clone -b master https://github.com/diaspora/diaspora.git


Redis ''(what's this it isn't clear what it is or what it does)''


To install Redis follow these steps (you can skip this step if you are going to use single_process_mode):
[server]:/home/[user directory] > ruby --version
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
You need Ruby 2.3 for Diaspora


  $ wget http://redis.googlecode.com/files/redis-2.4.5.tar.gz
[server]:/home/[user directory] > gem install bundler
[server]:/home/[user directory] > wget http://download.redis.io/releases/redis-3.2.9.tar.gz
[server]:/home/[user directory] > tar -zxvf redis-3.2.9.tar.gz
[server]:/home/[user directory] > cd redis-3.2.9
[server]:/home/[user directory]/redis-3.2.9 > cd src; make PREFIX=$HOME/redis
[server]:/home/[user directory]/redis-3.2.9/src > make test
[server]:/home/[user directory]/redis-3.2.9/src > make PREFIX=$HOME/redis install


??? wget http://download.redis.io/releases/redis-3.2.9.tar.gz
[server]:/home/[user directory]/redis-3.2.9/src > cd ~


  $ tar -zxvf redis-2.4.5.tar.gz
create file .gemrc and add the following line so that gem installs are directed to the user directory.
gem: --user-install


??? $ tar -zxvf redis-3.2.9.tar.gz
[server]:/home/[user directory] > curl -L https://s.diaspora.software/1t | bash
Add the following line to the ~/.bashrc file.
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"


  $ cd redis-2.4.5


??? $ cd redis-3.2.9
[server]:/home/[user directory] > gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3


  $ cd src; make PREFIX=$HOME/redis
[server]:/home/[user directory] > curl -L https://s.diaspora.software/1t | bash
  $ make PREFIX=$HOME/redis install
 
  $ ~/.gems/bin/bundle
You need this extra stuff for RVM
 
wget https://fossies.org/linux/misc/gmp-6.1.2.tar.gz
tar xzf gmp-6.1.2.tar.gz
cd gmp-6.1.2
cd gmp-6.1.2
./configure --prefix=${HOME}/gmp/6.1.2
make
make install
 
GMP_DIR="${HOME}/gmp/6.1.0"~/.bash_profile
export LD_LIBRARY_PATH=${GMP_DIR}/lib64:$LD_LIBRARY_PATH
export LIBRARY_PATH=${GMP_DIR}/lib64:$LIBRARY_PATH
export CPATH=${GMP_DIR}/include:$CPATH
 
Check Ruby...
[server]:/home/[user directory] > rvm --version
rvm 1.29.1 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io/]
 
Update Ruby
[server]:/home/[user directory] > rvm autolibs disable
[server]:/home/[user directory] > rvm install 2.3
 
Set the default
[server]:/home/[user directory] > rvm use 2.3 --default
Using /home/[user directory]/.rvm/gems/ruby-2.3.3
 
[server]:/home/[user directory] > cd diaspora
on change directory the following it triggered
ruby-2.3.3 - #gemset created /home/[user directory]/.rvm/gems/ruby-2.3.3@diaspora
ruby-2.3.3 - #generating diaspora wrappers..........
 
Edit the database and diaspora yml files
 
Set up the Dreamhost domain
Web directory: diaspora/public
Check Passenger and RVM
RVM: /home/[user directory]/.rvm/wrappers/default/ruby
You must use this path as the other path has illegal characters
 
Setup databases
diaspora_development
diaspora_production
diaspora_test
diaspora_integration1
diaspora_integration2
Bundle
It's time to install the Ruby libraries required by diaspora*:
gem install bundler
RAILS_ENV=production bin/bundle install --jobs $(nproc) --deployment --without test development --with mysql
This takes quite a while. When it's finished, you should see a message similar to: Bundle complete! 137 Gemfile dependencies, 259 gems now installed. If that's not the case, you should seek for help on the mailing list or the IRC channel. The --jobs $(nproc) flag speeds things a bit since it enables parallel downloading. nproc shows the number of CPU cores you have available.
Running the manual gem install command shown in the error message can sometimes show a clearer error message if the bundle command fails.
Database setup
Double check your config/database.yml looks right and run:
RAILS_ENV=production bin/rake db:create db:schema:load
 
Precompile assets
v
Start diaspora*
It's time to start diaspora*:
./script/server
 
Doesn’t work here...
[server]:/home/[user directory]/diaspora > gem install reload
[server]:/home/[user directory]/diaspora > gem install setup
[server]:/home/[user directory]/diaspora > gem install unicorn
 
Switched the server to Ngnix
 
 
 
''Now i have ti working...''
What I have done is copy redis-integration1.conf to redis-integration.conf edit the file then use the following start commend.
 
[server]:/home/[user directory] > ~/redis/bin/redis-server ~/diaspora/redis-integration.conf
 
I think the about should be in ./script/server.
 
Didn't spot anything yet that made the conventions for using the redis...conf file.

Latest revision as of 07:34, 16 June 2017

This is what I have so far. There are some bits I haven't worked out and maybe check over the order of the install.


The Dreamhost VPS is Ubuntu/Precise without root access. If you reference this document, it will help to highlight the specific needs of this platform. https://wiki.diasporafoundation.org/Installation/Ubuntu/Precise

Use a prompt that helps you locate where you are [server]$ PS1='$(hostname):$(pwd) > '

Grab Diaspora for later... [server]:/home/[user directory] > git clone -b master https://github.com/diaspora/diaspora.git


[server]:/home/[user directory] > ruby --version ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] You need Ruby 2.3 for Diaspora

[server]:/home/[user directory] > gem install bundler [server]:/home/[user directory] > wget http://download.redis.io/releases/redis-3.2.9.tar.gz [server]:/home/[user directory] > tar -zxvf redis-3.2.9.tar.gz [server]:/home/[user directory] > cd redis-3.2.9 [server]:/home/[user directory]/redis-3.2.9 > cd src; make PREFIX=$HOME/redis [server]:/home/[user directory]/redis-3.2.9/src > make test [server]:/home/[user directory]/redis-3.2.9/src > make PREFIX=$HOME/redis install

[server]:/home/[user directory]/redis-3.2.9/src > cd ~

create file .gemrc and add the following line so that gem installs are directed to the user directory. gem: --user-install

[server]:/home/[user directory] > curl -L https://s.diaspora.software/1t | bash Add the following line to the ~/.bashrc file. -s "$HOME/.rvm/scripts/rvm" && source "$HOME/.rvm/scripts/rvm"


[server]:/home/[user directory] > gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

[server]:/home/[user directory] > curl -L https://s.diaspora.software/1t | bash

You need this extra stuff for RVM

wget https://fossies.org/linux/misc/gmp-6.1.2.tar.gz tar xzf gmp-6.1.2.tar.gz cd gmp-6.1.2 cd gmp-6.1.2 ./configure --prefix=${HOME}/gmp/6.1.2 make make install

GMP_DIR="${HOME}/gmp/6.1.0"~/.bash_profile export LD_LIBRARY_PATH=${GMP_DIR}/lib64:$LD_LIBRARY_PATH export LIBRARY_PATH=${GMP_DIR}/lib64:$LIBRARY_PATH export CPATH=${GMP_DIR}/include:$CPATH

Check Ruby... [server]:/home/[user directory] > rvm --version rvm 1.29.1 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [1]

Update Ruby [server]:/home/[user directory] > rvm autolibs disable [server]:/home/[user directory] > rvm install 2.3

Set the default [server]:/home/[user directory] > rvm use 2.3 --default Using /home/[user directory]/.rvm/gems/ruby-2.3.3

[server]:/home/[user directory] > cd diaspora on change directory the following it triggered ruby-2.3.3 - #gemset created /home/[user directory]/.rvm/gems/ruby-2.3.3@diaspora ruby-2.3.3 - #generating diaspora wrappers..........

Edit the database and diaspora yml files

Set up the Dreamhost domain Web directory: diaspora/public Check Passenger and RVM RVM: /home/[user directory]/.rvm/wrappers/default/ruby You must use this path as the other path has illegal characters

Setup databases diaspora_development diaspora_production diaspora_test diaspora_integration1 diaspora_integration2 Bundle It's time to install the Ruby libraries required by diaspora*: gem install bundler RAILS_ENV=production bin/bundle install --jobs $(nproc) --deployment --without test development --with mysql This takes quite a while. When it's finished, you should see a message similar to: Bundle complete! 137 Gemfile dependencies, 259 gems now installed. If that's not the case, you should seek for help on the mailing list or the IRC channel. The --jobs $(nproc) flag speeds things a bit since it enables parallel downloading. nproc shows the number of CPU cores you have available. Running the manual gem install command shown in the error message can sometimes show a clearer error message if the bundle command fails. Database setup Double check your config/database.yml looks right and run: RAILS_ENV=production bin/rake db:create db:schema:load

Precompile assets v Start diaspora* It's time to start diaspora*: ./script/server

Doesn’t work here... [server]:/home/[user directory]/diaspora > gem install reload [server]:/home/[user directory]/diaspora > gem install setup [server]:/home/[user directory]/diaspora > gem install unicorn

Switched the server to Ngnix


Now i have ti working... What I have done is copy redis-integration1.conf to redis-integration.conf edit the file then use the following start commend.

[server]:/home/[user directory] > ~/redis/bin/redis-server ~/diaspora/redis-integration.conf

I think the about should be in ./script/server.

Didn't spot anything yet that made the conventions for using the redis...conf file.