Correct install for RVM and Chef - rvm

I installed rvm for multi-user on my server.
\curl -sSL https://get.rvm.io | sudo bash -s stable
sudo usermod -a -G
rvm ubuntu rvm install 2.1.1
rvm --default use 2.1.1
I also installed Chef
curl -L https://www.opscode.com/chef/install.sh | sudo bash
But when i run "gem install chef" under ubuntu i get
You don't have write permissions into the /opt/chef/embedded/lib/ruby/gems/1.9.1 directory
Obviously i can just change the permissions but I'm assuming this isn't how i should set this up.
Any help would be greatly appreciated.

The omnibus installer, aka:
curl -L https://www.opscode.com/chef/install.sh | sudo bash
Installs Chef for you. You don't need to install Chef. You can run chef as chef-client or chef-solo.
Chef get's installed into /opt/chef and it packages it's own Ruby, etc.
With respect to your RVM issues:
Have you added the required lines to your .bashrc?
Are you actually executing a login shell (-l)?
Why are you trying to install chef into rvm?

Related

How to install gearman extension in php7 running on ubuntu 18.04

I am currently required to setup the new server running php7.2 and the server will have many background process for sending emails to customer. the recommendation I got was to use Gearman Job Server.
I have been searching but seems to have only post about gearman-job-server with php5 and below.
The process of installing Gearman Job Server with php7 will be covered in like 4 steps
Install and update the Gearman PPA
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:gearman-developers/ppa
sudo apt-get update
Install Gearman Job Server and some other required components and tools
sudo apt-get install gearman-job-server libgearman-dev php7.0-dev php-pear wget unzip re2c
sudo apt-get upgrade
Download, compile the gearman pecl module and add to php.ini
cd /tmp/
sudo wget https://github.com/wcgallego/pecl-gearman/archive/master.zip
unzip master.zip
cd pecl-gearman-master
sudo phpize
./configure
sudo make
sudo make install
echo "extension=gearman.so" | sudo tee /etc/php/7.0/mods-available/gearman.ini
sudo phpenmod -v ALL -s ALL gearman
Restart webserver or PHP FPM
sudo service php7.0-fpm restart
sudo service apache2 restart
If you are running a different version of PHP make sure you make the appropriate changes to the commands or directories mentioned above. ie “/etc/php/7.0/” to “/etc/php/7.1/” etc.
Thanks to techearl.com for their tutorial which can be found
Here
The answer by Ruberandinda Patience is correct and will work but since the gearman pecl module is packaged for Ubuntu there is a much simpler way to achieve the same thing:
apt install gearman-job-server php-gearman

Installing Apache OpenWhisk using docker-compose on Amazon Linux instance gets stuck at "waiting for the Whisk invoker to come up..."

I am trying to install openwhisk for dev mode using docker compose on Amazon Linux EC2 Instance. I am following this link for doing so https://github.com/apache/incubator-openwhisk -> Get Started.
Although, it has worked for me before once, in this installation, I am facing an issue. These are the steps I followed:
sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo chkconfig docker on
sudo yum install -y python-pip
sudo pip install docker-compose
This step is because open whisk is using sudo for docker-compose, and based on previous steps, sudo docker-compose -v gives a command not found.
sudo cp /usr/local/bin/docker-compose /bin
sudo yum install -y git
cd ~
git clone https://github.com/apache/incubator-openwhisk-devtools.git
cd incubator-openwhisk-devtools/docker-compose
sudo make quick-start
Update: The problem is that the make command gets stuck at the stage where it is waiting for invokers.
I have not made any changes to any source code, nor I did any other steps before this on the instance. It was a freshly created instance.
Am I missing something in OpenWhisk or EC2 or the combination of both? Any help would be great.
Update: I tried the docker-compose method for installing open whisk on Amazon Linux 1, Amazon Linux 2, Ubuntu 16.04 as well as Ubuntu 14.04. On all platforms, it got stuck at sudo make quick-start where it is waiting for invokers.
Update: Instead of using python-pip for docker-compose installation, used the command from docker website as well.
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
if docker-compose command is not found it means you didn't install docker-compose correctly.
I don't think you can install docker-compose as a python library using pip
See the instructions here https://docs.docker.com/compose/install/#install-compose
someting like
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
Or take a look at https://medium.com/#khandelwal12nidhi/docker-setup-on-aws-ec2-instance-c670ff3d5f1b

