couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Installing_on_Ubuntu" by OctavianDamiean
Date Mon, 23 Jul 2012 21:34:18 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Installing_on_Ubuntu" page has been changed by OctavianDamiean:
http://wiki.apache.org/couchdb/Installing_on_Ubuntu?action=diff&rev1=76&rev2=77

Comment:
improved formatting

  {{{
  sudo chown -R couchdb /var/run/couchdb
  }}}
+ 
  Need to rerun the setup script:
  
  {{{
@@ -34, +35 @@

  
  This is a basic outline of the steps required to build CouchDB from source on Ubuntu.  Like
many things, there are multiple ways to achieve the same task. With that in mind, these steps
may or may not be the best method for you (Example #2 below uses a javascript engine that
is installed from source, which may be preffered for minimal Ubuntu systems).
  
-  * Install first set of dependencies: {{{sudo apt-get build-dep couchdb}}}
+  * Install first set of dependencies: `sudo apt-get build-dep couchdb`
   * Install second set of dependencies:
-   * Ubuntu '''up to 9.10''': {{{sudo apt-get install libmozjs-dev libicu-dev libcurl4-gnutls-dev
libtool}}}
+   * Ubuntu '''up to 9.10''': `sudo apt-get install libmozjs-dev libicu-dev libcurl4-gnutls-dev
libtool`
-   * Ubuntu '''10.04 and later when building CouchDB-1.1.x or less''': {{{sudo apt-get install
xulrunner-1.9.2-dev libicu-dev libcurl4-gnutls-dev libtool erlang-eunit}}}
+   * Ubuntu '''10.04 and later when building CouchDB-1.1.x or less''': `sudo apt-get install
xulrunner-1.9.2-dev libicu-dev libcurl4-gnutls-dev libtool erlang-eunit`
     . Note that in 11.10 and later, xulrunner-1.9.2 includes the development files, so xulrunner-1.9.2-dev
does not exist (install xulrunner-1.9.2 instead).
     . Then [[#xulrunner.conf|create /etc/ld.so.conf.d/xulrunner.conf]].
-   * Ubuntu '''11.04 and later when building CouchDB-1.2 or greater''': {{{sudo apt-get install
libmozjs-dev libicu-dev libcurl4-gnutls-dev libtool}}}
+   * Ubuntu '''11.04 and later when building CouchDB-1.2 or greater''': `sudo apt-get install
libmozjs-dev libicu-dev libcurl4-gnutls-dev libtool`
   * Download CouchDB from http://couchdb.apache.org/downloads.html.
-  * Untar (decompress) the source file: {{{tar -zxvf apache-couchdb-*.*.*.tar.gz}}}
+  * Untar (decompress) the source file: `tar -zxvf apache-couchdb-*.*.*.tar.gz`
-  * Change into the expanded directory: {{{cd apache-couchdb-*.*.*}}}
+  * Change into the expanded directory: `cd apache-couchdb-*.*.*`
-  * Configure the build: {{{./configure}}}
+  * Configure the build: `./configure`
    . On Ubuntu '''10.04 and later when building CouchDB-1.1.x or less''':
-    . {{{./configure --with-js-include=/usr/lib/xulrunner-devel-w.x.y.z/include --with-js-lib=/usr/lib/xulrunner-devel-w.x.y.z/lib}}}
+    . `./configure --with-js-include=/usr/lib/xulrunner-devel-w.x.y.z/include --with-js-lib=/usr/lib/xulrunner-devel-w.x.y.z/lib`
     . or
-    . {{{LDFLAGS="$(pkg-config mozilla-js --libs-only-L)" CFLAGS="$(pkg-config mozilla-js
--cflags)" ./configure}}}
+    . `LDFLAGS="$(pkg-config mozilla-js --libs-only-L)" CFLAGS="$(pkg-config mozilla-js --cflags)"
./configure`
-   . On Ubuntu '''11.04 and later when building CouchDB-1.2 or greater''': No special flags
should be necessary to build. Simply run {{{./configure}}}
+   . On Ubuntu '''11.04 and later when building CouchDB-1.2 or greater''': No special flags
should be necessary to build. Simply run `./configure`
    . You may want to specify build options like the installation directory, etc. Please reference
the examples below.
-  * Build or Compile the source: {{{make}}}
+  * Build or Compile the source: `make`
   * Fix any error before moving to the next step.
-  * Install your newly built CouchDB: {{{sudo make install}}}
+  * Install your newly built CouchDB: `sudo make install`
   * Once the installation completes successfully, you will need to make sure that there is
a CouchDB user, and that the CouchDB user owns the necessary files and directories.
-  * Now you can run CouchDB manually by changing into the {{{bin/}}} folder of the installation
directory, and running: {{{sudo -u couchdb ./couchdb}}}
+  * Now you can run CouchDB manually by changing into the `bin/` folder of the installation
directory, and running: `sudo -u couchdb ./couchdb`
   * Once the server is running you can browse to http://localhost:5984/_utils.  This should
take you to the Futon Web GUI.
   * To be thorough, you should run the built in tests to ensure that CouchDB is working properly.
 To '''run the tests''', click on the [[http://localhost:5984/_utils/couch_tests.html?script/couch_tests.js|Test
Suite]] link on the right hand side of the Futon Web GUI, then click on "Run All" to execute
all of the built in tests.  ''All of tests should run without error on Ubuntu.''
   * Once CouchDB is working properly you can add CouchDB to your startup scripts if desired.
@@ -109, +110 @@

  curl http://127.0.0.1:5984/
  # {"couchdb":"Welcome","version":"1.0.1"}
  }}}
+ 
  === Example 1 (Alternate) ===
  The default installation of Ubuntu desktop 10.04 has a lot of version 0.10.0 CouchDB files
and I did not want to worry about having them mixed with my source installed files.
  
- This set of install instructions is modified from Example 1 and places all current CouchDB
files within the /usr/local/ tree. Any other CouchDB related files outside of /usr/local/
can be deleted or ignored.
+ This set of install instructions is modified from Example 1 and places all current CouchDB
files within the `/usr/local/` tree. Any other CouchDB related files outside of `/usr/local/`
can be deleted or ignored.
  
  {{{
  sudo su
@@ -160, +162 @@

  
  # run test suite in firefox at http://127.0.0.1:5984/_utils/couch_tests.html?script/couch_tests.js
  }}}
+ 
  === Example 2 (with minimal dependencies) ===
  Tested with CouchDB versions: 0.11.0, 1.0.0
  
@@ -173, +176 @@

  {{{
  sudo apt-get install libicu-dev libcurl4-gnutls-dev libtool erlang-dev erlang
  }}}
+ 
- '''Note''': Without the 'erlang' package, couchdb could still be installed, but would be
missing important erlang libraries and won't run properly.
+ ''Note: Without the 'erlang' package, couchdb could still be installed, but would be missing
important erlang libraries and won't run properly.''
  
  ==== Installation: ====
  {{{
@@ -193, +197 @@

  sudo chown -R couchdb: ${prefix}/var/{lib,log,run}/couchdb ${prefix}/etc/couchdb
  sudo chmod 0770 ${prefix}/var/{lib,log,run}/couchdb ${prefix}/etc/couchdb
  }}}
+ 
  === Additional Notes ===
  '''Problems after upgrading from source'''
  
- If you have previously built and installed from source it is likely that there will be a
previous version of the Erlang libraries (couch-x.x.x, erlang-oauth, etap, ibrowse-x.x.x,
mochiweb-xxx) in /usr/local/lib/couchdb/erlang/lib. These should be removed before doing 'sudo
make install' for the new version. If you only discover a problem (e.g., CouchDB crashes)
after doing the new install, the problem might be solved by manually removing everything in
/usr/local/lib/couchdb/erlang/lib and redoing 'sudo make install'.
+ If you have previously built and installed from source it is likely that there will be a
previous version of the Erlang libraries (couch-x.x.x, erlang-oauth, etap, ibrowse-x.x.x,
mochiweb-xxx) in `/usr/local/lib/couchdb/erlang/lib`. These should be removed before doing
`sudo make install` for the new version. If you only discover a problem (e.g., CouchDB crashes)
after doing the new install, the problem might be solved by manually removing everything in
`/usr/local/lib/couchdb/erlang/lib` and redoing `sudo make install`.
  
  <<Anchor(xulrunner.conf)>>
  
@@ -207, +212 @@

  OS Process Error <0.4649.0> :: {os_process_error,{exit_status,127}}
  /opt/couchdb/lib/couchdb/bin/couchjs: error while loading shared libraries: libmozjs.so:
cannot open shared object file: No such file or directory
  }}}
+ 
  This is can be resolved by creating an xulrunner configuration as follows:
  
  {{{
  sudo vi /etc/ld.so.conf.d/xulrunner.conf
  }}}
+ 
- Note: To check what XULRunner version you have installed use xulrunner -v
+ ''Note: To check what XULRunner version you have installed use xulrunner -v''
  
  Then add the following lines to the file (You may need to change the library version to
match whats installed):
  
@@ -220, +227 @@

  /usr/lib/xulrunner-x.x.x.x
  /usr/lib/xulrunner-devel-x.x.x.x
  }}}
