How To Install Redmine on CentOS 7

Redmine on CentOS 7

Redmine is a project management web app that allows users to manage projects flexibly while offering robust monitoring tools and a broad library of plug-ins. This free and open source solution offers a substitute for paid job management tools and contains support for wikis, forums, calendars, and information visualization programs.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing all dependencies.

Step 3. Installing Ruby and RVM.

Step 4. Installing MySQL server.

Step 5. Installing Passenger and Nginx.

Step 6. Installing Redmine.

Step 7. Accessing Redmine.

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation the Redmine project management web app on a CentOS 7 server.
Install Redmine on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y install epel-release
yum -y update

Step 2. Installing all dependencies.

Install all dependencies that are required by Redmine:

yum install zlib-devel curl-devel openssl-devel httpd-devel apr-devel apr-util-devel mysql-devel ftp wget ImageMagick-devel gcc-c++ patch readline readline-devel zlib libyaml-devel libffi-devel make bzip2 autoconf automake libtool bison iconv-devel subversion

Step 3. Installing Ruby and RVM.

Redmin requires Ruby. So, first you’ll want to install Ruby Version Manager which allows managing of multiple ruby environments:

gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
curl -L https://get.rvm.io | bash -s stable --ruby=2.2.5

Now we have to add it the .bashrc file so it can be automatically reload and to add it to the .bashrc file run this:

echo '[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"' >> ~/.bashrc

Reload the .bashrc file using this command:

source ~/.bashrc

Now run following command as shown below to check Ruby and RVM version:

ruby -v
rvm -v

Step 4. Installing MySQL server.

MySQL needs to be configured so that Redmine can store data, so we will install MySQL server:

rpm -Uvh https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
yum repolist
yum install mysql-server

Now start the mysqld service using systemctl command as shown below:

systemctl start mysqld

By default, MySQL is not hardened. You can secure MySQL using the mysql_secure_installation script. You should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MySQL.

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next we will need to log in to the MySQL console and create a database for the Redmine. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MySQL root password and hit Enter. Once you are logged in to your database server you need to create a database for Redmine installation:

CREATE DATABASE redmin
GRANT ALL PRIVILEGES ON redmine.* TO 'redmine'@'localhost' IDENTIFIED BY 'PASSWORD';
FLUSH PRIVILEGES;
\q

Step 5. Installing Passenger and Nginx.

Passenger is an application server that runs your web application then communicates with the web server. We will install it and integrate it with Nginx:

gem install passenger --no-ri --no-rdoc
passenger-install-nginx-module

You will be asked for some information, and then it will install Nginx. The default installation directory is /opt/nginx. Of course, you can change it. In it, edit conf/nginx.conf.

On line 23, paste the following content:

