Pydio – Create Own File Sharing and Synchronization Portal like Dropbox in Linux

Pydio File Sharing and Synchronization

Pydio – Create Own File Sharing and Synchronization Platform

Pydio is an Open source, secure and powerful online file sharing and synchronization software solution that can be an alternative to many online cloud storage systems. It can be accessed from the web, desktop or mobile platforms and hosting is private therefore you can implement your own security measures.

 12 Open Source Cloud Storage Solutions to Sync Your Data Safely

Pydio Features

Pydio offers the following features:

  1. Secure links with passwords with an expiration date.
  2. Integration with LDAP/AD server for user authentication.
  3. Monitor user activities in real time on the system.
  4. Creation of workspace from shared folders among different users.
  5. Notify users of file or folder modifications.
  6. Supports SSO with many Content Management Systems (CMS) such as WordPress, Joomla, Drupal, Xibo and many others including custom designed CMS.
  7. Preview user files such as audio, video and documents such as Office documents, PDFs and many more.

In this tutorial, I am going to take you through the process of setting up Pydio file sharing and synchronization portal on RHEL/CentOS and Fedora.

Step 1: Installing Web Server and Dependencies

1. Pydio only requires a web server (Apache, Nginx or Lighttpd) with PHP 5.1 or higher along with some dependencies such as GD, MCrypt, Mbstring, DomXML, etc. In most of the today’s distributions, these libraries are pre-installed on standard PHP installation. If not, let’s install them using following series of commands.

Before installing dependencies, first you need to enable EPEL repository under your Linux system and update the repository database using yum package manager:

# yum install epel-release
# yum update

Once the repository has been enabled, you can now install the Apache web server and php libraries as shown:

# yum -y install httpd
# yum -y install php php-gd php-ldap php-pear php-xml php-xmlrpc php-mbstring curl php-mcrypt* php-mysql

--------------- On Fedora 22+ ---------------
# dnf -y install php php-gd php-ldap php-pear php-xml php-xmlrpc php-mbstring curl php-mcrypt* php-mysql

2. Once all the required PHP extensions are installed properly, it’s time to open Apache HTTP and HTTPS ports on firewall.

--------------- On FirewallD for CentOS 7 and Fedora 22+ ---------------
# firewall-cmd --permanent --zone=public --add-service=http
# firewall-cmd --permanent --zone=public --add-service=https
# firewall-cmd --reload
--------------- On IPtables for CentOS 6 and Fedora ---------------
# iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
# iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
# /etc/init.d/iptables save

Step 2: Create Pydio Database

3. To create pydio database, you must have MySQL/MariaDB server installed on the system, if not let’s install it.

# yum install mysql mysql-server            [On CentOS/RHEL 6 and Fedora]                 
# yum install mariadb mariadb-server        [On CentOS 7]
# dnf install mariadb mariadb-server        [On Fedora 22+]

Next secure mysql installation using command mysql_secure_installation and follow on screen instructions as shown.

MySQL Secure Installation

MySQL Secure Installation

Now connect to MySQL and create a new pydio user and set grant privileges as shown:

create database pydio;
create user pydio@localhost identified by 'tecmint';
grant all privileges on pydio.* to pydio@'localhost' identified by 'tecmint';

Step 3: Installing Pydio File Hosting Server

4. Here, we will use official Pydio repository to install most recent version of Pydio package with the help of following series of commands.

# rpm -Uvh http://dl.ajaxplorer.info/repos/pydio-release-1-1.noarch.rpm
# yum update
# yum --disablerepo=pydio-testing install pydio

Step 4: Configuring Pydio File Hosting Server

5. Next open and add the following configuration to .htaccess file to enable Pydio access over web as shown:

# vi /var/lib/pydio/public/.htaccess

Add the following configuration.

Order Deny,Allow
Allow from all
<Files ".ajxp_*">
deny from all

RewriteEngine on
RewriteBase pydio_public
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9_-]+)\.php$ share.php?hash=$1 [QSA]
RewriteRule ^([a-zA-Z0-9_-]+)--([a-z]+)$ share.php?hash=$1&lang=$2 [QSA]
RewriteRule ^([a-zA-Z0-9_-]+)$ share.php?hash=$1 [QSA]

In CentOS 7.x and Fedora 22+ distributions, you need to modify and add the following lines to pydio.conf file.

Alias /pydio /usr/share/pydio
Alias /pydio_public /var/lib/pydio/public

<Directory "/usr/share/pydio">
        Options FollowSymLinks
        AllowOverride Limit FileInfo
	Require all granted
      	php_value error_reporting 2
</Directory>


<Directory "/var/lib/pydio/public">
        AllowOverride Limit FileInfo
	Require all granted
      	php_value error_reporting 2
</Directory>

6. Next configure php.ini to allow max file upload, disable php output buffering and increase memory_limit to boost performance of Pydio as shown:

# vi /etc/php.ini
post_max_size = 1G
upload_max_filesize = 1G
output_buffering = Off
memory_limit = 1024M

7. Now set correct charset encoding in your locale definition in the form: en_us.UTF-8. First find out current charset lang of system by running following command.

# echo $LANG

Next open /etc/pydio/bootstrap_conf.php file and add the following line.

define("AJXP_LOCALE", "en_US.UTF-8");

8. It is recommended to use SSL encryption to secure all Pydio connections of data over secure HTTPS network. To do this, first install the mod_ssl package and open the following file and modify as shown:

# yum install mod_ssl
# vi /etc/pydio/bootstrap_conf.php

Now uncomment the following line at the bottom of the file. This will automatically redirect all connection via HTTPS.

define("AJXP_FORCE_SSL_REDIRECT", true);

9. Finally restart Apache web server to take new changes into effect.

# systemctl restart httpd.service       [On CentOS 7 and Fedora 22+]
# service httpd restart                 [On CentOS 6 and Fedora]

Step 5: Start Pydio Web Installer Wizard

10. Now open your web browser and type the url to load the web installer.

http://localhost/pydio/
OR
http://ip-address/pydio/

Pydio Installer

Pydio Installer

Click on the “Start Wizard” and follow on screen installer instructions….

Create Pydio Admin Account

Create Pydio Admin Account

Create Pydio Admin Account

Setup Global Options

Set Pydio Global Options

Set Pydio Global Options

Configure Pydio MySQL Database

Configure Pydio MySQL Database

Configure Pydio MySQL Database

Pydio Login

Pydio Login

Pydio Dashboard

Pydio Dashboard

Concluding

Cloud storage is on the rise and many companies out there are embarking on designing web file sharing software solutions such as Pydio. Hope you find this tutorial helpful and if you know of any other software out there that you have used, or if you are facing problems during installation or setup, let us know of it by leaving a comment. Thanks for reading and stay connected to Tecmint.

Reference: https://pyd.io/

Source

NitroShare – Easily Share Files Between Multiple Operating Systems on Local Network

One of the most important uses of a network is for file sharing purposes. There are multiple ways Linux and Windows, Mac OS X users on a network can now share files with each other and in this post, we shall cover Nitroshare, a cross-platform, open-source and easy-to-use application for sharing files across a local network.

