Dreamhost vps can't install rvm because requires being superuser - rvm

I followed this wiki.dreamhost.com/RVM‎ (and others) and the problem is simple:
I can have a sudo user from panel that can't do anything with my web site. But my usual user can't run as a superuser.
So there is no way so far that I get rvm to install on my vps.
I'm tired of searching, can anyone help me to solve this?

Following RVM site:
Without autolibs
$ \curl -L https://get.rvm.io | bash -s -- --autolibs=read-fail

You should only need sudo access for this if the bundle install fails on mysql2, to update apt-get and re-install libmysqlclient-dev if necessary. You should be able to handle those parts from the correct location with your "admin" user, then do whatever you need again from your regular user the site is hosted on.
This article will walk you through setting up RVM with a full Rails stack on a regular shell account. There is no need to even add an admin user to your VPS to perform this install, and you get to leave all of your services fully managed!!!
http://wiki.dreamhost.com/RVM#Do_Magic
If you have any other questions please do not hesitate to ask us, you can send our support team a ticket here https://panel.dreamhost.com/index.cgi?tree=support.msg& or you can even hit us up for support on Twitter #DreamHostCare
Thanks!
Matt C
DreamHost Staff

Related

redmine.org not running after updated the ruby

Ruby updated to version 1.8.7 and the redmine display at the top right side "Not Running" The issue that I found is that doesn't send mailing alerts to users when the status of one task change.
The redmine save tasks normally.
Do you know why I get "Not running"?
Do you know how can I found what is not running?
Do you know how the mail alerts will work as before?
Also the redmine is hosted in cPanel.
First of all your Ruby version is very old and non-maintaned, you should look for 2.4.x versions.
I recommend that you install new ruby via rvm or rbenv
So if you are to proceed with RVM, it's easy to install via console, it first imports the key
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
And then installs via curl and bash (your should ask for permission to use bash, because often with cpanel, the only shell users can use is some kind of jailshell)
\curl -sSL https://get.rvm.io | bash -s stable
Once RVM is installed, you will be able to install new ruby for that particular user, by typing rvm install rubyversion replace rubyversion with one of your choice.
And then proceed with Redmine upgrade, as explained in manual
http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade
Once you are done with that, you must figure out, how is your redmine being served, I assume it's served as fcgi module, since it's old version of ruby, so you might have to seek for a way to run your Redmine with new ruby, I recommend to try this approach first How to get rvm running inside fcgi?
There are several ways to deploy rails app like Redmine on a web-server, however running under cpanel gives you little or no choices, alternative would be to run some server like thin, or webrick, and proxy it thru apache, which should be possible with cpanel.

How to install mod_cloudflare for easyapache 4

