Quantcast
Channel: linoxide.com
Viewing all 1507 articles
Browse latest View live

How to Install LibreOffice 4.4.3 in Fedora 22

$
0
0

Hi everyone, today we'll learn how to install LibreOffice 4.4.3 running Fedora 22 as its Operating System. LibreOffice is a Free and Open Source powerful office suite developed and maintained by Document Foundation and its community. LibreOffice is a fork from OpenOffice in 2010 which is a fork of StarOffice. LibreOffice is built on the original OpenOffice.org code base. It has a pretty clean interface and powerful tools that let us unleash our creativity and grow our productivity. The LibreOffice suite consists of several applications to do word processing, spreadsheets, slideshows, diagrams and drawings, maintain databases, and compose mathematical formulae. It has a large number of satisfied users across the globe with almost 7.5 million downloads. It supports more than 30 languages and runs on all major operating systems. LibreOffice now ships with 2 new and awesome fonts, Carlito and Caledea, improving the looks and allure of your documents as well as their compatibility. It has one-click to PDF feature available in the software which enables fast and ease to share your document. The latest version of libreoffice ie 4.4.3 has a great looking menus, toolbars, redesigned sidebar, a new color manager, and countless other user interface & version tracking improvements.

Recommended System Requirements to run LibreOffice

It is highly recommended to fulfill the following requirements of hardware and software so to obtain an awesome performance of LibreOffice in our machine.

  • Linux kernel version 2.6.18 or higher
  • glibc2 version 2.5 or higher
  • gtk version 2.10.4 or higher
  • Pentium-compatible PC (Pentium III, Athlon or more-recent system recommended)
  • Minimum 256Mb RAM and recommended 512Mb RAM
  • Up to 1.55GBs available hard disk space
  • X Server with 1024x768 resolution or recommended higher resolution with at least 256 colors
  • Gnome 2.16 or higher, with the gail 1.8.6 and at-spi 1.7 packages (required for support for assistive technology [AT] tools) or another compatible GUI (such as KDE, among others).

Please note that Java is also required to enable certain features of the software but not most.

Here are some easy steps on how we can install LibreOffice 4.4.3 on our machine running Fedora 22.

1. Downloading LibreOffice 4.4.3 Package

First of all, we'll gonna download the tarball of LibreOffice 4.4.3 for RPM based linux distribution as Fedora 22 is an RPM based Linux distribution using the wget command inside the /tmp directory.

# cd /tmp/
# dnf install wget

On 32-bit Fedora 22

# wget http://download.documentfoundation.org/libreoffice/stable/4.4.3/rpm/x86/LibreOffice_4.4.3_Linux_x86_rpm.tar.gz

--2015-06-24 17:28:02-- http://download.documentfoundation.org/libreoffice/stable/4.4.3/rpm/x86/LibreOffice_4.4.3_Linux_x86_rpm.tar.gz
Resolving download.documentfoundation.org (download.documentfoundation.org)... 5.9.148.85, 2a01:4f8:190:3144::2
Connecting to download.documentfoundation.org (download.documentfoundation.org)|5.9.148.85|:80... connected.
...
Saving to: ‘LibreOffice_4.4.3_Linux_x86_rpm.tar.gz’
LibreOffice_4.4.3_Linu 100%[============================>] 203.18M 10.1MB/s in 26s
2015-06-24 17:28:29 (7.85 MB/s) - ‘LibreOffice_4.4.3_Linux_x86_rpm.tar.gz’ saved [213049472/213049472]

On 64-bit Fedora 22

# wget http://download.documentfoundation.org/libreoffice/stable/4.4.3/rpm/x86_64/LibreOffice_4.4.3_Linux_x86-64_rpm.tar.gz

--2015-06-24 16:44:25--http://download.documentfoundation.org/libreoffice/stable/4.4.3/rpm/x86_64/LibreOffice_4.4.3_Linux_x86-64_rpm.tar.gz
Resolving download.documentfoundation.org (download.documentfoundation.org)... 5.9.148.85, 2a01:4f8:190:3144::2
...
Length: 229593995 (219M) [application/x-gzip]
Saving to: ‘LibreOffice_4.4.3_Linux_x86-64_rpm.tar.gz’
LibreOffice_4.4.3_Linu 100%[============================>] 218.96M 10.0MB/s in 28s
2015-06-24 16:44:57 (7.74 MB/s) - ‘LibreOffice_4.4.3_Linux_x86-64_rpm.tar.gz’ saved [229593995/229593995]

2. Removing previous versions of LibreOffice

As we have just downloaded our latest and stable version of LibreOffice ie 4.4.3, we'll surely wanna remove our previously installed version of LibreOffice or OpenOffice. So, to uninstall it, we'll gonna use dnf package manager as shown below.

# dnf remove libreoffice* openoffice*

3. Extracting LibreOffice Tarball

Now, its time to extract our downloaded tarball of LibreOffice 4.4.3 that we downloaded inside /tmp/ as LibreOffice_4.4.3_Linux_x86_rpm.tar.gz . To extract the compressed tarball file, we'll gonna use tar command.

On 32-bit Fedora 22

# tar -xvf LibreOffice_4.4.3_Linux_x86_rpm.tar.gz

On 64-bit Fedora 22

# tar -xvf LibreOffice_4.4.3_Linux_x86-64_rpm.tar.gz

4. Installing LibreOffice 4.4.3

Next, we'll gonna install the rpm packages of LibreOffice 4.4.3.2 that we had just downloaded and extracted in the above steps. We'll use the dnf package manager to install those rpm packages that are located inside the RPMS directory.

On 32-bit Fedora 22

# cd /tmp/LibreOffice_4.4.3.2_Linux_x86-64_rpm/RPMS/
# dnf install *.rpm

On 64-bit Fedora 22

# cd /tmp/LibreOffice_4.4.3.2_Linux_x86-64_rpm/RPMS/
# dnf install *.rpm

6. Starting LibreOffice 4.4.3

Now, after we have completed the above steps for the complete installation, we'll wanna start our LibreOffice in our Fedora 22 Linux Distribution. To start LibreOffice 4.4.3, we can simply click on the icon of LibreOffice in the menu under Office or we can simply run the following command in the terminal.

# libreoffice4.4

 

LibreOffice

7. Setting up a Language Pack

Now, as we have got our LibreOffice 4.4.3.2 working awesome in our Fedora 22 machine, we'll now wanna install our Language Pack that we want to apply to libreoffice so that we can work with libreoffice in our required language. We can pick the required Language pack from http://www.libreoffice.org/download/libreoffice-fresh/?lang=pick then download it. After we download, we'll need to extract it and install the rpm packages. Here's we've got the link of the language pack we wanna download, so we'll download it using wget command, extract it and then install it.

# cd /tmp/

On 32-bit Fedora 22

# wget http://download.documentfoundation.org/libreoffice/stable/4.4.3/rpm/x86/LibreOffice_4.4.3_Linux_x86_rpm_langpack_ne.tar.gz
# tar -xvf LibreOffice_4.4.3_Linux_x86_rpm_langpack_ne.tar.gz
# cd /tmp/LibreOffice_4.4.3.2_Linux_x86-64_rpm_langpack_ne/RPMS/
# dnf install *.rpm

On 64-bit Fedora 22

# wget http://download.documentfoundation.org/libreoffice/stable/4.4.3/rpm/x86_64/LibreOffice_4.4.3_Linux_x86-64_rpm_langpack_ne.tar.gz
# tar -xvf LibreOffice_4.4.3_Linux_x86-64_rpm_langpack_ne.tar.gz
# cd /tmp/LibreOffice_4.4.3.2_Linux_x86-64_rpm_langpack_ne/RPMS/
# dnf install *.rpm

After installing the language packs, we'll need to restart the LibreOffice then choose the installed language in tools > options > language settings >languages.

Libreoffice Language Pack

Conclusion

Finally we've successfully installed and started LibreOffice 4.4.3 in our Fedora 22 Linux Distribution. LibreOffice is a powerful and pretty open source office suite that is designed for every sort of user from home users to corporate. It is a great alternative to Microsoft Windows Office and other Office suites. The latest build has a pretty beautiful interface with cool menus, toolbars and redesigned sidebar, new color manager and other awesome improvements. We can download and install additional templates and extensions from the LibreOffice Extension Center.

The post How to Install LibreOffice 4.4.3 in Fedora 22 appeared first on LinOxide.


How to Setup SugarCRM Community on CentOS 7.1

$
0
0

Customer Relations Management is a vital component to any business with customer support, marketing and sales. In our today’s article we will setup the World’s largest open source CRM software that is sugarCRM. It is a web based customer management tool that facilitates all the business roles by bringing them together under a unified software system that allows customer relations representatives to quickly and efficiently deal with a wide range of demands. One of the best thing about SugarCRM is that its source code of the application is available to any user, developer or customer of the product. It is often used to track customer orders, billing history and to catalog any complaints you have. So, this leads to a faster turnaround for the customer service issues, and it can also result in more accurate resolution of your customer’s issues by centralizing all customer relation services under the one unified system.

Prerequisites

We are going to setup SugarCRM on Linux CentOS 7.1 operating system with minimal installation package, so first of all we have to complete its basic requirements that include the Basic LAMP stack to be installed on the system where you are going to setup sugarCRM. Let’s follow the next few steps to complete the requirements before starting sugarCRM installation.

1) System Update

Login to your server with super user credentials to upgrade your OS with latest release and update its installed packages and repositories using below command.

[root@localhost ~]# yum update
[root@localhost ~]# yum upgrade

2) LAMP Setup

Basic LAMP setup is the major requirement for the installation of sugarCRM where we will use Apache as its web server, MySQL-MariaDB as its database server and PHP modules. Before doing the LAMP installation setup your servers hostname and configure your hosts file with proper FQDN.

[root@localhost ~]# hostnamectl set-hostname sugarcrm
[root@localhost ~]# vim /etc/hosts
10.2.3.4 sugarcrm sugarcrm.test.com
:wq!

Write the changes and quit file to update your hosts entry. Now we will install the LAMP packages and its other dependent utilities with yum command as shown below.

[root@sugarcrm ~]# yum install php httpd mariadb mariadb-server php-mysqlnd php-opcache php-mbstring php-gd

Once all the above mentioned packages are installed including their dependencies, start the Apache web server and MariaDB services then enable it at boot up auto start.

[root@sugarcrm ~]# service httpd start
[root@sugarcrm ~]# service mariadb start
[root@sugarcrm ~]# systemctl enable httpd
[root@sugarcrm ~]# systemctl enable mariadb

Now set the root password of MariaDB after a connection to it with command below.

[root@sugarcrm ~]#mysql
MariaDB [(none)]> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('root123');
Query OK, 0 rows affected (0.00 sec)

Once you have set the root password to the root user of MariaDB, now we will create a new database with its separate user and password that we will use later on during the installation process of sugarCRM. Let's use the following commands to create the database and assign the privileges to the new user.

MariaDB [(none)]> CREATE DATABASE sugarcrm;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> CREATE USER 'crm_user'@'localhost' IDENTIFIED BY 'crm123';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> GRANT ALL PRIVILEGES ON sugarcrm.* TO 'crm_user'@'localhost';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> quit;
Bye

Now tune the PHP settings to allow files of atleast 6MB to be uploaded in the PHP configuration file. To do that open file /etc/php.ini and adjust the settings by searching the following parameter and update accordingly.

[root@sugarcrm ~]# vim /etc/php.ini
upload_max_filesize = 25M
date.timezone = Europe/London

After you update configuration, you have to restart httpd services to implement the saved changes.

[root@sugarcrm ~]#systemctl restart httpd

3) Allow Firewall Access

We have to allow HTTP on port 80 for public zone and make sure that SELinux is turned off or set it to Permissive mode. So let’s do the firewall and selinux changes by updating its conf file.

[root@sugarcrm ~]# vim /etc/selinux/config
Change from enforcing to permissive as below.
#SELINUX=enforcing
SELINUX=permissive

Run the below command to update selinux state from enforcing to permissive mode.

[root@sugarcrm ~]# setenforce 0
[root@sugarcrm ~]# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: permissive
Mode from config file: permissive
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28

To allow access for http service in firewall you can use the below command to permit permanent access.

[root@sugarcrm ~]# firewall-cmd --zone=public --add-service=http --permanent
Success
[root@sugarcrm ~]# service firewalld restart
Redirecting to /bin/systemctl restart firewalld.service
[root@sugarcrm ~]# service firewalld status

Installing SugarCRM

We are ready to setup sugarCRM as had completed its all prerequisites in previous steps. Now let's follow the next few step to install SugarCRM on CentOS 7.1 as described in below steps.

1) Download sugarCRM

You can download the latest community edition of sugarCRM from their official website that is http://www.sugarcrm.com/download and the upload it on the server.

SugarCRM Download

If you have wget installed on your system then simply copy the link and get it on your server as.

[root@sugarcrm ~]# wget http://downloads.sourceforge.net/project/sugarcrm/1%20-%20SugarCRM%206.5.X/SugarCommunityEdition-6.5.X/SugarCE-6.5.22.zip

2) Extract the package

Now we will extract the downloaded package into the document root directory of our web server using the below unzip command.

[root@sugarcrm ~]# ls
SugarCE-6.5.22.zip
[root@sugarcrm ~]# unzip SugarCE-6.5.22.zip -d /var/www/html/

We will rename the extracted directory to something simpler and and this directory needs to be owned by the Apache user.

[root@sugarcrm ~]# cd /var/www/html/
[root@sugarcrm html]# mv SugarCE-Full-6.5.22 SugarCRM
[root@sugarcrm html]# chown -R apache:apache SugarCRM/

SugarCRM Web Installation Setup

In this section we are going to start the installation process of SugarCRM using our web server. Open the below URL that indicates the SugarCRM package placed in web server's document root directory with you localhost IP address.

http://your_servers_ip/SugarCRM

Welcome to the SugarCRM Community Setup Wizard.

SugarCRM Setup Wizard

Now we are ready for to install it on our Linux host, proceeding to next step make sure that you have read all the instructions mentioned in this section about the basic system requirements configurations.

system and components check

Read and Accept the License agreement then Click to NEXT button.

License Agreement

Installation Options

There are two available options one with Typical Installation and the second with Custom Installation. If you are a new to CRM then simply choose the First option and click to Next button.

Install Types

Database Type

If you multiple database extensions installed on your system, then will be displayed here and you have to choose the one where you want to install the sugarCRM instance.

Database Type

Database Configuration
In this section we have to choose the database configurations that contains the database user name and hostname that we created during LAMP setup.

Database Configurations

Once you are done with database configurations then in the Next step you have to verify the Database credentials and click to Next.

Verify DB Credentials

SugarCRM Site Configuration
Here we need to set the administrator username and password that will be used login to the instance after the installation of SugarCRM.

Admin User

Confirm Settings
Here is the complete summary of your configuration settings that you configured in previous steps.

Configuration Summary

Once you have confirmed all settings then click to the INSTALL button at the bottom of this page else reconfigure the missing parameters if found in the configuration settings.

Install SugarCRM

Performing Setup

The installation process will perform the tasks to create the configuration file, applications data and users setup as shown in the Picture.

installation setup

Login to SugarCRM
Put your admin user credentials to login to your SugraCRM community edition and start using your best customer relations management portal.

SugarCRM Dashboard

Welcome to SurgarCRM

SugarCRM is ready to Localize, so let's pecify your time zone and how you would like dates, currencies and names to appear in Sugar with addition to information about yourself. The information you provide about yourself will be visible to other Sugar users. After all settings have been done click on the FINISH button as shown in the below image.

finish setup

Here is the dashboard of sugarCRM we had recently setup on Linux CentOS 7.1 and is ready to use for managing more customers, with more sale and more lead.

Conclusion

SugarCRM CE web interface is very intuitive with many features out-of-the-box. With an integrated customer relations management software suite, a company can simplify the customer relations management tasks their employees must engage in. This leads to more efficient uses of company resources, which lowers overhead.

The post How to Setup SugarCRM Community on CentOS 7.1 appeared first on LinOxide.

How to Deploy Open Source Vtiger CRM in Fedora 22

$
0
0

In this article, we'll learn how to deploy Vtiger 6.2.0 customer relationship management (CRM) system in Fedora 22 linux distribution. Vtiger CRM is an open source CRM system which was forked from SugarCRM with the intention of making it a complete free and open source CRM application which is written in PHP language. It offers many features like, support automation using a customer portal and support tickets, marketing automation with campaign support, inventory management, analysis and reporting and many more. Vtiger is an awesome product for growing business suitable from small business to large business. It is a complete suite for maintaining better relationship with customers.

Here are some easy steps on how we can easily deploy Vtiger CRM 6.3.0 in Fedora 22.

1. Installing LAMP Stack

First of all, we'll need to install LAMP stack in our Fedora 22 machine. LAMP stack includes Apache Web Server, MySQL or MariaDB Database System and PHP. To install a complete LAMP stack, we'll need to run the following dnf command as dnf is the default package manager in Fedora 22 under root or sudo access.

$ sudo dnf install httpd mariadb-server mariadb php php-fpm php-devel php-mysql php-xml php-mcrypt php-pear php-gd php-mbstring php-ldap php-imap gcc make wget nano

Next, we'll gonna start MariaDB server and Apache Web Server to get started.

$ sudo systemctl start mariadb httpd

Then, we'll gonna enable them to start on every boot of the system.

$ sudo systemctl enable mariadb httpd

Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

2. Downloading Vtiger CRM 6.3.0

Now, we'll wanna download the latest version of Vtiger CRM ie 6.3.0 . We can get the link of our required version of Vtiger from their official download page. To download it, we'll gonna use wget command as shown below.

$ cd /tmp/
$ wget http://ufpr.dl.sourceforge.net/project/vtigercrm/vtiger%20CRM%206.2.0/Core%20Product/vtigercrm6.2.0.tar.gz

--2015-07-17 09:59:22-- http://ufpr.dl.sourceforge.net/project/vtigercrm/vtiger%20CRM%206.2.0/Core%20Product/vtigercrm6.2.0.tar.gz
Resolving ufpr.dl.sourceforge.net (ufpr.dl.sourceforge.net)... 200.236.31.2, 2801:82:80ff:8000::3
Connecting to ufpr.dl.sourceforge.net (ufpr.dl.sourceforge.net)|200.236.31.2|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 37498995 (36M) [application/x-gzip]
Saving to: ‘vtigercrm6.2.0.tar.gz’
vtigercrm6.2.0.tar.gz 100%[========================>] 35.76M 4.49MB/s in 8.0s
2015-07-17 09:59:31 (4.49 MB/s) - ‘vtigercrm6.2.0.tar.gz’ saved [37498995/37498995]

Then, we'll gonna extract the download tarball using tar command as shown below.

$ tar -xzf vtigercrm6.2.0.tar.gz

We'll now assign ownership of the extracted directory to apache to provide writeable access to apache process owner.