Nitroshare tremendously simplifies file sharing on a local network, once installed, it integrates with the operating system seamlessly. On Ubuntu, simply open it from the applications indicator, and on Windows, check it in the system tray.

Additionally, it automatically detects every other device on a network that has Nitroshare installed thereby enabling a user to easily transfer files from one machine to another by selecting which device to transfer to.

Suggested Read: OnionShare – Securely and Anonymously Share Files Over the Tor Network

The following are the illustrious features of Nitroshare:

  1. Cross-platform, runs on Linux, Windows and Mac OS X
  2. Easy to setup, no configurations required
  3. It’s simple to use
  4. Supports automatic discovery of devices running Nitroshare on local network
  5. Supports optional TSL encryption for security
  6. Works at high speeds on fast networks
  7. Supports transfer of files and directories (folders on Windows)
  8. Supports desktop notifications about sent files, connected devices and more

The latest version of Nitroshare was developed using Qt 5, it comes with some great improvements such as:

  1. Polished user interfaces
  2. Simplified device discovery process
  3. Removal of file size limitation from other versions
  4. Configuration wizard has also been removed to make it easy to use

How To Install Nitroshare on Linux Systems

NitroShare is developed to run on a wide variety of modern Linux distributions and desktop environments.

On Debian Sid and Ubuntu 16.04+

NitroShare is included in the Debian and Ubuntu software repositories and can be easily installed with the following command.

$ sudo apt-get install nitroshare

But the available version might be out of date, however, to install the latest version of Nitroshare, issue the command below to add the PPA for the latest packages:

$ sudo apt-add-repository ppa:george-edison55/nitroshare
$ sudo apt-get update
$ sudo apt-get install nitroshare

On Fedora 24-23

Recently, NitroShare has been included to Fedora repositories and can be installed with the following command:

$ sudo dnf install nitroshare

On Arch Linux

For Arch Linux, NitroShare packages are available from the AUR and can be built/installed with the following commands:

# wget https://aur.archlinux.org/cgit/aur.git/snapshot/nitroshare.tar.gz
# tar xf nitroshare.tar.gz
# cd nitroshare
# makepkg -sri

How to Use NitroShare on Linux

Note: As I had already mentioned earlier on, all other machines that you wish to share files with on the local network must have Nitroshare installed and running.

After successfully installing it, search for Nitroshare in the system dash or system menu and launch it.

Suggested Read: Pydio – Create Own File Sharing and Synchronization Portal like Dropbox in Linux

NitroShare is very easy to use, you will find options to “Send Files“, “Send Directory“, “View Transfers“, etc from the AppIndicator / tray icon menu, choose the files or directory that you want to send and you will get a list of available devices on your local network that runs NitroShare:

NitroShare - Select Send Files Option

NitroShare – Select Send Files Option

After selecting the files, click on “Open” to proceed to choosing the destination device as in the image below. Select the device and click “Ok” that is if you have any devices running Nitroshare on the local network.

NitroShare - Available Local Devices

NitroShare – Available Local Devices

Nitroshare - File Transfer Progress

Nitroshare – File Transfer Progress

From the NitroShare settings – General tab, you can add the device name, set default downloads location and in Advance settings you can set port, buffer, timeout, etc. only if you needed.

Homepagehttps://nitroshare.net/index.html

That’s it for now, if you have any issues regarding Nitroshare, you can share with us using our comment section below.

Source

How to Install Rust Programming Language in Linux

Rust (commonly known as Rust-Lang) is a relatively new, open source practical systems programming language that runs extremely fast, prevents segfaults, and guarantees thread safety. It is a safe and concurrent language developed by Mozilla and backed by LLVM.

It supports zero-cost abstractions, move semantics, guaranteed memory safety, threads without data races, trait-based generics and pattern matching. It also supports type inference, minimal runtime as well as efficient C bindings.

Rust can run on a great number of platforms and is being used in production by companies/organizations such as DropboxCoreOSNPM and many more.

In this article, we will show how to install Rust programming language in Linux and setup your system to get started with writing programs with rust.

Install Rust Programming Language in Linux

To install Rust, use the following official method of installing rust via the installer-script, which requires curl command-line downloader as shown.

$ sudo apt-get install curl  [On Debian/Ubuntu]
# yum install install curl   [On CentOS/RHEL]
# dnf install curl           [On Fedora]

Then install rust by running the following command in your terminal, and follow the onscreen instructions. Note that rust is actually installed as well as managed by the rustup tool.

$ curl https://sh.rustup.rs -sSf | sh

Install Rust in Linux

Install Rust in Linux

Once the Rust installation is complete, the Cargo’s bin directory (~/.cargo/bin – where all tools are installed) will be added in your PATH environment variable, in ~/.profile.

During the installation rustup will attempt to add the cargo’s bin directory to your PATH; if this fails for one reason or another, do it manually to get started with using rust.

Add Rust Cargo Bin Directory to PATH

Add Rust Cargo Bin Directory to PATH

Next, source the ~/.profile file to use the modified PATH and configure your current shell to work with the rust environment by running these commands.

$ source ~/.profile
$ source ~/.cargo/env

Finally verify the version of rust installed on your system by running the following command.

$ rustc --version

Check Rust Installed Version in Linux

Check Rust Installed Version in Linux

Test Rust Programming Language in Linux

Now that you have rust installed on your system, you can test it by creating your first rust program as follows. Begin by making a directory where your program files will reside.

$ mkdir myprog
$ cd myprog

Create a file called test.rs, copy and paste the following lines of code to the file.

fn main() {
    println!("Hello World, it’s TecMint.com – Best Linux HowTos, Guides on the Internet!");
}

Then run the following command which will create an executable called test in the current directory.

$ rustc main.rs

Finally, execute test as shown.

$ ./test 

Write Programs in Rust Language

Write Programs in Rust Language

Important: You should take note of these points about rust releases:

  • Rust has a 6-week rapid release process, be sure to get many builds of rust available at any time.
  • Secondly, all these builds are managed by rustup, in a consistent manner on every supported platform, enabling installation of rust from the beta and nightly release channels, and support for additional cross-compilation targets.

Rust Homepagehttps://www.rust-lang.org/en-US/

In this article, we have explained how to install and use rust programming language in Linux. Try it out and give us your feedback or share any queries via the comment form below.

Source

Installing Seafile (Secure Cloud Storage) with MySQL Database in RHEL/CentOS/SL 7.x/6.x

Seafile is an advanced Open Source collaborative cloud storage application written in Python with file sharing and syncing support, team collaboration and privacy protection using client side encryption. It’s build as a multi-platform file syncing with clients that runs on all major platforms (Linux, Raspberry Pi, Windows, Mac, iPhone and Android) and can be easily integrated with local services such as LDAP and WebDAV or can be deployed using advanced network services and databases like MySQL, SQLite, PostgreSQL, Memcached, Nginx or Apache Web Server.

Install Seafile in CentOS

Install Seafile in Linux

This tutorial will guide you on a step by step Seafile Server installation on RHEL/CentOS/Scientific Linux 7.x/6.x deployed with MySQL database, with start-up init scripts for running the server on default Seafile port (8000/TCP) and default HTTP transaction port (80/TCP), create necessary Firewall rules to open required ports.

