pointing to a different yum repository - amazon-ec2

I am not sure if this is possible or if there's any easier way but I am trying to install a software package but its not available when I search for it within Yum. I read their documentation and they seem to have a fedora package which I think amazon's ec2 linux image is based on(or cent os).
If I just change my repository to point to fedora or download the rpm, would that work? Or would that break something?

what is this application?
what you can do:
you have rpm file
$ wget [link to rpm file]
$ su -c 'yum --nogpgcheck localinstall [path to my rpm]
rpm is in testing
$ su -c 'yum install --enablerepo=updates-testing [application name]
You have source application
$ read README file and follow indication

Related

Trying to install epel-release on Fedora 30 -- no match for argument: epel-release

I'm on Fedora 30. I am trying to install "epel-release".
I am following this guide: https://www.phusionpassenger.com/library/install/standalone/install/oss/el7/ -- I am unable to successfully run the command:
$ sudo yum install -y epel-release yum-utils
I get as a result:
No match for argument: epel-release
So, I tried the following commands from this article: https://www.liquidweb.com/kb/enable-epel-repository/
$ cd /tmp
$ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ yum install ./epel-release-latest-*.noarch.rpm
No such luck - this is the output:
Error:
Problem: problem with installed package fedora-release-workstation-30-1.noarch
- package epel-release-7-11.noarch conflicts with fedora-release provided by fedora-release-workstation-30-1.noarch
- package epel-release-7-11.noarch conflicts with fedora-release provided by fedora-release-workstation-30-4.noarch
- conflicting requests
I have also tried:
$ sudo dnf install epel-relase
which that didn't work either, here's the results:
No match for argument: epel-release
Error: Unable to find a match
I have come across several different articles basically saying to either use the first command listed or variations of the second command I've tried - all unsuccessful. side note: Is this because Fedora 30 was just "recently" released?
My end goal is to deploy a Ruby on Rails web app internally using Nginx. For that, I am following this guide: https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/nginx/oss/el7/deploy_app.html
Any direction for how to install epel-release would be great as I can't move forward until passenger is installed.
Note that EPEL is not suitable for use in Fedora! Fedora is not Enterprise Linux. EPEL provides "a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Linux (OL)". Put simply, Enterprise Linux is a term that refers to Red Hat Enterprise Linux or one of its clones. And Fedora is not a Red Hat clone.
That is why you cannot install the "epel-release" package in Fedora. It simply does not exist. Don't try to use EPEL on Fedora.
As noted before, the Fedora repositories provide most (if not all) of the EPEL packages. Additional software for Fedora is available in the RPMFusion repositories. In their own words, RPMFusion is "an extension of Fedora" that "provides software that the Fedora Project or Red Hat doesn't want to ship." RPMFusion can not be used on Enterprise Linux. You could see RPMFusion as the "EPEL alternative" for Fedora, but be aware that the software collections provided by RPMFusion and EPEL are entirely unrelated and uncomparable.
EPEL is managed from within the Fedora project, and thus part of Red Hat. RPMFusion is an independent organization. You can consider their repositories reliable, but always be cautious when you install software from external sources.
Finally - on a sidenote - on recent Fedora versions, 'dnf' has replaced 'yum'.
Okay, so turns out that this can be simplified to just:
$ sudo dnf install passenger
Crazy that they have an entire tutorial for how to install passenger when it can just be simplified to this one line.
you'll need to install the EPEL (Extra Packages for Enterprise Linux) repository.
The EPEL project is run by the Fedora team.
When you install third-party repositories on Red Hat and CentOS systems.
Install in centos:
sudo yum install yum-plugin-priorities epel-release
When the installation completes, navigate to the /etc/yum.repos.d directory,
and open the CentOS-Base.repo file in your favorite text editor.
After the last line of the base, updates, and extras sections, add the line: priority=1.
After the last line of the centosplus section, add the line:
priority=2.
Save the file and close the editor.
Now, Open the epel.repo file for editing.
After the last line of the epel section,add the line:
priority=10.
After the last line of each remaining section, add the line:
priority=11.
Update the system and then create a list of the installed and available packages by running:
sudo yum upgrade
sudo yum list > yum_list.txt
For RHEL - dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Try with the above command to install epel-release in RHEL 8