$ sudo chown -R apache: vtigercrm
$ sudo chmod -R 775 vtigercrm

Next, we'll need to move the extracted Vtiger files to apache web server's webroot directory ie /var/www/html/ by default.

$ sudo mv vtigercrm /var/www/html

If you have SELinux enabled on the system, run the following command.

$ sudo chcon -R -t httpd_sys_content_t /var/www/html/vtigercrm
$ sudo chcon -R -t httpd_sys_rw_content_t /var/www/html/vtigercrm

3. Configuring MariaDB

As this is the first time we're going to configure MariaDB, we'll need to create a password for the root user of mariadb so that we can use it to login and create the database for our Vtiger CRM installation. To do so, we'll need to run the following command in a terminal or a shell.

$ sudo mysql_secure_installation

...
Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
Success!
...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Note: Above, we are asked to enter the root password of the mariadb server but as we are setting for the first time and no password has been set yet, we'll simply hit enter while asking the current mariadb root password. Then, we'll need to enter twice the new password we wanna set. Then, we can simply hit enter in every argument inorder to set default configurations.

4. Creating Database for Vtiger CRM

As Vtiger CRM requires MySQL or MariaDB database to store its data, we'll now create a database for our Vtiger CRM installation. Here, in this tutorial as we have already mentioned above, we'll be running mariadb as our database system. To do so, first we'll need to login to MariaDB database server by running the following command.

$ sudo mysql -u root -p

After logging into the database server, we'll now create a database named "vtiger_db" with user "vtiger_user" and password as "vtiger_password" and grant full access of the database to the user "vtiger_user". To do so, we'll need to run the following command inside the mariadb database server.

> CREATE DATABASE vtiger_db;
> CREATE USER 'vtiger_user'@'localhost' IDENTIFIED BY 'vtiger_password';
> GRANT ALL PRIVILEGES ON `vtiger_db`.* TO 'vtiger_user'@'localhost';
> FLUSH PRIVILEGES;
> EXIT;

Creating Vtiger Database

This will configure the database and exit the MariaDB environment.

5. Configuring PHP configuration

We'll configure our PHP configuration as shown below. To do so, we'll edit /etc/php.ini using our favorite text editor.

$ sudo nano /etc/php.ini

After that, we'll make changes to the file with the following lines of configuration if the PHP configuration meets the below values.

error_reporting                    E_WARNING & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT
display_errors                                on
max_execution_time                    600
log_errors                                       off
short_open_tag                               on

After we are done, we'll gonna save the file and exit. Then, we'll need to restart our Apache Web Server.

$ sudo systemctl restart httpd

6. Configuring Firewall

Next, if we are running a firewall program in Fedora 22, we'll need to configure our firewall to allow port 80 so that the Apache server's default port will be accessible externally. This will allow us to navigate our web browser to Vtiger CRM's web interface with the default http port 80. To do so, we'll need to run the following command.

$ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent

After done, we'll need to reload our firewall service.

$ sudo firewall-cmd --reload

7. Installation with Web Interface

Finally, if everything went as expected and described above, we'll be able to navigate to Vtiger CRM web interface using our favorite web browser. To do so, we'll need to goto http://domain-name.com/vtigercrm or http://ip-address/vtigercrm using our web browser.

Vtiger Setup Wizard

We'll be welcomed to Vtiger CRM configuration wizard. Then, we'll click on "Install" button which will lead us to License Agree.  Here, we'll gonna Click on I Agree button.

Vtiger License Agreement

Next, a page named Installation Prerequisites will appear. As we can see that all the dependencies have been fulfilled but there is "No" under PHP Version  section as our installed PHP version is greater than 5.5.0, this won't affect our installation so we'll simply gonna continue the process.

Vtiger Prerequisites Check

Then, we'll click on "Next" button, after that a Database Configuration page will appear in which we'll enter our MariaDB database configuration that we had just created above. In this page, we'll require hostname, username, password and database name.

Vtiger System Configuration

Note: Here, in this tutorial, we'll input hostname as "localhost", username as "vtiger_user", password as "vtiger_password" and database name as "vtiger_db". It is strictly recommended to change these according to your configuration done while creating the database.

After that, we'll be asked for Confirmation of the Database information we entered above, if the information was correct, we'll click Next and process further.

Configuration Confirmation

We'll now get the Installation in Progress page where the configurations are setup by the scripts itself. The progress bar can be seen as shown below. Here, we'll need to wait until the next page appears by itself.

installation in progress

Next, we'll be asked to select the necessary modules that we want to install with Vtiger CRM. Then, we'll click "Next" after we select the required modules to be installed in our CRM installation.

Selecting Modules

After everything has been completed as expected, we'll be directed to our login screen. Here, we'll need to enter the username and password we had just assigned while setting our database and system configuration above.

Note: Please note that the username and password required to login the Vtiger dashboard is not the database username and password. Its the details you entered while setting the configuration in the web based installer.

Vtiger Login Page

After we have logged in with the valid username and password, we'll be able to login to our dashboard. Our dashboard at initial looks like below image.

Vtiger Dashboard

Conclusion

Truly, Vtiger CRM 6.3.0 is more than just a CRM, it contains built-in solutions ranging from email marketing to activity and project management. It contains awesome features like calendar and task management, inventory management, email marketing, customizable customer portal, reporting, file and document management and many more. It is highly extensible as it can easily integrate with many softwares we need for our business as its extensions. So, Vtiger CRM is the best solution for ones growing business. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-)

The post How to Deploy Open Source Vtiger CRM in Fedora 22 appeared first on LinOxide.

How to Install Visual Studio Code in Linux

$
0
0

Hi everyone, today we'll learn how to install Visual Studio Code in Linux Distributions. Visual Studio Code is a code-optimized editor based on Electron, a piece of software that is based on Chromium, which is used to deploy io.js applications for the desktop. It is a source code editor and text editor developed by Microsoft for all the operating system platforms including Linux. Visual Studio Code is free but not an open source software ie. its under proprietary software license terms. It is an awesome powerful and fast code editor for our day to day use.  Some of the cool features of visual studio code are navigation, intellisense support, syntax highlighting, bracket matching, auto indentation, and snippets, keyboard support with customizable bindings and support for dozens of languages like Python, C++, jade, PHP, XML, Batch, F#, DockerFile, Coffee Script, Java, HandleBars, R, Objective-C, PowerShell, Luna, Visual Basic, .Net, Asp.Net, C#, JSON, Node.js, Javascript, HTML, CSS, Less, Sass and Markdown. Visual Studio Code integrates with package managers and repositories, and builds and other common tasks to make everyday workflows faster. The most popular feature in Visual Studio Code is its debugging feature which includes a streamlined support for Node.js debugging in the preview.

Note: Please note that, Visual Studio Code is only available for 64-bit versions of Linux Distributions.

Here, are some easy to follow steps on how to install Visual Sudio Code in all Linux Distribution.

1. Downloading Visual Studio Code Package

First of all, we'll gonna download the Visual Studio Code Package for 64-bit Linux Operating System from the Microsoft server using the given url http://go.microsoft.com/fwlink/?LinkID=534108 . Here, we'll use wget to download it and keep it under /tmp/VSCODE directory as shown below.

# mkdir /tmp/vscode; cd /tmp/vscode/
# wget https://az764295.vo.msecnd.net/public/0.3.0/VSCode-linux-x64.zip

--2015-06-24 06:02:54-- https://az764295.vo.msecnd.net/public/0.3.0/VSCode-linux-x64.zip
Resolving az764295.vo.msecnd.net (az764295.vo.msecnd.net)... 93.184.215.200, 2606:2800:11f:179a:1972:2405:35b:459
Connecting to az764295.vo.msecnd.net (az764295.vo.msecnd.net)|93.184.215.200|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 64992671 (62M) [application/octet-stream]
Saving to: ‘VSCode-linux-x64.zip’
100%[================================================>] 64,992,671 14.9MB/s in 4.1s
2015-06-24 06:02:58 (15.0 MB/s) - ‘VSCode-linux-x64.zip’ saved [64992671/64992671]

2. Extracting the Package

Now, after we have successfully downloaded the zipped package of Visual Studio Code, we'll gonna extract it using the unzip command to /opt/directory. To do so, we'll need to run the following command in a terminal or a console.

# unzip /tmp/vscode/VSCode-linux-x64.zip -d /opt/

Note: If we don't have unzip already installed, we'll need to install it via our Package Manager. If you're running Ubuntu, apt-get whereas if you're running Fedora, CentOS, dnf or yum can be used to install it.

3. Running Visual Studio Code

After we have extracted the package, we can directly launch the Visual Studio Code by executing a file named Code.

# sudo chmod +x /opt/VSCode-linux-x64/Code
# sudo /opt/VSCode-linux-x64/Code

If we want to launch Code and want to be available globally via terminal in any place, we'll need to create the link of /opt/vscode/Code as/usr/local/bin/code .

# ln -s /opt/VSCode-linux-x64/Code /usr/local/bin/code

Now, we can launch Visual Studio Code by running the following command in a terminal.

# code .

4. Creating a Desktop Launcher

Next, after we have successfully extracted the Visual Studio Code package, we'll  gonna create a desktop launcher so that it will be easily available in the launchers, menus, desktop, according to the desktop environment so that anyone can launch it from them. So, first we'll gonna copy the icon file to /usr/share/icons/ directory.

# cp /opt/VSCode-linux-x64/resources/app/vso.png /usr/share/icons/

Then, we'll gonna create the desktop launcher having the extension as .desktop. Here, we'll create a file named visualstudiocode.desktop under /tmp/VSCODE/ folder using our favorite text editor.

# vi /tmp/vscode/visualstudiocode.desktop

Then, we'll gonna paste the following lines into that file.

[Desktop Entry]
Name=Visual Studio Code
Comment=Multi-platform code editor for Linux
Exec=/opt/VSCode-linux-x64/Code
Icon=/usr/share/icons/vso.png
Type=Application
StartupNotify=true
Categories=TextEditor;Development;Utility;
MimeType=text/plain;

After we're done creating the desktop file, we'll wanna copy that desktop file to /usr/share/applications/ directory so that it will be available in launchers and menus for use with single click.

# cp /tmp/vscode/visualstudiocode.desktop /usr/share/applications/

Once its done, we can launch it by opening it from the Launcher or Menu.

Visual Studio Code

Installing Visual Studio Code in Ubuntu

We can use Ubuntu Make 0.7 in order to install Visual Studio Code in Ubuntu 14.04/14.10/15.04 distribution of linux. This method is the most easiest way to setup Code in ubuntu as we just need to execute few commands for it. First of all, we'll need to install Ubuntu Make 0.7 in our ubuntu distribution of linux. To install it, we'll need to add PPA for it. This can be done by running the command below.

# add-apt-repository ppa:ubuntu-desktop/ubuntu-make