Requirements

  1. Minimal CentOS 6.5 installation with static IP address.
  2. MySQL/MariaDB database
  3. Python 2.6.5+ or 2.7
  4. Python-setuptools
  5. Python-simplejson
  6. Python-imaging
  7. Python-mysqldb

This installation procedure tested on CentOS 6.4 64-bit system, but can also be used on other Linux distributions with the specification that init start-up scripts differ from one distribution to another.

Step 1: Install Python Modules

1. First do a system Update, then install all required Python modules using the following commands.

# yum upgrade
# yum install python-imaging MySQL-python python-simplejson python-setuptools

2. If you use a Debian or Ubuntu server install all Python modules with the next commands.

$ sudo apt-get update
$ sudo apt-get install python2.7 python-setuptools python-simplejson python-imaging python-mysqldb

Step 2: Install Seafile Server

3. After all Python modules are installed create a new system user with a strong password that will be used to host Seafile server configuration and all data on its home directory, then switch to newly user account created.

# adduser seafile
# passwd seafile
# su - seafile

Create Seafile User

Create Seafile User

4. Then login to MySQL database and create three databases, one for every Seafile Server components: ccnet serverseafile server and seahub with a single user for all databases.

$ mysql -u root -p

mysql> create database `ccnet-db`;
mysql> create database `seafile-db`;
mysql> create database `seahub-db`;
mysql> create user 'seafile'@'localhost' identified by 'password';
mysql> GRANT ALL PRIVILEGES ON `ccnet-db`.* to `seafile`@`localhost`;
mysql> GRANT ALL PRIVILEGES ON `seafile-db`.* to `seafile`@`localhost`;
mysql> GRANT ALL PRIVILEGES ON `seahub-db`.* to `seafile`@`localhost`;
mysql> FLUSH PRIVILEGES;
mysql> exit;

Install Seafile with MySQL Database

Create Seafile Database

5. Now it’s time to download and install Seafile Server. Go to Seafile official download page and grab the last .Tar Linux archive release for your server architecture using wget command, then extract it to your home Seafile user created earlier and enter Seafile extracted directory.

$ wget https://bitbucket.org/haiwen/seafile/downloads/seafile-server_3.0.4_x86-64.tar.gz
$ tar xfz seafile-server_3.0.4_x86-64.tar.gz
$ cd seafile-server_3.0.4/

Download Seafile

Download Seafile

6. To install Seafile Server using MySQL database run setup-seafile-mysql.sh initialization script and answer all questions using the following configuration options, after the script verifies the existence of all Python required modules.

$ ./setup-seafile-mysql.sh
  1. What is the name of your server? = choose a descriptive name (no spaces allowed).
  2. What is the IP or domain of the server? = enter your server IP address or your valid domain name.
  3. Which port do you want to use for ccnet server? = hit [Enter] – leave it default – 10001.
  4. Where do you want to put seafile data? = hit [Enter] – the default location will be your $HOME/seafile-datadirectory.
  5. Which port do you want to use for seafile server? = hit [Enter] – leave it default – 12001.

Run Seafile MySQL Script

Run Seafile MySQL Script

  1. Which port do you want to use for seafile httpserver? = hit [Enter] – leave it default – 8082.
  2. Please choose a way to initialize seafile databases: = choose 1 and provide default MySQL credentials: localhost, 3306 and root password.
  3. Enter the name for MySQL user of seafile: = seafile ( if you created other username enter that username) and seafile MySQL user password.
  4. On ccnet-server, seafile-server and seahub databases just hit [Enter] key – default.

Configure Seafile for MySQL

Configure Seafile for MySQL

MySQL Seafile Configuration

MySQL Seafile Configuration

After Seafile Server successfully installs, it will generate some useful information such as what ports needs to be open on your Firewall to allow external connection and what scripts to handle in order to start the server.

Seafile Installation Confirmation

Seafile Installation Confirmation

Step 3: Open Firewall and Create Seafile init Script

7. Before starting Seafile server from local script for a test, change back to root account and open iptablesfirewall file configuration located on /etc/sysconfig/ system path and add the following line rules before first REJECT line, then restart iptables to apply new rules.

$ su - root
# nano /etc/sysconfig/iptables

Append the following rules.

-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8000 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8082 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 10001 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 12001 -j ACCEPT

Open Ports for Seafile

Open Ports for Seafile

Restart iptables to apply rules using the following command.

# service iptables restart

NOTE: If you changed Seafile standard ports on installation process update your Firewall iptables rules accordingly.

8. Now it’s time to test Seafile Server. Switch to Seafile user and seafile-server directory and start the server using seafile.sh and seahub.sh scripts.

The first time you start seahub.sh script, create an administrative account for Seafile Server using your email address and choose a strong password for admin account, especially if you are deploying this configuration in a production environment.

# su - seafile
$ cd seafile-server-latest/
$ ./seafile.sh start
$ ./seahub.sh start

Start Seafile Server

Start Seafile Server

9. After the server is successfully started, open a browser and navigate to your server IP address or domain name on port 8000 using HTTP protocol, then login using you admin account created on the above step.

http://system_IP:8000

OR 

http://domain_name:8000

Seafile Login Screen

Seafile Login Screen

Seafile Dashboard

Seafile Dashboard

10. After first configuration tests, stop Seafile server and create an init script that will help you manage more easily the entire process, just like any other Linux system daemon processes.

$ ./seafile.sh stop
$ ./seahub.sh stop
$ su - root
# nano /etc/init.d/seafile

Add the following content on this init script – If Seafile is installed on other system user make sure to update user and paths accordingly on su – $USER -c lines.

#!/bin/sh
#chkconfig: 345 99 10
#description: Seafile auto start-stop script.

# source function library
. /etc/rc.d/init.d/functions

start() {
        echo "Starting Seafile server..."
su - seafile -c "seafile-server-latest/seafile.sh start"
su - seafile -c "seafile-server-latest/seahub.sh start"
}

stop() {
        echo "Stopping Seafile process..."
su - seafile -c "seafile-server-latest/seafile.sh stop"
su - seafile -c "seafile-server-latest/seahub.sh stop"
}

restart() {
        echo "Stopping Seafile process..."
su - seafile -c "seafile-server-latest/seafile.sh stop"
su - seafile -c "seafile-server-latest/seahub.sh stop"

         echo "Starting Seafile server..."
su - seafile -c "seafile-server-latest/seafile.sh start"
su - seafile -c "seafile-server-latest/seahub.sh start"
}

case "$1" in
    start)
       start
        ;;
    stop)
       stop
        ;;
    restart)
       restart
        ;;
        *)
      echo "Usage: $0 start stop restart"
        ;;
esac

11. After init file has been created, make sure it has execution permissions and manage the process using startstop and restart switches. Now you can add Seafile service on system start-up using chkconfig command.

# chmod +x /etc/init.d/seafile
# service seafile start 
# service seafile stop 
# service seafile restart
# chkconfig seafile on | off
# chkconfig --list seafile

Start Seafile Service

Start Seafile Service

Add Seafile Service on Startup

Add Seafile Service on Startup

