Project

General

Profile

Fedora 20 Install

Added by Jamie McPeek over 9 years ago

Does anyone have any steps for a start-to-finish installation of the latest stable (2.5.2) release on Fedora 20 x64?

I've tried to follow the limited documentation; however, can't seem to get up to an actual working installation.

The furthest I have been able to reach it was by following these instructions, then heading on to these.

In the generic installation instructions, I can get to the point of running in webrick to test the installation - which works (sort of).

If I run 'gem install ...' or 'bundle install ...' as my personal user (non-privileged) account, this works; however, all gems are installed to "/home/user/.gem/ruby/...".

If I run the commands as root, the rake commands fail stating they cannot find 'mysql/mysql2' file even though it shows as present in 'gem list'.

If, when installing the gems as a non-privileged user, I attempt to install mod_passenger/mod_rails, restarting apache2 fails because it cannot read the file "/home/user/.gem/ruby/passenger/...".

I tried following along with the CentOS 6.5 instructions since it shares a similar heritage to Fedora/RHEL; however, I didn't see anything that stood out as completely different and attempting to follow through as well as could be still results in either the gems being installed into my personal home folder and inaccessible to apache or they are made available to the system and the rake commands fail.

I apologize if there is something obvious being overlooked here - I have very limited ruby experience and no prior experience with rails/passenger.

Any assistance would be greatly appreciated.


Replies (5)

RE: Fedora 20 Install - Added by Jamie McPeek over 9 years ago

I was able to make some progress on this and get redmine up and running in apache, though partially broken/misconfigured it would appear.

The issue with not being able to find 'mysql2/mysql2' is documented at http://archive.railsforum.com/viewtopic.php?id=50501.

Getting past that, I was able to build passenger as a privileged user, run rake, and launch via WEBrick.

After using the settings recommended in passenger-install-apache2-module, I was able to point my browser to http://localhost/ and see the stock redmine installation.

Upon heading to Administration > Information, I am met with the following:

Despite the folders having full access:

drwxr-xr-x. 1 apache apache   18 Jul  6 07:44 files
drwxr-xr-x. 1 apache apache   76 Aug 11 22:10 log
drwxr-xr-x. 1 apache apache   12 Jul  6 07:44 plugins
drwxr-xr-x. 1 apache apache   82 Aug 11 22:07 tmp

With passenger running as apache:

apache    1087  0.1  3.0 357512 123968 ?       Sl   22:37   0:01 Passenger RackApp: /var/www/redmine

And rmagick installed:

*** LOCAL GEMS ***

rmagick (2.13.3)

Any assistance would be greatly appreciated.

RE: Fedora 20 Install - Added by Anonymous over 9 years ago

you are shure that your apache is running als user apache? This is quite unusual. Check for it via
ps aux | grep apache

Usually web applications run als www-data and thus permissions on directories have to be granted for this user.

Cheers

Alex

RE: Fedora 20 Install - Added by Anonymous over 9 years ago

Last remark: maybe plugin-assets-directory has first to be created.

Alex

RE: Fedora 20 Install - Added by Jamie McPeek over 9 years ago

I am positive apache2 is running as user apache:

From the Fedora documentation at http://fedoraproject.org/wiki/Administration_Guide_Draft/Apache#Apache_File_Security, the default is to run the daemon in the apache user and group.

And my process list confirms this:

$ ps aux | grep apache
apache   29359  0.0  0.0 227804  3808 ?        S    17:25   0:00 /usr/sbin/httpd -DFOREGROUND
apache   29378  0.0  0.1 228012  6864 ?        S    17:25   0:00 /usr/sbin/httpd -DFOREGROUND
apache   29379  0.0  0.0 227876  4048 ?        S    17:25   0:00 /usr/sbin/httpd -DFOREGROUND
apache   29380  0.0  0.0 227876  4048 ?        S    17:25   0:00 /usr/sbin/httpd -DFOREGROUND
apache   29381  0.0  0.0 227876  4048 ?        S    17:25   0:00 /usr/sbin/httpd -DFOREGROUND
apache   29382  0.0  0.0 227876  4048 ?        S    17:25   0:00 /usr/sbin/httpd -DFOREGROUND
apache   29394  0.0  0.0 227876  4048 ?        S    17:25   0:00 /usr/sbin/httpd -DFOREGROUND
apache   29407  0.0  2.6 357492 107096 ?       Sl   17:25   0:00 Passenger RackApp: /var/www/redmine

The inability to write to the folders despite the permissions was caused by SELinux. The default file context for the folders was set to "httpd_sys_content_t".

I was able to fix this by issuing the following command:

sudo chcon -t httpd_sys_content_rw_t -R files log public/plugin_assets tmp

After which, I restarted apache2, was able to modify the default admin user account, and was met with the following information settings:

This still leaves the mystery of why RMagick is saying it is not available but is installed and should be available like any of the other ruby gems.

RE: Fedora 20 Install - Added by Jamie McPeek over 9 years ago

I was able to get through the remainder of my issues with this installation.

In an effort to assist others, I have documented the steps on the wiki here: FedoraInstallation.

    (1-5/5)