This ppa proposes package backport of Ubuntu make for supported releases.
More info: https://launchpad.net/~ubuntu-desktop/+archive/ubuntu/ubuntu-make
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmpv0vf24us/secring.gpg' created
gpg: keyring `/tmp/tmpv0vf24us/pubring.gpg' created
gpg: requesting key A1231595 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpv0vf24us/trustdb.gpg: trustdb created
gpg: key A1231595: public key "Launchpad PPA for Ubuntu Desktop" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK

Then, we'll gonna update the local repository index and install ubuntu-make.

# apt-get update
# apt-get install ubuntu-make

After Ubuntu Make is installed in our ubuntu operating system, we'll gonna install Code by running the following command in a terminal.

# umake web visual-studio-code

Umake Web Code

After running the above command, we'll be asked to enter the path where we want to install it. Then, it will ask for permission to install Visual Studio Code in our ubuntu system. Then, we'll press "a". Once we do that, it will download and install it in our ubuntu machine. Finally, we can launch it by opening it from the Launcher or Menu.

Conclusion

We have successfully installed Visual Studio Code in Linux Distribution. Installing Visual Studio Code in every linux distribution is the same as shown in the above steps where we can also use umake to install it in ubuntu distributions. Umake is a popular tool for the development tools, IDEs, Languages. We can easily install Android Studios, Eclipse and many other popular IDEs with umake. Visual Studio Code is based on a project in Github called Electron which is a part of Atom.io Editor. It has a bunch of new cool and improved features that Atom.io Editor doesn't have. Visual Studio Code is currently only available in 64-bit platform of linux operating system. So, If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-)

The post How to Install Visual Studio Code in Linux appeared first on LinOxide.

How to Setup Zephyr Test Management Tool on CentOS 7.x

$
0
0

Test Management encompasses anything and everything that you need to do as testers. Test management tools are used to store information on how testing is to be done, plan testing activities and report the status of quality assurance activities. So in this article we will illustrate you about the setup of Zephyr test management tool that includes everything needed to manage the test process can save testers hassle of installing separate applications that are necessary for the testing process. Once you have done with its setup you will be able to track bugs, defects and allows the project tasks for collaboration with your team as you can easily share and access the data across multiple project teams for communication and collaboration throughout the testing process.

Requirements for Zephyr

We are going to install and run Zephyr under the following set of its minimum resources. Resources can be enhanced as per your infrastructure requirements. We will be installing Zephyr on the CentOS-7 64-bit while its binary distributions are available for almost all Linux operating systems.

Zephyr test management tool
Linux OS CentOS Linux 7 (Core), 64-bit
Packages JDK 7 or above ,  Oracle JDK 6 update No Prior Tomcat, MySQL installed
RAM 4 GB Preferred 8 GB
CPU 2.0 GHZ or Higher
Hard Disk 30 GB , Atleast 5GB must be free

You must have super user (root) access to perform the installation process for Zephyr and make sure that you have properly configured yout network with static IP address and its default set of ports must be available and allowed in the firewall where as the Port 80/443, 8005, 8009, 8010 will used by tomcat and Port 443 or 2099 will used within Zephyr by flex for the RTMP protocol.

Install Java JDK 7

Java JDK 7 is the basic requirement for the installation of Zephyr, if its not already installed in your operating system then do the following to install Java and setup its JAVA_HOME environment variables to be properly configured.

Let’s issue the below commands to install Java JDK 7.

[root@centos-007 ~]# yum install java-1.7.0-openjdk-1.7.0.79-2.5.5.2.el7_1

[root@centos-007 ~]# yum install java-1.7.0-openjdk-devel-1.7.0.85-2.6.1.2.el7_1.x86_64

Once your java is installed including its required dependencies, run the following commands to set its JAVA_HOME environment variables.

[root@centos-007 ~]# export JAVA_HOME=/usr/java/default
[root@centos-007 ~]# export PATH=/usr/java/default/bin:$PATH

Now check the version of java to verify its installation with following command.

[root@centos-007 ~]# java –version

java version "1.7.0_79"
OpenJDK Runtime Environment (rhel-2.5.5.2.el7_1-x86_64 u79-b14)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)

The output shows that we we have successfully installed OpenJDK Java verion 1.7.0_79.

Install MySQL 5.6.X

If you have other MySQLs on the machine then it is recommended to remove them and
install this version on top of them or upgrade their schemas to what is specified. As this specific major/minor (5.6.X) version of MySQL is required with the root username as a prerequisite of Zephyr.

To install MySQL 5.6 on CentOS-7.1 lets do the following steps:

Download the rpm package, which will create a yum repo file for MySQL Server installation.

[root@centos-007 ~]# yum install wget
[root@centos-007 ~]# wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

Now Install this downloaded rpm package by using rpm command.

[root@centos-007 ~]# rpm -ivh mysql-community-release-el7-5.noarch.rpm

After the installation of this package you will get two new yum repo related to MySQL. Then by using yum command, now we will install MySQL Server 5.6 and all dependencies will be installed itself.

[root@centos-007 ~]# yum install mysql-server

Once the installation process completes, run the following commands to start mysqld services and check its status whether its active or not.

[root@centos-007 ~]# service mysqld start
[root@centos-007 ~]# service mysqld status

On fresh installation of MySQL Server. The MySQL root user password is blank.
For good security practice, we should reset the password MySQL root user.

Connect to MySQL using the auto-generated empty password and change the
root password.

[root@centos-007 ~]# mysql
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('your_password');
mysql> flush privileges;
mysql> quit;

Now we need to configure the required database parameters in the default configuration file of MySQL. Let's open its file located in "/etc/" folder and update it as follow.

[root@centos-007 ~]# vi /etc/my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
symbolic-links=0

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
max_allowed_packet=150M
max_connections=600
default-storage-engine=INNODB
character-set-server=utf8
collation-server=utf8_unicode_ci

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
default-storage-engine=INNODB
character-set-server=utf8
collation-server=utf8_unicode_ci

[mysql]
max_allowed_packet = 150M
[mysqldump]
quick

Save the changes made in the configuration file and restart mysql services.

[root@centos-007 ~]# service mysqld restart

Download Zephyr Installation Package

We done with installation of required packages necessary to install Zephyr. Now we need to get the binary distributed package of Zephyr and its license key. Go to official download link of Zephyr that is http://download.yourzephyr.com/linux/download.php give your email ID and click to download.

Zephyr Download

Then and confirm your mentioned Email Address and you will get the Zephyr Download link and its License Key link. So click on the provided links and choose the appropriate version of your Operating system to download the binary installation package and its license file to the server.

We have placed it in the home directory and modify its permissions to make it executable.

Zephyr Binary

Start Zephyr Installation and Configuration

Now we are ready to start the installation of Zephyr by executing its binary installation script as below.

[root@centos-007 ~]# ./zephyr_4_7_9213_linux_setup.sh –c

Once you run the above command, it will check for the Java environment variables to be properly setup and configured. If there's some mis-configuration you might the error like.

testing JVM in /usr ...
Starting Installer ...
Error : Either JDK is not found at expected locations or JDK version is mismatched.
Zephyr requires Oracle Java Development Kit (JDK) version 1.7 or higher.

Once you have properly configured your Java, then it will start installation of Zephyr and asks to press "o" to proceed and "c" to cancel the setup. Let's type "o" and press "Enter" key to start installation.

install zephyr

The next option is to review all the requirements for the Zephyr setup and Press "Enter" to move forward to next option.

zephyr requirements

To accept the license agreement type "1" and Press Enter.

I accept the terms of this license agreement [1], I do not accept the terms of this license agreement [2, Enter]

Here we need to choose the appropriate destination location where we want to install the zephyr and choose the default ports, if you want to choose other than default ports, you are free to mention here.

installation folder

Then customize the mysql database parameters and give the right paths to the configurations file. You might the an error at this point as shown below.

Please update MySQL configuration. Configuration parameter max_connection should be at least 500 (max_connection = 500) and max_allowed_packet should be at least 50MB (max_allowed_packet = 50M).

To overcome this error make sure that you have configure the "max_connection" and "max_allowed_packet" limits properly in the mysql configuration file. So confirm these settings, connect to mysql server and run the commands as shown.

mysql connections

Once you have configured your mysql database properly, it will extract the configuration files to complete the setup.

mysql customization

The installation process completes with successful installation of Zephyr 4.7 on your computer. To Launch Zephyr Desktop type "y" to finish Zephyr installation.

launch zephyr

Launch Zephyr Desktop

Open your web browser to launch Zephyr Desktop with your localhost IP adress and you will be direted to the Zephyr Desktop.

http://your_server_IP/zephyr/desktop/

Zephyr Desktop

From your Zephyr Dashboard click on the "Test Manager" and login with the dault user name and password that is "test.manager".

Test Manage Login

Once you are loged in you will be able to configure your administrative settings as shown. So choose the settings you wish to put according to your environment.

Test Manage Administration

Save the settings after you have done with your administrative settings, similarly do the settings of resources management and project setup and start using Zephyr as a complete set of your testing management tool. You check and edit the status of your administrative settings from the Department Dashboard Management as shown.

zephyr dashboard

Conclusion

Cheers! we have done with the complete setup of Zephyr installation setup on Centos 7.1. We hope you are now much aware of Zephyr Test management tool which offer the prospect of streamlining the testing process and allow quick access to data analysis, collaborative tools and easy communication across multiple project teams. Feel free to comment us if you find any difficulty while you are doing it in your environment.

The post How to Setup Zephyr Test Management Tool on CentOS 7.x appeared first on LinOxide.

How to Configure Cacti on Fedora 22 / CentOS 7.0

$
0
0

Cacti is a free and open source web based front-end network graphing solution application designed for the industry-standard data logging tool RRDtool. It provides its users a fast poller, advanced graph templating, multiple data acquisition methods, and user management features with its beautiful web based interface. It is generally used to graph time-series data of metrics such as CPU load and network bandwidth utilization. It can handle multiple users, with their own graph sets to display bandwidth statistics of the users. Some of the awesome features of Cacti are as follows.

  • It consists of unlimited graph items with auto-padding support.
  • Graph data manipulation and flexible data sources.
  • Data gathering on a non-standard timespan with custom scripts
  • It consists built-in SNMP support.
  • It contains graph, data source, host templates
  • Tree, list, and preview views of graph data
  • It provisions user-based management and security.

Here are some simple easy steps on how we can install and setup Cacti in our machine running Fedora 22 or CentOS 7 as operating system.

1. Installing LAMP Stack

First of all, we'll need to install LAMP stack in our linux machine. LAMP stack is the combination of Apache web server, MariaDB/MySQL database server and PHP modules which is essential for Cacti in order to provide the web interface for it. To install the complete set of LAMP stack, we'll need to run the following command under root/sudo access according our operating system installed in our machine.

On Fedora 22

# dnf install httpd mariadb mariadb-server php php-mysql php-gd php-pear php-common php-cli php-devel php php-mbstring nano

On CentOS 7

# yum install httpd mariadb mariadb-server php php-mysql php-gd php-pear php-common php-cli php-devel php php-mbstring nano

2. Installing EPEL Repo

To install Cacti, we'll need to install and enable EPEL repository as cacti is not available on the default repository of Fedora 22 or CentOS 7. To install EPEL repo, we need to run the following command.

On Fedora 22

# dnf install http://ftp.cuhk.edu.hk/pub/linux/fedora-epel/7/x86_64/e/epel-release-7-5.noarch.rpm

On CentOS 7

# yum install epel-release

2. Installing SNMP and Cacti

Now, we'll gonna install snmp and cacti in our linux machine. As snmp and cacti is available on the official repository of both centos and fedora repository, we'll gonna install it using its default package manager.

On Fedora 22

# dnf install php-snmp net-snmp net-snmp-utils cacti

On CentOS 7

# yum install php-snmp net-snmp net-snmp-utils cacti

3. Starting and Enabling Apache, MariaDB and SNMP

To start apache web server, snmp and mariadb in our centos and fedora machine, we'll need to run the following systemd command in our linux terminal or console.

# systemctl start httpd mariadb snmpd

Next, we'll also need to enable them to start along with the system boot so that it will automatically get into work in every reboot.

# systemctl enable httpd mariadb snmpd

Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/snmpd.service to /usr/lib/systemd/system/snmpd.service.

4. Configuring MariaDB

As we have just installed our mariadb database server in our linux machine, we'll now need to assign a new password for our mariadb root user. Then, we'll create a new database for our Cacti to store its data. To configure mariadb, we'll need to run the following command in a terminal or a console.

# mysql_secure_installation

This will ask us to enter the password for root but as we haven’t set any password before and its our first time we’ve installed mariadb, we’ll simply press enter and go further. Then, we’ll be asked to set root password, here we’ll hit Y and enter our password for root of MariaDB. Then, we’ll simply hit enter to set the default values for the further configurations.

….
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
… Success!

installation should now be secure.

Thanks for using MariaDB!

Next, we’ll login to the MariaDB command prompt as root.

# mysql -u root -p

Here, we’ll need to enter the password of the MariaDB root account that we had set above.

After we’re logged in into the mariadb command prompt, we’ll gonna create the database for Cacti.

> CREATE DATABASE cacti;
> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'password';
> FLUSH PRIVILEGES;
> EXIT;

Note: It is highly recommended to change the above variables cacti, cactiuser and password according to your requirement or desire for security issue.

5. Configuring Cacti

Now, we'll gonna configure our installation of cacti which includes database configuration. Before we configure cacti, we'll need to first import the dumped cacti database table to the database in MariaDB server that we just created above. To do so, we'll need to run the following command.

# mysql -u cactiuser -p cacti < /usr/share/doc/cacti-*/cacti.sql

Here, we'll be asked to enter the password for our database user cactiuser. We'll need to enter the password that we had set in the above step. Here, we have database user as cactiuser and password as password .

After we have successfully imported the database table to our mariadb database cacti, we'll now configure our cacti configuration file. To do so, we'll need to edit /usr/share/cacti/include/config.php file using our favorite text editor.

# nano /usr/share/cacti/include/config.php

Then, we'll need to make change to the file as show below using the variables we had set above during the configuration of database in our mariadb server.

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "password";
$database_port = "3306";
$database_ssl = false;

After we've configured our cacti configuration file, we'll then save and exit it.

6. Adding Cacti to Cronjob

We'll now add a cronjob for cacti so that our cacti will work as scheduled in our cronjob configuration. To do so, we'll need to create a file named cacti under /etc/cron.d/ using our favorite text editor.

# nano /etc/cron.d/cacti

Then, we'll gonna uncomment the following lines by removing "#" from the line.

*/5 * * * * cacti php /usr/share/cacti/poller.php > /dev/null 2>&1

After that, we'll save and exit the file.

7. Fixing Ownership and Firewall

Next, we'll need to change the ownership of two directories rra and log which lies under /var/www/html/cacti/ to cacti so that it will have full read and write access over its files and directories.

# chown -R cacti /usr/share/cacti/rra/ /usr/share/cacti/log/

As fedora 22 and centos 7 both has preinstalled firewalld as the default firewall solution, we'll need to make firewalld allow http port so that cacti will be accessible via web browser. To do so, we'll need to run the following command.

# firewall-cmd --permanent --zone=public --add-service=http
# firewall-cmd --reload

8. Configuring Apache Config

We'll now need to allow access to Cacti from over the internet. To do so, we'll need to edit /etc/httpd/conf.d/cacti.conf using a text editor.

# nano /etc/httpd/conf.d/cacti.conf

Then, we'll need to append the file as shown below.

Alias /cacti /usr/share/cacti

<Directory /usr/share/cacti/>
<IfModule mod_authz_core.c>
# httpd 2.4
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
# httpd 2.2
Order deny,allow
Deny from all
Allow from all
</IfModule>
</Directory>

After saving and exiting the file, we'll gonna restart our apache web server by running the following command.

# systemctl restart httpd

9. Web Installation

Finally, after we have successfully setup cacti and lamp stack, we'll now navigate to the web interface of cacti. We'll need to point our web browser to http://ip-address/cacti or http://domain.com/cacti according to our configuration. Then, we'll see our first screen as Installation Guide with the portion of GNU General Public License.

Cacti License Page

To continue, we'll need to click on Next button which makes us that we accept the license agreement of the Cacti software. Then another page will be loaded which will ask us to select the type of installation we are going to setup. As we're gonna setup a new installation of Cacti, we'll simply select as New Install and verify the determined information then click on Next to continue.

Installation Type

After that, we'll be shown if all the required binary dependencies are available on the system or not. As we have already installed them in the above steps, we'll see that the dependencies were found in the system as shown below. After that, we'll simply click on Finish to continue further.

Cacti Dependencies Check

Then, we'll need to enter the default username and password of Cacti in order to login to the dashboard. The default username and password of Cacti is admin and admin respectively.

Cacti Login Screen

After entering the default username and password, we'll click on Login. Then, we'll need to change our password after logging in. A page to change the login password will appear in which we'll need to enter a new password which will be used for logging into the Cacti's dashboard.

Cacti Password Change

After entering our new login password, we'll click on Save in order to apply it. Then, we'll be welcomed to our Cacti Dashboard as shown below.

Cacti Dashboard

To create a new graph, we'll need to click on New Graphs which lies on the sidebar for our new devices. To see our graphs, we'll need to click on Graphs. We can change, import and export templates, manage users and system utilities from the very Cacti Dashboard.

Conclusion

Cacti is an awesome RRDTool based graphing solution having an easy to use web based interface. It is widely used from a small LAN installations to a complex networks with hundreds of devices. It is commonly used to monitor network traffic by polling a network switch or router interface through Simple Network Management Protocol. It is extensible because it can be extended to monitor any source using scripts. Cacti is very easy to setup and configure as we did in above tutorial. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents.

The post How to Configure Cacti on Fedora 22 / CentOS 7.0 appeared first on LinOxide.

How to Setup eCommerce Site with AbanteCart in CentOS 7.0

$
0
0

Today, we'll learn how we can start our very own eCommerce Site with AbanteCart in our machine running CentOS 7. AbanteCart is a free and open source PHP based eCommerce powerful platform designed and built for dynamic and fast growing online businesses. It is suitable from small to large online shopping website. It is utilizes very low hardware resource consuming shopping cart application which makes it blazing fast. It has pretty awesome responsive layout which makes it easily fit in any devices with beautiful design. Some of the awesome features of AbanteCart are as follows.

  • It has beautiful HTML5 based responsive templates supporting mobile devices and tablets.
  • AbanteCart has many payment services available by default like Paypal, Payza, AIM, Bank Transfer, Skril, SagePay, WordPay and many more.
  • It generates SEO optimized with SEO URLs, Mobile-friendly storefront for Google, Site Maps, Meta-information for products, pages, etc.
  • The security features provided by AbanteCart is awesome as it has passwords encryption in database and customer's data encryption in backups, customizable admin url and moreover it features SSL compatibility in both storefront and admin.
  • It has stock management feature for the products and also has shipping features through various shipping companies.
  • It contains discount coupon system, customers account management, order history, password reminder and many more.

Here are some fast and easy steps on how we can install AbanteCart on our machine or VPS running CentOS 7 as linux distribution. This tutorial includes installation of AbanteCart using its source code though there is the availability of graphical installer, Bitnami for AbanteCart for its quick and easy installation.

1. Installing LAMP stack

First of all, we'll need to install LAMP stack in our CentOS 7 machine. LAMP stack is the combination of Apache Web Server, MySQL or MariaDB Database System and PHP. We can directly install them using yum package manager by running the following command directly in a terminal or a shell.

$ sudo yum install httpd mariadb-server mariadb php php-mysql php-fpm php-gd php-mbstring unzip wget

Now, we'll gonna start our Apache web server and MariaDB by running the following command.

$ sudo systemctl start httpd
$ sudo systemctl start mariadb

Next, we'll enable apache web server and mariadb to start on every boot of the system.

$ sudo systemctl enable httpd
$ sudo systemctl enable mariadb

2. Downloading AbanteCart

Now, we'll gonna download the source code of the latest release of AbanteCart using wget command in a terminal.

$ cd /tmp/
$ wget https://github.com/abantecart/abantecart-src/archive/master.zip

After downloading AbanteCart zip package directly from the official Github repository, we'll now extract the zip package using unzip.

$ unzip master.zip

Next, we'll gonna copy the entire extracted files from abantecart-src-master/public_html to /var/ww/html/ directory as it is the default root directory of Apache Web Server. To do so, we'll run the following cp command under root or sudo access.

$ sudo cp -r abantecart-src-master/public_html/* /var/www/html/

3. Configuring MariaDB Database

We'll now need to setup our mariadb server as we're running for the first time. To do so, we'll need to run the following command in a terminal or a shell.

$ sudo mysql_secure_installation

...
Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
Success!
...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Note: Above, we are asked to enter the root password of the mariadb server but as we are setting for the first time and no password has been set yet, we'll simply hit enter while asking the current mariadb root password. Then, we'll need to enter twice the new password we wanna set. Then, we can simply hit enter in every argument inorder to set default configurations.

4. Creating a new Database for AbanteCart

We'll now create a database for AbanteCart to store data and information. As we have installed MariaDB server as the database system, we'll gonna login to the MariaDB command environment by running the following command.

$ sudo mysql -u root -p

Here, we're required to enter the password we just created in the above step.

After we have successfully logged into the mariadb environment, we'll now create our database for AbanteCart as "abante_db". Then we'll create a user and assign password as "abante_user" and "abante_password" respectively. To do so, we'll need to run the following command inside the mariadb command environment.

> CREATE DATABASE abante_db;
> CREATE USER 'abante_user'@'localhost' IDENTIFIED BY 'abante_password';
> GRANT ALL PRIVILEGES on abante_db.* TO 'abante_user'@'localhost' ;
> FLUSH PRIVILEGES;
> EXIT;

This will configure the database and exit the MariaDB command environment.

Note: It is strictly recommended to replace the above variables according to your desire for security reason.

5. Ownership and Permission

Next, we'll gonna configure some ownership and permission stuffs to the AbanteCart files and folders. To change the ownership of the files and directories to apache to provide writeable access to apache process owner, we'll gonna run the following command in a terminal or console under sudo or root access.

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

Now we'll need to change the permission of some files and directories of AbanteCart installation directory ie /var/www/html/ . To do so, we'll gonna run the following command.

$ cd /var/www/html/
$ sudo chmod -R 777 image/ system/ download/ extensions/ resources/ admin/system/backup/
$ sudo chmod 777 system/config.php

Then, after done, we'll gonna simply restart our Apache web server by running the following command.

$ sudo sytemctl restart httpd

6. Allowing Firewall

If we are running a firewall program, we'll need to configure our firewall to allow port 80 so that the Apache web server's default port will be accessible externally. This will allow us to navigate our web browser to AbanteCart's web interface with the default http port 80. To do so, we'll need to run the following command.

$ sudo firewall-cmd --zone=public --add-port=80/tcp --permanent

After done, we'll need to reload our firewall service.

$ sudo firewall-cmd --reload

7. Web Interface

Finally, after allowing our firewall and completing all the above steps, we'll be able to navigate to AbanteCart web interface using our favorite web browser. To do so, we'll need to goto http://domain-name.com/ or http://ip-address/ using our web browser.

Then, we'll be directed to AbanteCart Installation page in which we will be asked to accept the license agreement. We'll simply scroll down and accept the agreement by checking the box and we'll click Continue button.

Abantecart License Agreement

Next, we'll be shown that every required dependencies are fulfilled as we have already configured them all in the above steps. The fulfilled dependencies are denoted by green colored tick. As we can see all the dependencies as green ticked, we'll click Continue to move further.

Now, the main configuration page will appear. Here, we'll need to enter the Database configuration that we had created in step 4. Here, we need to enter those information as shown below. We'll also need to create a unique secret key, admin username and password then we'll also need to enter our email address so that we can use these details to login to our Admin Page later. After we finish entering the details, we'll now click on Continue button.

Abantecart Configuration

Hurray, now we'll get an "Installation Completed" page in which we will be asked to go to our Online Shop or our Admin Panel. We can simply click on the link we want to open.

Abantecart Setup Completed

We can navigate to the store by pointing our web browser to http://ip-address/ or http://domain.com/ .

Abantecart Store Page

And admin panel by pointing to http://ip-address/index.php?s=security-key or http://domain.com/index.php?s=security-key . The security-key is the key we had just create above while configuring our AbanteCart installation. Here, in this tutorial, the security-key is admin_linoxide so the required url will be http://ip-address/index.php?s=admin_linoxide .

Abantecart Admin Section

8. Post Installation

Next, after we have successfully installed, we'll need to secure the installation files for the security issue. So, we'll gonna delete the installation directory.

$ sudo rm -rf /var/www/html/install/

Conclusion

AbanteCart is an awesome product of free and open source eCommerce platform for shopping platform. It is highly extensible with its Marketplace which unlocks vast variety of additional features and gives more power to our growing eCommerce website. AbanteCart's store is highly optimized for the search engines to rank the products and information of the website. It has multilingual easy to use interface to edit text and to manage multiple tax rates and zones. It is very easy to install, learn and manage our eCommerce site with AbanteCart. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you ! Enjoy :-)

The post How to Setup eCommerce Site with AbanteCart in CentOS 7.0 appeared first on LinOxide.

How to Setup Odoo OpenERP on Ubuntu 15.04

$
0
0

Odoo is an OpenSource ERP. The former name is "Open ERP". Odoo / OpenERP is a comprehensive suite of open-source enterprise management and business applications including Sales, CRM, Project management, Warehouse management, Manufacturing, Financial management, and Human Resources etc. The short and snappy “Odoo” has the advantage of being easy to combine with the specific product names in each sector, to create solutions like Odoo CMS, Odoo Commerce and so on. It is available in the cloud or on-site and is most suited for small to mid-sized companies.

We are going install Odoo 8 (formerly OpenERP) on a Ubuntu 15.04 in this tutorial. This will shows how to install the latest Odoo version 8 from scratch using the Package Installer as Odoo provides packaged installers for Windows, deb-based distributions and RPM-based packages that automatically set up all dependencies.

Setup Ubuntu 15.04 Server with Prerequisites

First of all we will prepare the ubuntu server with its latest updates and required packages necessary to setup Odoo 8 (OpenERP). Let’s login to your server, open its command line terminal and run the below command to update your system with latest packages and security updates.

root@ubuntu-15:~# apt-get update

Before proceeding to the installation of Odoo, ensure that you are using a freshly installed Ubuntu machine. Odoo requires Python 2.7+ and PostgreSQL 9. In Ubuntu 15.04 server, Python 2.7+ is installed by default so we have to install PostgreSQL with Apache Web server and other Python supporting packages for Odoo.

1) Installing Python Liberaries

Odoo installation depends upon number of Puthon Liberaries, so run the following command to install its required Python libraries.

root@ubuntu-15:~# apt-get install -y python-decorator python-docutils python-feedparser python-imaging python-ldap python-libxslt1 python-mako python-mock python-openid python-passlib python-psutil python-pybabel

You might get the below indication while installing the Python liberaries to correct some unmet dependencies.

You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
python-docutils : Depends: python-roman but it is not going to be installed
Depends: docutils-common (= 0.12+dfsg-1) but it is not going to be installed
Recommends: python-pil but it is not going to be installed
Recommends: python-pygments but it is not going to be installed
Recommends: docutils-doc (= 0.12+dfsg-1) but it is not going to be installed
python-imaging : Depends: python-pil but it is not going to be installed
python-libxslt1 : Depends: python-libxml2 but it is not going to be installed
python-mako : Depends: python-markupsafe but it is not going to be installed
python-pybabel : Depends: python-babel but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

As mentioned above let's run the command below to fix the unmet dependencies and to install the list of dependent packages.

root@ubuntu-15:~# apt-get -f install

python libraries

2) Installing PostgreSQL

To install PostgreSQL we will use Tasksel utility as it’s easier and straight-forward. Type the following command and select PostgreSQL server for installation:

Run the below command to install tasksel utility if its not already installed.

root@ubuntu-15:~# apt-get install tasksel

tasksel utility

Then run the tasksel and choose the packages that you want to install including the PostgreSQL database as shown below.

root@ubuntu-15:~# tasksel

Tasksel PostgreSQL

3) Installing Webserver

Odoo OpenERP is a web based application so you must have any web server installed and running on your server. If its not already installed on your system let's run the below command to install Apache Web server and start its services.

root@ubuntu-15:~# apt-get install apache2
root@ubuntu-15:~# service apache2 status

apache2 service

You can test the successful installation of your web server by opening the below link with your servers IP address, and make sure that the the default port of Apache Webserver is allowed in the firewall.

http://your_localhost_IP/

apache page

Installing Odoo (OpenERP)

Now we will proceed to Odoo installation. We have to download Odoo installation file first using the following command to download version 8 of Odoo for Linux or visit www.odoo.com/page/download and enter your details to download the package in your localhos by choosing the required version for your OS.

root@ubuntu-15:~# wget http://nightly.odoo.com/8.0/nightly/deb/odoo_8.0.latest_all.deb

Odoo Package

Run the dpkg command to install the dowloaded debian package of Odoo.

root@ubuntu-15:~# dpkg -i odoo_8.0.latest_all.deb

Odoo Install

Configuring the Odoo OpenERP application

The default configuration file for the server is located at (/etc/odoo/openerp-server.conf) , Open this with your installed editor and configure your database password.

root@ubuntu-15:~# vim /etc/odoo/openerp-server.conf

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = odoo
db_password = odoo123
addons_path = /usr/lib/python2.7/dist-packages/openerp/addons

:wq!

After making configuration changes restart Odoo service services and then check its status to be sure that its working active and working fine.

root@ubuntu-15:~# service odoo restart
root@ubuntu-15:~# service odoo status

odoo status

Odoo Database Management

Now open your Web browser and go to http://your_server_ip:8069, fill the input fields and click on the “Create Database” button as shown below.

Odoo DB

After the database is created, you will be redirected to the admin panel where you can change your password, manage applications, users and other settings.

Installing Local Module (Project Management) on Odoo

Now you can install the modules you wish to install on your Odoo Server, as for an example we are going to show you the installation process of one of the available Odoo Module that is "Project Management". Choose the Module and choose in the below picture and clisk on the Install button.

Odoo Modules

Click on the "Create" button to start the new project where you can organize your activities and plan your tasks etc.

New project

Then in the next window you have to provide the required details about your new project, where you will choose the New project name, your customer and the project manager with your team. Once you you have configured the details about your new project, click on the "Save" button.

Odoo new project

Conclusion

Hope you find this tutorial helpful, Now you can install any other modules there are more than 200 free modules available that you can choose and install with its free business model, OpenERP combines the advantages of a complete ERP system with the flexibility of an in-house solution.

The post How to Setup Odoo OpenERP on Ubuntu 15.04 appeared first on LinOxide.


How to Install and Configure PhpBB Forum on CentOS 7

$
0
0

Today we are going to setup one of the most famous and open source forum software that is PHPBB Forum abbreviated as PHP Bulletin Board. Its written in the PHP scripting language and is available under the GNU General Public License. PhpBB offers a great list of features with more efficiency than any other bulletin board. Its administration panel allows customization of even the most complex features and integration into an existing site with an ease and without editing the code.

PhpBB forum can be installed through different ways and can be integrated with your domain. But in this tutorial we will walk through the steps to install it on our VPS with CentOS 7 installed on it.

Prepare Your Linux CentOS Server

For the smooth and successful installation of PhpBB Forum on CentOS 7, you must take care of following steps as described
1) System Update
Your system should be up-to-date with latest updates and security patches, so if you are connected to the internet then you can run the below command for Red Hat Linux to start update your system.

#yum update

2) Root Privileges
In order to perform system level tasks, you must have root or super user privileges otherwise you will not be able to perform system level changes on your server.

Install Required Packages for PhpBB Forum

You will not be able to setup PhpBB Forum on your CentOS 7 VPS unless you have installed all of its required packages. So, if your CentOS 7 VPS is with minimal installation packages then follow the below steps to complete the prerequisites that mostly consists of a LAMP server.
1) LAMP Setup
In order to setup the LAMP stack let’s start from Apache web server installation and run the below command to install it.

# yum install httpd

Once you have successfully installed it, start its services then enable it to start at every reboot and then check the status of its services, to be sure that its up and running. So, all these tasks can be done by running below commands.

# systemctl start httpd
# systemctl enable httpd
# systemctl status httpd

Now install the database server whatever you wish to use for PhpBB forum. Here we will be using MariaDB-MySQL database, so run the below command to install its package.

# yum install mariadb mariadb-server

After that starts its services and enables it to auto start at every reboot and then check the status of its services that should be active and running.

# systemctl start mariadb
# systemctl enable mariadb
# systemctl status mariadb

Move to the next package of LAMP stack that is PHP, so we need to install PHP and some of its required and optional modules necessary for the PhpBB forum.

# yum install php php-gd php-mysql

2) Create Database

Let’s setup the root password to the pre installed MariaDB by invoking the below command on the SSH terminal.

# mysqladmin -u root password any_passwd

Now connect to your MariaDB server with root user credentials with below command.

# mysql –u root –p

Once you are connected to the MariaDB server create a new database that will used specifically for PhpBB Forum then create a new user and grant that user to newly created database by running the below commands.

MariaDB [(none)]> create database phpbb;
MariaDB [(none)]> create user 'bbuser'@'localhost' identified by 'mariabb123';
MariaDB [(none)]> grant all privileges on phpbb.* to 'bbuser'@'localhost';

MariaDB [(none)]> flush privileges;

MariaDB [(none)]> exit
Bye

3) Add Firewall Rule

If you have firewall enabled, then make sure to allow access to the apache web service on port 80. You can add new firewall rule in centos 7 with below command.

# firewall-cmd --zone=public --add-port=80/tcp –permanent
# firewall-cmd --reload

Download Installation Package of PhpBB

Open the official web link https://www.phpbb.com/downloads/ and download the latest phpBB package to install on your VPS. You can directly download this zipped package using the wget command provided with download link.

# wget https://www.phpbb.com/files/release/phpBB-3.1.5.zip

phpBB download

Use the unzip command and extract the downloaded package into the document root directory of your apache web server that is “/var/www/html/”.

# unzip phpBB-3.1.5.zip -d /var/www/html/

Change the ownership of phpBB3 folder to apache user and give appropriate writable permissions to following directories as shows by running the below commands.

# chown –R /var/www/html/phpBB3
# cd /etc/var/www/phpBB3
# chmod 660 images/avatars/upload/ config.php
# chmod 770 store/ cache/ files/

Start Web Installation of phpBB

Its time to setup web installation process of phpBB, So open your web browser, give the name of your FQDN and your server IP with addition to the directory where you placed its installation files and directories.

http://19.24.45.25/phpBB3

You will be directed towards the installation steps where you will be introduced about the phpBB software as shown.

1) Introduction

phpBB setup

Then move to the next “Install” tab where you greeted with welcome note and the installation instruction as shown below, so read them carefully and click to “Proceed NEXT”.

2) Installation

phpBB Installation

3) Installation Compatibility

In this step phpBB installation will carry out some tests on your server configuration and files to ensure that you are able to install and run phpBB by checking PHP version and settings and supported databases as shown below.

phpBB Compatibility

Furthermore the installation compatibility will check for optional modules and the permissions of files and directories, so everything should be fine to proceed forward to the Next step. Once all of your configurations become compatible click to “Start install” button as shown below.

Test Compatibility

4) Database Configurations

Choose the database type as MySQL and provide the details of your database name and user that you had configured previously and click to “Proceed Next”.

Database Conf

If your provided credentials are fine you will greeted with successful connection to database, and you can proceed to next step.

DB Connection

5) Admin Details

Provide your Administrator username, password and contact email as shown below.

Admin Setting

Once you are greeted with successful configurations of administrator settings click the Next button to precede with configurations file.

Conf File

6) Advance Settings

The settings on this page are only necessary to set if you know that you require something different from the default. If you are unsure, just proceed to the next page, as these settings can be altered from the Administration Control Panel later.

Then in the next step you proceed with the database tables used by phpBB 3.1 that will be created and populated with some initial data. After that you have Proceed to the next screen and finish installing phpBB.

7) Finish Installation

Cheers! We are ready to go with phpBB by Clicking the button below that will take us to a form for submitting statistical data to phpBB in your Administration Control Panel (ACP). Please delete, move or rename the install directory before using your board. While this directory exists, only the Administration Control Panel (ACP) will be accessible.

Finish Installation

Welcome to phpBB Admin Panel

This screen will give you a quick overview of all the various statistics of your board. The links on the left hand side of this screen allow you to control every aspect of your board experience. Each page will have instructions on how to use the tools.

phpBB Panel

Conclusion

We hope you have enjoyed following this tutorial and have learnt allot about the setup of Open Source phpBB Forum, where you can communicate with your forum members, discuss issues and resolve problems quickly and efficiently in a secured way with fully featured phpBB forum.

The post How to Install and Configure PhpBB Forum on CentOS 7 appeared first on LinOxide.

How to Develop and Control of Arduino Systems on Linux

$
0
0

Today we are going to learn how to install Arduino IDE on Linux, some of basic features to help you get started, build and upload you programs to the Arduino board, create a basic unix-like command interface based on Arduino's Serial library, use system utilities to control it and how to create a simple web-based interface using Apache and Perl CGI.

Table of Contents

  • Intro
    • What is Arduino?
    • What can it do?
    • Requirements
  • Install Arduino
  • Running Arduino IDE
    • Connect the board
    • Select port
    • Load Example
    • Upload to Arduino
      • Troubleshooting AVRDUDE
  • Talking to the Board
    • Linux Shell
    • Minicom
    • Perl

Introduction

What is Arduino?

Arduino is an open source electronics prototyping platform, it provides application programming libraries, development environment  and hardware modules, which are based on Atmel's 8 and 32-bit AVR microcontrollers. It has a simple programming language based on C, full of libraries, examples and a large community, which make it fairly easy to get started and make cool things.

What can I do with it?

  • Engineers uses it to make prototypes much faster and cheaper to their projects
  • Sysadmins can monitor systems health, automate tasks on the data center, such as physical backups.
  • Hackers can create awesome gadgets such as, augmented reality goggles, 3D printers and all others kinds amazing stuff
  • Musicians creates entire new instruments, that can literary tune and play itself when needed.
  • Kids have fun while learning computer programming and electronics engineering to make their own toys.

The limits of what you can do with Arduino is up to you, from systems  to help people with special needs to clouds of shooting drones, so remember that great powers comes with great responsibility.

Requirements

  • Arduino board - This tutorial uses UNO board, but should be OK for others too
  • cdc-acm.ko or ftdi_sio.ko - Linux kernel with CDC ACM or FTDI module to interface with the USB port
  • Arduino IDE - The Arduino development environment
    • Contained - The following requirements are now distributed within the IDE package
      • JRE - Java Runtime Environment
      • AVRDUDE -AVRDownloaderUploaDEr
  • System dependent - shared libraries are needed and missing  or in different version on some systems, install will be covered
  • libtinfo.so.5 - Terminfo shared library
  • libreadline.so.6 - readline shared library
  • Optional - For the web interface
    • ApacheHTTPD - Web server
      • Perl - Server-side language
        • Device::SerialPort and CGI modules

Install Arduino

We are going to use the new packaged version of Arduino, which comes with java runtime environment and avr tools, and thus make things much easier and in older versions.

Download the package with wget

wget http://downloads.arduino.cc/arduino-1.6.5-linux64.tar.xz

Extract the contents from the xz tarball:

tar Jxvf arduino-1.6.5-linux64.tar.xz

Move the extracted package to /opt and link its arduino shell script on /usr/local/bin:

mv arduino-1.6.5 /opt/ && cd /opt/ && ln -s arduino-1.6.5 arduino && ln -s /opt/arduino/arduino /usr/local/bin/arduino

Now you should be able to start the IDE by simply calling arduino:

arduino

Arduino splash screen

Arduino splash screen

Running Arduino

Now that we have Arduino ready on our system, let's focus out attention on how to upload our programs to it.

Connect your board

Once you connect the board on the Linux system, it should be registered by the kernel as /dev/ttyACMx, where x is numeral and may change. To be sure on how your board was recognized, connect your board and run the following command:

dmesg | tail -n 7

Detect arduino lsmod and dmesg

lsmod tells that cdc-acm module were loaded and dmesg shows where

Select port

By default, the IDE will detect your board, however, it may fail when you disconnect and reconnect your board or you have a deadlock on computer side for instance,so you may need to click on Tools->Port, from the menu, as in the image below:

Select serial port

Select serial port

Load example

Let's say hello to Arduino, for this select the example sketch from the menu File->Examples->Basics->Blink, as follows:

Load blink example sketch

Load blink example sketch

Upload you program

Once you have a program ready on the IDE, click on the Arrow on the top-left area of the IDE or press [Ctrl+u] to sent it to the board. You will see the status of the upload on the output console on the bottom of the IDE.

Upload succeeded

Upload succeeded

Alright, your board should be blinking now, if so you can go to the Talking to Arduino section, otherwise, continue on the next section.

Troubleshooting Avrdude

On some distros (at least on  Slackware 14.1), the packaged avrdude throws error messages regarding missing libtinfo.so.5 and libreadline.so.6.  The following lines describes how to build and install these shared libraries from source

libtinfo.so.5

libtinfo-terminfo.9 error during upload

libtinfo-terminfo.9 error during upload

Download

wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz &&  tar zxvf ncurses-5.9.tar.gz

Enter on sources directory

cd ncurses-5.9

Configure the ncurses build with Terminfo and shared library options enabled

./configure --with-termlib --with-shared

Then, make and install ncurses

make && make install

libreadline.so.6

Error libreadline.so

Error libreadline.so

Download

wget ftp://ftp.cwru.edu/pub/bash/readline-6.3.tar.gz && tar xzvf readline*

Enter sources directory

cd readline*

No special flag needed

./configure

Then make and install

make && make install

Update your shared libraries database:

ldconfig

Now try to upload your code again and look at your board to see if it is blinking now, if not, the following command may help you to find out what is going wrong:

From within the Arduino directory try:

ldd hardware/tools/avr/bin/avrdude_bin

On the following example with libreadline, you see two outputs, highlighted in the red when  some library can't be found and on green is the output when things are good.

ldd showing missing or found readline library.

ldd showing missing or found readline library.

Talking to the Arduino board

You can communicate with the program on your board in many ways, I am going to show you how to use the serial port to do this.

Arduino serial terminal

The following program is based on the SerialEvent example that comes with Arduino, it will process the data coming from the serial port, perform actions based on it, such as blink, read sensor, report uptime or reboot.

my_serial_interface.ino

String inputString = "";

String lastcmd = "";

boolean stringComplete = false;

int sensor = A0;

int ledstate = LOW;

//use some wiring from this pin to reset pin to disable auto-reset

int resetPin = 8;

//Check if inputString match the given cmd string

bool cmd(String cmd){

if (inputString.startsWith(cmd)){ return true;}
else { return false; }

}

//Simply blink the led for some time

void blink(int led, int mil){

digitalWrite(led,HIGH);  delay(mil);
digitalWrite(led,LOW);  delay(mil);

}

//This function will restart your board

void(* reboot) (void) = 0;

void setup() {

//Set the serial port speed

Serial.begin(9600);
inputString.reserve(255);
pinMode(13,OUTPUT);

//with some wiring from the resetPin (pin 8) to the reset pin, this will disable auto-restart

digitalWrite(resetPin,HIGH);

//blink 3 times to show that system is starting

blink(13,200);
blink(13,200);
blink(13,200);

//print a cool penguin and initial prompt

Serial.println("  .^.");
Serial.println("  /\V\\");
Serial.println(" / - \\");
Serial.println("/(   )\\");
Serial.println(" ^`~'^");
Serial.print("Arduino:");

}