12. By default Seafile server uses 8000/TCP HTTP port for web transactions. If you want to access Seafile Server from browser on standard HTTP port use the following init script which starts the server on port 80 (be aware that starting a service on ports below 1024 requires root privileges).

# nano /etc/init.d/seafile

Add the following content on this init script to start Seafile on standard HTTP port. If Seafile is installed on other system user make sure to update user and paths accordingly on su – $USER -c and $HOME lines.

#!/bin/sh
#chkconfig: 345 99 10
#description: Seafile auto start-stop script.

# source function library
. /etc/rc.d/init.d/functions

start() {
                echo "Starting Seafile server..."
su - seafile -c "seafile-server-latest/seafile.sh start"
                ## Start on port default 80 http port ##
/home/seafile/seafile-server-latest/seahub.sh start 80
}

stop() {
                echo "Stopping Seafile process..."
su - seafile -c "seafile-server-latest/seafile.sh stop"
/home/seafile/seafile-server-latest/seahub.sh stop
}

restart() {
      echo "Stopping Seafile process..."
su - seafile -c "seafile-server-latest/seafile.sh stop"
/home/seafile/seafile-server-latest/seahub.sh stop
                 echo "Starting Seafile server..."
su - seafile -c "seafile-server-latest/seafile.sh start"
/home/seafile/seafile-server-latest/seahub.sh start 80
}

case "$1" in
    start)
       start
        ;;
    stop)
       stop
        ;;
     restart)
       restart
        ;;
                *)
        echo "Usage: $0 start stop restart"
        ;;
Esac

13. If you previously started Seafile on port 8000 make sure all processes are killed, start the server on port 80.

# chmod +x /etc/init.d/seafile
# service seafile start | stop | restart

Open a browser and direct it to the following address.

http://system_ip 

OR

http://domain_name.tld

Start Seafile Service on Port 80

Start Seafile Service on Port 80

Seafile Login Panel

Seafile Login Panel

14. You can also verify on what ports Seafile is running using netstat command.

# netstat -tlpn

Verify Seafile Service

Verify Seafile Service

That’s it! Seafile can happily replace other cloud collaborative and file syncing platforms like public DropboxOwncloudPydioOneDrive, etc on your Organization, being designed for better teamwork and full control over your storage with advanced security in user-space.

Source

Phabricator – An Open Source Powerful “Project Management” Tool for Linux

Phabricator is an open source application that helps software companies to create/build better software, which is built using PHP language and available under Apache 2.0 open source license for Linux, MacOSX and can be run in any platform, it can even run in windows but it is totally based on Linux support. Phabricator has been used by Facebook before. The first version of phabricator was built by facebook with lots of features such as reviewing and auditing codes, tracking bugs etc.

Install Phabricator in Linux

Install Phabricator in CentOS and Ubuntu

We can use phabricator as a repository same as git and svn. There are several privacy settings available to secure the code among particular development teams. We can review the code of coworkers before finalizing the code.

I hope everyone is aware about git, if not please have a quick look at the GIT article below, that explain how to use it.

  1. Install GIT to Create Your Own Projects on GITHub Repository

Same like git, phabricator also has lots of features and used by most of the popular companies like Facebook, Dropbox, Groupon to develop there web applications.

Requirements

Phabricator can run in a normal computer, with following required packages. We don’t need specification with high resources.

  1. Apache2.2.7 or higher
  2. MySQL and PHP 5.2 or higher
  3. Git and some of the php extensions.

NOTE: Phabricator can only be installed on an entire domain (tecmint.com) or on an sub domain (phabricator.tecmint.com). You cannot install it to a specific path on any existing domain, say “tecmint.com/phabricator”.

Step 1: Installing Required Components

There are scripts available for setting-up in Ubuntu and Redhat based Linux, choose this option if you are not familiar with Linux.

  1. RedHat Derivatives – http://www.phabricator.com/rsrc/install/install_rhel-derivs.sh
  2. Ubuntu Derivatives – http://www.phabricator.com/rsrc/install/install_ubuntu.sh

If you are an Advance user, you just need to setup a LAMP server to run a phabricator. Okay, now let us start installing Phabricator on RHEL/CentOS and Ubuntu/Debian.

On RHEL/CentOS

Install LAMP server and include some php extensions, while installing.

# yum install mysql-server httpd git php php-mysql php-gd php-curl php-apc php-cli -y
On Ubuntu/Debian
$ sudo apt-get install mysql-server apache2 git-core git php5 php5-mysql php5-gd php5-curl php-apc php5-cli -y

NOTE: On Ubuntu based distributions, during installation it will ask you to enter root password for MysQL.

Step 2: Downloading Phabricator Files

Once, you have all the above stuff installed, now pick install directory. Here I’m going to create a directory called ‘myprojectapp‘ under DocumentRoot of Apache directory.

# mkdir /var/www/html/myprojectapp		[On RedHat]

$ sudo mkdir /var/www/myprojectapp		[On Ubuntu]

If you are installing, as a normal user you need to add current user (in my case ‘tecmint‘) in Apache group to get the write permission. This step can be ignored if you are switched to root user.

# chown -R tecmint:apache /var/www/html		[On RedHat]
$ sudo chown -R tecmint:www-data /var/www	[On Ubuntu]	

Then navigate to the newly created directory i.e. myprojectapp.

# cd /var/www/html/myprojectapp			[On RedHat]

$ cd /var/www/myprojectapp			[On Ubuntu]

Now, start pulling the phabricator and its dependencies from there official git repository.

git clone https://github.com/phacility/libphutil.git
git clone https://github.com/phacility/arcanist.git
git clone https://github.com/phacility/phabricator.git

Download Phabricator

Download Phabricator

Step 3: Configure Apache for Phabricator

On Ubuntu based distributions, you need to enable mod_php, mod_rewrite and mod_ssl modules, during installation most of these modules enabled by default, but we need to confirm.

# sudo a2enmod rewrite
# sudo a2enmod ssl

Enable PHP Modules in Ubuntu

Enable PHP Modules

Once, these modules enabled, next restart the web server to reflect changes.

$ sudo /etc/init.d/apache2 restart		[On Ubuntu]

Next, create a separate Virtualhost in your Apache configuration file.

# vi /etc/httpd/conf/httpd.conf			[On RedHat]

$ sudo nano /etc/apache2/sites-available/phabricator.conf	[On Ubuntu]

Append the following Virtualhost entry at the bottom of the file and change the DocumentRoot path to match exact location of phabricator files.

<VirtualHost *:80>
        ServerAdmin root@phab.tecmintlocal.com
        ServerName phab.tecmintlocal.com
        DocumentRoot /var/www/html/myprojectapp/phabricator/webroot
        RewriteEngine on
        RewriteRule ^/rsrc/(.*)     -                       [L,QSA]
        RewriteRule ^/favicon.ico   -                       [L,QSA]
        RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]
<Directory "/var/www/html/myprojectapp/phabricator/webroot">
        Order allow,deny
        Allow from all
</Directory>
</VirtualHost>

On Ubuntu, you need to enable the newly created virtualhost entry using following command. For RedHat based systems, no need to enable anything.