include vhost/*.conf;

Save and close the file. Next, create a vhost directory for Virtual Host configuration files:

mkdir -p /opt/nginx/conf/vhost

ost

In this directory, create a redmine.conf file. The paste the following into that file:

server {
 listen 80;
 server_name yourdomain.com;

root /var/www/html/redmine/public;
 passenger_enabled on;
 client_max_body_size 10m; # Max attachemnt size

# redirect server error pages to the static page /50x.html
 #
 error_page 500 502 503 504 /50x.html;
 location = /50x.html {
 root html;
 }
 }

Restart the web server for the changes to take effect:

systemctl restart nginx
systemctl enable nginx

Step 6. Installing Redmine.

First, download the latest version of Redmine, at the moment of writing this article it is version 3.4:

cd /var/www/
svn co http://svn.redmine.org/redmine/branches/3.4-stable redmine

Next, change the current working directory and the example configuration files:

cd redmine
cp config/configuration.yml.example config/configuration.yml
cp config/database.yml.example config/database.yml

Make the following changes to the database.yml file:

nano config/database.yml

Add following content:

production:
 adapter: mysql2
 database: redmine
 host: localhost
 username: redmine
 password: PASSWORD
 encoding: utf8

Run following commands to change the owner to user and group nobody:

mkdir -p tmp tmp/pdf public/plugin_assetssud
chown -R nobody:nobody files log tmp public/plugin_assetssudo
chmod -R 775 files log tmp public/plugin_assets

Install the bundler and gem dependencies for redmine:

gem install bundlerbundle install --without development test

Generate the secret token using the following command:

bundle exec rake generate_secret_token
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake redmine:load_default_data

Finally, Restart the web server for the changes to take effect:

systemctl restart nginx

Step 7. Accessing Redmine.

Redmine will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://mydomain.com and complete the required the steps to finish the installation using the default credentials (admin/admin). If you are using a firewall, please open port 80 to enable access to the control panel.

Congratulation’s! You have successfully installed Redmine. Thanks for using this tutorial for installing Redmine project management web app on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Redmine web site.

How To Set up WebDAV using Apache on CentOS 7

WebDAV using Apache on CentOS 7

WebDAV (Web-based Distributed Authoring and Versioning) is an Extension of the HTTP protocol that allows users to edit and manage files and documents stored on servers.

WebDAV provides a frame for users to create, alter, move, Upload, and download documents on an Apache web server. This makes WebDAV a favorite choice for programmers, especially when combined with Subversion or Git.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing Apache web server.

Step 3. Configure WebDAV.

Step 4. Configure Apache vhost for WebDAV.

Step 5. Accessing WebDAV.

 

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step set up WebDAV using Apache on CentOS 7 server.
Set up WebDAV using Apache on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y install epel-release
yum -y update

Step 2. Installing Apache web server.

Install Apache using YUM:

yum install httpd

Start the Apache web server:

systemctl start httpd.service
systemctl enable httpd.service

For Apache, there are three WebDAV-related modules which will be loaded by default when a Apache web server getting started. You can confirm that with this command:

httpd -M | grep dav

You should be result with:

dav_module (shared)
dav_fs_module (shared)
dav_lock_module (shared)

Step 3. Configure WebDAV.

After installing the WebDAV module, you will need to create a webdav directory:

mkdir /var/www/html/webdav
chown -R apache:apache /var/www/html
chmod -R 755 /var/www/html

Set up password authentication:

htpasswd -c /etc/httpd/.htpasswd chedelics

Now, you need to assign group ownership of the file to the apache user, and lock down the permissions for everyone else. To do this, run the following command:

chown root:apache /etc/httpd/.htpasswd
chmod 640 /etc/httpd/.htpasswd

Step 4. Configure Apache vhost for WebDAV.

Next, you need to create a virtual host file for the webdav directory:

nano /etc/httpd/conf.d/webdav.conf

Add the following content:

DavLockDB /var/www/html/DavLock

 ServerAdmin webmaster@localhost
 DocumentRoot /var/www/html/webdav/
 ErrorLog /var/log/httpd/error.log
 CustomLog /var/log/httpd/access.log combined
 Alias /webdav /var/www/html/webdav
 
 DAV On
 AuthType Basic
 AuthName "webdav"
 AuthUserFile /etc/httpd/.htpasswd
 Require valid-user
 

Save and exit, Restart Apache to put your changes into effect:

systemctl restart httpd.service

Step 5. Accessing WebDAV.

WebDAV will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://mydomain.com/webdav and complete the required the steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel.

Congratulation’s! You have successfully installed WebDAV using Apache on CentOS 7. Thanks for using this tutorial for set up WebDAV using Apache on CentOS 7 systems. For additional help or useful information, we recommend you to check the official WebDAV web site.

How To Install TYPO3 on CentOS 7

TYPO3 on CentOS 7

TYPO3 is an enterprise open source content management system based on PHP. It’s intended for ease of use to allow owners and enterprises to create powerful and dynamic content websites.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Install LAMP server.

Step 3. Installing TYPO3.

Step 4. Configuring MariaDB for TYPO3.

Step 5. Configure Apache web server for TYPO3.

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation the TYPO3 open source content management system on a CentOS 7 server.
Install TYPO3 on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Install LAMP server.

A CentOS 7 LAMP stack server is required. If you do not have LAMP installed, you can follow our guide here. Also install required PHP modules:

yum -y install php-gd php-imap php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mssql php-snmp php-soap php-tidy curl curl-devel

Step 3. Installing TYPO3.

First thing to do is to go to TYPO3’s download page and download the latest stable version of TYPO3, At the moment of writing this article it is version 9:

wget https://typo3.azureedge.net/typo3/9.0.0/typo3_src-9.0.0.tar.gz

Unpack the TYPO3 archive to the document root directory on your server:

tar xzvf typo3_src-9.0.0.tar.gz
cd typo3_src-9.0.0/
cp -r . /var/www/html/

We will need to change some folders permissions:

chown apache:apache -R /var/www/html/

Step 4. Configuring MariaDB for TYPO3.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next we will need to log in to the MariaDB console and create a database for the TYPO3. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for TYPO3 installation:

CREATE DATABASE typo3;
CREATE USER typo_db_user@localhost IDENTIFIED BY ‚secretpassword‘;
GRANT ALL PRIVILEGES ON typo3.* TO typo_db_user@localhost;
FLUSH PRIVILEGES;
exit

Step 5. Configure Apache web server for TYPO3.

We will create Apache virtual host for your TYPO3 website. First create ‘/etc/httpd/conf.d/vhosts.conf’ file with using a text editor of your choice:

nano /etc/httpd/conf.d/vhosts.conf
IncludeOptional vhosts.d/*.conf

Next, create the virtual host:

mkdir /etc/httpd/vhosts.d/
nano /etc/httpd/vhosts.d/yourdomain.com.conf

Add the following lines:

ServerAdmin [email protected]
DocumentRoot "/var/www/html/"
ServerName yourdomain.com
ServerAlias www.yourdomain.com
ErrorLog "/var/log/httpd/yourdomain.com-error_log"
CustomLog "/var/log/httpd/yourdomain.com-access_log" combined

<Directory "/var/www/html/">
DirectoryIndex index.html index.php
Options FollowSymLinks
AllowOverride All
Require all granted


Save and close the file. Restart the apache service for the changes to take effects:

systemctl restart httpd.service

Next we have to make some PHP settings. For this we go into the php.ini and adjust a few settings:

nano /etc/php.ini

Then make the change the following lines below in the file and save:

max_execution_time = 30 // change it to 240
max_input_vars = 1000 // Uncomment and change the value to 1500

Step 6. Accessing TYPO3 CMS.

TYPO3 will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://yourdomain.com/ or http://server-ip/ and complete the required the steps to finish the installation. If you are using a firewall, please open port 80 to enable access to the control panel.

Congratulation’s! You have successfully installed TYPO3. Thanks for using this tutorial for installing TYPO3 open source content management on CentOS 7 systems. For additional help or useful information, we recommend you to check the official TYPO3 web site.

How To Install VMware Workstation on CentOS 7

VMware Workstation on CentOS 7

For those of you who didn’t know, VMware Workstation is the most popular Virtualization software used at the desktop level on Linux like operating systems and Microsoft Windows. It allows the us to create and run multiple Virtual machines simultaneously. VMware Workstation is not an open source or free software so we need to buy its license key, though we can use its trail version for 30 days then later you can apply its license key.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

 

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation the VMware Virtualization on a CentOS 7 server.
Install VMware Workstation on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing VMware Workstation.

yum clean all
yum install kernel-headers kernel-devel
yum groupinstall "Development tools"
yum -y update

Step 2. Installing VMware Workstation.

First download the Vmware Workstation 14 Pro bundle package here.

Once the VMware workstation bundle file is downloaded, set the executable permissions on it with the below chmod command:

chmod a+x VMware-Workstation-Full-14.0.0-6661328.x86_64.bundle

Now let’s go ahead and start the installation of Vmware Workstation 14 pro by running the .bundle package. Refer the command below:

sudo ./VMware-Workstation-Full-14.0.0-6661328.x86_64.bundle

Accept the End User License Agreement:
End-User-License-Agreement-VMware-Workstation
Click on Next and disable product updates on startup:
VMware-Workstation-Product-Updates2
Specify the User Name which will have rights to connect to VMware workstation, in my case I using ‘idroot‘ as user name:
Linuxtechi-User-VMware-Workstation3
Click on next to proceed, you can also keep the default path. In my case I am also keeping the default directory:
Virtual-Machine-Storing-Path-VMware-WorkStation4
Specify the HTTPs port or keep default one:
HTTPs-Port-Debian9-VMware-Workstation5
Enter the License key in case you have already buy its license, else you can leave it blank:
License-Key-Debian9-VMware-Workstation6
In the next window, click on ‘Install‘ option to start its installation:
VMware-Workstation-Installation-Progress7
Once the Installation is successful, we will get the below window:
VMware-Workstation-Installation-Completed8
After the installation is finished, you can open the workstation from the CentOS 7 application menu under the System Tools sub category.

Congratulation’s! You have successfully installed VMware. Thanks for using this tutorial for installing VMware Virtualization on CentOS 7 systems. For additional help or useful information, we recommend you to check the official VMware Workstation web site.

How To Install Apache Spark on CentOS 7

Apache Spark on CentOS 7

Apache Spark is a fast and general-purpose cluster computing system. It provides high-level APIs in Java, Scala and Python, and also an optimized engine which supports overall execution charts. It also supports a rich set of higher-level tools including Spark SQL for SQL and structured information processing, MLlib for machine learning, GraphX for graph processing, and Spark Streaming.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing Java.

Step 3. Installing Scala.

Step 4. Installing Apache Spark.

Step 5. Configure Firewall for Apache Spark.

Step 6. Accessing Apache Spark.

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step install Apache Spark on CentOS 7 server.
Install Apache Spark on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y install epel-release
yum -y update

Step 2. Installing Java.

Installing java for requirement install apache spark:

yum install java -y

Once installed, check java version:

java -version

Step 3. Installing Scala.

Spark installs Scala during the installation process, so we just need to make sure that Java and Python are present:

wget http://www.scala-lang.org/files/archive/scala-2.10.1.tgz
tar xvf scala-2.10.1.tgz
sudo mv scala-2.10.1 /usr/lib
sudo ln -s /usr/lib/scala-2.10.1 /usr/lib/scala
export PATH=$PATH:/usr/lib/scala/bin

Once installed, check scala version:

scala -version

Step 4. Installing Apache Spark.

Install Apache Spark using following command:

wget http://www-eu.apache.org/dist/spark/spark-2.2.1/spark-2.2.1-bin-hadoop2.7.tgz
tar -xzf spark-2.2.1-bin-hadoop2.7.tgz
export SPARK_HOME=$HOME/spark-2.2.1-bin-hadoop2.7
export PATH=$PATH:$SPARK_HOME/bin

Setup some Environment variables before you start spark:

echo 'export PATH=$PATH:/usr/lib/scala/bin' >> .bash_profile
echo 'export SPARK_HOME=$HOME/spark-1.6.0-bin-hadoop2.6' >> .bash_profile
echo 'export PATH=$PATH:$SPARK_HOME/bin' >> .bash_profile

The standalone Spark cluster can be started manually i.e. executing the start script on each node, or simple using the available launch scripts. For testing we can run master and slave daemons on the same machine:

./sbin/start-master.sh

Step 5. Configure Firewall for Apache Spark.

firewall-cmd --permanent --zone=public --add-port=6066/tcp
firewall-cmd --permanent --zone=public --add-port=7077/tcp
firewall-cmd --permanent --zone=public --add-port=8080-8081/tcp
firewall-cmd --reload

Step 6. Accessing Apache Spark.

Apache Spark will be available on HTTP port 7077 by default. Open your favorite browser and navigate to http://yourdomain.com:7077 or http://server-ip:7077 and complete the required the steps to finish the installation.
apache-spark-installation
Congratulation’s! You have successfully installed Apache Spark on CentOS 7. Thanks for using this tutorial for installing Apache Spark on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Apache Spark web site.

How To Install Nginx Mainline Version on CentOS 7

Nginx Mainline Version on CentOS 7

Nginx has two primary repositories or branches that folks can use to install or update Nginx packages. When you install Nginx from CentOS default repositories, you’re installing Nginx from the stable repository.

Every new feature is added to the mainline repository first and after it has been tested and proven to be stable, before the repository switches to be stable. If you’re not overly cautious and wish to install the latest and greatest Nginx packages and features, you may have to install Nginx from it Mainline repository.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing Mainline version.

 

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step install Nginx mainline version on CentOS 7 server.
Install Nginx Mainline Version on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Installing Mainline version.

First, create nginx repository file in CentOS:

nano /etc/yum.repos.d/nginx.repo

Add these lines into the file and save it:

[nginx.org]
name=nginx.org repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=1
enabled=1

Now update repositories and install Nginx:

yum update
yum install nginx -y

Check Nginx version:

### nginx -v
nginx version: nginx/1.13.8

Start Nginx and add it to automatically start on your system start-up using:

systemctl restart nginx
systemctl enable nginx

You can verify that Nginx is really running by opening your favorite web browser and entering the URL http://your-server’s-address, if it is installed, then you will see this:
nginx-default-page
Congratulation’s! You have successfully installed Nginx on CentOS 7. Thanks for using this tutorial for installing Nginx mainline version web server on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Nginx web site.

How To Install Nginx Amplify Agent on CentOS 7

Nginx Amplify Agent on CentOS 7

Nginx Amplify Agent is a Strong Nginx monitoring tool written in Python. Its function is to collect various metrics and metadata and send Them securely into the backend for storage and visualization. After appropriate Installation, it supplies you with NGINX Amplify web interface and also you Should observe real-time metrics to your monitored systems.

Table of Contents

Step 1. First let’s start by ensuring your system is up-to-date.

Step 2. Installing Nginx Amplify Agent.

Step 3. Configuring the Nginx Amplify Agent.

 

 

Prerequisites

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation the Nginx Amplify Agent monitoring tool on a CentOS 7 server.
Install Nginx Amplify Agent on CentOS 7

Step 1. First let’s start by ensuring your system is up-to-date.

yum clean all
yum -y update

Step 2. Installing Nginx Amplify Agent.

First, Create a repo file:

# cat >/etc/yum.repos.d/nginx-amplify.repo <

Install the Nginx Amplify Agent rpm package:

yum install nginx-amplify-agent

Verify the installtion by inspectivng the log file ‘/var/log/amplify-agent/agent.log‘

Once installed, These commands can be used to start/stop the agent:

systemctl enable amplify-agent
systemctl start amplify-agent

Step 3. Configuring the Nginx Amplify Agent.

Checklist:

    stub status
    extended access logging
    ‘warn’ level on error logging

server {
 listen [::]:80;
 server_name bmw.idroot.us localhost [::1] 127.0.0.1;
 keepalive_timeout 60;

location /nginx_status {
 stub_status;
 access_log off;

allow ::1;
 allow 127.0.0.1;
 deny all;
 }
}

The logging needs to be confiured to have extended information as per the documentation:

log_format  main      '$remote_addr - $remote_user [$time_local] "$request" '
                      ' $status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for" '
                      'rt=$request_time ua="$upstream_addr" '
                      'us="$upstream_status" ut="$upstream_response_time" '
                      'ul="$upstream_response_length" '
                      'cs=$upstream_cache_status' ;

Ensure warnings are logged to the error log:

error_log /var/log/nginx/error.log warn

Finally steps, You can overview the status of our monitored server in the Web interface logging to your Amplify Account as in the snapshot:
nginx-amplify-agent
Congratulation’s! You have successfully installed Nginx Amplify. Thanks for using this tutorial for installing Nginx Amplify monitoring tool on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Nginx Amplify Agent web site.