//Perform actions based on the input

void check_input(String input){

//if the input is an exclamation, repeat last command

if(cmd("!")){ inputString = lastcmd;}

//Turn led on

if (cmd("led_on")){

ledstate = HIGH;
Serial.println("LED was turned on");

//Turn led off

} else if (cmd("led_off")) {

ledstate = LOW;
Serial.println("LED was turned off");

//Read sensor pin

} else if (cmd("read_sensor")) {

Serial.println("Sensor value was:"+String(analogRead(sensor)));

//Call blink function

} else if (cmd("blink")) {

blink(13,200);

blink(13,200);

blink(13,200);

//Call reboot

} else if (cmd("reboot")) {

Serial.println("Rebooting...");
delay(200);
reboot();

//Show time since last boot in milliseconds

} else if (cmd("uptime")) {

unsigned long time = millis();
Serial.println("Uptime: "+String(time));

//Input string does not have any registered command

}else {

Serial.println(" command not found->"+inputString);

}

//Add the command to "history"
lastcmd = inputString;

//prepare for next command
inputString = "";
stringComplete = false;
Serial.print("Arduino:");

}

//The main loop function

void loop() {

serialEvent();
if (stringComplete) {

//Call our input handler function

check_input(inputString);

}
digitalWrite(13,ledstate);

}

//This function works when we have data comming from the serial port

void serialEvent() {

while (Serial.available()) {

char inChar = (char)Serial.read();
// [ Backspace ]

if ( inChar == '\b') {

inputString.remove(inputString.length() - 1, inputString.length());
Serial.print(' ');
Serial.print('\b');

}
// [ Enter ]
else if ( int(inChar) == 13 ) {

inChar = '\n';

} else {

//add current character to input command

inputString += inChar;

//Serial.print(int(inChar)); //debug control characters

}

if (inChar == '\n') {

stringComplete = true;

}

}

}

Serial Monitor

The most simple way to talk to your board is the Serial Monitor available from the IDE, for that, click on Tools->Serial Monitor or press [Ctrl+Shift+m]

Controlling Arduino with Serial Monitor

Controlling Arduino with Serial Monitor