$ sudo a2ensite phabricator.conf

Finally, restart the Apache service to reflect new changes.

# service httpd restart				[On RedHat]

$ sudo /etc/init.d/apache2 restart		[On Ubuntu]

Step 4: Configure MySQL for Phabricator

Now, it’s time to configure MySQL, but before heading up for setup, make sure your MySQL is running and you able to connect to it. So, that you can load the mysql settings into it.

# cd /var/www/html/myprojectapp/phabricator/		[On RedHat]

# cd /var/www/myprojectapp/phabricator/			[On Ubuntu]

# ./bin/config set mysql.host localhost
# ./bin/config set mysql.user root
# ./bin/config set mysql.pass mjackson

Next, run the storage upgrade script to load database schema into it. While processing, it will prompt you to press ‘y‘ to continue, this will take little time to complete the setup for setting-up data schema.

# ./bin/storage upgrade --user root --password mjackson

Configure MySQL for Phabricator

Configure MySQL

Once, scheme added to mysql, restart the service to take new settings.

# service mysql restart

$ sudo service mysql restart

Step 5: Configuring Phabricator Web UI

Now you can access the web UI at the following locations, but we need to create an admin login account.

http://phab.tecmintlocal.com/

OR

http://ipaddress

Phabricator Admin Account

Phabricator Admin Account

If the above admin setup page is not displayed we need to create admin login manually from the terminal. This step only required, if incase we get the error cause admin account was not defined.

# ./bin/accountadmin

Once admin account created, you can login into admin section using same credentials. After login you can see some setup issue in the top left corner, that needs to be resolved before start using it.

Here are some of the steps to get fix, each and every issues can be resolved very easily as they have pointed how to resolve it.

Phabricator Setup Issues

Phabricator Setup Issues

Total, there are 10 setup issue mentioned as shown in the image below.

Open Phabricator Issues

Open Phabricator Issues

Here, I can’t show how to resolve each issue, but will try to show how to resolve one of the issue as mentioned in the error page. Let’s take first issue, MYSQL STRICT_ALL_TABLES Mode Not Set, clicking on the link will get the instructions on how to solve the issue.

So, let’s follow those instructions as described in the page. Open and edit the mysql configuration file.

# /etc/my.cnf		[On RedHat]

# sudo vim /etc/mysql/my.conf	[On Ubuntu]

Next, append the code under the mysqld section of conf file, what we get from while clicked on “MYSQL STRICT_ALL_TABLES Mode Not Set“.

sql_mode	= STRICT_ALL_TABLES
ft_min_word_len	= 3

After resolving each errors, you must restart the MySQL and Apache service to reflect new changes.

------------ On Red Hat Systems  ------------
# service mysqld restart
# service apache restart


------------ On Ubuntu Systems  ------------
$ sudo service mysql restart
$ sudo service apache2 restart

After, solving all issues, you can login into the panel again and check for the status, you will see “Ready to Use” message.

Phabricator Login

Phabricator Login

Check Phabricator Issues

Check Phabricator Issues

Step 6: Browsing Phabricator Features

You can see some of the user available features as shown in the pictures below.

Add Authenticate Provider

Add Authenticate Provider

Phabricator Configuration

Phabricator Configuration

Core Applications

Core Applications

Utilities

Utilities

Phabricator Administration

Administration

For Creating a normal user account, click on top-left corner icon then Scroll down the page, then click on “People“. Now to create a new user we have to Click on “Create New User“.

Step 7: Recover Phabricator Admin Password

If incase, you forget your admin password and you want to recover it, just follow the below command.

# ./bin/auth recover tecmint

Recover Phabricator Admin Password

Recover Admin Password

Next, copy the given access code and access the URL to recover, as shown in the images below.

Authentication Failure

Authentication Failure

Phabricator Account Recovery

Phabricator Account Recovery

That’s all for now, we’ve successfully installed and configured “Phabricator“an open source project management tool without any glitches. I hope you too setup with any errors, if any let me know via comments, I would love to help you out.

http://phabricator.org/

Source

How to Install GoLang (Go Programming Language) in Linux

Go (also referred to as GoLang) is an open source and lower level programming language designed to enable users to easily write simple, reliable, and highly efficient computer programs.

Developed in 2007 at Google by a team of programmers – Robert GriesemerRob Pike, and Ken Thompson, it is a compiled, statically typed language same as other system languages such as CC++Java and many more.

GoLang is highly productive, and readable with support for networking and multiprocessing and it is scalable in extensive systems as well. Below is a list of a few well known open source projects developed using GoLang:

  1. Docker
  2. Kubernetes
  3. Lime
  4. InfluxDB
  5. Gogs (Go Git Service) among others.

Install GoLang in Linux Systems

1. Go to https://golang.org/dl/ and download the latest version (i.e 1.7.3) of GoLang in an archive file as follows:

$ cd ~/Downloads
$ wget -c https://storage.googleapis.com/golang/go1.7.3.linux-amd64.tar.gz

2. Next, check the integrity of the tarball by verifying the SHA256 checksum of the archive file using the shasum command as below, where the flag -a is used to specify the algorithm to be used:

$ shasum -a 256 go1.7.3.linux-amd64.tar.gz

ead40e884ad4d6512bcf7b3c7420dd7fa4a96140  go1.7.3.linux-amd64.tar.gz

Important: To show that the contents of the downloaded archive file are the exact copy provided on the GoLang website, the 256-bit hash value generated from the command above as seen in the output should be the same as that provided along with the download link.

If that is the case, proceed to the next step, otherwise download a new tarball and run the check again.

3. Then extract the tar archive files into /usr/local directory using the command below.

$ sudo tar -C /usr/local -xvzf go1.7.3.linux-amd64.tar.gz

Where, -C specifies the destination directory..

Configuring GoLang Environment in Linux

4. First, setup your Go workspace by creating a directory ~/go_projects which is the root of your workspace. The workspace is made of three directories namely:

  1. bin which will contain Go executable binaries.
  2. src which will store your source files and
  3. pkg which will store package objects.

Therefore create the above directory tree as follows:

$ mkdir -p ~/go_projects/{bin,src,pkg}
$ cd ~/go_projects
$ ls

5. Now it’s time to execute Go like the rest of Linux programs without specifying its absolute path, its installation directory must be stored as one of the values of $PATH environment variable.

Now, add /usr/local/go/bin to the PATH environment variable by inserting the line below in your /etc/profile file for a system-wide installation or $HOME/.profile or $HOME./bash_profile for user specific installation:

Using your preferred editor, open the appropriate user profile file as per your distribution and add the line below, save the file and exit:

export  PATH=$PATH:/usr/local/go/bin

6. Then, set the values of GOPATH and GOBIN Go environment variables in your user profile file (~/.profile or ~/bash_profile) to point to your workspace directory.

export GOPATH="$HOME/go_projects"
export GOBIN="$GOPATH/bin"

Note: If you installed GoLang in a custom directory other than the default (/usr/local/), you must specify that directory as the value of GOROOT variable.

For instance, if you have installed GoLang in home directory, add the lines below to your $HOME/.profile or $HOME/.bash_profile file.

export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin

7. The final step under this section is to effect the changes made to the user profile in the current bash session like so:

$ source ~/.bash_profile
OR
$ source ~/.profile

Verify GoLang Installation

8. Run the commands below to view your Go version and environment:

$ go version
$ go env

Check GoLang Version and Environment

Check GoLang Version and Environment

Type the following command to display usage information for Go tool, which manages Go source code:

$ go help

9. To test your if your Go installation is working correctly, write a small Go hello world program, save the file in ~/go_projects/src/hello/ directory. All your GoLang source files must end with the .go extension.

Begin by creating the hello project directory under ~/go_projects/src/:

$ mkdir -p ~/go_projects/src/hello

Then use your favorite editor to create the hello.go file:

$ vi ~/go_projects/src/hello/hello.go

Add the lines below in the file, save it and exit:

package main 

import "fmt"

func main() {
    fmt.Printf("Hello, you have successfully installed GoLang in Linux\n")
}

10. Now, compile the program above as using go install and run it:

$ go install $GOPATH/src/hello/hello.go
$ $GOBIN/hello

First GoLang Program

First GoLang Program

If you see the output showing you the message in the program file, then your installation is working correctly.

11. To run your Go binary executables like other Linux commands, add $GOBIN to your $PATH environment variable.

Reference Linkshttps://golang.org/

That’s it! You can now go on and learn GoLang for writing simple, reliable, and highly efficient computer programs. Are you already make use of GoLang?

Share your experience with us and many other Linux users out there via the comment section below or imaginably, you can ask a question in relation to this guide or GoLang.

Source

fpaste – A Tool for Sharing Errors and Commandline Output to Pastebin

Software developers or users always encounter different problems during the process of software development or usage. Some of these problems may include errors, therefore one way to solve them is to share error messages, command output or the contents of given files with other developers or users on the Internet.

There are many online platforms for sharing such problems which can be referred to as online content-sharing tool. An online content-sharing tool is often called a pastebin.

The Fedora ecosystem has one such tool called fpaste, is a web-based pastebin and a command line tool used for debugging errors or simply looking for feedback on some text.

Therefore in this article we are going to look at ways of how you can use fpaste as a programmer or normal user to report errors from commandline to fpaste.org site..

In order to use fpaste, you need to access it using one of the two ways; via the website or the command line. In this guide we shall focus more on the command line but let us see how you can use it via the web-based interface.

To use it from the website, you can go to fpaste website, copy your error, paste it into the input box provided, and then submit it. A response page will be provided and it has the URL link that you can send to fellow debuggers.

The web user interface allows a user to:

  1. set the syntax of the paste.
  2. tag the paste with his or her alias.
  3. use a password.
  4. set a time for the pasted error to expire.

How to Install fpaste Tool in Linux

To install it on Fedora/CentOS/RHEL distributions, you can run the following command as a privileged user.

# yum install fpaste
# dnf install fpaste         [On Fedora 22+ versions]
Sample Output
Last metadata expiration check performed 0:21:15 ago on Fri Jan 22 15:25:34 2016.
Dependencies resolved.
=================================================================================
 Package         Arch            Version                   Repository       Size
=================================================================================
Installing:
 fpaste          noarch          0.3.8.1-1.fc23            fedora           38 k

Transaction Summary
=================================================================================
Install  1 Package

Total download size: 38 k
Installed size: 72 k
Is this ok [y/N]: y
Downloading Packages:
fpaste-0.3.8.1-1.fc23.noarch.rpm                       9.3 kB/s |  38 kB     00:04    
---------------------------------------------------------------------------------------
Total                                                  5.8 kB/s |  38 kB     00:06     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Installing  : fpaste-0.3.8.1-1.fc23.noarch                                       1/1 
  Verifying   : fpaste-0.3.8.1-1.fc23.noarch                                       1/1 

Installed:
  fpaste.noarch 0.3.8.1-1.fc23                                                         

Complete!

Now we will see some ways on how to use fpaste from terminal.

You can paste a test.txt, as follows:

# fpaste test.txt

Uploading (1.9KiB)...
http://ur1.ca/ofuic -> http://paste.fedoraproject.org/313642/34569731

To use a nickname and password while pasting test.txt, run this command.

# fpaste test.txt -n “labmaster” --password “labmaster123” test.txt

Uploading (4.7KiB)...
http://ur1.ca/ofuih -> http://paste.fedoraproject.org/313644/57093145

To send a script file named test_script.sh, specify the language as bash, copy the returned URL link to the X clipboard and make the paste private as follows.

# fpaste -l bash --private --clipout test_script.sh 

Uploading (1.9KiB)...
http://ur1.ca/ofuit -> http://paste.fedoraproject.org/313646

To send the output of the w command, run this command.

# w | fpaste 

Uploading (0.4KiB)...
http://ur1.ca/ofuiv -> http://paste.fedoraproject.org/313647/53457312

To send your system information with a description and a confirmation, run this command below.

# fpaste --sysinfo -d "my laptop" --confirm -x "1800" 

Gathering system info .............................OK to send? [y/N]: y
Uploading (19.1KiB)...
http://ur1.ca/ofuj6 -> http://paste.fedoraproject.org/313648/53457500

You can also paste the output of more than one command. In the next example I am going to send the output of the following commands; uname -adate and who.

# (uname -a ; date ; who ) | fpaste --confirm -x "1800" 

Linux tecmint.com 4.2.6-301.fc23.x86_64 #1 SMP Fri Nov 20 22:22:41 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Fri Jan 22 15:43:24 IST 2016
root     tty1         2016-01-22 15:24
root     pts/0        2016-01-22 15:32 (192.168.0.6)

OK to send? [y/N]: y
Uploading (0.4KiB)...
http://ur1.ca/ofujb -> http://paste.fedoraproject.org/313649/14534576

You can use many other options of fpaste in man pages.

# man fpaste

Summary

fpaste is a good content-sharing tool with easy to use methods. We have looked at some few examples of using it in this guide but you can explore more by trying out many other options.

If you encounter any errors while using it, you can post a comment or for those of who use fpaste, please add some information about how you use it and share your experience.

Source

Apache OpenOffice 4.1.2 Released – Install on RedHat and Debian Based Distributions

Apache OpenOffice is a most popular and open source application suit for LinuxWindows & Mac used for word processing, spreadsheets, presentations, drawings, database, formula and much more. OpenOffice is used by more than 130 millions of users across the globe in corporates, homes and research centers with almost in 38 languages. It is available freely for download and works on all common systems.

Install Apache OpenOffice in Linux

Install Apache OpenOffice in Linux

Update: Install LibreOffice 5.0.2 on RHEL/CentOS/Fedora and Debian/Ubuntu/Linux Mint

OpenOffice 4.1.2 Improvements/Enhancements

  1. Performance improvement for faster startup.
  2. 38 supported languages.
  3. Number of enhancements were added to the WebDAV management and file locking.
  4. Bug fixes in Writer, Calc, Impress/Draw, Base.
  5. The PDF export dialog was revamped for better usability on small laptop screens.
  6. Fixed several security vulnerabilities.

The complete list of features can be found at Apache OpenOffice 4.1.2.