I am trying to install mod_cloudflare for Apache using easyapache 4 on cPanel Server. I am running CentOS 7.2.
I have installed mod_cloudflare for EasyApache4 following the instructions under Option 2 here. After running the installer it said "Done. Please restart EasyApache 4". I then went into WHM -> EasyApache 4 and tried to find the server module, but it is not to be found. I clicked the "run system update" button and tried again, to no avail. Is there an easyapache service that needs to be restarted via the command line?
I am not a hosting provider so I have not tried the Cloudflare plugin for CPanel.
* Edit 4/9/2019 *
Changing accepted answer to EasyCo's, as the original solution no longer works.
Figured I'd throw my solution into the mix using Centos 6.9 with WHM/cPanel.
bash <(curl -s https://raw.githubusercontent.com/cloudflare/mod_cloudflare/master/EasyApache/installer.sh)
wget https://raw.githubusercontent.com/cloudflare/mod_cloudflare/master/mod_cloudflare.c
yum install ea-apache24-devel
apxs -a -i -c mod_cloudflare.c
rm /etc/apache2/conf.modules.d/mod_cloudflare.conf
service httpd restart
What's happening?
We're using the cPanel installer.sh as suggested by Cloudflare but the compiled mod_cloudflare.so throws an error if you then run service httpd restart. Lets fix this.
Download the source mod_cloudflare file.
Ensure we have the correct EasyApache4 developer tools to build the mod_cloudflare module.
Build and install extension module.
Remove the new mod_cloudfare.conf file since we prefer the one that was generated and installed in step 1.
Restart apache.
Note: The mod_cloudflare module will not show in EasyApache4. You can see it's enabled by running httpd -M | grep cloudflare and you should see something like cloudflare_module (shared).
References:
https://www.cloudflare.com/technical-resources/
https://community.cloudflare.com/t/help-installing-mod-cloudflare/1747/12
http://www.marathon-studios.com/blog/issues-installing-mod_cloudflare-on-centos-7/
https://forums.cpanel.net/threads/install-httpd-devel.594631/#post-2405975
I found a solution that worked perfectly.
This github project installs the module and adds it into EasyApache so that future rebuilds keep the module active. This was the only solution I found that actually works for EasyApache 4. Everything else seems to be for EasyApache 3.
CloudFlare was not much help with this either, as they had suggested I contact my hosting provider for assistance.
I know this is a bit old now, but it's the first answer that shows up in google.
The official cloudflare answer does work, it just doesn't show up in the EA4 list of modules. However it is installed and working.
Just for others like me that reached here recently, mod_cloudflare module is deprecated and there is a native module for apache [mod_remoteip]. I can see it in EasyApache (apache module section). Also There is a manual here to install & config :
https://support.cloudflare.com/hc/en-us/articles/200170786-Restoring-original-visitor-IPs
with this module you can see Client IP through
$_SERVER['REMOTE_ADDR']
And there is no need to
$_SERVER['HTTP_CF_CONNECTING_IP']
Instructions for installing mod_cloudflare on cPanel with EasyApache4 can be found here:
https://support.cloudflare.com/hc/en-us/articles/206175737-How-do-I-restore-original-visitor-IP-with-EasyApache-cPanel-
bash <(curl -s https://raw.githubusercontent.com/cloudflare/mod_cloudflare/master/EasyApache/installer.sh)

Suite CRM Installation

I'm trying to install Suite CRM on a 2011 Mac Mini running El Capitan and with the "Mac Server App" installed.
I've unzipped the Suite CRM package under /Library/Server/Web/Data/Sites/Suite however when I enter the following
chgrp _www.www /Library/Server/Web/Data/Sites/Suite -R
I get the error
chgrp: _www._www: illegal group name
I've checked I'm using the right Apache user and group so I'm stuck. Should I unzip SuiteCRM in a different location? Is it something to do with the Mac Server App?
Any help is greatly appreciated.
It think you need to use sudo:
sudo chown -R _www:_www <mywebfolder>
sudo chmod -R 775 <mywebfolder>
To install Suite CRM, which is compatible almost with every OS there is the procedure of following steps:
After downloading the SuiteCRM (if you are installing it first time otherwise you will have to upgrade the existing one), click on install.
Pre requisite for SuiteCRM are platform appropriate version of PHP, web server and database on your machine (Linux or Windows platform)
Unzip the downloaded SuiteCRM package and set permissions. For this, while unzipping the package locate the root directory or sub directory of your web server.
You can rename the SuiteCRM as well
Set permissions or ownership of your SuiteCRM directory with the following command: Chgrp ApacheUser.ApacheGroup <suitecrmroot> -R
Now set the system user of your web server. If you find it difficult to set the permissions for system user then you can take the help of any expert. From there you can take the help. Commonly the users are apache or nobody for Linux and IUSR_computerName for Windows. For Linux following commands are to be executed in order to set the permissions: sudo chown –R www-data:www-data;sudo chmod –R 755; sudo chmod –R 775 cache custom modules themes data upload config_override.php
While for Windows the steps are different. You can also take the help of any expert if you find it difficult to set up the Suite CRM, then any training or service provider of technical courses can help you in this regard. We have used the service of Janbask, they are professional training provider and IT consultants, with the help of their experts they also provide solutions of real time problems.
Many Thanks

Which type of rvm install do I do if I want to use it with phusion passanger

I am on ubuntu 12.04.1 LTS.
I have installed apache2 running as www-data.
I want to use ruby 1.9.3.
I need to install passanger.
The question is which installation method should I use to install rvm. Should I use the single-user or the multi-user installation.
If I have to use the single-user installation, do I install it as my user or as www-data.
On my production systems, I install RVM system-wide. That way I can log in (or anyone else can login) and pull up a console on the system using the same ruby and gemsets. I am sure there are ways to do that with single user, but this has always been the least complicated for me.
However, for Passenger, I recommend installing that against the system ruby. The reason for that is because every time you change or upgrade your ruby, it would blow up your passenger installation and you would need to change your Apache configuration and rerun the passenger installation. This works because passenger and your application do not need to run on the same ruby installation.

Apache Web Development on Cygwin

I'm trying to get an Apache server running on my Cygwin setup to follow the Java Ranch Cattle Drive tutorials online (basically, to learn Java EE web page development that uses a MySQL back end.)
I used the Cygwin Setup program to install httpd (which is how I installed most other dev tools I use on cygwin) and it says install complete, yet when I run 'httpd' it cannot find the command. It also appears the expected install directory (/usr/local/apache...) doesn't exist.
Does anyone have any experience using this setup, and if so, you could walk me through the initial steps of getting the server up and running and getting a browser to display the server's default page?
To keep answers focused, I didn't want to discus the drawbacks of running Apache on a Windows system - this is just for learning purposes. Thanks in advance.
Looking at the Cygwin Package Listing for httpd, you can see that the executable is installed under /usr/sbin.
So, if /usr/sbin is not on your PATH (it isn't on mine, not by default anyhow), you would actually run:
/usr/sbin/httpd
And btw, if you would like to list the files installed for a certain package, you can use cygcheck:
cygcheck -l httpd
cygrunsrv -I Apache -p /usr/sbin/httpd -a "-X"
This will solve the problem. This assumes you already have cyrunsrv set up. The reason httpd fails with cygrunsrv if you leave out the -X is that the process disconnects from the terminal and cygrunsrv considers that a failure. The -X option for httpd is the debug or terminal mode.
I couldn't find any detailed information on how to get Apache working on Cygwin, so here it is if someone's interested:
Install the httpd-* and httpd-mod_* packages you need. Note that the packages named "Apache" are deprecated. You need the ones named "httpd" (which are actually Apache).
Install cygrunsrv (normally this is a default Cygwin package)
Run /usr/bin/cygserver-config as admin. This is needed because Apache requires an IPC server running.
Open services.msc, then go to the CYGWIN Cygserver. Right-click on it and start it. If you don't do this, you'll probably get errors like "AH00023: Couldn't create the proxy mutex".
Finally, start Apache by running /usr/sbin/apachectl restart
Config is in /etc/httpd/.
Some information about running Apache on Cygwin:
http://httpd.apache.org/docs/1.3/cygwin.html
http://www.issociate.de/board/goto/895433/apache2_does_not_start_in_cygwin.html
http://www.cygwin.com/ml/cygwin-apps/2005-02/msg00085.html
Personally, I would recommend installing WAMPServer or other WAMP stack and do it that way. There is no difference, except that you'll need to control Apache through Windows commands [net start, net stop], not Cygwin's ones.