This approach is particularly useful for debugging, use it when creating your program.

Linux Shell

You can also interact to it using bash, to do this, open 2 terminal sessions, one for read and other write, run following commands.

Session 1:

tail -f /dev/ttyACM0

Session 2:

echo "my message" >> /dev/ttyACM0

Here is an example:

Interacting with Arduino using tail and echo

Interacting with Arduino using tail and echo

Minicom

Minicom is an terminal emulator that comes with many Linux distros, to use it with Arduino try:

minicom -D /dev/ttyACM0

Then type the following key sequence to configure port settings

[Ctrl+a], z, p, c, q, [Enter]

Arduino session on Minicom

Arduino session on Minicom

Web Interface

blink(13,200);We are now going to use our browser to interface with Arduino, for that you will need a web server and a server-side language, and we are going to use Perl.

Apache CGI feature

Before we can continue on the Perl script, we need to set Apache to enable CGI feature, for that you must remove comment on the line referring to the cgi_module, that looks like the following:

LoadModule cgi_module lib64/httpd/modules/mod_cgi.so

Disable auto-reset

Also have in mind that most boards will restart after you close the serial port, to disable this, put wiring from pin 8 to reset on your board. If there current on reset pin Arduino will not reset, and we set this pin HIGH during setup function on our code.

Access to serial port

Assuming that the owner of Apache process is apache, add it to the dialout group, which is owners of the /dev/ttyACMx device

usermod -a -G dialout apache || usermod -a -G uucp apache

Perl Modules

In fact we could be using IO::File to the device much  and simple print to generate our page, but things start to become complex for the reading from serial and user submitted data, so let's use CGI and Device::SerialPort modules to make our lives easier.

CGI module to process the  HTTP requests and print out some html using perl syntax, so install with cpan:

cpan -i CGI

Device::SerialPort as the name suggests, if for the serial communication:

cpan -i Device::SerialPort

Once you have Apache set and the modules installed, create the Perl script under the cgi-bin directory of your web server with the following content:

#!/usr/bin/perl -wT

use CGI qw(:standard);
use Device::SerialPort;

#initialize CGI object
my $cgi = new CGI;

#get command from user request
my $cmd = $cgi->param('cmd');

my  $read_timeout = 1, #time limit to wait for input from Arduino
$start_time = 2, #time to wait before connection is ready
$char_count = 0, #total characters read from Arduino
$arduino_output = ""; #response received from Arduino
$port = '/dev/ttyACM1';

#open connection to Arduino on the specified port
my $arduino = Device::SerialPort->new($port) or print header,a "Cannot open $port" and die "Cannot open $port";

#configure serial parameters
$arduino->baudrate(9600);
$arduino->databits(8);
$arduino->parity("none");
$arduino->stopbits(1);
$arduino->read_char_time(0);
$arduino->read_const_time(1000);

#wait connection to be ready
sleep $start_time;

#send http headers, start html, head, body and headings
print header,

start_html({-title=>'Arduino serial connection'}),

h2('Arduino serial web'), br,

#create a form for the command

start_form,

a('Command:'), input({-type=>'text',-name=>'cmd',-value=>"$cmd",-tabindex=>'1'}),

end_form;

#if we have any command
if(defined $cmd){

#send to arduino
$arduino->write($cmd."\n");

#untill time is over

while ($read_timeout>0) {

#read up to 255 characters

my ($count,$char)=$arduino->read(255);

#if we have atleat 1 character

if ($count > 0) {

$char_count+=$count; #sum to total character count

$arduino_output.=$char; #append to output string

} else {

$read_timeout--; #decrease remaining wait time

}

}

$arduino_output =~ s' '&nbsp;'g; # parse blank space
$arduino_output =~ s'\n'<br />'g; # parse line break

#print the final output

print hr, b("$arduino_output");

}

print end_html; #close html

#finish connection
$arduino->close;
undef $arduino;

Take a look:

Arduino web interface

Arduino web interface

Conclusion

If you really want to give a try on Arduino, go on its official site, arduino.cc to learn more, there is many things to learn yet, and there you will find everything you need, as the API reference.

Have in mind that these codes where not intended for production, but for learning, and to make things there is not security, performance on any kind of reliability check. It could also be simpler, and thus cleaner, however that is what we got, I hope it is enough to get you started, maybe we do more in the future. :)

That is all for now! With this concept in mind, you can start to create your commands and read or write to Arduino. I hope you like it, have some fun and create cool stuff using Linux and Arduino power.

Thanks for reading!

The post How to Develop and Control of Arduino Systems on Linux appeared first on LinOxide.

Howto Setup Photo Gallery with Piwigo in Fedora / Ubuntu / CentOS

$
0
0

Piwigo is a free and open source web based photo gallery software which is available under GNU General Public License. It is heavily developed and designed by an active community of developers and users. Piwigo is written in PHP language and uses MySQL database for storage. Piwigo is highly customizable as anyone is allowed to modify it according to their use, besides that it has its extensions freely available. It has a beautiful photo gallery in the frontend and very interactive dashboard making things easy to perform. Some of the main features of Piwigo are listed as follows.

  • It is easy to upload photos and videos with ftp, web uploads, android/iOS and desktop applications.
  • We can organize our photos with Albums.
  • It assures privacy on our Photos allowing us to decide who can see them.
  • It is highly customizable with its free themes and plugins available on the internet.
  • Piwigo is heavily localized by its active community all around the world making it available in many languages.
  • It has the ability to generate multiple size photos and enables us to add watermarks automatically.
  • The most important feature is that, it has statistics and management tools enabling us to manage our photo gallery.

Here are some easy steps on how we can install Piwigo online photo gallery in Fedora, Ubuntu and CentOS linux distributions.

1. Installing LAMP Stack

First of all, we'll install LAMP Stack in our linux machine which includes Apache web server, MySQL/MariaDB Database server and PHP modules. Here, in this tutorial, we'll be using MariaDB as its a complete free and open source software, fast and enhanced fork of MySQL. As the complete latest LAMP stack is available on the official repository of almost all linux distribution which includes Fedora, Ubuntu and CentOS, we'll simply install them using their default package manager respectively.

On Fedora 22

As dnf package manager is the default package manager of fedora 22, we'll simply run the following dnf command to install LAMP stack under sudo/root access.

# dnf install httpd mariadb mariadb-server php php-mysql php-gd ImageMagick unzip wget

On Fedora 21

As yum package manager is the default package manager of fedora 22, we'll simply run the following yum command.

# yum install httpd mariadb mariadb-server php php-mysql php-gd ImageMagick unzip wget

On Ubuntu 12.04/14.04/15.04

To install LAMP stack on Ubuntu machine, we'll need to run the following apt commands under sudo/root access.

# apt-get install apache2 mariadb-server php5 php5-mysql php5-gd imagemagick unzip wget

On CentOS 6/7

As we know the default package manager of centos is yum package manager, we'll need to run the following command to install it.

# yum install httpd mariadb mariadb-server php php-mysql php-gd ImageMagick unzip wget

2. Starting and Enabling Apache and MariaDB

We'll now start our apache web server and mariadb database server and configure it to start automatically in every system boot. To do so, we'll need to run the following command.

On SysVinit

If we have the release of linux distributions like CentOS 6.x , Ubuntu 12.04/14.04, running SysVinit installed in our machine then we'll need to run the following command to start apache and mariadb services.

On CentOS 6.x

# service httpd start
# service mariadb start
# chkconfig --levels 235 httpd on

On Ubuntu 12.04/14.04

# service apache2 start
# service mariadb start
# update-rc.d apache2 defaults

On Systemd

If we have latest release of linux distributions like Fedora 22, CentOS 7, Ubuntu 15.04 running systemd installed in our machine then we'll need to run the following command to start apache and mariadb services.

On Fedora 21/22/CentOS 7

# systemctl start httpd mariadb
# systemctl enable httpd mariadb

Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.

On Ubuntu 15.04

# systemctl start apache2 mariadb
# systemctl enable apache2 mariadb

Created symlink from /etc/systemd/system/multi-user.target.wants/apache2.service to /usr/lib/systemd/system/apache2.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.

3. Setting MariaDB root password

Next, we'll need to setup a password for our mariadb root user as we're installing it for the first time. To do so, we'll need to run the following command in a terminal.

# mysql_secure_installation

Note: Now, the script will ask us to enter the password for the database's root user but as we haven't set any password, we'll simply press enter. Then, we'll be asked to set a new password for the database's root user. Here we'll hit Y and enter our password for root of MariaDB. Then, we'll simply hit enter to set the default values for the further configurations.

....
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
...
installation should now be secure.

Thanks for using MariaDB!

4. Creating MariaDB Database for Piwigo

Next, we'll login to the MariaDB command prompt as root. To so do, we'll need to execute the following command.

# mysql -u root -p

Then, we'll be prompted to enter the password of root user of mariadb database. Here, we'll need to enter the password we'd set in the above step while configuring mariadb. After done, we'll be welcomed into the MariaDB command prompt environment.

We'll create the database for piwigo in our mariadb. To do so, we'll need to run the following command inside the mariadb command prompt environment.

> CREATE DATABASE piwigo_db;
> CREATE USER 'piwigo_user'@'localhost' IDENTIFIED BY 'P!W!g0_p1$$wor4';
> GRANT ALL PRIVILEGES ON piwigo_db.* TO 'piwigo_user'@'localhost';
> FLUSH PRIVILEGES;
> EXIT; Creating MariaDB Database

We’ve successfully created a database named piwigo_db with database user piwigo_user and its password as P!W!g0_p1$$wor4 .

Note: It is strongly recommended to replace the above variables as your requirement or desire as per the security issue.

5. Downloading Latest Piwigo

We'll now download and extract the latest release of Piwigo from its official download page. We'll get inside the /tmp folder and download the zipped package of the latest release of Piwigo and name it as piwigo-latest.zip . To do so, we'll need to run the following command in a terminal.

# cd /tmp/
# wget "http://piwigo.org/download/dlcounter.php?code=latest" -O piwigo-latest.zip

--2015-08-18 22:09:52-- http://piwigo.org/download/dlcounter.php?code=latest
Resolving piwigo.org (piwigo.org)... 87.98.147.22
Connecting to piwigo.org (piwigo.org)|87.98.147.22|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7233466 (6.9M) [application/zip]
Saving to: 'piwigo-latest.zip'
piwigo-latest.zip 100%[=====================>] 6.90M 2.35MB/s in 2.9s
2015-08-18 22:09:55 (2.35 MB/s) - 'piwigo-latest.zip' saved [7233466/7233466]

After we have successfully downloaded the zipped package, we'll now simply extract it using unzip. To do so, we'll need to run the following command.

# unzip piwigo-latest.zip

Next, we'll gonna move the whole extracted folder to the webroot of our web server. As the default webroot of apache web server is /var/www/html/ , we'll simply move it into that folder by running the following command.

# mv piwigo /var/www/html/gallery

6. Changing Ownership

Now we'll change the ownership of the piwigo directory to apache so that the apache process owner will have full read and write access to the directory.

On Fedora/CentOS

If we are running Fedoro or CentOS or their derivatives, we'll need to run the following command to change the ownership of directory.

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

On Ubuntu

In Ubuntu machine, we'll need to replace apache to www-data in the above command and execute as shown below.

# chown www-data: /var/www/html/gallery

7. Allowing Firewall

If we have firewall programs like iptables, firewalld running, we'll need to allow http port 80 in order to make our web server and website accessible remotely from the internet.

On Iptables

In the linux distibutions like Fedora 21, CentOS 6.x, Ubuntu 12.04/14.04 , iptables is used as the default firewall program. To allow port 80 from iptables, we'll need to run the following command.

# iptables -I INPUT -p tcp --dport 80 -j ACCEPT

Then, in order to apply the changes permanently even after the reboot, we'll need to save the configuration by running the following command.

# service iptables save

On Firewalld

Firewalld is used as the default firewall program in the latest releases of linux distributions like Fedora 22, CentOS 7, Ubuntu 15.04 running systemd. So, to allow http port 80, we'll need to run the following command.

# firewall-cmd --permanent --zone=public --add-service=http

To apply the changes made above, we'll need to reload our firewalld, by running the below command.

# firewall-cmd --reload

9. Allowing SELinux

If we are running Fedora 21/22 or CentOS 7 in our machine, we've SELinux security feature enabled by default. So, in order to make SELinux allow our piwigo installation to work, we'll need to run the following command.

# cd /var/www/html/gallery/

#  chcon -vR --type=httpd_sys_rw_content_t .

8. Web Installation

Finally after such a hard work, we'll be able to navigate to our Piwigo web interface by pointing our browser to http://ip-address/gallery or http://domain.com/gallery according to our configuration.

Configuring Piwigo

Here, we need to enter the required database configuration that we had set in the above step while creating database in MariaDB. In this tutorial, we've user, password and database name as piwigo_user, P!W!g0_p1$$wor4 and piwigo_db respectively. Then, we'll need to enter the administration configuration that we'll need in order to login to the Administrative Panel of Piwigo. After done, we'll click on Start Installation to continue further.

Piwigo Welcome Page

After the installation has been finished, we'll gonna click on Start the Tour to login into our Piwigo Admin panel. Then, we'll see our Admin panel as shown below. If we wanna learn more about Piwigo gallery, we can read the instructions shown in small dialogue window.

Piwigo Admin Panel

To upload an image, we'll need to click on Add under Photos which lies on the left sidebar as shown in the figure.

Piwigo Gallery Homepage

After uploading our images, it will be loaded in our Piwigo Photo Gallery. We can easily customize our photo gallery using different options available in our admin panel.

Known Issue and Fix

Error

If we see the following error on the top of our Piwigo Gallery Admin panel, we can make sure that the date.timezone variable is disabled in our PHP configuration.

date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.

Fix

To fix the above error, we'll need to specify a date.timezone variable in our PHP configuration file. To do so, we'll need to open it using a text editor.

# nano /etc/php.ini

After that, we'll need to find for the line where date.timezone variable in assigned. Here, we'll need to specify the timezone that we want to set to our application.

date.timezone =America/Los_Angeles

Conclusion

Piwigo is an excellent photo gallery application which has made pretty easy for people to host their own gallery in the internet. The most awesome thing is that, Piwigo is very easy to setup and customize according to our desire and requirement. It has beautiful web interface which is pretty responsive. Piwigo is highly extensible as there are hundreds of powerful plugins and extensions. There are also several hosting companies which provides hosting services to Piwigo. If we have LAMP stack installed or have a shared hosting, we can simply install Piwigo with its NetInstall PHP script . It is also available on Softaculous web app installer making its installation far easier with a single click. So, if you have any queries, suggestions, comments, please do comment below so that we can improve our contents and website. Thanks!

The post Howto Setup Photo Gallery with Piwigo in Fedora / Ubuntu / CentOS appeared first on LinOxide.

How to Install QGit Viewer in Ubuntu 14.04

$
0
0

QGit is a free and Open Source GUI git viewer written on Qt and C++ by Marco Costalba. It is a better git viewer which provides us the ability to browse revisions history, view commits and patches applied to the files under a simple GUI environment. It utilizes git command line to process execute the commands and to display the output. It has some common features like to view revisions, diffs, files history, files annotation, archive tree. We can format and apply patch series with the selected commits, drag and drop commits between two instances and more with QGit Viewer. It allows us to create custom buttons with which we can add more buttons to execute a specific command when pressed using its builtin Action Builder.

Here are some easy steps on how we can compile and install QGit Viewer from its source code in Ubuntu 14.04 LTS "Trusty".

1. Installing QT4 Libraries

First of all, we'll need have QT4 Libraries installed in order to run QGit viewer in our ubuntu machine. As apt is the default package manager of ubuntu and QT4 packages is available in the official repository of ubutnu, we'll gonna install qt4-default using apt-get command as shown below.

$ sudo apt-get install qt4-default

2. Downloading QGit Tarball

After installing Qt4 libraries, we'll gonna install git so that we can clone the Git repository of QGit Viewer for Qt 4 . To do so, we'll run the following apt-get command.

$ sudo apt-get install git

Now, we'll clone the repository using git command as shown below.

$ git clone git://repo.or.cz/qgit4/redivivus.git

Cloning into 'redivivus'...
remote: Counting objects: 7128, done.
remote: Compressing objects: 100% (2671/2671), done.
remote: Total 7128 (delta 5464), reused 5711 (delta 4438)
Receiving objects: 100% (7128/7128), 2.39 MiB | 470.00 KiB/s, done.
Resolving deltas: 100% (5464/5464), done.
Checking connectivity... done.

3. Compiling QGit

After we have cloned the repository, we'll now enter into the directory named redivivus and create the makefile which we'll require to compile qgit viewer. So, to enter into the directory, we'll run the following command.

$ cd redivivus

Next, we'll run the following command in order to generate a new Makefile from qmake project file ie qgit.pro.

$ qmake qgit.pro

After the Makefile has been generated, we'll now finally compile the source codes of qgit and get the binary as output. To do so, first we'll need to install make and g++ package so that we can compile, as it is a program written in C++ .

$ sudo apt-get install make g++

Now, we'll gonna compile the codes using make command.

$ make

4. Installing QGit

As we have successfully compiled the source code of QGit viewer, now we'll surely wanna install it in our Ubuntu 14.04 machine so that we can execute it from our system. To do so, we'll run the following command.

$ sudo make install

cd src/ && make -f Makefile install
make[1]: Entering directory `/home/arun/redivivus/src'
make -f Makefile.Release install
make[2]: Entering directory `/home/arun/redivivus/src'
install -m 755 -p "../bin/qgit" "/usr/lib/x86_64-linux-gnu/qt4/bin/qgit"
strip "/usr/lib/x86_64-linux-gnu/qt4/bin/qgit"
make[2]: Leaving directory `/home/arun/redivivus/src'
make[1]: Leaving directory `/home/arun/redivivus/src'

Next, we'll need to copy the built qgit binary file from bin directory to /usr/bin/ directory so that it will be available as global command.

$ sudo cp bin/qgit /usr/bin/

5. Creating Desktop File

As we have successfully installed qgit in our Ubuntu box, we'll now go for create a desktop file so that QGit will be available under Menu or Launcher of our Desktop Environment. To do so, we'll need to create a new file named qgit.desktop under /usr/share/applications/ directory.

$ sudo nano /usr/share/applications/qgit.desktop

Then, we'll need to paste the following lines into the file.

[Desktop Entry]
Name=qgit
GenericName=git GUI viewer
Exec=qgit
Icon=qgit
Type=Application
Comment=git GUI viewer
Terminal=false
MimeType=inode/directory;
Categories=Qt;Development;RevisionControl;

After done, we'll simply save the file and exit.

6. Running QGit Viewer

After QGit is installed successfully in our Ubuntu box, we can now run it from any launcher or application menu. In order to run QGit from the terminal, we'll need to run as follows.

$ qgit

This will open the Qt4 Framework based QGit Viewer in GUI mode.