Requirements for Apache OpenOffice 4.1.2

  1. JRE (Java Runtime Environment) 1.5
  2. Kernel 2.6 or higher and glibc2 2.11 or higher
  3. Minimum 256MB and recommended 512MB RAM.
  4. Disk space 400MB

Install Apache OpenOffice 4.1.2 on Linux

The following installation instructions shows you how to install Apache OpenOffice 4.1.2 using language US English on a 32-Bit and 64-bit Linux distributions.

For 64-Bit platforms, there will be a minor changes in directory names, but the installation instructions same for both the architectures.

Step 1: Installing Java JRE

As I said above, you must have a JRE version (32-bit or 64-bit) installed on your systems, if not install the latest Java JRE version using following article.

  1. Install Java on Linux Systems

Else, you can follow below instructions to install most recent version of Java JRE on Linux distributions such a Debian and RedHat based.

On Debian and its derivatives
$ sudo apt-get install openjdk-8-jre

Install Java JRE in Ubuntu

Install Java JRE in Ubuntu

On RedHat based Systems
# yum install java-1.8.0-openjdk

Install Java JDK on CentOS

Install Java JDK on CentOS

Once Java installed, you can verify the version using following command.

$ java -version

openjdk version "1.8.0_66-internal"
OpenJDK Runtime Environment (build 1.8.0_66-internal-b01)
OpenJDK 64-Bit Server VM (build 25.66-b01, mixed mode)

Step 2: Downloading Apache OpenOffice 4.1.2

Download OpenOffice 4.1.2 using Wget command based on your system bit.

On Debian and its derivatives
# cd /tmp

---------------------------- On 32-bit Systems ---------------------------- 
# wget http://sourceforge.net/projects/openofficeorg.mirror/files/4.1.2/binaries/en-US/Apache_OpenOffice_4.1.2_Linux_x86-64_install-deb_en-US.tar.gz


---------------------------- On 64-bit Systems ---------------------------- 
# wget http://sourceforge.net/projects/openofficeorg.mirror/files/4.1.2/binaries/en-US/Apache_OpenOffice_4.1.2_Linux_x86_install-deb_en-US.tar.gz
On RedHat based Systems
# cd /tmp

---------------------------- On 32-bit Systems ---------------------------- 
# wget http://sourceforge.net/projects/openofficeorg.mirror/files/4.1.2/binaries/en-US/Apache_OpenOffice_4.1.2_Linux_x86-64_install-rpm_en-US.tar.gz


---------------------------- On 64-bit Systems ---------------------------- 
# wget http://sourceforge.net/projects/openofficeorg.mirror/files/4.1.2/binaries/en-US/Apache_OpenOffice_4.1.2_Linux_x86_install-rpm_en-US.tar.gz

Step 3: Removing Old OpenOffice Version

$ sudo apt-get remove openoffice* libreoffice*		[On Debian based Systems]
# yum remove openoffice* libreoffice*			[on RedHat based Systems]

Step 4: Extracting OpenOffice 4.1.2 Package

Use Tar command to extract the package in the current directory.

-------------------- On Debian and its Derivatives -------------------- 
# tar -xvf Apache_OpenOffice_4.1.2_Linux_x86-64_install-deb_en-US.tar.gz	[For 32-bit]
# tar -xvf Apache_OpenOffice_4.1.2_Linux_x86_install-deb_en-US.tar.gz		[For 64-bit]

-------------------- On RedHat based Systems -------------------- 
# tar -xvf Apache_OpenOffice_4.1.2_Linux_x86_install-rpm_en-US.tar.gz		[For 64-bit]
# tar -xvf Apache_OpenOffice_4.1.2_Linux_x86-64_install-rpm_en-US.tar.gz	[For 32-bit]

Step 5: Installing OpenOffice 4.1.2 Package

Now execute following RPM command to install all the RPM packages at once.

-------------------- On Debian and its Derivatives -------------------- 
# dpkg -i en-US/DEBS/*.deb en-US/DEBS/desktop-integration/openoffice4.1-debian-*.deb


-------------------- On RedHat based Systems -------------------- 
# rpm -Uvh en-US/RPMS/*.rpm en-US/RPMS/desktop-integration/openoffice4.1.2-redhat-*.rpm

Step 6: Starting Apache OpenOffice 4.1.2

On the terminal execute following command to start the OpenOffice application.

# openoffice4

Step 7: Screenshots of Apache OpenOffice 4.0.1

Apache OpenOffice

Apache OpenOffice

About Apache OpenOffice 4.1.2

About Apache OpenOffice 4.1.2

Source

Testssl.sh – Testing TLS/SSL Encryption Anywhere on Any Port

testssl.sh is a free and open source, feature-rich command line tool used for checking TLS/SSL encryption enabled services for supported ciphers, protocols and some cryptographic flaws, on Linux/BSD servers. It can be run on MacOS X and Windows using MSYS2 or Cygwin.

Features of Testssl.sh

  • Easy to install and use; produces clear output.
  • Highly flexible, it can be used to check any SSL/TLS enabled and STARTTLS services.
  • Perform a general check or single checks.
  • Comes with several command line options for various categories of single checks.
  • Supports different output types, including colored output.
  • Supports SSL Session ID check.
  • Supports checking for multiple server certificates.
  • Offers absolute privacy, it’s only you who can sees the result, not a third party.
  • Supports logging in (flat) JSON + CSV format.
  • Supports mass testing in serial (default) or parallel modes.
  • Supports presetting of command line options via environment variables, and so much more.

Important: You should be using bash (which comes preinstalled on almost Linux distributions) and a newer OpenSSL version (1.0) is recommended for effective usage.

How to Install and Use Testssl.sh in Linux

You can install testssl.sh by cloning this git repository as shown.

# git clone --depth 1 https://github.com/drwetter/testssl.sh.git
# cd testssl.sh

After cloning testssl.sh, the general use case is probably just run the following command to run a test against a website.

# ./testssl.sh https://www.google.com/

Test SSL TLS Encryption

Test SSL TLS Encryption

To run a check against STARTTLS enabled protocols: ftp, smtp, pop3, imap, xmpp, telnet, ldap, postgres, mysql, use the -t option.

# ./testssl.sh -t smtp https://www.google.com/

By default, all mass tests are done in serial mode, you can enable parallel testing using the --parallel flag.

# ./testssl.sh --parallel https://www.google.com/

If you do not want to use the default system openssl program, use the –openssl flag to specify an alternative.

# ./testssl.sh --parallel --sneaky --openssl /path/to/your/openssl https://www.google.com/

You might want to keep logs for later analysis, testssl.sh has the --log (store log file in the current directory) or --logfile (specify log file location) option for that.

# ./testssl.sh --parallel --sneaky --logging https://www.google.com/

To disable DNS lookup, which can increase test speeds, use the -n flag.

# ./testssl.sh -n --parallel --sneaky --logging https://www.google.com/

Run Single Checks Using testssl.sh

You can also run single checks for protocols, server defaults, server preferences, headers, various types of vulnerabilities plus many other tests. There are a number of options provided for this.