Janus WebRTC installation issue

I am installing Janus WebRTC Gateway in a Ubuntu Machine (14.04 64 bit). I followed the instructions as in the following link:
However, I get the following error when trying to execute janus:
https://github.com/meetecho/janus-gateway (readme.md file)
[FATAL] [janus.c:main:3670] No Janus API transport is available...
enable at least one and restart Janus
Anyone has any idea what the issue might be? I will only use the REST API without WebStockets or RabbitMQ.
I successfully installed Janus on Ubuntu 14 according to the following steps:
sudo apt-get install libmicrohttpd-dev libjansson-dev libnice-dev libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev libopus-dev libogg-dev libini-config-dev libcollection-dev libwebsockets-dev pkg-config gengetopt automake libtool doxygen graphviz git cmake
sudo apt-get install libavformat-dev
mkdir -p ~/build
cd ~/build
git clone git://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure --disable-data-channels --disable-websockets --disable-rabbitmq --disable-docs --prefix=/opt/janus LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" CFLAGS="-I/usr/local/include"
make && sudo make install
sudo make configs
Running it by:
cd /opt/janus/bin/
./janus -F /opt/janus/etc/janus/
I had this issue before, I had write a script to install everything just run this
wget https://gist.githubusercontent.com/johnmelodyme/966f474a99b6dd0cf4e7ac19ba4258da/raw/0f1779499c62eeee3e2a577ef641e94e57b71154/janus.sh && sh janus.sh
Hope This Help Much, I believe there are certain dependencies needs to be installation but you missed it. In https://github.com/meetecho/janus-gateway it stated the Dependencies needed, have to be installed without error.
It is because libmicrohttpd version is lower than requirement, Download and install libmicrohttpd manually (dont use yum or apt-get).

Offline Ansible Control Machine installation

I need to install Ansible Control Machine behind a corporate firewall with no internet access. I can't find documentation for an offline install. I have access on my workstation to download anything I want and can copy it to the target machine. I have tried searching online but have not been able to find examples on how to do this. My server is Ubuntu 14.04 but if anyone has documentation for Red Hat or another distro that would also help.
I did a testing on my RH6, so if you have a RH6 with Internet access to download all required installation file, and a RH6 installation ISO. You should be able to achieve this.
Assuming you have a RH6 which has Internet access, let's call it A. And another one doesn't have access: B.
download Ansible and Jinja2 from A, and copy the files to B.
For Ansible: http://docs.ansible.com/ansible/intro_installation.html
Jinja2 is required for Ansible, download it here:
https://pypi.python.org/pypi/Jinja2
Mount the RH6 installation ISO to your RH6 B, then install the required RPM.
In my case, i installed PIP as well:
rpm -ivh python-paramiko-1.7.5-2.1.el6.noarch.rpm libyaml-0.1.3-4.el6_6.x86_64.rpm PyYAML-3.10-3.1.el6.x86_64.rpm perl-TermReadKey-2.30-13.el6.x86_64.rpm perl-Error-0.17015-4.el6.noarch.rpm python-six-1.9.0-2.el6.noarch.rpm
//following required for Git
rpm -ivh --force --nodeps perl-Git-1.7.1-3.el6_4.1.noarch.rpm
rpm -ivh git-1.7.1-3.el6_4.1.x86_64.rpm
Note: i didn't install httplib2 here, you can do it later.
install MarkupSafe (required for Jinja2)
//install MarkupSafe
tar -xvf MarkupSafe-0.23.tar.gz
cd MarkupSafe-0.23/
sudo python setup.py install
install Jinja2
//install Jinjia2
tar -xvf Jinja2-2.8.tar.gz
cd Jinja2-2.8/
sudo python setup.py install
On RH6 B, you should be able to run Ansible now:
tar -zxvf ansible.tar.gz
source ./hacking/env-setup
echo "127.0.0.1" > ~/ansible_hosts
export ANSIBLE_INVENTORY=~/ansible_hosts
ansible --version
I know this is a very old question, but I've found the answer in this blog post and I believe that could help someone out there.
Although this post aproach is on a CentOS/RHEL machine, I believe the procedure is very similar to other distros:
Download the packages (RPM) dependencies
Download the Ansible packages
Upload the downloaded packages to the target machine
Install it using yum localinstall
Or you could also install it from the source.

