How To Install Anaconda on CentOS 7 Step by Step

Install Anaconda on CentOS 7

Anaconda is a popular and commonly used Python/R Data Science platform, available for users of the data scientist and other scientific communities. The platform is available as an open source distribution, meaning you can perform Python/R data Science and Machine learning on commonly used operating systems like Linux, Windows, and Mac OS X. In this tutorial we will learn how To Install Anaconda on CentOS 7 step by step

Table of Contents

Step 1. Ensuring your system is up-to-date.

Step 2. Installing Anaconda Python on CentOS.

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 Anaconda on a CentOS 7 server.

Install Anaconda 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 Anaconda Python on CentOS.

Download the Anaconda Installation Script:

cd /tmp
curl -O https://repo.anaconda.com/archive/Anaconda3-5.3.1-Linux-x86_64.sh

Once the progress bar is filled and the download is complete, we’ll verify the data integrity of the package. Do this by keying in this command into the command line:

sha256sum Anaconda3-5.3.1-Linux-x86_64.sh

The output should be like:

d4c4256a8f46173b675dd6a62d12f566ed3487f932bab6bb7058f06c124bcc27  Anaconda3-5.3.1-Linux-x86_64.sh

Now start anaconda installation script running following command:

bash Anaconda3-5.3.1-Linux-x86_64.sh

Now press ENTER to continue. Again press ENTER to scroll through the license of Anaconda. At last, you will be asked to accept the license terms.

Do you approve the license terms? [yes|no]

Type yes to continue. Then you will be asked to choose the installation directory.
Anaconda3 will now be installed into this location:

/home/linux4one/anaconda3

    - Press ENTER to confirm the location
    - Press CTRL-C to abort the installation
    - Or specify a different location below

Source the ~/.bashrc file to activate Anaconda:

source ~/.bashrc

Now verify the installation typing following command:

conda info

The output should be like:

active environment : base
    active env location : /home/wpcademy/anaconda3
            shell level : 1
    user config file : /home/wpcademy/.condarc
populated config files : 
        conda version : 4.5.11
    conda-build version : 3.15.1
        python version : 3.7.0.final.0
    base environment : /home/linuxize/anaconda3  (writable)
        channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                        https://repo.anaconda.com/pkgs/main/noarch
                        https://repo.anaconda.com/pkgs/free/linux-64
                        https://repo.anaconda.com/pkgs/free/noarch
                        https://repo.anaconda.com/pkgs/r/linux-64
                        https://repo.anaconda.com/pkgs/r/noarch
                        https://repo.anaconda.com/pkgs/pro/linux-64
                        https://repo.anaconda.com/pkgs/pro/noarch
        package cache : /home/wpcademy/anaconda3/pkgs
                        /home/wpcademy/.conda/pkgs
    envs directories : /home/wpcademy/anaconda3/envs
                        /home/wpcademy/.conda/envs
            platform : linux-64
            user-agent : conda/4.5.11 requests/2.19.1 CPython/3.7.0 Linux/3.10.0-957.1.3.el7.x86_64 centos/7 glibc/2.17
                UID:GID : 0:0
            netrc file : None
        offline mode : False

Congratulation’s! You have successfully installed Anaconda. Thanks for using this tutorial for installing Anaconda Python on CentOS 7 system. For additional help or useful information, we recommend you to check the official Anaconda website.

How To Install Mod_Security Apache on CentOS 7

Install Mod_Security Apache on CentOS 7

ModSecurity is an open source, cross platform web application firewall (WAF) developed by Trustwave’s SpiderLabs. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis. In this tutorial we will learn how To Install Mod_Security Apache on CentOS 7

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 ModSecurity on a CentOS 7 server.

Install Mod_Security Apache 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 Mod_Security Apache on CentOS

Install Dependencies for mod_security:

yum install gcc make httpd-devel libxml2 pcre-devel libxml2-devel curl-devel git

Next, download latest stable release of mod_security source code from their official website to your server:

wget https://www.modsecurity.org/tarball/2.9.3/modsecurity-2.9.3.tar.gz
tar xzf modsecurity-apache_2.9.3.tar.gz
cd modsecurity-apache_2.9.3
./configure
make install
cp modsecurity.conf-recommended /etc/httpd/conf.d/modsecurity.conf
cp unicode.mapping /etc/httpd/conf.d/

