Install Redmine 3.x on WHM/Cpanel - cpanel

Guys I've spent last 24 hours continuously trying to install Redmine 3.x on the WHM/Cpanel server but failed to do so. Can some please guide me with one proper way or tell me about a relatively new article regarding this issue because every solution i find on the internet is old.

There is no out-of the box solution for Cpanel.
Redmine is complex Ruby on Rails based web application, and as such it relies on lot's of 3rd party libraries, defined in Gemfile.
Although it migth be possible to install all Gems manually via Cpanel and avoid bundle install command, you would still need to run some commands like
bundle exec rake generate_secret_token
bundle exec rake db:migrate RAILS_ENV=production
So to install it via WHM/Cpanel, I suggest you create a cpanel account for your Redmine, then enable SSH access for that Cpanel user, and follow official installation tutorial from Redmine. (Which is too big to write here inside answer).
Just make sure to unpack your Redmine outside public_html!
And you can deploy your Redmine via Cpanel as FastCGI, by pointing your application path to Redmine's public directory, just make sure to have dispatch.fcgi in your public folder of Redmine
mv dispatch.fcgi.example dispatch.fcgi
mv htaccess.fcgi.example .htaccess

Related

Error using zef to install Twitter module

I'm using zef to install the Twitter module with zef install Twitter
I'm getting the following error:
Enabled fetching backends [git path curl wget] don't understand git://github.com/raku-community-modules/Twitter You may need to configure one of the following backends, or install its underlying software - [pswebrequest]
I've googled 'pswebrequest' and I'm not getting anything of note.
I've tried installing HTTP::Tinyish, one of the dependencies, to check that my zef installation is working properly, and that was fine.
Any pointers on how to fix this?
The source-url should end with .git if its a git repository, as the backends use extensions to figure out how/what is needed to fetch/extract various types of packaged distributions.
You could open a pull request to add the .git to the source-url, or you could work around it manually via:
zef install https://github.com/raku-community-modules/Twitter.git

Best practices for using RVM to run Ruby on Rails 5 on a web server

I realize that this question has already been asked a million times, but after days of searching I am still yet to find a suitable answer.
I would like to run Ruby on Rails 5 on Centos 7. The default Ruby currently packaged with Centos 7 is 2.0.0. For Rails 5, I need a higher version, hence the need for RVM.
Here are some of the problems I have encountered when using RVM:
If I use the recommended option to install RVM
\curl -sSL https://get.rvm.io | bash -s stable --ruby
RVM and all Ruby gems will install into my $HOME directory, but this is not ideal, because the server has many users, and, since it is a web server, it is, of course, not desirable to have gems contained with users' home directories, especially if those directories could be deleted at any time (if an employee's contract ends).
Some people recommend installing RVM using sudo to get around that problem (though just as many people frown on this approach, as it seems to negate the purpose of RVM):
\curl -sSL https://get.rvm.io | sudo bash -s stable --ruby
and based on RVM's own suggestion, I comment out the line containing
Defaults secure_path=...
and my gems are installed into /usr/local/rvm/gems/ruby-2.3.1, which is great, except it produces another problem:
If I run gem install rails I receive an error:
You don't have write permissions for the /usr/local/rvm/gems/ruby-2.3.1 directory.
Yes, I could solve this by adding myself to the rvm group, but this is not ideal, because that means I always have to remember to add every new user to and remove every old user from this group.
If I run sudo gem install rails I also receive an error:
/usr/bin/env: ruby: No such file or directory
If I run rvmsudo gem install rails, everything works, except I will also have to run bundle install using rvmsudo, which produces a warning, because it is not recommended.
I could run everything using root user, which works... but then I need to remember to change the owner of all of my project files because apache doesn't quite have root privileges and is unable to write to certain of the project's directories. Plus, running as root seems wrong on so many levels.
In other words, no matter what approach I choose while using RVM, I run into one problem or another. Perhaps, someone else who has deployed this successfully can share their insights.
The only reasonable approach I have been able to come up with is to create a dedicated Rails user, to which all server users would switch prior to performing any maintenance, but I am worried that a service like apache won't "see" the gems installed locally.
Comments, thoughts, ideas? Maybe there is something I am missing about RVM?