wkhtmltopdf: cannot connect to X server

I have been using wkthmltopdf to convert html to pdf documents on-the-fly on my linux web server. The program originally needed X11 or similar X server to run correctly, but through many requests by developers to have this run on servers without GUI, I am pretty sure it runs a virtual X server in the static version. I have been using the static (stand-alone) version of the program and it works great! I would put the executable file in a folder, and run:
./wkhtmltopdf file1.html file2.pdf
However I would like to install this program system-wide. I used the apt-get install wkhtmltopdf (just installed yesterday) and since I am running on a 64 bit system, I also needed apt-get install ia32-libs. After installation I can find the version like this:
wkhtmltopdf --version
output:
Name:
wkhtmltopdf 0.9.9
License:
Copyright (C) 2008,2009 Wkhtmltopdf Authors.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO
WARRANTY, to the extent permitted by law.
Authors:
Written by Jakob Truelsen. Patches by Mário Silva, Benoit Garret and Emmanuel
Bouthenot.
Now when I try to run the program installed via aptitude, I get the following error:
wkhtmltopdf: cannot connect to X server
Does anyone know how I can fix this? I guess this version is missing a virtual X server or something.
or try this (from http://drupal.org/node/870058)
Download wkhtmltopdf. Or better install it with a package manager:
sudo apt-get install wkhtmltopdf
Extract it and move it to /usr/local/bin/
Rename it to wkhtmltopdf so that now you have an executable at /usr/local/bin/wkhtmltopdf
Set permissions: sudo chmod a+x /usr/local/bin/wkhtmltopdf
Install required support packages.
sudo apt-get install openssl build-essential xorg libssl-dev
Check to see if it works: run
/usr/local/bin/wkhtmltopdf http://www.google.com test.pdf
If it works, then you are done. If you get the error "Cannot connect to X server" then continue to number 7.
We need to run it headless on a 'virtual' x server. We will do this with a package called xvfb.
sudo apt-get install xvfb
We need to write a little shell script to wrap wkhtmltopdf in xvfb. Make a file called wkhtmltopdf.sh and add the following:
xvfb-run -a -s "-screen 0 640x480x16" wkhtmltopdf "$#"
Move this shell script to /usr/local/bin, and set permissions:
sudo chmod a+x /usr/local/bin/wkhtmltopdf.sh
Check to see if it works once again: run
/usr/local/bin/wkhtmltopdf.sh http://www.google.com test.pdf
Note that http://www.google.com may throw an error like "A finished ResourceObject received a loading finished signal. This might be an indication of an iframe taking to long to load." You may want to test with a simpler page like http://www.example.com.
This solved the issue for me:
sudo apt-get install xvfb
xvfb-run --server-args="-screen 0, 1024x768x24" wkhtmltopdf file1.html file2.pdf
I tried to do sudo apt-get install wkhtmltopdf but without any success.
Instead I recommend you try:
Download the latest executable (.11 rc1) :
wget https://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1-static-i386.tar.bz2
uncompress it :
tar -vxf wkhtmltopdf-0.11.0_rc1-static-i386.tar.bz2
rename it :
mv wkhtmltopdf-i386 wkhtmltopdf
chmod it to executable :
chmod a+x wkhtmltopdf
place it into /usr/bin :
sudo mv wkhtmltopdf /usr/bin
Just made it:
1- To download wkhtmltopdf dependencies
# apt-get install wkhtmltopdf
2- Download from source
# wget http://downloads.sourceforge.net/project/wkhtmltopdf/xxx.deb
# dpkg -i xxx.deb
3- Try
# wkhtmltopdf http://google.com google.pdf
Its working fine
It works!
I found method to resolve this problem without fake X server.
In newest version of wkhtmltopdf dont need X server for work, but it no into official linux repositories.
Solution for Ubuntu 14.04.4 LTS (trusty) i386
$ sudo apt-get install xfonts-75dpi
$ wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2/wkhtmltox-0.12.2_linux-trusty-i386.deb
$ sudo dpkg -i wkhtmltox-0.12.2_linux-trusty-i386.deb
$ wkhtmltopdf http://www.google.com test.pdf
Solution for Ubuntu 14.04.4 LTS (trusty) amd64
$ sudo apt-get install xfonts-75dpi
$ wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2/wkhtmltox-0.12.2_linux-trusty-amd64.deb
$ sudo dpkg -i wkhtmltox-0.12.2_linux-trusty-amd64.deb
$ wkhtmltopdf http://www.google.com test.pdf
User felixhummel got very good solution, but repository with utilite has changed.
Expanding on Timothy's answer...
If you're a web developer looking to use wkhtmltopdf as part of your web app, you can simply install it into your /usr/bin/ folder like so:
cd /usr/bin/
curl -C - -O http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.11.0_rc1-static-i386.tar.bz2
tar -xvjf wkhtmltopdf-0.11.0_rc1-static-i386.tar.bz2
mv wkhtmltopdf-i386 wkhtmltopdf
You can now run it anywhere using wkhtmltopdf.
I personally use the Snappy library in PHP. Here is an example of how easy it is to create a PDF:
<?php
// Create new PDF
$pdf = new \Knp\Snappy\Pdf('wkhtmltopdf');
// Set output header
header('Content-Type: application/pdf');
// Generate PDF from HTML
echo $pdf->getOutputFromHtml('<h1>Title</h1><p>Your content goes here.</p>');
Update to latest wkhtmltopdf version from SourceForge (0.12 as of this writing). It does not need an X Server to run.
Example for Ubuntu 14.04:
$ cd /tmp/
$ wget -q http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
$ dpkg -x wkhtmltox-0.12.2.1_linux-trusty-amd64.deb foo
$ echo '<p>hi</p>' | ./foo/usr/local/bin/wkhtmltopdf - /tmp/hi.pdf
Loading pages (1/6)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done
$ head -n3 /tmp/hi.pdf
%PDF-1.4
1 0 obj
<<
for 14.04.1-Ubuntu https://wkhtmltopdf.org/downloads.html
wget https://downloads.wkhtmltopdf.org/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz -O mktemp.tar.xz
tar xf mktemp.tar.xz
sudo cp wkhtmltox/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
sudo chmod +x /usr/bin/wkhtmltopdf
rm mktemp.tar.xz
rm wkhtmltox -rf
apt-get update
apt-get install -y libxrender1 libxtst6 libxi6
wkhtmltopdf http://www.google.com test.pdf
sudo -i
apt-get install wkhtmltopdf xvfb libicu48
mv /usr/bin/wkhtmltopdf /usr/bin/wkhtmltopdf-origin
touch /usr/bin/wkhtmltopdf && chmod +x /usr/bin/wkhtmltopdf && cat > /usr/bin/wkhtmltopdf << END
#!/bin/bash
/usr/bin/xvfb-run -a -s "-screen 0 1024x768x24" /usr/bin/wkhtmltopdf-origin "\$#"
END
Problem is probably in old version of wkhtmltopdf - version 0.9 from distribution repository require running X server, but current version - 0.12.2.1 doesnt require it - can run headless.
Download package for your distribution from http://wkhtmltopdf.org/downloads.html and install it - for Ubuntu:
sudo apt-get install xfonts-75dpi
sudo dpkg -i wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
wkhtmltopdf > 0.11 doesn't have this X-server issue.
So installing 0.12.2.1 on a linux server.
At first install xvfb server:
sudo apt-get install xvfb
Get needed version of wkhtmltopdf from http://wkhtmltopdf.org/downloads.html
Install wkhtmltopdf:
sudo dpkg -i wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
or install with wget
URL='http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb'; FILE=`mktemp`; wget "$URL" -qO $FILE && sudo dpkg -i $FILE; rm $FILE
Install dependency (if needed):
sudo apt-get -f install
Create symblic link in /usr/local/bin/:
echo 'exec xvfb-run -a -s "-screen 0 640x480x16" wkhtmltopdf "$#"' | sudo tee /usr/local/bin/wkhtmltopdf.sh >/dev/null
sudo chmod a+x /usr/local/bin/wkhtmltopdf.sh
Now try below and it should work,
/usr/local/bin/wkhtmltopdf http://www.google.com test.pdf
I just figured out that I can simply move the static executable to the /usr/bin/ directory and execute it from anywhere.
solution for Centos7:
yum -y install xorg-x11-fonts-75dpi \
xorg-x11-fonts-Type1 \
&& rpm -Uvh http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-centos7-amd64.rpm
We run into this problem inside docker containers and the above install has wkhtmltopdf with patched QT
It is recommended to use at least 0.12.2.1.
Starting from wkhtmltopdf >= 0.12.2 it doesn't require X server or emulation anymore. You can download new version from http://wkhtmltopdf.org/downloads.html
I did follow the instructions here and made wkhtmltopdf work for me but I would like to offer a bit of perspective which I discovered while doing my own little dance with wkhtmltopdf - xvfb.
This is important because the same reason that causes it to throw the infamous cannot connect to X server error is also causing it to run with sever limitations even if you do provide it a X server. These limitations include not being able to take multiple input sources, set header and footers, etc (check the Reduced Functionality section of the manual).
wkhtmltox by itself doesn't require a X11, however it's making use of QT libraries which do. In newever versions of wkthmltox developers made a patch for QT which allows it to run with a X11.
Currently some versions are built against patched QT and some are not. You can check your version by running wkhtmltopds --version. There should be a line at the end saying Compiled against wkhtmltopdf patched qt.
So, to conclude, if you install and use a version that uses the patched libraries it should work on a linux server without the xvfb server, as I can confirm.
Pay attention: your file could be wkhtmltopdf.sh or wkhtmltopdf, check it on second step
You must copy it into directory : /usr/local/bin, make sur it's executable and add symlink of wkhtmltopdf.sh like :
1- the command :
sudo apt-get install wkhtmltopdf
2 - insert the binary in directory /usr/bin so the browser can't have permission to execute in this directory.
You must copy the wkhtmltopdf.sh to directory /usr/local/bin cause the browser have permission in this directory like:
sudo cp /usr/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf.sh
3 - After make sur the binary have permission of execution like :
sudo chmod a+x /usr/local/bin/wkhtmltopdf.sh
4 - so now you can test, it's work like:
/usr/local/bin/wkhtmltopdf.sh http://www.google.com google.pdf
it make download the pdf in the current directory in your terminal
5 - Optional
now you can add symlink in your directory /usr/local/bin like
ln -s /usr/local/bin/wkhtmltopdf.sh /usr/local/bin/wkhtmltopdf
Just tell the Qt backend to not use X:
QT_QPA_PLATFORM=offscreen wkhtmltopdf <input> <outfile.pdf>
Download file from this link
Extract it and move executable file(/wkhtmltox/bin/wkhtmltopdf) to /usr/bin/
Rename it to wkhtmltopdf if current name is not wkhtmltopdf. So that now you have an executable at /usr/bin/wkhtmltopdf
Set permissions: sudo chmod a+x /usr/bin/wkhtmltopdf
Install required support packages. sudo apt-get install openssl build-essential xorg libssl-dev
Now, check with wkhtmltopdf http://www.google.com test.pdf
hint: detail information from this link
Just install a version 0.12.4 or higher. This seems to solve the problem.
See How can I install the latest wkhtmltopdf on Ubuntu 16.04?.
If you config wkhtmltopdf for Rails or Somethings in Centos, you can follow these step bellow:
Go to https://wkhtmltopdf.org/downloads.html and copied the link of rpm file.
In centos server bash.
wget link_of_wkhtmltopdf_rpm.rpm
rpm -ivh link_of_wkhtmltopdf_rpm.rpm
which wkhtmltopdf
=> You will get path of wkhtmltopdf.
Setup for wicked_pdf or pdfkit with path in step 4.
This is sample config with wickedpdf. config/initializers/wicked_pdf.rb
if Rails.env != "production"
path = %x[which wkhtmltopdf].gsub(/\n/, "")
else
path = "path_of_wkhtmltopdf_in_step_4"
end
WickedPdf.config = { exe_path: path }
Restart server.
DONE.
For 64-bit Use:
wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-amd64.tar.bz2
tar xvjf wkhtmltopdf-0.9.9-static-amd64.tar.bz2
sudo mv wkhtmltopdf-amd64 /usr/bin/wkhtmltopdf
sudo chmod +x /usr/bin/wkhtmltopdf

Installing CouchDB in AWS EC2 Free Tier

Does anyone know of a step by step installation guide for CouchDB in the free tier 32bit AWS EC2 instance?
Keep in mind that YUM is limited by default and I would need to add yum.repos to get extra stuff. I've tried all different articles and RPMs but none seem to work.
I also tried couchbase but it has extremely poor post-install instructions. The server start but then what? I couldn't find the files, configs, or install directories. And, how do I access it?
CouchDB sounds like such a great database but it really needs to break these barriers of entry. MongoDb has better docs, although I couldn't get that to work either (I spent a fraction of the time trying, though).
Thanks :)
The apache team put together this quick script that installs CouchDB (thanks #_jhs
for build-couchdb!) on an Amazon Linux AMI:
https://gist.github.com/1171217
If you are using cloudinit + the EC2 command line tools, simply use
ec2-run-instances with --user-data-file (you will need some mods to
the script to save the password or locally generate one) and voila'.
Relaxing FTW.
Worked like a charm for me!
Enable the EPEL repository first and then install it with yum install couchdb
You can enable EPEL using the instructions here.
EDIT:
More information at http://wiki.apache.org/couchdb/Installing_on_RHEL5. Keep in mind that the Linux EC2 AMI is a cut down version of CentOS and you can add custom repositories and install as you wish.
Here is a quick run down of the steps I use to install couchdb 1.5.1 on Amazon Linux 2014.03.1. See also this post on my blog http://www.everyhaironyourhead.com/installing-couchdb-1-5-1-on-amazon-linux-ami-2014-03-1/.
Core deps and dev tools.
Enable the EPEL Repo by editing the file /etc/yum.repos.d/epel.repo and setting it to enabled.
Next install the deps and tools.
sudo yum install gcc gcc-c++ libtool libicu-devel openssl-devel autoconf-archive erlang python27 python-sphinx help2man
Get the SpiderMonkey JS Engine and build it...
wget http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz
tar xvfz js185-1.0.0.tar.gz
cd js-1.8.5/js/src
./configure
make
sudo make install
You should see it installed under /usr/local/lib
Build CouchDB.
Download the source package for CouchDB, unpack it and cd in.
Point it to the required libs and configure.
./configure --with-erlang=/usr/lib64/erlang/usr/include --with-js-lib=/usr/local/lib/ --with-js-include=/usr/local/include/js/
make
sudo make install
Prepare the CouchDB installation.
Make a couchdb user.
sudo useradd -r -d /usr/local/var/lib/couchdb -M -s /bin/bash couchdb
Set the file ownerships.
sudo chown -R couchdb:couchdb /usr/local/etc/couchdb
sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb
sudo chown -R couchdb:couchdb /usr/local/var/log/couchdb
sudo chown -R couchdb:couchdb /usr/local/var/run/couchdb
sudo chmod 0775 /usr/local/etc/couchdb
sudo chmod 0775 /usr/local/var/lib/couchdb
sudo chmod 0775 /usr/local/var/log/couchdb
sudo chmod 0775 /usr/local/var/run/couchdb
Prepare the init scripts.
Link the init script and copy the log rotate script to /etc.
sudo cp /usr/local/etc/logrotate.d/couchdb /etc/logrotate.d
sudo ln -s /usr/local/etc/rc.d/couchdb /etc/init.d/couchdb
This and most other linux distros don’t include /usr/local/lib in ld, so CouchDB will have problems finding the SpiderMonkey libs we installed there earlier. One way to solve this is to add the following line to the top of the /etc/init.d/couchdb startup script.
export LD_LIBRARY_PATH=/usr/local/lib
See man page for ldconfig for more info, and please comment with a better solution.
You may want to edit /usr/local/etc/default/couchdb to turn off the auto respawn.
To get it to autostart, just use the standard linux setup tools for running service scripts.
sudo chkconfig --add couchdb
It should pick up the default run levels needed from the script, but in case it doesn’t, you can do it manually like this...
sudo chkconfig --level 3 couchdb on
sudo chkconfig --level 4 couchdb on
sudo chkconfig --level 5 couchdb on
You can sudo chkconfig —list to confirm its there. See man chkconfig for more details.
Relax.
Finally reboot (or just start couchdb from the script) and confirm its running with curl http://127.0.0.1:5984/
Comments, corrections, improvements, and criticisms are appreciated.
Add the EPEL repository first and then install it with yum install couchdb
Yeah, not exactly. I'm running AWS Free Tier standard and installing couch has been hell on earth - lots and lots of dependency issues around erland various graphics libs, I'll report back here when I get a process that works
okay, the issue for me was wxGTK.x86_64 - It had a list of 15 or so dependencies that wouldn't install through yum (even with epel) and I had to manually install the rpms and dependencies before yum install couchdb would work.
Not sure the default AMI is a good idea if you want couch!
I googled: "build couchdb"
and followed the steps
I am installing it.
I can tell you it is very painful. After pressing "rake", you need to wait 2, maybe 3 hours until all the dependencies are compiled. I am still installing it right now in my free tier server. You have to make sure you have that time to keep your terminal busy out there!
However, it is the only working solution so far for me. It is installing automatically for real.
I also tried couchbase but it has extremely poor post-install instructions. The server start but then what? I couldn't find the files, configs, or install directories. And, how do I access it?
Sorry for hearing about the experience you are having! We have been focused on making Couchbase highly performant and scalable recently so understand the developer experience pain such as documentations. Hopefully these two step by step guides would help!
This is on how to install the Couchbase Server and Couchbase Sync Gateway Amazon AMI on AWS and then how to connect Couchbase Sync Gateway to a mobile application:
Part 1 : Database on Amazon: Installing Couchbase AMI on AWS
The first part goes over how to install and access the Couchbase Web Console.
Part 2 : Database on Amazon: Connecting Couchbase Sync Gateway to Couchbase AMI on AWS
The second part goes over how to access the Couchbase contents/directory
You mentioned CouchDB and Couchbase together in this thread and they have different APIs but the Couchbase Sync Gateway component would be able to sit in front of CouchDB through the REST APIs as another option.
For those specifically installing on AWS Linux 2
Installing Couchdb on AWS Linux 2
This page uses Apache Couchdb binary installation
Instructions
Using the Centos installation instructions.
Create the bintray-apache-couchdb-rpm.repo file in the /etc/yum.repos.d directory
Fill in the full path to the repository list rather than using the Relver and Architecture macros.
[bintray--apache-couchdb-rpm] name=bintray--apache-couchdb-rpm baseurl=http://apache.bintray.com/couchdb-rpm/el7/x86_64/
gpgcheck=0
repo_gpgcheck=0
enabled=1
Yum install after enabling epel
sudo yum update && sudo yum install -y couchdb
Continue with the Couchdb and configuration as normal

Resources