QGit Viewer

Conclusion

QGit is really an awesome QT based git viewer. It is available on all three platforms Linux, Mac OSX and Microsoft Windows. It helps us to easily navigate to the history, revisions, branches and more from the available git repository. It reduces the need of running git command line for the common stuffs like viewing revisions, history, diff, etc as graphical interface of it makes easy to do tasks. The latest version of qgit is also available in the default repository of ubuntu which we can install using apt-get install qgit command. So, qgit makes our work pretty fast and easy to do with its simple GUI.

The post How to Install QGit Viewer in Ubuntu 14.04 appeared first on LinOxide.

How to Configure OpenNMS on CentOS 7.x

$
0
0

Systems management and monitoring services are very important that provides information to view important systems management information that allow us to to make decisions based on this information. To make sure the network is running at its best and to minimize the network downtime we need to improve application performance. So, in this article we will make you understand the step by step procedure to setup OpenNMS in your IT infrastructure. OpenNMS is a free open source enterprise level network monitoring and management platform that provides information to allow us to make decisions in regards to future network and capacity planning.

OpenNMS designed to manage tens of thousands of devices from a single server as well as manage unlimited devices using a cluster of servers. It includes a discovery engine to automatically configure and manage network devices without operator intervention. It is written in Java and is published under the GNU General Public License. OpenNMS is known for its scalability with its main functional areas in services monitoring, data collection using SNMP and event management and notifications.

Installing OpenNMS RPM Repository

We will start from the installation of OpenNMS RPM for our CentOs 7.1 operating system as its available for most of the RPM-based distributions through Yum at their official link http://yum.opennms.org/ .

OpenNMS RPM

Then open your command line interface of CentOS 7.1 and login with root credentials to run the below command with “wget” to get the required RPM.

[root@open-nms ~]# wget http://yum.opennms.org/repofiles/opennms-repo-stable-rhel7.noarch.rpm

Download RPM

Now we need to install this repository so that the OpenNMS package information could be available through yum for installation. Let’s run the command below with same root level credentials to do so.

[root@open-nms ~]# rpm -Uvh opennms-repo-stable-rhel7.noarch.rpm

Installing RPM

Installing Prerequisite Packages for OpenNMS

Now before we start installation of OpenNMS, let’s make sure you’ve done the following prerequisites.

Install JDK 7

Its recommended that you install the latest stable Java 7 JDK from Oracle for the best performance to integrate JDK in our YUM repository as a fallback. Let’s go to the Oracle Java 7 SE JDK download page, accept the license if you agree, choose the platform and architecture. Once it has finished downloading, execute it from the command-line and then install the resulting JDK rpm.

Else run the below command to install using the Yum from the the available system repositories.

[root@open-nms ~]# yum install java-1.7.0-openjdk-1.7.0.85-2.6.1.2.el7_1

Once you have installed the Java you can confirm its installation using below command and check its installed version.

[root@open-nms ~]# java -version

Java version

Install PostgreSQL

Now we will install the PostgreSQL that is a must requirement to setup the database for OpenNMS. PostgreSQL is included in all of the major YUM-based distributions. To install, simply run the below command.

[root@open-nms ~]# yum install postgresql postgresql-server

Installing Postgresql

Prepare the Database for OpenNMS

Once you have installed PostgreSQL, now you'll need to make sure that PostgreSQL is up and active. Let’s run the below command to first initialize the database and then start its services.

[root@open-nms ~]# /sbin/service postgresql initdb
[root@open-nms ~]# /sbin/service postgresql start

start DB

Now to confirm the status of your PostgreSQL database you can run the below command.

[root@open-nms ~]# service postgresql status

PostgreSQL status

To ensure that PostgreSQL will start after a reboot, use the “systemctl”command to enable start on bootup using below command.

[root@open-nms ~]# systemctl enable postgresql
ln -s '/usr/lib/systemd/system/postgresql.service' '/etc/systemd/system/multi-user.target.wants/postgresql.service'

Configure PostgreSQL

Locate the Postgres “data” directory. Often this is located in /var/lib/pgsql/data directory and Open the postgresql.conf file in text editor and configure the following parameters as shown.

[root@open-nms ~]# vim /var/lib/pgsql/data/postgresql.conf

#------------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#------------------------------------------------------------------------------

listen_addresses = 'localhost'
max_connections = 256

#------------------------------------------------------------------------------
# RESOURCE USAGE (except WAL)
#------------------------------------------------------------------------------

shared_buffers = 1024MB

User Access to the Database

PostgreSQL only allows you to connect if you are logged in to the local account name that matches the PostgreSQL user. Since OpenNMS runs as root, it cannot connect as a "postgres" or "opennms" user by default, so we have to change the configuration to allow user access to the database by opening the below configuration file.

[root@open-nms ~]# vim /var/lib/pgsql/data/pg_hba.conf

Update the configuration file as shown below and change the METHOD settings from "ident" to "trust"

user access to db

Write and quit the file to make saved changes and then restart PostgreSQL services.

[root@open-nms ~]# service postgresql restart

Starting OpenNMS Installation

Now we are ready go with installation of OpenNMS as we have almost don with its prerequisites. Using the YUM packaging system will download and install all of the required components and their dependencies, if they are not already installed on your system.
So let's riun th belwo command to start OpenNMS installation that will pull everything you need to have a working OpenNMS, including the OpenNMS core, web UI, and a set of common plugins.

[root@open-nms ~]# yum -y install opennms

OpenNMS Installation

The above command will ends up with successful installation of OpenNMS and its derivative packages.

Configure JAVA for OpenNMS

In order to integrate the default version of Java with OpenNMS we will run the below command.

[root@open-nms ~]# /opt/opennms/bin/runjava -s

java integration

Run the OpenNMS installer

Now it's time to start the OpenNMS installer that will create and configure the OpenNMS database, while the same command will be used in case we want to update it to the latest version. To do so, we will run the following command.

[root@open-nms ~]# /opt/opennms/bin/install -dis

The above install command will take many options with following mechanism.

-d - to update the database
-i - to insert any default data that belongs in the database
-s - to create or update the stored procedures OpenNMS uses for certain kinds of data access

==============================================================================
OpenNMS Installer
==============================================================================

Configures PostgreSQL tables, users, and other miscellaneous settings.