+ 
- Once the configuration files is created and saved, you will need to run ldconfig:
+ Once the configuration files is created and saved, you will need to run `ldconfig`:
  
  {{{
  sudo /sbin/ldconfig
  }}}
+ 
- This solution is referenced in this bug report @ https://bugs.launchpad.net/ubuntu/+source/xulrunner-1.9/+bug/557275
+ This solution is referenced in bug report [[https://bugs.launchpad.net/ubuntu/+source/xulrunner-1.9/+bug/557275|#557275]].
  
  ==== System updates ====
- When performing system updates (using apt-get or package manager) please keep in mind that
the /etc/ld.so.conf.d/xulrunner.conf file is not maintained by the system and will not be
updated if a new version of xulrunner is deployed !
+ When performing system updates (using apt-get or package manager) please keep in mind that
the `/etc/ld.so.conf.d/xulrunner.conf` file is not maintained by the system and will not be
updated if a new version of xulrunner is deployed!
  
  So please check the update content in order to determine if the xulrunner package is being
updated, then make sure that you update the configuration file with new version number.
  
- You can use the following command line in order to update your xulrunner configuration :
+ You can use the following command line in order to update your xulrunner configuration:
  
  {{{
  find /usr/lib -maxdepth 1 -type d -name "xulrunner-*" | grep -v 'addons' > /tmp/new.xulrunner.conf
&& sudo cp /tmp/new.xulrunner.conf /etc/ld.so.conf.d/xulrunner.conf && sudo
/sbin/ldconfig
  }}}
+ 
- You need to re-start your couchdb server after the library configuration update !
+ You need to re-start your couchdb server after the library configuration update!
  
  ==== Don't forget to configure logging! ====
- -''Setup log rotate:''
+ 
+ ===== Setup log rotate =====
  
  First off, a lot of people run CouchDB from source which means that in 99% of all installs,
the log rotation is not activated.
  
@@ -249, +260 @@

  {{{
  sudo ln -s /usr/local/etc/logrotate.d/couchdb /etc/logrotate.d/couchdb
  }}}
+ 
- ,,- Don't forget to change the path to match your installation.,,
+ ,,Don't forget to change the path to match your installation.,,
  
  Make sure to familiarize yourself with log rotate. Depending on the space requirements and
business of your installation, you should adjust your configuration so that you don't run
out of disk space. If CouchDB is unable to log, it will crash.
  
- -''Adjust the log level:''
+ ===== Adjust the log level =====
  
  In most cases it's more than alright to just run with a log level of error.
  
- Add the following to your local.ini (in [log]): level = error Log directory
+ Add the following to your ''local.ini'' (in [log]): `level = error` Log directory
  
- If you are still running out of diskspace? Add the following to your local.ini (in [log]):
+ If you are still running out of diskspace? Add the following to your ''local.ini'' (in [log]):
  
- file = /path/to/more/diskspace/couch.log
+ `file = /path/to/more/diskspace/couch.log`
  
  ... if you adjusted the above, you will need to correct the config for logrotate.d as well.
  
- -''No logging:''
+ ===== No logging =====
  
  Last but not least — if no logs are needed, just turn them off completely.
  
- These logging tips is based on the recommendations found here: [[http://till.klampaeckel.de/blog/archives/95-Operating-CouchDB.html|Operating
CouchDB]]
+ These logging tips are based on the recommendations found on Till Klampäckel's Blog article
''[[http://till.klampaeckel.de/blog/archives/95-Operating-CouchDB.html|Operating CouchDB]]''.

  
  == Note on installing on  Ubuntu Desktop flavors ==
- If you're *not* running Ubuntu server, but rather running some variant of Ubuntu desktop,
I'd strongly recommend compiling from source and keeping the default prefix of /usr/local.
 Ubuntu comes standard with couchdb-bin, and uses desktop-couch with tools like  Ubuntu One,
gwibber, and evolution. But, Lucid Lynx ships with version 0.10.0.  This is a long-term support
item, but that doesn't mean Canonical will be releasing 0.11 anytime soon.
+ If you're ''not'' running Ubuntu server, but rather running some variant of Ubuntu desktop,
I'd strongly recommend compiling from source and keeping the default prefix of `/usr/local`.
 Ubuntu comes standard with ''couchdb-bin'', and uses ''desktop-couch'' with tools like  Ubuntu
One, gwibber, and evolution. But, Lucid Lynx ships with version 0.10.0.  This is a long-term
support item, but that doesn't mean Canonical will be releasing 0.11 anytime soon.
  
- So, to install a parallel version of current CouchDB on an Ubuntu desktop system, you should
download build from source, being careful to keep the default install prefix of "/usr/local",
and following all of the above instructions about libraries and dependencies.
+ So, to install a parallel version of current CouchDB on an Ubuntu desktop system, you should
download build from source, being careful to keep the default install prefix of `/usr/local`,
and following all of the above instructions about libraries and dependencies.
  
- Then, after installing CouchDB, you can still get it to start at boot as normal, but because
0.11.x is in /usr/local, just running
+ Then, after installing CouchDB, you can still get it to start at boot as normal, but because
0.11.x is in `/usr/local`, just running
  
  {{{
  sudo update-rc.d couchdb defaults
  }}}
+ 
- is probably *not* going to do the right thing.  What is seems to do is look in the /etc/init.d
directory, where it will likely find the 0.10 version of CouchDB.
+ is probably ''not'' going to do the right thing.  What is seems to do is look in the `/etc/init.d`
directory, where it will likely find the 0.10 version of CouchDB.
  
- Instead, you have force the system to use the version of CouchDB installed in /usr/local.
 There should be an option to update-rc.d that will tell it to look in /usr/local/etc rather
than /etc, but I couldn't find it.
+ Instead, you have force the system to use the version of CouchDB installed in `/usr/local`.
 There should be an option to update-rc.d that will tell it to look in `/usr/local/etc` rather
than `/etc`, but I couldn't find it.
  
  A brute force way to make it work is to do something like:
  
  {{{
-  sudo mv /etc/init.d/couchdb /etc/init.d/couchdb.0.10.donotuse
+ sudo mv /etc/init.d/couchdb /etc/init.d/couchdb.0.10.donotuse
-  sudo ln -sf /usr/local/etc/init.d/couchdb /etc/init.d/couchdb
+ sudo ln -sf /usr/local/etc/init.d/couchdb /etc/init.d/couchdb
-  sudo update-rc.d couchdb defaults
+ sudo update-rc.d couchdb defaults
  }}}
+ 
  == External Articles ==
   * [[http://h.imagehost.org/download/0072/How-to_Install_CouchDB_and_CouchDB-Lucene_on_Ubunut_Lucid|Installing
CouchDB and CouchDB-Lucene on Ubunut 10.04 Lucid Lynx- PDF]]
   * [[http://www.owengriffin.com/posts/2010/04/27/CouchDB_0.11_and_CouchApp_Notes.html#comment-48272833|CouchDB
0.11 and CouchApp Notes]]

Mime
View raw message