Anyone setup "wraith" visual comparison on centos?

I am trying to run wraith script on centOS. Ruby installation get stuck with 2.3.0 version.
Appreciate if anyone has any steps?
thanks,
Raj
Try to install ruby with rvm instead:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | bash -s stable
Afterwards:
Reload shell configuration & check
source ~/.rvm/scripts/rvm
Check …
ruby –v
rvm –v
Start ruby
rvm ruby-2.x.x
As a working alternative you could use the prebuilt Wraith docker container:
docker pull bbcnews/wraith

Radius Apache web server on centos

Hey guys i am having a big problem , i have a centos vps and and i want radius apache web server Authentication. but in these tutorial http://freeradius.org/mod_auth_radius/ , i do not know where i should enter this :
./configure --add-module=LOCATION/mod_auth_radius.c
( i tried that in "var/www" and "etc/httpd" but show me these error : -bash: ./configure: No such file or directory )
Please help me.
You'd have to run ./configure from your Apache source, wherever you built Apache from. Since it sounds like you're new to building stuff, I wouldn't recommend that you build Apache from source.
On Centos 7, I did the following to build it. First, I had to install a couple of packages for Apache development:
sudo yum -y install httpd-devel
sudo yum -y install openssl
sudo yum -y install openssl-devel
Then to build it I did:
cd /tmp
tar xvf mod_auth_radius-1.5.8.tar
cd mod_auth_radius-1.5.8
cp mod_auth_radius-2.{0,4}.c
sed s/remote_ip/client_ip/g -i mod_auth_radius-2.4.c
apxs -i -a -c mod_auth_radius-2.4.c
The sed it because the code doesn't compile right on Apache 2.4.
There, now you have a /etc/httpd/modules/mod_auth_radius-2.4.so ready to go.

Compiling libapache2-svn for Apache 2.4.4

I want to use Apache 2.4.4 with SVN on Ubuntu server 12.04 (Precise Pangolin). But when I use
apt-get install libapache2-svn
I get the following dependencies error
The following packages have unmet dependencies:
libapache2-svn : Depends: apache2.2-common but it is not going to be installed
Googling around I got some suggestion about compiling from source by hand. I don't know how to do that. How can I do it?
I have two solutions:
Follow the instructions in this Server Fault Q&A.
*Note: Create another user if you're using a root account on the server.
I've asked Ondřej Surý on Launchpad to add Subversion to his Apache PPA. You can add Ondřej Surý's PPA to perform a normal update/upgrade.
You did ask Ondrej to include Subversion in his PPA launchpad. But I couldn't install the libapache2-svn package after adding Ondrej's PPA.
Somehow the instructions provided for compiling didn't work for me so here's an alternative way to get it working.
Reference:
(https://askubuntu.com/questions/312568/where-can-i-find-a-subversion-1-8-binary)
WANDisco has Subversion 1.8 for Ubuntu then:
sudo sh -c 'echo "# WANdisco Open Source Repo" >> /etc/apt/sources.list.d/WANdisco.list'
sudo sh -c 'echo "deb http://opensource.wandisco.com/ubuntu precise svn18" >> /etc/apt/sources.list.d/WANdisco.list'
wget -q http://opensource.wandisco.com/wandisco-debian.gpg -O- | sudo apt-key add -
sudo apt-get update
After that:
apt-cache show subversion | grep '^Version:'
And then you should be good to install normally:
sudo apt-get install subversion libapache2-svn