DEBUG: Platform is IPv6 ready: true
- searching for libjicmp.so:
- trying to load /usr/lib64/libjicmp.so: OK
- searching for libjicmp6.so:
- trying to load /usr/lib64/libjicmp6.so: OK
- searching for libjrrd.so:
- trying to load /usr/lib64/libjrrd.so: OK
- using SQL directory... /opt/opennms/etc
- using create.sql... /opt/opennms/etc/create.sql
17:27:51.178 [Main] INFO org.opennms.core.schema.Migrator - PL/PgSQL call handler exists
17:27:51.180 [Main] INFO org.opennms.core.schema.Migrator - PL/PgSQL language exists
- checking if database "opennms" is unicode... ALREADY UNICODE
- Creating imports directory (/opt/opennms/etc/imports... OK
- Checking for old import files in /opt/opennms/etc... DONE
INFO 16/08/15 17:27:liquibase: Reading from databasechangelog
Installer completed successfully!

==============================================================================
OpenNMS Upgrader
==============================================================================

OpenNMS is currently stopped
Found upgrade task SnmpInterfaceRrdMigratorOnline
Found upgrade task KscReportsMigrator
Found upgrade task JettyConfigMigratorOffline
Found upgrade task DataCollectionConfigMigratorOffline
Processing RequisitionsMigratorOffline: Remove non-ip-snmp-primary and non-ip-interfaces from requisitions: NMS-5630, NMS-5571
- Running pre-execution phase
Backing up: /opt/opennms/etc/imports
- Running post-execution phase
Removing backup /opt/opennms/etc/datacollection.zip

Finished in 0 seconds

Upgrade completed successfully!

Firewall configurations to Allow OpenNMS

Here we have to allow OpenNMS management interface port 8980 through firewall or router to access the management web interface from the remote systems. So use the following commands to do so.

[root@open-nms etc]# firewall-cmd --permanent --add-port=8980/tcp
[root@open-nms etc]# firewall-cmd --reload

Start OpenNMS and Login to Web Interface

Let's start OpenNMS service and enable to it start at each bootup by using the below command.

[root@open-nms ~]#systemctl start opennms
[root@open-nms ~]#systemctl enable opennms

Once the services are up are ready to go with its web management interface. Open your web browser and access it with your server's IP address and 8980 port.

http://servers_ip:8980/

Give the username and password where as the default username and password is admin/admin.

opennms login

After successful authentication with your provided username and password you will be directed towards the the Home page of OpenNMS where you can configure the new monitoring devices/nodes/services etc.

opennms home

Conclusion

Congratulations! we have successfully setup OpenNMS on CentOS 7.1. So, at the end of this tutorial, you are now able to install and configure OpenNMS with its prerequisites that included PostgreSQL and JAVA setup. So let's enjoy with the great network monitoring system with open source roots using OpenNMS that provide a bevy of features at no cost than their high-end competitors, and can scale to monitor large numbers of network nodes.

The post How to Configure OpenNMS on CentOS 7.x appeared first on LinOxide.

How to Install DNSCrypt and Unbound in Arch Linux

$
0
0

DNSCrypt is a protocol that encrypt and authenticate communications between a DNS client and a DNS resolver. Prevent from DNS spoofing or man in the middle-attack. DNSCrypt are available for most operating system, including Linux, Windows, MacOSX android and iOS. And in this tutorial I'm using archlinux with kernel 4.1.

Unbound is a DNS cache server used to resolve any DNS query received. If the user requests a new query, then unbound will store it as a cache, and when the user requests the same query for the second time, then unbound would take from the cache that have been saved. This will be faster than the first request query.

And now I will try to install "DNSCrypt" to secure the dns communication, and make it faster with dns cache "Unbound".

Step 1 - Install yaourt

Yaourt is one of AUR(Arch User Repository) helper that make archlinux users easy to install a program from AUR. Yaourt use same syntax as pacman, so you can install the program with yaourt. and this is easy way to install yaourt :

1. Edit the arch repository configuration file with nano or vi, stored in a file "/etc/pacman.conf".

$ nano /etc/pacman.conf

2. Add at the bottom line yaourt repository, just paste script below :

[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

3. Save it with press "Ctrl + x" and then "Y".

4. Now update the repository database and install yaourt with pacman command :

$ sudo pacman -Sy yaourt

Step 2 - Install DNSCrypt and Unbound

DNSCrypt and unbound available on archlinux repository, then you can install it with pacman command :

$ sudo pacman -S dnscrypt-proxy unbound

wait it and press "Y" for proceed with installation.

Step 3 - Install dnscrypt-autoinstall

Dnscrypt-autoinstall is A script for installing and automatically configuring DNSCrypt on Linux-based systems. Dnscrypt-autoinstall available in AUR(Arch User Repository), and you must use "yaourt" command to install it :

$ yaourt -S dnscrypt-autoinstall

Note :

-S = it is same as pacman -S to install a software/program.

Step 4 - Run dnscrypt-autoinstall

run the command "dnscrypt-autoinstall" with root privileges to configure DNSCrypt automatically :

$ sudo dnscrypt-autoinstall

Press "Enter" for the next configuration, and then type "y" and choose the DNS provider you want to use, I'm here use DNSCrypt.eu featured with no logs and DNSSEC.

DNSCrypt autoinstall

Step 5 - Configure DNSCrypt and Unbound

1. Open the dnscrypt configuration file "/etc/conf.d/dnscrypt-config" and make sure the configuration of "DNSCRYPT_LOCALIP" point to localhost IP, and for port configuration "DNSCRYPT_LOCALPORT" it's up to you, I`m here use port 40.

$ nano /etc/conf.d/dnscrypt-config

DNSCRYPT_LOCALIP=127.0.0.1
DNSCRYPT_LOCALIP2=127.0.0.2
DNSCRYPT_LOCALPORT=40

DNSCrypt Configuration

Save and exit.

2. Now you can edit unbound configuration in "/etc/unbound/". edit the file configuration with nano editor :

$ nano /etc/unbound/unbound.conf

3. Add the following script in the end of line :

do-not-query-localhost: no
forward-zone:
name: "."
forward-addr: 127.0.0.1@40

Make sure the "forward-addr" port is same with "DNSCRYPT_LOCALPORT" configuration in DNSCrypt. You can see the I`m use port 40.

Unbound Configuration

and then save and exit.

Step 6 - Run DNSCrypt and Unbound, then Add to startup/Boot

Please run DNSCrypt and unbound with root privileges, you can run with systemctl command :

$ sudo systemctl start dnscrypt-proxy unbound

Add the service at the boot time/startup. You can do it by running "systemctl enable" :

$ sudo systemctl enable dnscrypt-proxy unbound

the command will create the symlink of the service to "/usr/lib/systemd/system/" directory.

Step 7 - Configure resolv.conf and restart all services

Resolv.conf is a file used by linux to configure Domain Name Server(DNS) resolver. it is just plain-text created by administrator, so you must edit by root privileges and make it immutable/no one can edit it.

Edit it with nano editor :

$ nano /etc/resolv.conf

and add the localhost IP "127.0.0.1". and now make it immutable with "chattr" command :

$ chattr +i /etc/resolv.conf

Note :

If you want to edit it again, make it writable with command "chattr -i /etc/resolv.conf".

Now yo need to restart the DNSCrypt, unbound and the network :

$ sudo systemctl restart dnscrypt-proxy unbound netctl

If you see the error, check your configuration file.

Testing

1. Test DNSCrypt

You can be sure that DNSCrypt had acted correctly by visiting https://dnsleaktest.com/, then click on "Standard Test" or "Extended Test" and wait the process running.

And now you can see that DNSCrypt is working with DNSCrypt.eu as your DNS provider.

Testing DNSCrypt

And now you can see that DNSCrypt is working with DNSCrypt.eu as your DNS provider.

2. Test Unbound

Now you should ensure that the unbound is working correctly with "dig" or "drill" command.

This is the results for dig command :

$ dig linoxide.com

Now see in the results, the "Query time" is "533 msec" :

;; Query time: 533 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Aug 30 14:48:19 WIB 2015
;; MSG SIZE rcvd: 188

and try again with the same command. And you will see the "Query time" is "0 msec".

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Aug 30 14:51:05 WIB 2015
;; MSG SIZE rcvd: 188

Unbound Test

And in the end DNSCrypt secure communications between the DNS clients and DNS resolver is working perfectly, and then Unbound make it faster if there is the same request in another time by taking the cache that have been saved.

Conclusion

DNSCrypt is a protocol that can encrypt data flow between the DNS client and DNS resolver. DNSCrypt can run on various operating systems, either mobile or desktop. Choose DNS provider also includes something important, choose which provide a DNSSEC and no logs. Unbound can be used as a DNS cache, thus speeding up the resolve process resolv, because Unbound will store a request as the cache, then when a client request same query in the next time, then unbound would take from the cache that have been saved. DNSCrypt and Unbound is a powerful combination for the safety and speed.

The post How to Install DNSCrypt and Unbound in Arch Linux appeared first on LinOxide.

How to Manage Linux Containers using LXC

$
0
0

Linux Containers  is a light weight virtualization technology at the operating-system level which is capable of running more than one Linux system on a Linux host. It is an alternative to other traditional hypervisors like KVM and Xen.  Compared to the full machine virtualization techniques, isolation offered in containers is less but at the same time overhead is reduced as a portion of the host kernel and operating system instance gets shared by the virtual machines.  This does not mean that the containers can replace traditional hypervisors as each have their own pros and cons. In this article, we will briefly learn about the installation and usage of one of the popular Linux based container project LXC.

Installation of LXC

I'm using Ubuntu 14.10 for all the examples used here.

LXC can be installed by using the simple apt-get command in Debian based distros (yum in RedHat based ones).  Make sure that you use 'sudo' command everywhere if you are not logged in as root.

sudo apt-get install lxc

Creation, listing, login and stopping

Next you need to create a container by using the lxc-create command

sudo lxc-create -t  <template> -n <container-name>

There are quite a few ready-made templates available for creating containers. They are mostly for the popular Linux distributions. Let us try to create a Ubuntu based container.

sudo lxc-create -t ubuntu -n Ubuntu1

May be you want to help yourself with a cup of coffee as it takes a while for retrieving the required packages and creating the container. :)

lxc-create comand

Output of 'lxc-create' command

lxc-create command

Output of 'lxc-create' command - contd....

Now we have an Ubuntu container with the name Unbuntu1.

Let us now list all the containers that are present on our host.

sudo lxc-ls

poornima@poornima-Lenovo:~$ sudo lxc-ls
[sudo] password for poornima:
Ubuntu1

We can view the complete details using lxc-info

sudolxc-info -n <container-name>

poornima@poornima-Lenovo:~$ sudo lxc-info -n Ubuntu1
Name: Ubuntu1
State: STOPPED

From the output you can see the list of all the containers present on the host and categorised depending on the different states that they are in (running, stopped or frozen).

Containers can be started using the lxc-start command.

lxc-start -n <container-name>

OR

lxc-start -d -n <container-name>    to start the container in the background.

Verify if the container has actually started or not:

poornima@poornima-Lenovo:~$ sudo lxc-info -n Ubuntu1
Name: Ubuntu1
State: RUNNING
PID: 2969
IP: 10.0.3.150
CPU use: 1.27 seconds
BlkIO use: 20.66 MiB
Memory use: 26.27 MiB
KMem use: 0 bytes
Link: vethVFLSOP
TX bytes: 1.80 KiB
RX bytes: 4.94 KiB
Total bytes: 6.74 KiB

In order to login or attach back to the container console, we have lxc-console. 

lxc-console -n <container-name>

poornima@poornima-Lenovo:~$ sudo lxc-console -n Ubuntu1

Connected to tty 1
Type <Ctrl+a q> to exit the console, <ctrl+a ctrl+a=""> to enter Ctrl+a itself

Ubuntu 14.10 Ubuntu1 tty1

Ubuntu1 login: ubuntu
Password:
Last login: Thu Aug 27 12:05:59 IST 2015 on lxc/tty1
Welcome to Ubuntu 14.10 (GNU/Linux 3.16.0-23-generic i686)

* Documentation: https://help.ubuntu.com/
ubuntu@Ubuntu1:~$

We can come back to the host's console using the key sequence 'Ctrl+a' followed q.  Note that the container is still running in the background and we have just detached from it.

If you have to stop the container you need to use lxc-stop.

lxc-stop -n <container-name>

poornima@poornima-Lenovo:~$ sudo lxc-stop -n Ubuntu1
poornima@poornima-Lenovo:~$ sudo lxc-info -n Ubuntu1
Name: Ubuntu1
State: STOPPED

Freezing, unfreezing, cloning and poweroff

Containers can be frozen using the lxc-freeze command.

lxc-freeze -n <container-name>

poornima@poornima-Lenovo:~$ sudo lxc-freeze -n Ubuntu1
poornima@poornima-Lenovo:~$ sudo lxc-info -n Ubuntu1
Name: Ubuntu1
State: FROZEN
PID: 2969
IP: 10.0.3.150
CPU use: 1.48 seconds
BlkIO use: 21.42 MiB
Memory use: 26.96 MiB
KMem use: 0 bytes
Link: vethVFLSOP
TX bytes: 2.63 KiB
RX bytes: 5.80 KiB
Total bytes: 8.43 KiB

You can unfreeze them with lxc-unfreeze. 

 lxc-unfreeze -n <container-name>

One can even clone containers using the lxc-clone command. But before issuing the clone command, see to it that you stop the running container first using the lxc-stop command as mentioned previously.

lxc-clone -o <existing container> -n <new container>

poornima@poornima-Lenovo:~$ sudo lxc-clone -o Ubuntu1 -n Ubuntu-clone
Created container Ubuntu-clone as copy of Ubuntu1
poornima@poornima-Lenovo:~$ sudo lxc-ls
Ubuntu-clone Ubuntu1

To poweroff containers, use lxc poweroff when inside the containers console.

ubuntu@Ubuntu1:~$ sudo poweroff
[sudo] password for ubuntu:

Broadcast message from ubuntu@Ubuntu1
(/dev/lxc/tty1) at 12:17 ...

The system is going down for power off NOW!

You can verify from the host that the container has stopped.

poornima@poornima-Lenovo:~$ sudo lxc-info -n Ubuntu1
Name: Ubuntu1
State: STOPPED

Snapshots - creation and restoration

lxc-snapshot command is useful for taking a snapshot of the required container.

lxc-snapshot  -n <container-name>

poornima@poornima-Lenovo:~$ sudo lxc-snapshot -n Ubuntu1
lxc_container: lxccontainer.c: lxcapi_snapshot: 2953 Snapshot of directory-backed container requested.
lxc_container: lxccontainer.c: lxcapi_snapshot: 2954 Making a copy-clone. If you do want snapshots, then
lxc_container: lxccontainer.c: lxcapi_snapshot: 2955 please create an aufs or overlayfs clone first, snapshot that
lxc_container: lxccontainer.c: lxcapi_snapshot: 2956 and keep the original container pristine.

These snapshots will be stored under /var/lib/lxc in Ubuntu 14.10 . In some earlier versions, you can find them in /var/lib/lxcsnaps. 

poornima@poornima-Lenovo:~$ sudo lxc-snapshot --name Ubuntu1 --list
snap0 (/var/lib/lxc/Ubuntu1/snaps) 2015:08:27 12:20:41

Configuration options

By default, all the containers created using lxc are stored under /var/lib/lxc where each container will have a directory. Inside this directory, each containers configuration will be stored in a file called config. The option  lxc.rootfs specifies the location of containers root file system.  lxc. network.type specifies the kind of networking used by that container. Eg, veth

If you are interested in more configuration options, check out man 5 lxc.conf

 Deletion

Containers can be completely destroyed from the host using lxc-destroy command. If you have created any snapshots from the container that you are about to delete, you need to first delete them.

lxc-destroy -n <container-name>

poornima@poornima-Lenovo:~$ sudo lxc-destroy --name=Ubuntu-clone
poornima@poornima-Lenovo:~$ sudo lxc-info --name=Ubuntu-clone
Ubuntu-clone doesn't exist

Management using web console

If you are not a fan of the Linux command line or not comfortable using it, then you can manage your containers using the LXC web panels through your browsers.

Install the web panel using the following command as a root user.

wget http://lxc-webpanel.github.io/tools/install.sh -O - | bash

root@poornima-Lenovo:/home/poornima# wget http://lxc-webpanel.github.io/tools/install.sh -O - | bash
--2015-08-27 13:15:13-- http://lxc-webpanel.github.io/tools/install.sh
Resolving lxc-webpanel.github.io (lxc-webpanel.github.io)... 103.245.222.133
Connecting to lxc-webpanel.github.io (lxc-webpanel.github.io)|103.245.222.133|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2678 (2.6K) [application/x-sh]
Saving to: STDOUT

0% [                                                                                                                                                                     ] 0 --.-K/s _ __ _______ __ __ _ _____ _
| | \ \ / / ____| \ \ / / | | | __ \ | |
| | \ V / | \ \ /\ / /__| |__ | |__) |_ _ _ __ ___| |
| | > <| | \ \/ \/ / _ \ '_ \ | ___/ _` | '_ \ / _ \ |
| |____ / . \ |____ \ /\ / __/ |_) | | | | (_| | | | | __/ |
|______/_/ \_\_____| \/ \/ \___|_.__/ |_| \__,_|_| |_|\___|_|
Automatic installer

Installing requirement...
100%[======================================>] 2,678 --.-K/s in 0.003s

2015-08-27 13:15:14 (867 KB/s) - written to stdout [2678/2678]

Cloning LXC Web Panel...
Cloning into '/srv/lwp'...
remote: Counting objects: 188, done.
remote: Total 188 (delta 0), reused 0 (delta 0), pack-reused 188
Receiving objects: 100% (188/188), 172.76 KiB | 49.00 KiB/s, done.
Resolving deltas: 100% (79/79), done.
Checking connectivity... done.

Installation complete!
Adding /etc/init.d/lwp...
Done
Starting server...done.
Connect you on http://your-ip-address:5000/

We can then access the user interface using the URL:  http://:5000 using the default userid / password  admin/admin

LXC web panel login screen

LXC Web panel login screen

Web panel

LXC web panel User Interface

Phew! Now, you are ready to perform all your container related operations using the web panel!!

Conclusion

In this article, we have learnt how to install LXC, use some of the available commands and the web panel. Of late, some tools have been developed which in turn use LXC underneath.  Docker engine and LXD are some of them.  In the near future, it is quite possible for the cloud infrastructure to heavily use Linux containers for all the advantages they have to offer.

The post How to Manage Linux Containers using LXC appeared first on LinOxide.


How to Install FreeBSD 10.2 with Mate Desktop

$
0
0

FreeBSD/free Unix-like operating system is advanced computer operating system used for modern computer, desktop and embedded platform. FreeBSD available for all platform include PowerPC and ARM. It is advanced operating system for networking, security and storage, with these advantages make a FreeBSD the platform of choice for many big company, including Apache, Apple, Cisco, Citrix etc.

FreeBSD is derived from BSD, the version of UNIX developed by Berkeley Software Distribution (BSD) and released under BSD License. You can install it for your server, and you can use it too for your primary computer desktop with many Desktop Environment such as Gnome, XFCE, KDE and Mate etc.

Prerequisites

in this article will be taught step by step to install FreeBSD on a desktop computer, I use FreeBSD 64 bits with the following specifications :

  • Memory 1 GB
  • Disk 25 GB

and also continued with a guide to install a desktop environment "Mate" on FreeBSD, so you can use it for your daily activity.

Installing FreeBSD 10.2

1. Download FreeBSD from https://www.freebsd.org/where.html and make a bootable from it. You can use file ".iso" if you want to burn to the CD/DVD, and if you want to make a USB Bootable, you must download ".img" file. If you use ubuntu/other linux distribution, you can use "dd" command to make a FreeBSD usb bootable. I'm here use a USB for media installation, so you can make a bootable by this command :

dd bs=4M if=/file/img/FreeBSD.img of=/dev/sdX && sync

2. When a USB bootable been made, please setting your BIOS to make it boot from a USB flashdisk and then reboot your system, and after that you will see a FreeBSD menu, you can choose number "1" or just press "Enter".

FreeBSD Boot Option

3. Once boot complete, you will see a "Welcome to FreeBSD!" with many options. And select "Install" to install a FreeBSD.

Install FreeBSD

4. Next step you will be displayed about keymap configuration, I'm use a default keymap, a "US" keybord map. Please choose "Select".

Keybord Map FreeBSD

5. Now type your hostname for your system, I'm here use "tadokoroBSD" as my hostname.

Hostname

6. Choose the FreeBSD Components to install and select "OK".

  • doc : additional documentation for freebsd, install into "/usr/share/doc".
  • games : some BSD games, including rot13, fortune etc.
  • lib32 : collection of libraries for running 32-bit application in 64-bit version of freeBSD.
  • ports : collection of files which automates the downloading, compiling and installing third-party software packages. You can search in "/usr/ports".
  • src : Complete FreeBSD source code for the kernel and userland. it is required to build a driver, kernel modules or some ports app collection.

Select Package

7. In this step you need to setup a disk partition for freebsd. you need to choose the option :

  • Auto (UFS) : this is automatic create a "UFS" partition for freebsd.
  • Manual : this option allow you to create and setting the partition by your self.
  • Shell : this is allow a user to configure the partition from the shell using fdisk or gparted etc.
  • Auto (ZFS) : this options will create encrypted root-on-ZFS system.

In this tutorial we choose "Manual" option.

Configure Dis Partition

8. After choose the "Manual" option, you must configure a partition scheme/partition table for the disk we have prepared - 26GB disk. Please select "Create" and then choose "GPT" as partition scheme because we use 64-bit architecture.

Choose the disk

Choose GPT Partition Scheme

9. Now "GPT" partition scheme created, and then you must define the partition. You need to create 3 partition :

  • freebsd-boot - 512 KB
  • freebsd-swap - 2 GB
  • freebsd-ufs - filesystem for freebsd with "/" root as mountpoint.

Create Partition

Select "Create" and define the partition, press "Tab" to move the option, and then select "OK" and press "Enter" to confirm.

Create Boot Partition

Create Boot Partition

Create Swap Partition

Create SWAP Partition

Create root Partition

Create root Partition

10. Now the partition was defined, and now select "Finish" and choose a "commit" to begin the installation.

Finishing Partition

Commit or save changes.

Save Changed

11. Wait the fetching, verifying and extracting distribution files.

Wait extraction

12. Once all requested distribution files have been extracted, you need to configure/change "root" password for your freebsd. Just type the password you want and press "Enter" to confirm.

Change root Password

13. Now step to configure the "Network Interfaces". Here I've one network adapter, if you have a multiple netwotk adapter, choose the adapter you want to use and select "OK".

Choose Adapter for Network Interfaces

14. Then choose IPv4 for the interface and select "Yes". And now we use a DHCP for obtaining the ip address for this interface and choose "Yes".

Configure IPv4

Obtaining ipadress with DHCP

Select DHCP

Select "No" for IPv6.

No IPv6

15. Now you can configure the DNS Resolver. for the first I use local dns and the google dns for second dns resolver and select "OK".

Choose DNS Resolver

16. In this step will be shown to you about "Time Configuration". Please choose "No" here to select a specific timezone. I'm here choose "Asia" and select my country and my timezone and then select "OK". Select "Yes" to confirm.

Select No

Choose Timezone "Asia"

Asia Timezone

Specific Timezone

Specific timezone2

17. Now you need to configure a service that start on the boot time, you can select the service by press "Escape" on your keybord and then select "OK" to confirm.

Service on the boot time

18. And now you will be ask to create new user account and please select "Yes" and type a username and password you want.

Add New User2

look this example :

Add New User2

Type "yes" and press "Enter" to confirm all user configuration. and then you will be ask about to "add Another User", just type "no" for it.

Confirm New User

19. Now installation is finised and please select "OK".

Installation Finished

And you will be ask about to add a new "Manual Configuration" and select "No".

No for additional configuration

Now choose "Reboot" and remove the media installation, in this tutorial is USB.

Reboot

After rebooting, just press "Enter" to boot the FreeBSD. and then login with username "root" and your password.

Login Screen

Login Screen root

FreeBSD 10.2 installed

FreeBSD 10.2 Installed

Installing MATE Desktop

The MATE Desktop Environment is the continuation of GNOME 2.  It provides an classic and lightweight desktop environment using traditional display for Linux and other Unix-like operating systems. And so we will install SLIM as our display manager, other alternative, LightDM, GDM or LXDM.

1. Before install a mate desktop, you need to configure your user that has been created - "megumi". Login to the freebsd as root and install sudo and nano with "pkg" command :

pkg install sudo nano

and then allow a user "megumi" to execute "sudo" command by editing sudoers file with command :

visudo

and below the line "root", add user "megumi" :

megumi ALL=(ALL) ALL

Adding user to sudoers

2. Now install Mate Desktop and the all needed by it.

pkg install xf86-video-fbdev mate-desktop mate xorg

Installation need more 1GB disk space, so make sure your system have more disk. And then add the services to the boot time by editing file "/etc/rc.conf" with nano editor :

nano /etc/rc.conf

Add the following script at the bottom line :

moused_enable="YES"
dbus_enable="YES"
hald_enable="YES"

Save and exit.

3. Installing "SLIM Display Manager" with "pkg" command :

pkg install slim

and add SLIM to run on the startup/boot time with this line :

slim_enable="YES"

Slim and Mate boot configuration

4. And the last you must configure a user "megumi" to login with MATE Desktop. Log out from the root shell and switch to megumi shell. Add new file ".xinitrc" to the home directory of user megumi :

cd ~
nano .xinitrc

add the line :

exec mate-session

and Reboot your system.

After rebooting, you will be shown a SLIM Display manager, just type your username "megumi" and the password, and then you will log in to MATE Desktop.

SLIM Display Manager

Slim Display Manager

Mate Desktop

Mate Desktop

Conclusion

FreeBSD is derivered from BSD, the version of UNIX developed by Berkeley Software Distribution (BSD) and released under BSD License. It is advanced operating system for networking, security and storage. Using by BIG company such as Apache, Apple etc. FreeBSD Avilable for all platform, so you can install it for your server operating system, or you can use it as primary computer with many desktop environment such as MATE Desktop. It is easy to install and configure.

The post How to Install FreeBSD 10.2 with Mate Desktop appeared first on LinOxide.

How to Setup JIRA on Ubuntu 15.04

$
0
0

Hi, in today’s article we are going to work on Jira, where we will show you about its installation and configuration process on Ubuntu 15.04 64-Bit Operating system. Before starting its installations let me introduce you about JIRA. Jira is a web based software that is used for bug and issues tracking and projects management developed by Atlassian. It allows you to track any kind of unit of work through a predefined workflow where all of your project items/issues lie at a team wide, company or individual level. Collaboration's also a big point of emphasis in JIRA about its mentioning, formatted commenting , and sharing issues via email all help make your work more visible to your teams so folks stay on the same page throughout their project, release, or set of tasks.

JIRA Basic Requirements

JIRA can run well on any reasonably fast workstation computer as its memory requirements depend on how many projects and issues you will store, but 300MB – 1GB (of Java heap size) is enough for most evaluation purposes for JIRA Setup.

Jira is a cross platform web based application that runs centrally on a server while the users interact with it through web browsers from any other computer. So on the server side we will need a browser with JavaScripts enabled on it with addition to the JAVA installed on your system.

JAVA Installation

JIRA requires a Java Developers Kit (JDK) or Java Runtime Environment (JRE) platform to be installed on your server's operating system. But in case of Linux Installer to install JIRA, there is no need to install and configure a separate JDK/JRE since these executable files will install and configure their own JRE to run JIRA.

Database for JIRA

JIRA requires a relational database to store its issue data. JIRA supports most popular relational database servers, so we suggest using the one that you are most comfortable with administering.
We will be using MySQL database in this tutorial. So, if you intend to use JIRA in your production environment, we strongly recommend that you connect JIRA to an enterprise database.

So, in order to create the separate database and user for the Jira, connect to your mysql server or whatever you are using and run the below commands in case you are using MySQL.

mysql> create database jiradb character set utf8;
Query OK, 1 row affected (0.17 sec)

mysql> create user 'jira'@'localhost' identified by 'jira123';
Query OK, 0 rows affected (0.25 sec)

mysql> GRANT ALL Privileges ON jiradb.* TO 'jira'@'localhost' IDENTIFIED by 'jira123' with grant option;
Query OK, 0 rows affected (0.17 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.14 sec)

mysql> quit

Download JIRA Linux Installer

Now we are going to install a new JIRA installation on Linux using the automated 'Linux Installer' script. Let's download the appropriate JIRA 'Linux 64-bit / 32-bit Installer' (.bin) file from the JIRA page.

Jira Download

You can also copy the download link and put it on your server using "wget" command given below.

root@ubuntu-15:~# wget https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-6.4.10-x64.bin

jira package

Installing JIRA on Linux Ubuntu

According to the Jira Documentation there are two ways to install JIRA using the Linux Installer, Using the "Console Wizard" or by "Performing Unattended Installation". So we are going to Use the console wizard and if you are installing JIRA on your server for the first time or you wish to specify your installation options then choose the same.

Let's execute the recently downloaded Linux Installer with 'root' user privileges, the installer will create a dedicated user account for JIRA. To run JIRA as a service, the Linux Installer must be executed with 'root' user privileges.

Run the below commands to give the execute permission to the binary script and then execute it within its downloaded directory.

root@ubuntu-15:~# chmod +x atlassian-jira-6.4.10-x64.bin

Now you can start the binary script to run the installer.

root@ubuntu-15:~# ./atlassian-jira-6.4.10-x64.bin

Unpacking JRE ...
Starting Installer ...

This will install JIRA 6.4.10 on your computer.
OK [o, Enter], Cancel [c]
o

Choose the appropriate installation or upgrade option as shown below.

Jira Installer

Open Ports for JIRA

If are working with your firewalld enabled and active then make sure that the ports that you configured for JIRA during the above installation process are open in your firewall.

In ubuntu you can enable and open the JIRA ports by running the below commands.

#sudo ufw enable
#sudo ufw allow 8181
#sudo ufw allow 8005

Starting and Stoping JIRA

If JIRA is not already started, you can start/stop JIRA using the appropriate command at the Linux console as given below.

To stop JIRA

#stop-jira.sh
#service jira stop
#/etc/init.d/jira stop

To start JIRA

#start-jira.sh
#service jira start
#/etc/init.d/jira start

JIRA service startup script will be executed as shown below on your terminal.

jira service

JIRA Web Setup

Now you can access JIRA from any computer with network access to your JIRA server by opening a supported web browser on the computer and visiting the below URL, by giving the name or IP address of the computer on which you have installed JIRA and the HTTP port number specified when you installed JIRA.

http://your_servers_ip:8181/

Choose the method you would like for the Jira setup, whether you want to install it in production or demostration environment and then click to the NEXT button.

Jira web

JIRA Database Setup

Here we need to choose the database setup from the two available options whether to chose the built in database or choose our own. So, we will be going with our own database that we had created on earlier step.

After choosing the MySQL databse, you will be asked to for JIRA requires that you download and install the MySQL driver. You will have to restart JIRA after installing the driver.

MySQL Driver

So, let's follow the instructions for Connecting JIRA to MySQL as below to install the driver.

Open this link http://dev.mysql.com/downloads/file.php?id=457912 and click on the download button as shown below.

mysql connector

Now upload it to the server and extract the zipped package and place the required .JAR file into the directory where we have intalled JIRA in its lib directory.

mysql connector

Now restart JIRA service and with "/etc/init.d/jira stop/start" command.

Testing JIRA Database

Now refresh your JIRA web setup page choose the database options an click on the "Test Database Connection", so when you get a message that database connection is successful click on the "NEXT".

Database Test

Then it will take few minutes while preparing the database for JIRA.

JIRA Application Set Up Properties

Once you database has been setup then we will be directed to the next screen where we have to configure and setup the application properties for JIRA by choosing its Name, Mode and Base URL.

jira propertise

Then moving to the next step we have to choose the type of JIRA according the requirement and purpose you want to use it for. so We'll install JIRA and JIRA Agile to enable agile software development workflows and task boards.

jira type

Specify Your License Key

We need a license key to set up JIRA. Enter your license key or generate a new license key below. You need an account at my.atlassian.com to generate a license key. Let's choose the appropriate option to generate the license key and move to NExt.

jira key

Check your Email and verify that you have mentioned for Jira Key generation.

Setup Admin Account

Then setup your administrator account provided with your username and passowrd.

admin account

Now Finish the installation setup after configuring a connection to an outgoing mail server so that JIRA can send email notifications. You can configure a mail server now or after you have set up JIRA.

Finish Jira Setup

Welcome To JIRA

Greetings! Welcome to JIRA , After you first time login to JIRA you will be guided to use Jira and how you can create your first Project and raise Issues within that project.

Here is the first look of it Dashboard, where you can create new projects or raise your issues.

Jira Dashboard

Conclusion

JIRA can be great source of information,or to know the status of the running project. As the whole team working on it,and would agree on the points mention in it. It keeps on giving reminders or updating with the running state of the project.So if you are new to JIRA and are working in Software Development or Testing and not aware how to install and use JIRA effectively, then we hope have at the end of this tutorial you are now able to setup JIRA without any problem. If you still find any problem then feel free to contact us right here.

The post How to Setup JIRA on Ubuntu 15.04 appeared first on LinOxide.

Howto Setup SpaceWalk System Management in CentOS / RHEL 7.X

$
0
0

Spacewalk is a free and open source Linux systems management software developed by Red Hat and maintained by its active community. It was the upstream version of the Red Hat Satellite which got open sourced in 2008. Spacewalk includes a beautiful web interface with powerful back-end, Red Hat Proxy Server and its associated client software of Red Hat Satellite. It uses PostgreSQL to store its necessary data and uses it as default database system. It is released under the GNU General Public License version 2 by its community and developers. Unlike Satellite, it is fully community-driven and support several other linux distributions like Fedora, CentOS, SuseLinux, Debian and their derivatives. Some of the major features of Spacewalk are listed as follows.

  • It provides information of hardware and software in our system.
  • It makes install and update of software easy in our system.
  • It helps to collect and distribute our custom software packages into manageable groups.
  • It provisions kickstart deployment our system.
  • Managing and deploying configuration files is easy with spacewalk.
  • It has the capacity to start, stop and configure virtual guests like Xen, KVM.

Here are some easy steps on how we can setup Spacewalk completely in our machine running CentOS 7 or RHEL 7.

1. Installing EPEL Repo

First of all, we'll install the EPEL repository into our linux machine so that the Java Virtual Machine package v 1.6 or greater and other dependencies required by spacewalk will be installed from the EPEL repository while installing it. It also contains the necessary version of openjdk which is required by spacewalk. To install EPEL in our CentOS 7 or RHEL 7, we'll need to run the following command in a terminal or console under sudo/root access using rpm package manager.

# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Retrieving https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
warning: /var/tmp/rpm-tmp.mvB2nT: Header V3 RSA/SHA256 Signature, key ID 352c64e5: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:epel-release-7-5 ################################# [100%]

2. Adding JPackage Repo

Next, we'll need to install JPackage repository so that all the necessary java packages for spacewalk will be installed. It is strongly recommended to install it before installing Spacewalk in our centos or rhel machine. To add JPackage repository, we'll create a new file named jpackage-generic.repo under /etc/yum.repos.d/ directory and add the required configuration using a text editor.

# vi /etc/yum.repos.d/jpackage-generic.repo

We'll now add the following lines of configuration for our jpackage repository then, we'll simply save and exit the file.

[jpackage-generic]
name=JPackage generic
#baseurl=http://mirrors.dotsrc.org/pub/jpackage/5.0/generic/free/
mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=5.0
enabled=1
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc

Adding Jpackage Repo

Here, we're adding the repository of JPackage version 5.0 which is generic release.

3. Setting up Spacewalk Repo

We'll need to add the official yum repository of Spacewalk so that we can easily install spacewalk and its required dependencies from the repository. Here in this tutorial, we'll install the latest release of spacewalk ie 2.3 so, we'll gonna install the repository of the respective version ie 2.3. To install the repository, we'll need to install an rpm file which can be installed by running the following command in a terminal or console.

# rpm -Uvh http://yum.spacewalkproject.org/2.3/RHEL/7/x86_64/spacewalk-repo-2.3-4.el7.noarch.rpm

Retrieving http://yum.spacewalkproject.org/2.3/RHEL/7/x86_64/spacewalk-repo-2.3-4.el7.noarch.rpm
warning: /var/tmp/rpm-tmp.SsWo0p: Header V3 RSA/SHA1 Signature, key ID 066e5810: NOKEY
Preparing... ################################# [100%]
Updating / installing...
1:spacewalk-repo-2.3-4.el7 ################################# [100%]

4. Installing a Database server

Next, we'll need to install a database server so that spacewalk can store data and information into it. There are several options on database servers that spacewalk can be used with. But PostgrelSQL is the most popular and easy to install database system for spacewalk. As Spacewalk contains an embedded postgresql database server, we'll simply install it. To do so, we'll need to run the following yum command.

# yum install spacewalk-setup-postgresql

5. Installing Spacewalk

After our database server with default spacewalk configuration has been setup, we'll now finally install spacewalk in our CentOS or RHEL machine. As we have installed postgresql for database purpose, we'll now run the following yum command to install spacewalk.

# yum install spacewalk-postgresql

6. Configuring Spacewalk

Now we'll configure our spacewalk installation to make it work. As we are installing spacewalk with postgresql as database server, we'll simply run the default command to configure spacewalk. To configure spacewalk, we'll need to run the following command.

# spacewalk-setup --disconnected

** Database: Setting up database connection for PostgreSQL backend.
** Database: Installing the database:
** Database: This is a long process that is logged in:
** Database: /var/log/rhn/install_db.log
*** Progress: ###
** Database: Installation complete.
** Database: Populating database.
*** Progress: ############################
* Configuring tomcat.
* Setting up users and groups.
** GPG: Initializing GPG and importing key.
** GPG: Creating /root/.gnupg directory
You must enter an email address.
Admin Email Address? arun@linoxide.com
* Performing initial configuration.
* Activating Spacewalk.
** Loading Spacewalk Certificate.
** Verifying certificate locally.
** Activating Spacewalk.
* Configuring apache SSL virtual host.
Should setup configure apache's default ssl server for you (saves original ssl.conf) [Y]? y
** /etc/httpd/conf.d/ssl.conf has been backed up to ssl.conf-swsave
* Configuring jabberd.
* Creating SSL certificates.
CA certificate password?
Re-enter CA certificate password?
Organization? Linoxide
Organization Unit [centos]? Linux
Email Address [arun@linoxide.com]?
City? Dublin
State? Leinster
Country code (Examples: "US", "JP", "IN", or type "?" to see a list)? IE
** SSL: Generating CA certificate.
** SSL: Deploying CA certificate.
** SSL: Generating server certificate.
** SSL: Storing SSL certificates.
* Deploying configuration files.
* Update configuration in database.
* Setting up Cobbler..
Cobbler requires tftp and xinetd services be turned on for PXE provisioning functionality. Enable these services [Y]?
* Restarting services.
Installation complete.
Visit https://centos to create the Spacewalk administrator account.

7. Allowing Firewall

As spacewalk consists of a web based interface, it needs to be accessible from a web browser connected to the internet. To do so, we'll need to allow http port 80 and https port 443 from the firewall program. As firewalld is the default firewall program in CentOS 7 and RHEL 7, we'll need to simply run the following firewall-cmd command to allow those two protocols.

# firewall-cmd --permanent --add-service=http
# firewall-cmd --permanent --add-service=https

Then, we'll need to reload the firewall daemon to apply the changes.

# firewall-cmd --reload

8. Web Installation

Finally, we'll now navigate to our Spacewalk web interface by pointing our web browser to https://server.domain.com or https://ip-address/ according to our configuration. As the web interface of spacewalk uses SSL/TLS for web security, we may get some warning regarding the certificate as we're using a self-signed SSL certificate in this tutorial. After confirming the certificate, we'll see a web page of Spacewalk as shown below.

Creating Spacewalk User

Then, we'll be asked to create a new administrative user and assign a desired password for that user. Then, we'll be asked to enter our name and email address. After entering the required information, we'll simply click on Create Login button. That will create a new user with the required information and lead towards the dashboard of spacewalk.

Spacewalk Dashboard

Conclusion

Spacewalk is pretty easy to setup as we have done in this tutorial. It is a very powerful tool developed by its active community. As its a software maintained by its community, it doesn't have a commercial support as there is with Red Hat Satellite but the support is awesome by the spacewalk community. The machine should have 2 GB RAM as recommended but can be installed in the machine with 1 GB RAM too. It is recommended to install Spacewalk in the server which has resolvable fully-qualified domain name (FQDN) such as 'sub.domain.com' to make component working as expected. The web interface of spacewalk is very neat and clean with a well managed options and menus.  If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you !

The post Howto Setup SpaceWalk System Management in CentOS / RHEL 7.X appeared first on LinOxide.

How to Install and Setup Sentora CP on CentOS 7

$
0
0

Hello everybody, in today’s Linux article we are going to show you the complete setup of Sentora on CentOS-7.0 which is another open source and modern web hosting control panel. Sentora is a fully featured, easy to manage and with user friendly interface web hosting control panel. Its licensed under the GPLv3 and is a separately maintained by the ZPanel project. So, Sentora is one of the best choice for the small to medium sized ISPs who are looking for a cost effective and extendable platform as it provides their users with central repository to install, rate and publish modules or themes.

Sentora Pre-Installation Check

Before starting the installation of Sentora on CentOs 7 64-Bit Operating System, let’s make sure of the following points to be fulfilled for successful setup.

1) Prepare your Server

Prepare your latest CentOS 7 server with minimal installed packages so that there is no other management panel installed on it and there should be no web server services to be running on it like Apache, MySQL, PHP, Postfix etc because the installation script of Sentora does this all itself.

2) Setup Host