problems deploying openMRS.war to glassfish v.2

I'm trying to deploy openMRS v.1.9.2 to a local VM running CentOS & Glassfish 2 for work. Unfortunately, I could not get it to work. Normally, I just download the standalone found at source forge. I just double-click the jar, and I'm good to go.
I normally just SSH into the the VM, so I first tried doing everything through a terminal. Here are the steps I took:
Using wget, retrieve the .zip
Create a dir (I just called it /openmrs), cd into the new directory, and then expand the .zip.
cd into the directory.
At this point, there are two options to start openMRS.
Run the bash script: ./run-on-linux.sh
Run the .JAR: java -jar [insert_jar_name].jar -commandline
When I run the .JAR, I get a stack trace.
When I try to run the bash script, I get another error.
Anyways, I thought I found a potential solution in an openMRS JIRA ticket, but it seems aimed at Glassfish 3, and not Glassfish 2 (which is what I need to use).
I then tried deploying the .WAR via the Glassfish admin UI. I thought it would work, but after going through the steps of selecting a language, whether or not to use demo data, etc. I received this.
Does anyone have experience deploying openMRS to Glassfish 2.1.1? Unfortunately Glassfish 3 doesn't seem to be a realistic option. I would really appreciate any help here. Thanks.
Although it doesn't solve my problem of not being able to successfully deploy openMRS to an instance of Glassfish v.2, I did manage to get myself further by just installing MySQL on the VM. Our work machines are all set up for postgres, so I think should have guessed earlier that not having a MySQL server installation was the problem.
Here is a tutorial I used to install MySQL

Create an installer for a Rails JRuby app

I have a Ruby On Rails 3 app that is installed under a Tomcat in Windows XP. I used jruby and warbler to create the war file.
I need to make an installer (Which means getting the code from a git repository, configuring, executing warbler, configure warbler and copy the output to Tomcat.
Can you help me with that? What is the correct approach for this requirement? A batch file and a EXE that executes it?
Simple question: You really have to use Tomcat under Windows?
This question because with Torquebox you could solve your problem in a super simple way. All rake tasks for deploying are there, you could deploy as a war or exploded folder. Otherwise you could use Stompbox to deploy the Heroku style with git.
Look at the documentation for more details: http://torquebox.org/documentation/current/deployment.html

Trying to transfer older version of mediawiki to new server

So, in college I had a Debian server which used to host a wiki, with mediawiki version 1.9. This server stopped working, and all I have now is its HD. I want to transfer this wiki to a new server, which also runs Debian, but I can't do that with Debian's current stable version of mediawiki, 1.15, because it is not possible to transfer a wiki to another version of mediawii.
So, my idea is to install mediawiki 1.9 on the new server, and then move the wiki. But I am having problems with installing it.
When I go to http://my_hostname/config/index.php, to configure the new wiki, so that I can transfer the other one, I get the following message, and nothing happens:
Checking environment...
Please include all of the lines below when reporting installation problems.
PHP 5.3.3-7+squeeze8 installed"
I really don't have a clue on what is wrong. ANY help would be greatly appreciated!
Like you commented yourself, it would certainly be worth a try to using your existing configuration. The configuration is typically some site preferences and database configuration, so make sure dat your database is setup in the same way as before.
Regarding your configuration problems, maybe php filters away the errors. You can check this by searching for error_reporting in your php.ini.
Just follow the instructions at http://www.mediawiki.org/wiki/Manual:Upgrading. Probably no point in trying to install at MediaWiki 1.9.
You may want to do a clean install of MediaWiki 1.18.1 first just to make sure your system is ready, all dependencies met, etc.