Step 3. Configuring Mod_Security.

# nano /etc/httpd/conf/httpd.conf
LoadModule security2_module modules/mod_security2.so

Now set the basic rule set in your httpd.conf file. Add the following lines of code at the end of the file:

<IfModule security2_module>
    Include conf.d/modsecurity.conf
</IfModule>

Save the changes and restart Apache:

systemctl restart httpd

Step 4. Download and configure OWASP (Open Web Application Security Project) core rule set for a base configuration.

cd /etc/httpd
git clone https://github.com/SpiderLabs/owasp-modsecurity-crs.git
mv owasp-modsecurity-crs modsecurity-crs
cd modsecurity-crs
cp modsecurity_crs_10_setup.conf.example modsecurity_crs_10_config.conf

Open the Apache configuration file again, and add the following lines at the end of the file:

# nano /etc/httpd/conf/httpd.conf

Include modsecurity-crs/modsecurity_crs_10_config.conf
Include modsecurity-crs/base_rules/*.conf

Next, restart the Apache service to enable mod_security module:

systemctl restart httpd

Congratulation’s! You have successfully installed Mod_Security. Thanks for using this tutorial for installing Mod_Security on CentOS 7 system. For additional help or useful information, we recommend you to check the official ModSecurity website.

How To Install Slack on CentOS 7 – Step by Step

Install Slack on CentOS 7

Slack is a Cloud-based software that provides a team collaboration tool and services, founded by Stewart Butterfield. Slack offers a lot of IRC-like (Internet Relay Chat) features such as persistent chat room channel organized by topic. Slack can be searchable including files, conversation, and people. In this tutorial we will learn how To Install Slack on CentOS 7.

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 Slack on a CentOS 7 server.

Install Slack on CentOS 7

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

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

Step 2. Installing Slack on CentOS.

Go to the Slack for Linux download page and download the latest Slack .rpm package:

wget https://downloads.slack-edge.com/linux_releases/slack-3.3.8-0.1.fc21.x86_64.rpm

After downloads successful, now install Slack using following command:

sudo yum -y install slack-3.3.8-0.1.fc21.x86_64.rpm

Step 3. Start Slack.

Now that you have Slack installed on your CentOS desktop, you can start it either from the command line by typing slack or by clicking on the Slack icon (Activities -> Slack).

Congratulation’s! You have successfully installed Slack. Thanks for using this tutorial for installing Slack on CentOS 7 system. For additional help or useful information, we recommend you to check the official Slack website.

How To Install Shopware on CentOS 7 – Step by Step

Install Shopware on CentOS 7

Shopware is a free and open source e-commerce application written in PHP. It uses MySQL as the database server to store the data. Shopware is very easy to use and require no coding knowledge to work. It is secure and responsive. The application provides the interface for elements to drag and drop, it also supports design grids. It contains story telling, slide shows, and quick views. In this tutorial we will learn how to Install Shopware on CentOS 7.

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 accge of Linount, 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 Shopware on a CentOS 7 server.

Install Shopware 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 Shopware on CentOS.

Go to the root directory of your system and download the latest stable version of Shopware:

wget https://codeload.github.com/shopware/shopware/zip/5.5
unzip v5.5.zip -d /var/www/html
cd /var/www/html/shopware-5.5 cp -a * ..

We will need to change some folders permissions:

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

Step 4. Configuring MariaDB for Shopware.

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 Shopware. 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 Shopware installation:

CREATE DATABASE shopware;
GRANT ALL PRIVILEGES ON shopware.* TO 'shopware'@'localhost' IDENTIFIED BY 'strong_password';
FLUSH PRIVILEGES;
\q

Step 5. Configuring Apache for Shopware.

We will create Apache virtual host for your Shopware 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:

<VirtualHost YOUR_SERVER_IP:80>
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
</Directory>
</VirtualHost>

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

systemctl restart httpd.service

Step 6. Accessing Shopware e-commerce.

Shopware 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 Shopware. Thanks for using this tutorial for installing Shopware community edition on CentOS 7 systems. For additional help or useful information, we recommend you to check the official Shopware website.

How To Install BIND9 DNS Server on Ubuntu Step by Step

BIND is a widely used DNS Server. Ideally, DNS server consist of 2 machines that work together simultaneously, one act as master and the other one act as slave. If your domain registrar doesn’t provide you a free DNS server, or if you want to create a custom DNS record, then you might need to host your own DNS server.

In this tutorial, we will learn how to install and configure BIND9 Master and Slave DNS server. Both server will use Ubuntu OS. We will start configuring the master then the slave.

Install BIND9 Master and Slave DNS Server on Ubuntu

Here are the servers example data:

Server1 (master) IP address: 108.100.100.1
Server2 (slave) IP address: 108.100.100.2
Domain: wpcademy.com
This domain will be hosted on this server: 192.168.100.07

ON MASTER

Step1. Update ubuntu repository and install Bind using apt-get.

apt-get update
apt-get install bind9

Step2. Configure bind options

*)do this if you haven't installed nano text editor: 
apt-get install nano

nano /etc/bind/named.conf.options
options {
	directory "/var/cache/bind";
	additional-from-auth no;
	additional-from-cache no;
	version "Bind Server";

	// If there is a firewall between you and nameservers you want
	// to talk to, you may need to fix the firewall to allow multiple
	// ports to talk.  See http://www.kb.cert.org/vuls/id/800113

	// If your ISP provided one or more IP addresses for stable 
	// nameservers, you probably want to use them as forwarders.  
	// Uncomment the following block, and insert the addresses replacing 
	// the all-0's placeholder.

	 forwarders {
	 	8.8.8.8;
		8.8.4.4;
	 };

	//========================================================================
	// If BIND logs error messages about the root key being expired,
	// you will need to update your keys.  See https://www.isc.org/bind-keys
	//========================================================================
	dnssec-validation auto;
	allow-recursion { 127.0.0.1; };
	auth-nxdomain no;    # conform to RFC1035
	listen-on-v6 { any; };
};

Step 3. Store the domain name and zone file setting

 nano /etc/bind/named.conf.local
//place these lines at the bottom of file

zone "wpcademy.com" {
        type master;
        file "/etc/bind/zones/wpcademy.com.db";
        allow-transfer { 108.200.200.2; };
        also-notify { 108.200.200.200.2; };
};

Step4. Because in the above config we put zone file in “/etc/bind/zones/wpcademy.com.db”, then we need to create the folder and file

mkdir /etc/bind/zones
nano /etc/bind/zones/wpcademy.com.db
$TTL    86400
$ORIGIN wpcademy.com.
@       IN      SOA     ns1.wpcademy.com. root.wpcademy.com. (
                              1         ; Serial
                          86400         ; Refresh
                           7200         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns1.wpcademy.com.
@       IN      NS      ns2.wpcademy.com.
ns1      IN      A       108.100.100.1
ns2      IN      A       108.100.100.2

;also list other computers
@       IN      A       192.168.100.07
www     IN      A       192.168.100.07

Step 5. (last step on master) Restart bind9 dns service

 service bind9 restart

ON SLAVE

Repeat step 1-2 similar to the master.

Step 3. Configure slave bind options

 nano /etc/bind/named.conf.options
zone "wpcademy.com" {
	type slave;
	file "/var/cache/bind/wpcademy.com.db";
	masters {108.100.100.1;};
};

notice the difference in this config file from the master.

Step 4. Restart bind9 service.

 service bind9 restart

What to do next?

This DNS server will not work until you change your domain’s nameserver. It can be done from your domain’s registrar website. In this scenario, we change nameserver to:

ns1.wpcademy.com
ns2.wpcademy.com

Testing BIND

This test could be done either on the DNS server itself or from another server, or from your own PC. In this case, we will do the test from another server running Ubuntu OS.

Step 1.Install dnsutils

 apt-get install dnsutils

Step 2. Do the dig dns test

 dig wpcademy.com

Step 3. Do the nslookup dns test

 nslookup wpcademy.com

How To Setup a NGINX Virtual Host – Easy Guide

In this tutorial we are going to learn how to install and configuration of virtual hosts “Server Blocks” Nginx on your Linux server. Virtual hosts such as nginx are used for running two or more domains or websites using just one server which you can learn more about in this hosting fundamentals course. Here’s a brief tutorial that shows you how to create a virtual host or server block on Nginx web server. This guide assumes that you’ve been following along from the previous tutorial: How to Install and Configure a NGINX Server.

Setup a NGINX Virtual Host

Create a New Directory

cd /var/www
mkdir -p wpcademy.com/{public_html,logs,stats}
mkdir -p wpcademy.com/{public_html,logs,stats}
Create vhost conf file
#nano /etc/nginx/conf.d/wpcademy.com.conf

server {
   listen  80;
   server_name  wpcademy.com www.wpcademy.com;
 
   access_log  /var/www/wpcademy.com/logs/access.log ;
   error_log    /var/www/wpcademy.com/logs/error.log ;
 
   location / {
       root   /var/www/wpcademy.com/public_html;
       index  index.php index.html index.htm;
 
   }
 
   error_page   500 502 503 504  /50x.html;
   location = /50x.html {
       root   /var/www/wpcademy.com/public_html;
   }
 
  # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  location ~ .php$ {
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
root    /var/www/wpcademy.com/public_html;
fastcgi_param  SCRIPT_FILENAME  /var/www/wpcademy.com/public_html$fastcgi_script_name;
include fastcgi_params;
}
 
 
   location ~ /.ht {
       deny  all;
   }
}
# nano /etc/nginx/conf.d/wpcademy.com.conf
server {
   listen  80;
   server_name  wpcademy.com www.wpcademy.com;
 
   access_log  /var/www/wpcademy.com/logs/access.log ;
   error_log    /var/www/wpcademy.com/logs/error.log ;
 
   location / {
       root   /var/www/wpcademy.com/public_html;
       index  index.php index.html index.htm;
 
   }
 
   error_page   500 502 503 504  /50x.html;
   location = /50x.html {
       root   /var/www/wpcademy.com/public_html;
   }
 
  # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  location ~ .php$ {
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
root    /var/www/wpcademy.com/public_html;
fastcgi_param  SCRIPT_FILENAME  /var/www/wpcademy.com/public_html$fastcgi_script_name;
include fastcgi_params;
}
 
   location ~ /.ht {
       deny  all;
   }
}

Add vhost on nginx.conf

# nano /etc/nginx/nginx.conf
### add line like this on http section:
include /etc/nginx/conf.d/*.conf;

Restarting nginx and php-fpm

# /etc/init.d/nginx restart
# /etc/init.d php-fpm restart

Note: Please make sure that all the domain names are propagated and are properly directed to your servers ip address, if not you will not able able to check if your new configuration works or not.

Congratulation’s! You have successfully installed server blocks Nginx. Thanks for using this tutorial for installing Virtual hosts Nginx on Linux system. For additional help or useful information, we recommend you to check the official Nginx web site

How To Install Netbeans 11.0 on Ubuntu 18.04 LTS

Install Netbeans on Ubuntu 18

The NetBeans is an open-source integrated development environment which provides a powerful application frame platform which allows programmers to create Java-based net applications, mobile software, and desktop software.

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 Netbeans on a Ubuntu 18.04 (Bionic Beaver) server.

Install Netbeans on Ubuntu 18.04 LTS

Step 1. First, make sure that all your system packages are up-to-date

sudo apt update
sudo apt upgrade

Step 2. Installing Java OpenJDK.

NetBeans requires having the Java VM installed on the machine, so you would need to install either Oracle Java 8 or OpenJDK 8:

sudo apt install openjdk-8-jdk
sudoaptinstallopenjdk-8-jdk

Step 3. Installing Netbeans IDE.

Install the Netbeans using snap:

sudo snap install netbeans --classic
sudosnapinstallnetbeans--classic

The process may take some time depending on your connection speed. On successful installation, you will see the following output:
netbeans 10.0 from ‘apache-netbeans’ installed

netbeans10.0from’apache-netbeans’installed

Step 4. Assessing Netbeans IDE.

Now that Netbeans is installed on your Ubuntu system you can start it typing netbeans in your terminal or by clicking on the Netbeans icon (Activities -> Netbeans).

Congratulation’s! You have successfully installed Netbeans. Thanks for using this tutorial for installing Netbeans on your Ubuntu 18.04 system. For additional help or useful information, we recommend you to check the official Netbeans website.