You have to configure your FQDN according to your registered domain name or sub domain that points to your server’s IP address through which you can access your Sentora control panel.

You can configure your local hosts entry by opening the below file with your editor.

# vi /etc/hosts

3) Setup Firewall

You have to open following default ports used in Sentora configurations, in that case if your systems firewall in active.

In CentOS Linux Operating system you can enable and allow port as follow.

# systemctl enable firewalld

[root@sentora ~]# firewall-cmd --zone=public --add-port=20/tcp --permanent
success
[root@sentora ~]# firewall-cmd --zone=public --add-port=21/tcp --permanent
success
[root@sentora ~]# firewall-cmd --zone=public --add-port=25/tcp --permanent
success
[root@sentora ~]# firewall-cmd --zone=public --add-port=53/tcp --permanent
success
[root@sentora ~]# firewall-cmd --zone=public --add-port=80/tcp --permanent
success
[root@sentora ~]# firewall-cmd --zone=public --add-port=110/tcp --permanent
success
[root@sentora ~]# firewall-cmd --zone=public --add-port=143/tcp --permanent
success
[root@sentora ~]#

Then use below command to reload firewall rule.

[root@sentora ~]# firewall-cmd --reload

Installing Sentora on CentOS 7.0

Now we will need to download the installation script from the official web link of Sentora Download Page .

Sentora download

To download files from the web you can also use the below wget command then give the execute permissions to the installer script.

# wget http://sentora.org/install

# chmod +x install

Sentora Installer

Now execute the Sentora installation script within the same directory where we you had downloaded it.

[root@sentora ~]# ./install

Installing Sentora

During the installation process through the script you will be prompted to configure the package by choosing your geographical area and the time zone. So choose you appropriate location and and time zone and press "Enter" to continue.

choose region

After that you Current default time zone would be set as 'Europe/London' as shown in the picture.

choose region

If you wish to change it using the /usr/bin/tzselect command in shell scripts

In the next step during the installation script you will be asked to configure the sub-domain that you want to use to access Sentora panel and the public IP of the server as shown in below image.

Choose Domain

Here you might get the warning about your DNS configurations if its not properly configured then add records in your DNS manager.

Then press "Y" to accept and install Senotra on your choosed subdomain with given IP. The installation script will install all of its required packages including dependencies that may take few minutes depending on your connection speed.

start installation

The Sentora installation script will ends up with restarting of following packages after their installation.

Daemon run complete! (21:03 6th Sep 2015 BST)
Restarting mariadb
Restarting httpd
Restarting postfix
Restarting dovecot
Restarting crond
Restarting named
Restarting proftpd
Restarting atd

Once the installation process is complete, you will be greeted with login details of Sentora and its database passwords as shown below.

########################################################
Congratulations Sentora has now been installed on your
server. Please review the log file left in /root/ for
any errors encountered during installation.

Login to Sentora at http://sentora.linoxide.com
Sentora Username : zadmin
Sentora Password : tjstwmfytjEWdxAUmw

MySQL Root Password : TOgQYXguamdjsrnC
MySQL Postfix Password : G3slr74qHyx7Iv3j
MySQL ProFTPd Password : Dej36skrSMEYmCiU
MySQL Roundcube Password : EMjst39sjXjDm
(theses passwords are saved in /root/passwords.txt)
########################################################

Sentora Control Panel Web Login

After your server is back after reboot, open your web browser and access your Sentora Control panel using the sub-domain or your server's IP address then provide your credentials, you got after completion of installation process.

Sentora CP login

Welcome to Sentora CP

Congratulations! you have successfully installed the latest version of Sentora CP on CentOS 7 VPS. Now you can manage your multiple domains web hosting using the free Sentora Control Panel by using its all features as shown below.

Sentora CP

Create New Domain on Sentora CP

From the domain management choose the domains module that will enables you to add or configure domain web hosting on your account.

Simply give your new domain name and choose the existing or create new home directory and then click on the Create button.

domain module

In the same way using different other modules you can manage your subdomains, databases, email settings and other system level functions.

Conclusion

It’s important to have a good grasp of what your web hosting needs are before committing to a specific web hosting. So the Sentora control is one of the best competitive web hosting control panel that offers their clients to easily make modifications to their web site as this application is reputable, stable and clearly supported. So always choose the best web hosting control panel as this could have a major impact on the functionality and stability of your web site’s performance.

The post How to Install and Setup Sentora CP on CentOS 7 appeared first on LinOxide.

How to Setup Node JS v4.0.0 on Ubuntu 14.04 / 15.04

$
0
0

Hi everyone, Node.JS Version 4.0.0 has been out, the popular server-side JavaScript platform has combines the Node.js and io.js code bases. This release represents the combined efforts encapsulated in both the Node.js project and the io.js project that are now combined in a single codebase. The most important change is this Node.js is ships with version 4.5 of Google's V8 JavaScript engine, which is the same version that ships with the current Chrome browser. So, being able to more closely track V8’s releases means Node.js runs JavaScript faster, more securely, and with the ability to use many desirable ES6 language features.

Node JS

Node.js 4.0.0 aims to provide an easy update path for current users of io.js and node as there are no major API changes. Let’s see how you can easily get it installed and setup on Ubuntu server by following this simple article.

Basic System Setup

Node works perfectly on Linux, Macintosh, and Solaris operating systems and among the Linux operating systems it has the best results using Ubuntu OS. That's why we are to setup it Ubuntu 15.04 while the same steps can be followed using Ubuntu 14.04.

1) System Resources

The basic system resources for Node depend upon the size of your infrastructure requirements. So, here in this tutorial we will setup Node with 1 GB RAM, 1 GHz Processor and 10 GB of available disk space with minimal installation packages installed on the server that is no web or database server packages are installed.

2) System Update

It always been recommended to keep your system upto date with latest patches and updates, so before we move to the installation on Node, let's login to your server with super user privileges and run update command.

# apt-get update

3) Installing Dependencies

Node JS only requires some basic system and software utilities to be present on your server, for its successful installation like 'make' 'gcc' and 'wget'. Let's run the below command to get them installed if they are not already present.

# apt-get install python gcc make g++ wget

Download Latest Node JS v4.0.0

Let's download the latest Node JS version 4.0.0 by following this link of Node JS Download Page.

nodejs download

We will copy the link location of its latest package and download it using 'wget' command as shown.

# wget https://nodejs.org/download/rc/v4.0.0-rc.1/node-v4.0.0-rc.1.tar.gz

Once download completes, unpack using 'tar' command as shown.

# tar -zxvf node-v4.0.0-rc.1.tar.gz

wget nodejs

Installing Node JS v4.0.0

Now we have to start the installation of Node JS from its downloaded source code. So, change your directory and configure the source code by running its configuration script before compiling it on your ubuntu server.

root@ubuntu-15:~/node-v4.0.0-rc.1# ./configure

Installing NodeJS

Now run the 'make install' command to compile the Node JS installation package as shown.

root@ubuntu-15:~/node-v4.0.0-rc.1# make install

The make command will take a couple of minutes while compiling its binaries so after executinf above command, wait for a while and keep calm.

Testing Node JS Installation

Once the compilation process is complete, we will test it if every thing went fine. Let's run the following command to confirm the installed version of Node JS.

root@ubuntu-15:~# node -v
v4.0.0-pre

By executing 'node' without any arguments from the command-line you will be dropped into the REPL (Read-Eval-Print-Loop) that has simplistic emacs line-editing where you can interactively run JavaScript and see the results.

node version

Writing Test Program

We can also try out a very simple console program to test the successful installation and proper working of Node JS. To do so we will create a file named "test.js" and write the following code into it and save the changes made in the file as shown.

root@ubuntu-15:~# vim test.js
var util = require("util");
console.log("Hello! This is a Node Test Program");
:wq!

Now in order to run the above program, from the command prompt run the below command.

root@ubuntu-15:~# node test.js

Node Program

So, upon successful installation we will get the output as shown in the screen, where as in the above program it loads the "util" class into a variable "util" and then uses the "util" object to perform the console tasks. While the console.log is a command similar to the cout in C++.

Conclusion

That’s it. Hope this gives you a good idea of Node.js going with Node.js on Ubuntu. If you are new to developing applications with Node.js. After all we can say that we can expect significant performance gains with Node JS Version 4.0.0.

The post How to Setup Node JS v4.0.0 on Ubuntu 14.04 / 15.04 appeared first on LinOxide.

Viewing all 1507 articles
Browse latest View live


Latest Images