F29Installation » History » Revision 16
Revision 15 (Gerd Pokorra, 2019-01-01 10:42) → Revision 16/41 (Gerd Pokorra, 2019-01-01 11:54)
h1. HowTo Install Redmine 4.0.0 on Fedora 29 {{toc}} This guide is not complete. It will be completed in the next two weeks. h2. System Requirements It is assumed that the Server Edition is installed on the system in this guide. h3. Updating the System It is recommended to install Redmine on an update system. To ensure that all installed packages are up-to-date issue the following command: <pre>> dnf update </pre> h3. Installing Dependencies A number of dependencies need to be installed: <pre>> dnf install rubygem-bundler > dnf install rubygem-rails > dnf install ruby-devel rubygem-rmagick > dnf install gcc redhat-rpm-config > dnf groupinstall "C Development Tools and Libraries" > dnf groupinstall "Development Tools" </pre> The list of dependencies may not complete. Problems of the installation or build of a compoment can be solved by installing the necessary dependency. For PostgreSQL: <pre>> dnf install rubygem-pg </pre> h2. Obtaining Redmine (Step 1) Get the Redmine source code by downloading the packaged release. <pre>> dnf install wget > mkdir /var/www > cd /var/www > wget http://www.redmine.org/releases/redmine-4.0.0.tar.gz > tar xf redmine-4.0.0.tar.gz </pre> At this guide is accepted that the location of the Redmine source code is: <pre>/var/www/redmine-4.0.0 </pre> For example the nginx configuration refer to the path @/var/www/redmine-4.0.0@. h2. Setup a local database server This section discribes the setup of a database server that will be configured to allow access from the localhost. h3. PostgreSQL h3. MySQL h2. Firewall Open the firewall for https: <pre>> firewall-cmd --add-service=https > firewall-cmd --permanent --add-service=https </pre> h2. Web Server h3. Nginx/Passenger The Fedora @nginx@ package do not include Passenger, so you have to build @nginx@ with the passenger module. The guide assume that the sources are extracted under the directory @/opt@ . The @nginx@ software will be installed at @/opt/ngnix@. At the time of writting that guide this was the current stable releases of @passenger@ and @nginx@: * passenger-6.0.0 * nginx-1.14.2 h4. Downloading the sources: <pre>Passenger > cd /opt > wget https://s3.amazonaws.com/phusion-passenger/releases/passenger-6.0.0.tar.gz > tar xf passenger-6.0.0.tar.gz Nginx > wget http://nginx.org/download/nginx-1.14.2.tar.gz > mkdir /opt/src > cd /opt/src > tar xf nginx-1.14.2.tar.gz </pre> h4. Installing additional packages For the build of @passenger@ and @nginx@ the following additional packages are needed to be installed: <pre>> dnf install install gcc-c++ libcurl-devel openssl-devel zlib-devel </pre> h4. Execute the ruby script for building and installing The simplest way to build and install the @nginx@ web server with the @passenger@ module is to run the script @passenger-install-nginx-module@. <pre>> /opt/passenger-6.0.0/bin > ./passenger-install-nginx-module --prefix=/opt/nginx --nginx-source-dir=/opt/src/nginx-1.14.2 --languages ruby </pre> With the same @passenger@ locality the installer modify the @nginx@ configuration file @/opt/nginx/conf/nginx.conf@ and output the same text: <pre> http { ... passenger_root /opt/passenger-6.0.0; passenger_ruby /usr/bin/ruby; ... } </pre> h4. Add a systemd service file To start the @nginx@ process during the boot add the file @/usr/lib/systemd/system/nginx.service@ with the following content: <pre>[Unit] Description=The nginx HTTP and reverse proxy server After=network.target remote-fs.target nss-lookup.target [Service] Type=forking #PIDFile=/run/nginx.pid PIDFile=/opt/nginx/logs/nginx.pid # Nginx will fail to start if /run/nginx.pid already exists but has the wrong # SELinux context. This might happen when running `nginx -t` from the cmdline. # https://bugzilla.redhat.com/show_bug.cgi?id=1268621 ExecStartPre=/usr/bin/rm -f /opt/nginx/logs/nginx.pid #ExecStartPre=/usr/sbin/nginx -t #ExecStart=/usr/sbin/nginx ExecStartPre=/opt/nginx/sbin/nginx -t ExecStart=/opt/nginx/sbin/nginx -c /opt/nginx/conf/nginx.conf ExecReload=/bin/kill -s HUP $MAINPID KillSignal=SIGQUIT TimeoutStopSec=5 KillMode=mixed PrivateTmp=true [Install] WantedBy=multi-user.target </pre> The paths are modified to start the executable @/opt/nginx/sbin/nginx@. <pre>> systemctl start nginx > systemctl enable nginx </pre> h4. Nginx Configuration For http add the two lines and comment out the four lines: <pre> server { listen 80; ... root /var/www/redmine-4.0.0/public; passenger_enabled on; #location / { # root html; # index index.html index.htm; #} ... } </pre> For https add you can use lines like this: <pre> # HTTPS server # server { listen 443 ssl; server_name my_web_serv.domain; ssl_certificate /etc/ssl/certs/my_web_serv.pem; ssl_certificate_key /etc/ssl/private/privkey.pem; root /var/www/redmine-4.0.0/public; passenger_enabled on; } </pre> h3. Apache