For example, the -e flag enables you to check each local cipher remotely. If you want to make the test much faster, use include the --fast flag; this will omit some checks, in case you are using openssl for all ciphers, it only displays the first proffered cipher.

# ./testssl.sh -e --fast --parallel https://www.google.com/

The -p option allows for testing TLS/SSL protocols (including SPDY/HTTP2).

# ./testssl.sh -p --parallel --sneaky https://www.google.com/

You can view the server’s default picks and certificate using the -S option.

# ./testssl.sh -S https://www.google.com/

Next, to see the server’s preferred protocol+cipher, use the -P flag.

# ./testssl.sh -P https://www.google.com/

The -U option will help you test all vulnerabilities (if applicable).

# ./testssl.sh -U --sneaky https://www.google.com/

Unfortunately, we can not exploit all the options here, use the the command below to see a list of all options.

# ./testssl.sh --help

Find more at testssl.sh Github repository: https://github.com/drwetter/testssl.sh

Conclusion

testssl.sh is a useful security tool that every Linux system administrator needs to have and use for testing TSL/SSL enabled services. If you have any questions or thoughts to share, use the comment form below. In addition, you can also share with us any similar tools, that you have come across out there.

Source

How to Mount Remote Linux Filesystem or Directory Using SSHFS Over SSH

The main purpose of writing this article is to provide a step-by-step guide on how to mount remote Linux file system using SSHFS client over SSH.

This article is useful for those users and system administrators who want to mount remote file system on their local systems for whatever purposes. We have practically tested by installing SSHFS client on one of our Linux system and successfully mounted remote file systems.

Before we go further installation let’s understand about SSHFS and how it works.

Sshfs Mount Remote Linux Filesystem or Directory

Sshfs Mount Remote Linux Filesystem or Directory

What Is SSHFS?

SSHFS stands for (Secure SHell FileSystem) client that enable us to mount remote filesystem and interact with remote directories and files on a local machine using SSH File Transfer Protocol (SFTP).

Suggested Read: 10 sFTP Command Examples to Transfer Files on Remote Servers in Linux

SFTP is a secure file transfer protocol that provides file access, file transfer and file management features over Secure Shell protocol. Because SSH uses encryption while transferring files over the network from one computer to another computer and SSHFS comes with built-in FUSE (Filesystem in Userspace) kernel module that allows any non-privileged users to create their file system without modifying kernel code.

In this article, we will show you how to install and use SSHFS client on any Linux distribution to mount remote Linux filesystem or directory on a local Linux machine.

Step 1: Install SSHFS Client in Linux Systems

By default sshfs packages does not exists on all major Linux distributions, you need to enable epel repositoryunder your Linux systems to install sshfs with the help of Yum command with their dependencies.

# yum install sshfs
# dnf install sshfs              [On Fedora 22+ releases]
$ sudo apt-get install sshfs     [On Debian/Ubuntu based systems]

Step 2: Creating SSHFS Mount Directory

Once the sshfs package installed, you need to create a mount point directory where you will mount your remote file system. For example, we have created mount directory under /mnt/tecmint.

# mkdir /mnt/tecmint
$ sudo mkdir /mnt/tecmint     [On Debian/Ubuntu based systems]

Step 3: Mounting Remote Filesystem with SSHFS

Once you have created your mount point directory, now run the following command as a root user to mount remote file system under /mnt/tecmint. In your case the mount directory would be anything.

The following command will mount remote directory called /home/tecmint under /mnt/tecmint in local system. (Don’t forget replace x.x.x.x with your IP Address and mount point).

# sshfs tecmint@x.x.x.x:/home/tecmint/ /mnt/tecmint
$ sudo sshfs -o allow_other tecmint@x.x.x.x:/home/tecmint/ /mnt/tecmint     [On Debian/Ubuntu based systems]

If your Linux server is configured with SSH key based authorization, then you will need to specify the path to your public keys as shown in the following command.

# sshfs -o IdentityFile=~/.ssh/id_rsa tecmint@x.x.x.x:/home/tecmint/ /mnt/tecmint
$ sudo sshfs -o allow_other,IdentityFile=~/.ssh/id_rsa tecmint@x.x.x.x:/home/tecmint/ /mnt/tecmint     [On Debian/Ubuntu based systems]

Step 4: Verifying Remote Filesystem is Mounted

If you have run the above command successfully without any errors, you will see the list of remote files and directories mounted under /mnt/tecmint.

# cd /mnt/tecmint
# ls
[root@ tecmint]# ls
12345.jpg                       ffmpeg-php-0.6.0.tbz2                Linux                                           news-closeup.xsl     s3.jpg
cmslogs                         gmd-latest.sql.tar.bz2               Malware                                         newsletter1.html     sshdallow
epel-release-6-5.noarch.rpm     json-1.2.1                           movies_list.php                                 pollbeta.sql
ffmpeg-php-0.6.0                json-1.2.1.tgz                       my_next_artical_v2.php                          pollbeta.tar.bz2

Step 5: Checking Mount Point with df -hT Command

If you run df -hT command you will see the remote file system mount point.

# df -hT
Sample Output
Filesystem                          Type        Size  Used Avail Use% Mounted on
udev                                devtmpfs    730M     0  730M   0% /dev
tmpfs                               tmpfs       150M  4.9M  145M   4% /run
/dev/sda1                           ext4         31G  5.5G   24G  19% /
tmpfs                               tmpfs       749M  216K  748M   1% /dev/shm
tmpfs                               tmpfs       5.0M  4.0K  5.0M   1% /run/lock
tmpfs                               tmpfs       749M     0  749M   0% /sys/fs/cgroup
tmpfs                               tmpfs       150M   44K  150M   1% /run/user/1000
tecmint@192.168.0.102:/home/tecmint fuse.sshfs  324G   55G  253G  18% /mnt/tecmint

Suggested Read: 12 Useful “df” Commands to Check Disk Space in Linux

Step 6: Mounting Remote Filesystem Permanently

To mount remote filesystem permanently, you need to edit the file called /etc/fstab. To do, open the file with your favorite editor.

# vi /etc/fstab
$ sudo vi /etc/fstab     [On Debian/Ubuntu based systems]         

Go to the bottom of the file and add the following line to it and save the file and exit. The below entry mount remote server file system with default settings.

sshfs#tecmint@x.x.x.x:/home/tecmint/ /mnt/tecmint fuse.sshfs defaults 0 0

Make sure you’ve SSH Passwordless Login in place between servers to auto mount filesystem during system reboots..

If your server is configured with SSH key based authorization, then add this line:

sshfs#tecmint@x.x.x.x:/home/tecmint/ /mnt/tecmint fuse.sshfs IdentityFile=~/.ssh/id_rsa defaults 0 0

Next, you need to update the fstab file to reflect the changes.

# mount -a
$ sudo mount -a   [On Debian/Ubuntu based systems]

Step 7: Unmounting Remote Filesystem

To unmount remote filesystem, jun issue the following command it will unmount the remote file system.

# umount /mnt/tecmint

That’s all for now, if you’re facing any difficulties or need any help in mounting remote file system, please contact us via comments and if you feel this article is much useful then share it with your friends.

Source

WP2Social Auto Publish Powered By : XYZScripts.com