Quantcast
Channel: LinOxide
Viewing all 1287 articles
Browse latest View live

How to Setup DirectAdmin Hosting Control Panel on CentOS 6 / 7

$
0
0

Direct Admin is a Graphical User Interface (GUI) web hosting control panel that provides you the administrative options for managing all the parts of your hosting account and can be used for the management of web hosting and making your users easier to perform common web hosting account management tasks. DirectAdmin automates the tasks for creating separate packages and defining your customized rules so that the web servers can be easily shared and give web site owners a way to quickly set-up and manage their web sites.

The DirectAdmin control panel is very low cost and has become one of the most popular web hosting control panel in use today that provided every feature that you would like to set up on your web site with shared hosting.

Preparing Servers

In this article we going to show you the complete installation steps for DirectAmin Web Hosting control Panel on CentOS 6 and CentOS 7 servers.

1) Hostname Setup

Let's prepare your CentOS server with basic parameters by configuring its proper Host names and IP address. To configure the basic server parameters, login to your server using the root or sudo credentials and configure your host name using below commands.

CentOS 6

# vi /etc/sysconfig/network
HOSTNAME=cantos-6

# vi /etc/hosts
72.25.10.175 centos-6 centos-6.linoxide.com

CentOS 7

# Hostnamectl set-hostname centos-7

# vi /etc/hosts
72.25.10.173 centos-7 centos-7.linoxide.com

2) Firewall Settings

After host name setup configure your firewall and SELinux to permissive mode so that you won't get any issue during your installation setup but keep a note that enable it back and allow only your required ports in firewall if you are working on production environment.

CentOS 6

# Service iptables start

# vi /etc/sysconfig/selinux
SELINUX=permissive

CentOS 7

# systemctl start firewalls

# setenforce 0

3) System Update

Now run the following command to update your CentOS 6/7 servers with latest patches and updates.

# yum update

You asked to press Y for Yes and N for No to exit from the update, so press "Y" key and hit enter to start installing missing packages and their updates.

4) Installing Packages

Before starting the DirectAdmin installation setup, we will be installing few packages that must be installed on your CentOS 6 or 7 server.

Let's run the below command to install some dependent packages on your CentOS server.

CentOS 6

# yum install wget zip unzip gcc gcc-c++ flex bison quota make perl bind bind-libs bind-utils openssl openssl-devel libaio libcom_err-devel libcurl-devel gd zlib-devel libcap-devel cronie bzip2 autoconf automake libtool which patch mailx cyrus-sasl-devel perl-ExtUtils-Embed db4-devel

After successful execution of above command you will be asked whether to proceed for the installation of these packages including their dependencies and updates. So, press "Y" key to proceed the installation.

CentOS 7

In CentOS 7, we need to install the following dependencies for with addition to some general packages installation as shown below.

# yum install wget unzip psmisc net-tools libdb-devel perl-DBI systemd-devel

Downloading DirectAdmin

To download the latest installation script for DirectAdmin we will be using the following command on CentOS 6/7 servers as shown.

# wget http://www.directadmin.com/setup.sh

Assign the executable permissions to the downloaded script by using the below command.

# chmod 755 setup.sh

Now you can see by list your current directory that it should have the proper executable permissions.

Starting DirectAdmin Installation:

To start installation of DirectAdmin on CentOS 6/7, let's point to installation script and execute it within your current direct directory where you have downloaded then press "Y" key to install the required pre installation packages as shown.

#./setup.sh

*** 64-bit OS ***

*****************************************************
*
* DirectAdmin requires certain packages, described here:
* http://help.directadmin.com/item.php?id=354
*
* Would you like to install these required pre-install packages? (y/n): y

This might take a while to install the prerequisites, after that you will be asked to configure some of the following settings. So, choose the best appropriate answers according to your environment and give correct Client ID and License ID that you have got from DirectAdmin against your public IP.

Complete!
*
*****************************************************

Please enter your Client ID : xxxxx
Please enter your License ID : xxxxxx
Please enter your hostname (server.domain.com)
It must be a Fully Qualified Domain Name
Do *not* use a domain you plan on using for the hostname:
eg. don't use domain.com. Use server.domain.com instead.
Do not enter http:// or www

Enter your hostname (FQDN) : centos-7.linoxide.com
Client ID:
License ID:
Hostname: centos-007.linoxide.com
Is this correct? (y,n) : y
Is ens160 your network adaptor with the license IP (72.25.10.173)? (y,n) : y
Your external IP: xx.xx.xx.xx
The external IP should typically match your license IP.

Is 72.25.10.173 the IP in your license? (y,n) : y

DirectAdmin will now be installed on: Enterprise 7.1
Is this correct? (must match license) (y,n) : y
You have chosen custombuild 2.0.
--2015-12-08 22:13:35-- http://files.directadmin.com/services/custombuild/2.0/custombuild/build
Resolving files.directadmin.com (files.directadmin.com)... 69.162.69.58, 208.167.226.3, 216.144.254.90
Connecting to files.directadmin.com (files.directadmin.com)|69.162.69.58|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 617821 (603K)
Saving to: ‘/usr/local/directadmin/custombuild/build’

100%[====================================================================================>] 617,821 431KB/s in 1.4s

2015-12-08 22:13:37 (431 KB/s) - ‘/usr/local/directadmin/custombuild/build’ saved [617821/617821]

Would you like the default settings of apache 2.4 with mod_ruid2 and php 5.5 cli? (y/n):y

After downloading the updates and packages with your client id and license id for your IP address you see a multiple number of DirectAdmin processes taking place on your screen to complete the installation setup.

DirectAdmin Web Access

Upon successful completion of the installation setup of DirectAdmin, you can access its Web Console on your web browser with the FQDN of your server and port '2222'.

http://your-servers-ip:2222

Make sure that the port 80 and 2222 is allowed in your firewall/iptable settings.

Conclusion

In this article you have learned about installation of DirectAdmin on CentOS 6 and 7 server. DirectAdmin is one the best alternative to WHM-cPanel and its quite cheap and fairly easily to setup. Thank you for reading this article we hope you find it much helpful. Don't forget to leave your valuable comments.

The post How to Setup DirectAdmin Hosting Control Panel on CentOS 6 / 7 appeared first on LinOxide.


How to Configure Magento on Ubuntu 15.10

$
0
0

Hello Everyone, our today's article is installing Magento on the latest version of Ubuntu 15.10. Magento is most powerful and fast growing e-commerce software and e-commerce platforms solution, created by Varien aimed at larger sites. It is an open-source platform using Zend PHP and MySQL databases that offers great flexibility through its modular architecture. It is completely scalable and has a wide range of control options that its users appreciate after using it just because it is designed to be utilized as an application by someone who isn't a developer. While finding help on Magento is also not a big issue as its community is extremely large and very helpful.

The installation of Magento is very easy and you can also add additional layouts and plug-ins with little efforts.

Basic Requirements

The basic requirements to install Magento on Ubuntu 15.10 includes the basic system resources with sufficient RAM and Hard Disk. We are going to install it using 4 GB of RAM, 50 GB Disk and 2 vCPU.

Make sure that you have configured the FQDN and IP address with sudo privileges on the server to perform different system level tasks.

1) System Update

Let's login to your Ubuntu 15.10 server and run the command below to update your system packages with latest patches and security updates.

# apt-get update

2) LAMP Setup

LAMP stack is the basic software requirement to install Magento on any Linux distribution. So, in this step we be installing Apache Web server , MySQL Database and PHP including some of its required libraries for Magento.

First of all run the below command to install install PHP and its dependent libraries as shown.

# apt-get install php5 php5-mcrypt php5-common libapache2-mod-php5 php5-cli php5-ldap php5-gd php5-xsl php5-intl php5-mysql php5-xmlrpc php5-curl php5-tidy

After that run the the command below to install Apache and MySQL Database server and its client packages.

# apt-get Apache2 install mysql-server mysql-client

Installing Apache and MySQL

Next you will be asked to configure the MySQL root password which is highly recommended to setup during its installation then press OK to proceed.

MySQL root config

3) Starting Services

Start MySQL and Apache services and enable these for auto start at bootup.

# systemctl start mysql
# systemctl enable mysql

# systemctl start apache2
# systemctl enable apache2
# systemctl status apache2

Apache Status

4) Database Setup for Magento

Connect to the MySQL server console using the root credentials as per configured above then run the following MySQL commands to create a new database and user as shown with its assigned privileges.

# mysql -u root -p

mysql> CREATE DATABASE magentodb;
mysql> GRANT ALL PRIVILEGES ON magentodb . * TO magento@'localhost' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
mysql> flush privileges;
mysql> exit

MySQL DB setup

5) Apache Configurations

Open the default configuration file for Apache configurations using any editor, you are comfortable with and update its configuration by adding the following parameters in it as shown.

# vim /etc/apache2/sites-available/000-default.conf

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all

apache Conf

Then we need to configure PHP for Magento to make it utilize its enough required memory by changing its following parameters as shown.

# vim /etc/php5/apache2/php.ini

; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 512M
:wq!

Close the the file after saving the changes and restart apache web server services to implement all the changes that we made in above configuration files.

# systemctl restart apache2

Downloading Magento

Our basic requirements section is complete, now we will downloading the latest available package for Magento this LINK

Magento Download

After uploading the Compressed folder on your Ubuntu Server, run the command below to extract its package using below command.

root@localhost:~# ls /var/www/html/
Magento-CE-2.0.0-2015-11-17-05-47-46.zip
root@localhost:~# unzip /var/www/html/Magento-CE-2.0.0-2015-11-17-05-47-46.zip

Give the Apache ownership and fix its proper permissions to the web document directory using the below commands.

# chown -R www-data:www-data /var/www/html/
# chmod -R 755 /var/www/html

Now restart Apache and MySQL services once again after you will be able to access Magento on your web browser.

# systemctl restart apache2
# systemctl restart mysqld

Magento Web Installation

Open your web browser and open the link below that can be your server's IP address of the fully qualified domain name and you will be directed towards its setup.

http://your_servers_IP/

Click on 'Agree and Set Up Magento' to proceed to the next step.

Magento Web

Next you will be followed by the readiness check test, so click on the 'Start Readiness Check' button to test your PHP extensions and setting.

Readiness Check

You might get some errors, so fix them according to the solution other wise you can't be able to move to next step. Once your Readiness check result is all fine you will be able to move to the next step as indicated.

Readiness test result

Choose the database settings by mentioning the database name, its user and password.

Adding DB

Configure your web settings by providing the store and Magento Web address as shown.

Web Configurations

In the next step you will be asked to customize your store settings and you can also choose your selected modules as requirements.

Store Customization

Create your admin user and mention its name and password within the required fields as shown below.

Admin Account

That's it now click on the INSTALL button to proceed to the final step for the installation of Magento 2.0.0 on Ubuntu 15.10 as shown below.

Mageto Install

A progress bar will be launched, let's wait for its completion upto 100 % installation done.

Magento Installation

Lanuching Magento Admin

Congratulation, we have successfully completed the installation setup, you can see a summary of your server built and click on the 'Launch Magento Admin' as shown below .

Magento Admin

Conclusion

After Launching the Magneto Web console , login with your admin account and start enjoying with Magento its really an awesome and best e-commerce solution. I hope you have found this article much helpful, let's share your comments about your experience with Magento.

The post How to Configure Magento on Ubuntu 15.10 appeared first on LinOxide.

Introduction to IRC with XChat, Irssi and UnrealIRCD on CentOS 7.0

$
0
0

Hi tuxman, this time we are going to talk about the Internet Relay Chat, or simply IRC. In the first part of this article we will review this protocol, how to use Irssi or XChat to connect on Freenode and other IRC networks,enter on channels and talk to people. After that, you will see how to start your own IRC service with UnrealIRCd.

Table of contents

  • Introduction
  • Connecting on IRC
  • Basic IRC commands
  • Serving IRC with UnrealIRCd

Introduction

You may remember the IRC chats, when there was no such thing as Facebook Google+ or LinkedIn and our social networks were IRC chat channels. Today we have a lot of alternatives to talk to someone on the internet, along with the social networks we have many popular messaging services, such as Whatsapp, Skype, Hangouts and so on.

However, despite IRC is not the main communication program on the internet, it is still alive and a great tool. It is a lightweight, widely deployed and  standardized protocol, originally created on 1988 by BBS users as a replacement and improvement for the talk program and that by its characteristics, saw the birth and death of many other messaging systems.

Connecting on IRC

To connect to an IRC network, you will need a client software. Here are some good clients for Linux.

Irssi

Irssi is a curses based IRC client, it is pretty great, customizable, allows the use of scripts and dismiss the need of a X server.

Install

yum install irssi

Connect to a network with the -c flag,

irssi -c irc.freenode.org

To switch between Irssi windows can be a little tricky at the first time,  you can use [Ctrl+n] to go to next window and [Ctrl+p] for the previous. the /window command.

/window [ next | previous ]

Use the list parameter to display a list with the open windows

/window list

You can then jump to the listed window number with [Alt+#], where # is the window number between 1-9. Another way to do this is with the goto parameter

/window goto [1-9]

You can also find good tips on how to use Irssi on quadpoint website.

XChat

XChat simplify the process for new comers by giving you point and click options to commands and most actions.

You can install XChat with yum

yum install xchat

Connect to IRC networks, using the dialog presented to you when you just start XChat, also accessible from  menu XChat->Network List [Ctrl+s]

Connect to IRC networks on XChat

Connect to IRC networks on XChat

As you sucessfully connect to the network, you can select one of the options to join to channels. You can also use the menu Server->List of Channels.

IRC join Freenode XChat

IRC join Freenode XChat

Basic IRC commands

Now you have a client ,here are some commands that you can use on IRC. When you first connect on a network, you will be given a nickname based on your system login by the client, and to change your nickname to Tuxman for instance, try this.

/nick Tuxman

With a new, you may want to enter on a channel. To list channels related to development try

/list #devel*

Once you find the channel you are interested on, try to join with /join #channelname.

/join #linux

OK, you are on a channel, you can start talking now, to know who is on the channel, do this with names

/names

Maybe you want to know more about who is someone on the network, try whois.

/whois MrRobot

Want to a chat window with someone? query.

/query MrRobot

Register you nick

You don't need to create an account to chat on IRC networks. However, if you want to prevent your nickname of being be used by someone else, you must register you nickname on the network. This will also give you access to resources that require registered nicknames, such as cloaking and access to more channels.

Let's suppose that you want to register the Tuxman nickname on Freenode. Ask the NickServ to REGISTER your nickname

/msg NickServ REGISTER password me@email.com

After that you must get your verification code that was sent to the email you provided and send it to NickServ

/msg NickServ VERIFY REGISTER nickname verifycode

You have registered your nickname, now you can identify yourself to the network

/msg NickServ IDENTIFY password

Connect and identify at Irssi startup with -n and -w flags.

irssi -c irc.freenode.net -n nickname -w password

You should also change your password from time to time, use the following command

/msg nickserv set password newpassword

Installing UnrealIRCd

Among other Ircd implementations there is the UnrealIRCd. It is fully featured, modular and highly documented, also the most implemented IRC server nowadays, corresponding to more than 50% of the currently running IRC servers.

Extra Requirements

Here is some requirements to get best of your UnrealIRCd, despite it is not required, it is strongly recommended as you will see.

Ntp - You must have correct time and date, ntp is your best choice to maintain time and date correct.

Install ntp

yum install ntp

Enable ntpd

chkconfig ntpd on

OpenSSL - This is also optional,  this will be used if you want SSL/TLS support.

yum install openssl

Zlib - This will let you to compress the network packets and reduce the load over the links.

yum install zlib

Get UnrealIRCd

Download Unrealircd.

wget --no-check-certificate https://www.unrealircd.org/downloads/Unreal3.2.10.5.tar.gz

Extact the tarball

tar zxvf Unreal3.2.10.5.tar.gz

Enter the sources tree

cd Unreal*

Enable chroot irc user and irc group (recommended)

This step is optional but strongly recommended as it will allow you to drop superuser rights and run UnreadIRCd under an unprivileged user account, inside a chrooted environment, and thus will make the whole setup much safer.

To do this you must edit include/config.h file within the sources directory.

Chroot environment feature is defined by the following directive

/* #define CHROOTDIR    */

Define the IRC_USER constant

/* #define IRC_USER  "<user name>" */

Define the IRC_GROUP constant

/* #define IRC_GROUP "<group name>" */

enable-user-chroot

Create group for ircd

groupadd ircd

Create ircd user and add it to the ircd group.

useradd ircd -s /bin/false -g ircd

Set the password for the ircd user to make sure no one can enter.

passwd ircd

Configure the build

At this point you follow the questions on the screen,  and you can use default settings most of then, however, I advice you to answer Yes when asked to enable ssl support.

./config

Configuring UnrealIRCd build

Configuring UnrealIRCd build

Build the sources

make

Install files

make install

If you enabled the ircd user, group and chroot features, you should now change the ownership of UnrealIRCd directory.

chown -R ircd:ircd /home/ircd/UnrealIRCd

Configure

It is time to make your IRC daemon work. For this edit the unrealircd.conf, the configuration file for UnrealIRCd. You can find the well documented file doc/sample.conf under your UnrealIRCD directory tree, it may help you in your journey. I created this working snippets with a brief description.

me - This block sets some basic server settings, name, basic info and the numeric value that must be unique across server on the same network.

me {

name "irc.localhost";
info "My Server";
numeric 1;

};

admin -  Here you set who is the server administrator, its name, nickname and email.

admin {

"George Jedi"; /* Name */
"geroge";/* Nick Name */
"george@heaven.net"; /* Email */

};

class clients/servers - This sets how clients and other servers are handled by the our server respectively. ping frequency, maximum of clients connections, frequency of reconnection tries, receive and send queues.

class clients {

pingfreq 90;
maxclients 500;
sendq 100000;
recvq 8000;

};'

class servers {

pingfreq 90;
maxclients 10; /* Max servers we can have linked at a time */
sendq 1000000;
connfreq 100; /* How many seconds between each connection attempt */

};

allow - Define who can connect to the server and how. First block allows user connections from any IP or hostname and limits the connections to 5 per IP. Second block allows only one authenticated connection to people from ugly.people.com

allow {

ip *;
hostname *;
class clients;
maxperip 5;

};

allow {

ip *@*;
hostname *@*.ugly.people.com;
class clients;
password "jayajaya";
maxperip 1;

};

listen - Which ports to listen for connections. On the block we are listening at port 6697 for user clients connecting over secure socket layer (SSL). Note also the line simple statement for plaintext connections at port 6667

listen *:6697 {

options {

ssl;
clientsonly;

};

};
#listen *:8067;
listen *:6667;
#listen *:6660-6669;

oper - Operator attributes, in this example we use an operator nicknamed george that can connect from anywhere with the "fuba" password

oper george {
class clients;
from {
userhost *@*;
};

password "fuba";
flags {

netadmin;
can_gkline;
can_kline;
can_unkline;
can_gzline;
can_zline;
can_restart;
can_die;
can_rehash;
global;

};

swhois "Example of a whois mask";
snomask cFfkoSsqNG;

};

loadmodule - Loads modules, these are the minimum recommended

loadmodule "modules/commands.so";
loadmodule "modules/cloak.so";

log - How log files will be written, on the example we log events flagged as errors, kills and so

log ircd.log {

maxsize 5MB;
flags {

errors;
kills;
oper;
tkl;

};

};

set - You may set many other things here, in our example we have a network at domain gaia.net called gaianet, that connect people to the #welcome channel, we set 3 different alphanumeric cloak keys, set the hosts on the network, create a #help  channel and other options that are detailed on nrealircd.org.

set {

kline-address my@email.address;
auto-join #welcome;
op

options {

hide-ulines;

};

maxchannelsperuser 10;
services-server         "services.gaia.net";
default-server              "localhost";
network-name                "gaianet";
help-channel                "#help";
hiddenhost-prefix           "gaia";

cloak-keys {

"aoAr1O6fh3Q6w4Hnl3J7hVz4Zb7x4YwpW";
"andaoAr1HnR6gl3sJ7uhVzO6fh3Q6w4oN3";
"a2Ja2JO6fh3Q6w4oNs7O6fh3Q6w4oN3s7";

};

hosts {

local           "locop.gaia.net";
global          "ircop.gaia.net";
coadmin         "coadmin.gaia.net";
admin           "admin.gaia.net";
servicesadmin   "csops.gaia.net";
netadmin        "netadmin.gaia.net";
host-on-oper-up "no";

};

};

Start UnrealIRCd

With all things in place, you can start your IRC daemon now.  Add the following command on rc.local to start UnrealIRCd when your system starts.

/home/ircd/UnrealIRCd/unreal start

It should run with no problems, however if face any problem during the startup, read the error messages on the terminal and also on the ircd.log file to figure out what is wrong.

Conclusion

You are done for now, your client and server should be running now, you can talk to people worldwide using some of the global networks or using your own network. However, it is a good idea to learn more on the IRC protocol, how to manage networks, channels and users, etc. The following documents should help you.

RFC documents

The following RFC defines the standards for the IRC protocol. You should read this before you can get best of IRC.

RFC-1459, RFC-2810, RFC-2811, RFC-2812, RFC-2813, RFC-7194

UnrealIRCd support and docs

Refer official documentation of UnrealIRCd to acquire more information. It contains all details that are not described on this document. You can also get help from IRC by connecting on irc.unrealircd.org:6667 on the #unreal-support channel. Thanks for reading!

The post Introduction to IRC with XChat, Irssi and UnrealIRCD on CentOS 7.0 appeared first on LinOxide.

How to Install PostgreSQL and PhpPgAdmin on FreeBSD 10.2

$
0
0

Postgresql or postgres is open-source object relational database system developed by PostgreSQL Global Development Group. 15 years active development, and until now has proven for the intregity, reliabelity and ability as the database server. It is powerfull and is very suitable for the use of large-scale database, support for all major operating system, including Linux, Unix, Mac OS X and Windows.

In this tutorial we will guide you about postgresql installation and configuration on Unix operating system FreeBSD 10.2. And then will install a phppgadmin as the premier web-based administration tool for postgresql that required apache and php.

Prerequisite

  • FreeBSD 10.2 - 64bit
  • Root privileges

Step 1 - Update the Repository Database

Log in to the freebsd server with the ssh credential, and the gain the sudo/root privileges with command "sudo su", and update the repository :

freebsd-update fetch
freebsd-update install

Step 2 - Install PostgreSQL Database

In this tutorial we will install all the package from the freebsd repository with pkg command, run pkg command as sudo user to install postgresql database :

pkg install postgresql93-server postgresql93-client

If the installation finished, next add postgresql to start at the booti time with sysrc command :

sysrc postgresql_enable=yes

Next, run command 'initdb' to initialize the database :

service postgresql initdb

And if you want the database postgresql to be accessed from the network, you must edit the postgresql.conf on pssql directory. Go to the postgresql configuration directory and edit the file with nano command.

cd /usr/local/psql/data/
nano -c postgresql.conf

Uncomment the listen address on line 59 and change the value to "*".

listen_addresses = '*'

On the line 63, uncomment the port option to enable postgresql listening on that port :

port = 5432

Save and exit.

And now start the postgresql with service command :

service postgresql start

Verify that postgresql is running on port 5432 with 'sockstat' command below :

sockstat -l4 | grep post

pgsql    postgres   19966 4  tcp4   *:5432                *:*

Step 3 - Configure User for PostgreSQL

Once the postgresql installation, it will create new user called 'pgsql', and in this step we need to change the password for 'pgsql' that used for log in to the pgsql shell/environment.

Run command below as root/sudo privileges :

passwd pgsql
New Password: INPUT YOUR PASSWORD HERE

And try to log in to the pgsql shell with command :

su pgsql

NOTE : If you run that command as roo/sudo privileges, you will not be ask for 'pgsql' password, but if you run it on the normal user, you will be ask a password for 'pgsql' user.

A password for pgsql user has changed, and the next step is to create new user and new database for postgresql. This user used to log in to the postgresql databse from the phppgadmin web based tool.

Log in to the pgsql user shell/environment :

su pgsql

And create new user 'imnewuser' and create new databse 'newdb' with command below :

createuser -sdrP imnewuser
createdb -O imnewuser newdb

  • -s : role will be superuser.
  • -d : role can create new database.
  • -r : role can create new roles.
  • -P : assign a password for new role.
  • -O : database user to own the new database.

New user and database is created, this user will be use for the next step to log in to the phppgadmin.

You can test with command below :

Test the database and User

Step 4 - Install Apache and PHP

PhpPgAdmin is php application, web based administrative tool for postgresql, so we need this up and accessible from the browser, and we need apache and php for it.

Install apache from freebsd repository with pkg command :

pkg install apache24

Go to the apache configuration directory and edit the file 'httpd.conf' :

cd /usr/local/etc/apache24/
nano -c httpd.conf

Uncomment the ServerName on line 219, and chage it to localhost IP :

ServerName 127.0.0.1:80

Save and exit.

And now add the apache to start at boot time, then start it :

sysrc apache24_enable=yes
service apache24 start

Apache Installation is done.

Next install php56 with pkg command :

pkg install php56 mod_php56 php56-curl php56-session php56-pgsql

And now you must configure php to work with apache by adding the php configuration to the apache configuration file 'httpd.conf'.

Go to the apache apache configuration directory and edit httpd.conf :

cd /usr/local/etc/apache24/
nano -c httpd.conf

Add php configuration below under line 288 :

<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>

And add the index.php on line 278 :

<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>

Save and exit.

Configure Apache and PHP

Next step is just copying the php.ini file on '/usr/local/etc/' directory :

cd /usr/local/etc/
cp php.ini-production php.ini

And restart the apache :

service apache24 restart

Apache and php is configured, and you can verify it by creating new php file on the web root directory. Go to the web directory and create the php file :

cd /usr/local/www/apache24/data
echo "<?php phpinfo(); ?>" > info.php

Visit the server IP : 192.168.1.108/info.php

Apache and PHP is Done

Step 5 - Install and Configure PhpPgAdmin

PhpPgAdmin is web application based on PHP for managing the Postgresql database. We can install it from source, but it is now available on freebsd repository, so let's install it with pkg command :

pkg install phppgadmin-5.1_1

On the installation step you will get error :

cp: /usr/local/www/data-dist/phpPgAdmin/conf/config.inc.php: No such file or directory

It is fine, dont worry about it.

Next, PhpPgAdmin is installed on directory '/usr/local/www/phpPgAdmin', and we must make the symlink of that directory to the apache web directory '/usr/local/www/apache24/data'.

cd /usr/local/www/apache24/data
ln -s /usr/local/www/phpPgAdmin/ /usr/local/www/apache24/data/

Now visit the server IP : 192.168.1.108/phpPgAdmin/.

And you will see the phppgadmin page, try to log in with the user and password created.

PhpPgAdmin Login Page

After logged in, we can see the database 'newdb' taht was created.

PhpPgAdmin is Done

PostgreSQL with PhpPgAdmin is installed on FreeBSD 10.2.

Conclusion

PostgreSQL is powerful and open-source object relational database management system (RDBMS). Developed more then 15 year, and it is very suitable for large scale database. It is Cross Platform, can run on Linux, Unix and Windows. PhpPgAdmin is web application based on php, used for manage the postgresql database from the browser. Postgresql and PhpPgAdmin is easy to install and configure.

The post How to Install PostgreSQL and PhpPgAdmin on FreeBSD 10.2 appeared first on LinOxide.

How to Install Django 1.9 with Gunicorn and Nginx on FreeBSD 10.2

$
0
0

Django is web framework based on python, maintain by Django Software Foundation. It is free and opensource python framework for building a macro web applications. Django is powerful, make your develpment process is so fast, make your application simple and useful. Make your developer easy to maintain and deploy the project. Django is a high-level python framework with MVC (Model-View-Controller) concept, used by big company like mozilla, pinterest, disquss, instagram, bitbucket etc. In this tutorial we will guide about django installation. We will install django 1.9 with gunicorn, supervisord and nginx as the web server. Nginx running on port 80 and django framework running under gunicorn with gunicorn sock file.

Prerequisite :

  • FreeBSD 10.2 - 64bit.
  • Root privileges.

Step 1 - Update FreeBSD Repository

Log in to your freebsd server and update the repository with 'freebsd-update' command :

freebsd-update fetch
freebsd-update install

Step 2 - Install Python, SQLite3 and Pip

In this step we will install python 2.7 with pip. If you want to use python3, please use MySQL or PostgreSQL as your django database. We will install python and pip from freebsd repository with command below :

pkg install python
pkg install py27-pip

And update the pip to latest version with command :

pip install --upgrade pip

Next, install sqlite3 databse and the python module py27-sqlite3 with pkg command :

pkg install sqlite3
pkg install py27-sqlite3

Python, pip and SQLite3 installed on the freebsd server.

Step 3 - Install Django on Virtual Environment

We will install and deploy django with the normal user called 'vagrant', not as root. We will install django under virtualenv, it is virtual python environment builder, tool to create the isolated python environment. Virtualenv is available on PyPI repository, we can install it with pip command :

pip install virtualenv

Next switch to the user 'vagrant' :

su - vagrant

Create new virtual environment called 'myenv' with python2.7 as the version of it. We can create it with virtualenv command below :

mkvirtualenv --python=python2.7 myenv

It will create new directory called 'myenv', go to the directory and activate the virtual environment that has been created before :

cd myenv
source bin/activate

And this our time to install django 1.9 and a gunicorn, install all it with pip command under the virtualenv :

pip install django==1.9
pip install gunicorn

Django and Gunicorn is installed, we can check it with pip command :

pip list

Django (1.9)
gunicorn (19.4.1)

Next, create new sample project with django. We will create new project named 'myproject' with django-admin command :

django-admin startproject myproject

That command will create new directory 'myproject', go to the directory and test the django installation by running manage.py file :

cd myproject/
python manage.py runserver

runserver = start our django project with port 8000.

Django_Virtualenv

If there is no error, then proceed with the next step by editing setting.py file inside django project directory :

nano -c myproject/settings.py

In the end of the line add configuration below :

STATIC_ROOT = '/home/vagrant/myenv/myproject/static/'
STATIC_URL = '/static/'

MEDIA_ROOT = '/home/vagrant/myenv/myproject/media/'
MEDIA_URL = '/media/'

Save and exit.

And generate the static file by running command below :

python manage.py collectstatic

collectstatic used to manage the static files, it will copied the django static file to directory 'static' on myproject dir.

Django_Collectstatic

Django is configured, and the last we need to configure the gunicorn. Go to the 'myenv' directory and activate the environment, then create new file on bin directory :

cd /home/vagrant/myenv/
source bin/activate
nano -c bin/gunicorn_start

Paste configuration below :

#!/bin/bash

NAME="myproject"                                             # Django Project Name
DJANGODIR=/home/vagrant/myenv/myproject                        # Django Project Directory
SOCKFILE=/home/vagrant/myenv/myproject/run/gunicorn.sock     # Gunicorn Sock File
USER=vagrant                                                # Django Project Running under user vagrant
GROUP=vagrant                                                # Django Project Running under group vagrant
NUM_WORKERS=3
DJANGO_SETTINGS_MODULE=myproject.settings                     # change 'myproject' with your project name
DJANGO_WSGI_MODULE=myproject.wsgi                             # change 'myproject' with your project name

echo "Starting $NAME as `whoami`"

# Activate the virtual environment
cd $DJANGODIR
source ../bin/activate
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
export PYTHONPATH=$DJANGODIR:$PYTHONPATH

# Create the run directory if it doesn't exist
RUNDIR=$(dirname $SOCKFILE)
test -d $RUNDIR || mkdir -p $RUNDIR

# Start your Django Unicorn
# Programs meant to be run under supervisor should not daemonize themselves (do not use --daemon)
exec ../bin/gunicorn ${DJANGO_WSGI_MODULE}:application \
--name $NAME \
--workers $NUM_WORKERS \
--user=$USER --group=$GROUP \
--bind=unix:$SOCKFILE \
--log-level=debug \
--log-file=-

Save and exit.

And make the script executable :

chmod u+x bin/gunicorn_start

Django is configured with gunicorn, django will run under gunicorn sock file.

Note : If you want to exit from the virtualenv, you can use command "deactivate".

Step 4 - Install Supervisord

Supervisor is a process control on Linux and Unix operating system that allow the users to monitor and control the number of process. In this tutorial we need a py-supervisor to control the gunicorn that running with our django project.

Install py-supervisor from freebsd repository with pkg command :

pkg install py-supervisor

If it's done, add supervisor to the boot time with sysrc command, and then start it:

sysrc supervisord_enable=yes
service supervisord start

Supervisor is started, but we need to add our application to it. We can do it by editing the supervisor configuration file, go to the directory and edit the file 'supervisord.conf' with nano :

cd /usr/local/etc/
nano -c supervisord.conf

In the end of the line, add our app configuration below :

[program:myproject]
command = sh /home/vagrant/myenv/bin/gunicorn_start
user = vagrant
stdout_logfile = /home/vagrant/myenv/logs/gunicorn_supervisor.log
redirect_stderr = true
environment=LANG=en_US.UTF-8,LC_ALL=en_US.UTF-8

Save and exit.

Now we must create new directory for the gunicorn log file with user vagrant  :

mkdir -p /home/vagrant/myenv/logs/
touch /home/vagrant/myenv/logs/gunicorn_supervisor.log

Restart the supervisor and check our application is running :

service supervisord restart
supervisorctl status

Supervisord

Step 5 - Install Nginx

We will use nginx as front end the server and run on port 80. If someone access from the browsers, the connection will be passed to gunicorn that running with the sock file.

Install nginx from the freebsd repository with pkg command :

pkg install nginx

Next configure the virtualhost for our django project. Go to the nginx configuration directory and create new directory called vhost there :

cd /usr/local/etc/nginx/
mkdir -p vhost/

Go to vhost directory and create new file conafiguration 'mydjango.conf' :

cd vhost/
nano -c mydjango.conf

Paste virtualhost configuration below :

upstream myproject_server {
server unix:/home/vagrant/myenv/myproject/run/gunicorn.sock fail_timeout=0;
}

server {

listen   80;
server_name www.djangofreebsd.com;

client_max_body_size 4G;

access_log /home/vagrant/myenv/logs/nginx-access.log;
error_log /home/vagrant/myenv/logs/nginx-error.log;

location /static/ {
alias   /home/vagrant/myenv/myproject/static/;
}

location /media/ {
alias   /home/vagrant/myenv/myproject/media/;
}

location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;

# Try to serve static files from nginx, no point in making an
# *application* server like Unicorn/Rainbows! serve static files.
if (!-f $request_filename) {
proxy_pass http://myproject_server;
break;
}
}

# Error pages
error_page 500 502 503 504 /500.html;
location = /500.html {
root /home/vagrant/myenv/myproject/static/;
}
}

Save and exit.

Now we must add the virtualhost configuration to the nginx.conf. Go back to the nginx directory, edit the file nginx.conf with nano :

cd /usr/local/etc/nginx/
nano -c nginx.conf

Before the end of the line, add line below :

include vhost/*.conf;

Save and exit.

Test the nginx configuration, if there is no error, add nginx to the boot time :

nginx -t
sysrc nginx_enable=yes

And the last, restart supervisord and start nginx :

service supervisord restart
service nginx start

Now we can access our django applications with the browser, in this tutorial we use domain www.mydjango.co.

Django_with Nginx_Done

Django admin page.

Djang_Admin

Django 1.9 and gunicorn with supervisor and nginx is done.

Conclusion

Django is web application framework based on python with MVC (Model-View-Controller) concept. Django is the best solutions for you if you want to build a macro web application. It is fast and simple, free and opensource and maintained by Django Software Foundation. Django can be up with standalone, but we can use apache or nginx too as the front end of the django project.

The post How to Install Django 1.9 with Gunicorn and Nginx on FreeBSD 10.2 appeared first on LinOxide.

How to Setup ClipBucket to Start Video Sharing Website in Linux

$
0
0

ClipBucket is a free and open source software which helps us to create a complete video sharing website like Youtube, Dailymotion, Metacafe, Veoh, Hulu in few minutes of setup. ClipBucket is the fastest growing application which was first started as Youtube Clone but now its advance features & enhancements makes it the most versatile, reliable & scalable media distribution platform with latest social networking features. It uses FFMPEG for video conversion and thumbs generation which is the most widely used application so, users can stream it straight away using the Flash & HTML 5 Players. Here are some of the awesome features available in ClipBucket.

  1. ClipBucket is 100% free and open source web application making it extensible and pretty easy to customize.
  2. It uses FFMpeg for real time conversion of videos to make on fly video conversion allowing users to stream using the Flash & HTML 5 Players.
  3. It has a beautiful media management, user management and messaging system.
  4. It also contains ajax based comments, ratings and channels and user feeds.
  5. In addition, it also consists of a built-in language editor.
  6. ClipBucket promises to make it 100% secure from different Security issues like SQL injection.

Here are some easy steps on how we can setup ClipBucket to start our own Video Sharing platform running in a linux based operating system. In this tutorial, we'll cover the installation of ClipBucket in Ubuntu 14.04 LTS and CentOS 7 linux distributions.

1. Installing LAMP Stack

First of all, we'll need to install a complete LAMP Stack. LAMP stack is the combination of Apache Web Server, MySQL/MariaDB Database server and PHP modules. In order to setup, we'll need to run the following command as shown below with respect to the distribution of linux we're running. Here, in this tutorial, we'll be focusing on two distributions of linux, CentOS and Ubuntu.

On Ubuntu 14.04

First of all, we'll gonna update the local repository index of our Ubuntu system so that we'll get the repository index of the latest available software packages.

# apt-get update

After the update is complete, we'll go for the installation of the lamp stack using apt-get command line as shown below.

# apt-get install apache2 mariadb-server php5 php5-gd php5-mysql php5-curl php5-xsl php5-cli php-pear unzip

In Ubuntu, we'll be asked to enter a new password for the MariaDB root user as shown below. We'll need this password in future for accessing the root user of MariaDB database server.

Set MariaDB Root Password Ubuntu

On CentOS 7

On CentOS 7, as we have yum as the package manager, we'll run the following command to install lamp stack.

# yum install httpd mariadb-server mariadb php php-gd php-mysql php-curl php-xsl php-cli php-mbstring php-pear unzip

2. Installing ImageMagick

After our LAMP Stack has been successfully installed, we'll now go for the installation of ImageMagick in our linux machine. ImageMagick will allow our clipbucket to process and manipulate the images. To setup, we'll need to run the following commands according to the linux distribution we are running in our machine.

On Ubuntu 14.04

# apt-get install imagemagick php5-imagick
# php5enmod imagick

On CentOS 7

# yum install ImageMagick ImageMagick-devel ImageMagick-perl

After installing ImageMagick and its other packages, we'll now install imagick which is a php module for ImageMagick. To install that, we'll need to run pecl command as shown below.

# pecl install imagick

And then, we'll need to append /etc/php.ini configuration file and add extension=imagick.so in the end of the file.

# echo extension=imagick.so >> /etc/php.ini

3. Installing FFMPEG

Next, we'll need to setup FFMPEG in our system. FFMPEG allows us to easily record, convert and stream audio and video. It will be used by Clipbucket to make a working video streaming site. In order to install it, we'll need to run the following commands in a console or terminal with sudo or root access as shown below.

On Ubuntu 14.04

As FFMPEG is currently not available in Ubuntu's repository, we'll either need to compile it and setup using the source code or install it via a PPA hosted in launchpad. There is a PPA of FFMPEG available which we can add by running the following command.

# apt-add-repository ppa:mc3man/trusty-media

After done, we'll need to update the local repository index using the following command.

# apt-get update

Then, we can install the required FFMPEG packages by running the following apt-get command.

# apt-get install ffmpeg gstreamer0.10-ffmpeg

On CentOS 7

FFMPEG is also not available in the official repository of CentOS so, we'll need to install NUX Dextop Release and EPEL "Extra Packages for Enterprise Linux" repository in our CentOS machine as its available in it.

# rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm
# yum install epel-release

After the repositories are added in our machine, we'll now go for the installation of FFMPEG in our machine by running the following yum package manager.

# yum install ffmpeg

4. Installing FLVTool2

We'll now install FLVTool2 which is an application for the manipulation of Macromedia Flash Video files (FLV).  It can calculate a lot of meta data, insert an onMetaData tag, cut FLV files, add cue points and more. To install it we'll first need to install ruby in our machine. To do so, we'll need to run the following command.

Installing Ruby

On Ubuntu 14.04

# apt-get install ruby

On CentOS 7

# yum install ruby

After ruby and its dependencies are installed successfully, we'll need to install flvtool2 using gem as shown below.

Installing via gem

# gem install flvtool2

Fetching: flvtool2-1.0.6.gem (100%)
Successfully installed flvtool2-1.0.6
1 gem installed
Installing ri documentation for flvtool2-1.0.6...
Installing RDoc documentation for flvtool2-1.0.6...

5. Installing MP4Box (GPAC)

we'll then need to install GPAC which is also known as MP4Box. It is needed by Clipbucked for performing many manipulations on multimedia files like AVI, MPG, TS, but mostly on ISO media files like MP4, 3GP. To install it, we'll need to execute the following command depending on the distributions we are running.

On Ubuntu 14.04

# apt-get install gpac mediainfo

On CentOS 7

# yum install gpac mediainfo

6. Configuring PHP Configurations

After everything above is installed successfully, we'll now go for configuring the PHP configuration. We'll need to edit the php.ini file which is located in different directory according to the distribution. In Ubuntu, php.ini file is located under /etc/php5/apache2/ directory whereas in CentOS, it is located under /etc/ directory.

On Ubuntu 14.04

# nano /etc/php5/apache2/php.ini

On CentOS 7

# nano /etc/php.ini

After opening the file with the text editor, we'll make sure that we have the configuration file configured as shown below. We'll need to append the opened file as the configurations shown below.

upload_max_filesize = 500M
max_execution_time = 300
max_input_time = 300
memory_limit = 256M
magic_quotes_gpc = on
magic_quotes_runtime = off
post_max_size = 500M
register_globals = off
safe_mode = off
output_buffering = off
display_errors = on

After done, we'll need to restart the Apache Web Server that is running in our machine.

On Ubuntu 14.04

# service apache2 restart

On CentOS 7

# systemctl restart httpd

7. Configuring MariaDB server

As we have already set password for our MariaDB root user in our machine running Ubuntu, we'll simply skip this step of configuring MariaDB and continue the next step of creating the database. But if we are running CentOS, we haven't configured MariaDB server so, we'll need to follow this step.

At first, as we haven't set any root password for our MariaDB server, we'll need to configure a root password for it. And after its done, we'll move forward towards the creation of a database user and a database so that Clip-Bucket can utilize it to store its data. To configure MariaDB and assign a root password, we’ll need to run the following command.

# 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!

8. Creating a MariaDB Database

Next, we’ll login to the MariaDB command prompt as root. Here, we’ll need to enter the password of the MariaDB root account that we had set above.

# mysql -u root -p

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

> CREATE DATABASE clipbucketdb;
> CREATE USER 'clipbucketuser'@'localhost' IDENTIFIED BY 'Pa$$worD';
> GRANT ALL PRIVILEGES ON clipbucketdb.* TO 'clipbucketuser'@'localhost';
> FLUSH PRIVILEGES;
> EXIT;

 

 Creating Database Clipbucket

Finally, we’ve successfully created a database named clipbucketdb with username clipbucketuser and password as Pa$$worD .

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

9. Configuring Apache Web Server

We'll now add a new virtualhost in the apache configuration so that we can define a specific apache configuration to our clipbucket installation. Creating it will help us to define specific ports, webroot, domain, alias and other configurations for our ClipBucket installation. Here are some configurations we'll setup in this tutorial respective to the distribution of linux we're running.

On Ubuntu 14.04 LTS

# touch /etc/apache2/sites-available/clipbucket.conf
# ln -s /etc/apache2/sites-available/clipbucket.conf /etc/apache2/sites-enabled/clipbucket.conf
# nano /etc/apache2/sites-available/clipbucket.conf

Now, we'll gonna add the following lines of configuration into the opened file.

<VirtualHost *:80>
ServerAdmin info@clipbucket.linoxide.com
DocumentRoot /var/www/clipbucket/
ServerName clipbucket.linoxide.com
ServerAlias www.clipbucket.linoxide.com
<Directory /var/www/clipbucket/>
Options FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/log/apache2/clipbucket.linoxide.com-error_log
CustomLog /var/log/apache2/clipbucket.linoxide.com-access_log common
</VirtualHost>

After done, we'll gonna save the file and exit the text editor. Then, we'll need to make sure that mod is enabled. To enable it, we'll need to execute the following command.

# a2enmod rewrite

Enabling module rewrite.
To activate the new configuration, you need to run:
service apache2 restart

Then, we'll restart our apache web server.

# service apache2 restart

On CentOS 7

In our CentOS machine, we'll create a file named clipbucket.conf under /etc/httpd/conf.d/ directory using a text editor.

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

Then, we'll gonna add the following lines of configuration into the file.

<VirtualHost *:80>
ServerAdmin info@clipbucket.linoxide.com
DocumentRoot /var/www/clipbucket/
ServerName clipbucket.linoxide.com
ServerAlias www.clipbucket.linoxide.com
<Directory /var/www/clipbucket/>
Options FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/log/httpd/clipbucket.linoxide.com-error_log
CustomLog /var/log/httpd/clipbucket.linoxide.com-access_log common
</VirtualHost>

Once done, we'll simply save the file and exit the editor. And then, we'll gonna restart our apache web server.

# systemctl restart httpd

10. Downloading ClipBucket

We'll now go for downloading the Clip Bucket package from the Official Clip Bucket Download Page . As the latest release of Clip Bucket is version 2.8, we'll get the link from the download page and then start the download using wget as follows under /tmp/ directory.

# cd /tmp/
# wget http://downloads.sourceforge.net/project/clipbucket/ClipBucket%20v2/clipbucket-2.8.v3354-stable.zip

--2015-12-12 11:15:16-- http://downloads.sourceforge.net/project/clipbucket/ClipBucket%20v2/clipbucket-2.8.v3354-stable.zip
Resolving downloads.sourceforge.net (downloads.sourceforge.net)... 216.34.181.59
...
Connecting to liquidtelecom.dl.sourceforge.net (liquidtelecom.dl.sourceforge.net)|197.155.77.8|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10710544 (10M) [application/octet-stream]
Saving to: 'clipbucket-2.8.v3354-stable.zip'
100%[===============================================>] 10,710,544 37.0KB/s in 3m 1s
2015-12-12 11:18:18 (57.9 KB/s) - 'clipbucket-2.8.v3354-stable.zip' saved [10710544/10710544]

After the download is completed, we'll gonna extract the zip file using unzip.

# unzip clipbucket-2.8.v3354-stable.zip

Once the compressed zip file is extracted, we'll get inside the extracted folder in which we'll see two folders named upload and do_not_upload. Under upload folder we'll see that there is the ClipBucket installation file which we'll copy to the webroot of apache server ie /var/www/html/ by default. Whereas under do_not_upload folder, we'll see a file named admin_change_pass.php which we can use to change the default password of Clipbucket login administration user.

To copy the installation files and directories of Clipbucket which lies under upload directory, we'll need to run the following command.

# mkdir /var/www/clipbucket
# cp -r /tmp/clipbucket-2.8.v3354-stable/upload/* /var/www/clipbucket/
# cp /tmp/clipbucket-2.8.v3354-stable/upload/.htaccess /var/www/clipbucket/

11. Fixing File Permission

After the compressed Clip Bucket zip file is extracted and moved to the webroot, we'll go further towards fixing of permission in the files and directories which lies under the installation directory.

# chmod -R 777 /var/www/clipbucket/includes/
# chmod -R 777 /var/www/clipbucket/files/
# chmod -R 777 /var/www/clipbucket/images/
# chmod -R 777 /var/www/clipbucket/cache/
# chmod -R 777 /var/www/clipbucket/cb_install/

After that, we'll also set the ownership of the installation directory to apache user as it should have full access to the files. To set the ownership of the directory to apache processes, we'll need to run the following command according to the distribution as the apache process owner may be different in different linux distribution.

On Ubuntu 14.04

# chown www-data:www-data -R /var/www/clipbucket/

On CentOS 7

# chown apache:apache -R /var/www/clipbucket/

12. Setting Up Crons

Now, its time for setting up the cronjob for making some scripts automated. We'll need to run crontab -e command which will open the crontab file in which we'll configure the automation.

# crontab -e

Then, we'll simply need to append the file with the following lines and we can even adjust the frequency of it according to our need for better performance.

* * * * * php -q /var/www/clipbucket/actions/video_convert.php
* * * * * php -q /var/www/clipbucket/actions/verify_converted_videos.php
0 0,12,13 * * * php -q /var/www/clipbucket/actions/update_cb_stats.php

After done, we'll simply save and close the text editor.

13. Allowing Firewall

Now, we'll allow port 80 to expose on the internet so that our site is accessible in the same network. To enable http or allow port 80, we'll need to run the following command.

On Ubuntu 14.04

Iptables is a very popular firewall solution program used in Ubuntu 14.04. So, to allow or expose port 80, we'll need to execute the following iptables command.

# iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
# iptables-save > /etc/iptables-up.rules

On CentOS 7

As systemd is used as the init system in CentOS 7, we'll have firewalld installed for firewall program. To allow port 80 or http service, we'll need to run the following commands.

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

14. Web based Installation

Finally, as we have setup and configured everything correctly in above steps, we'll now go further towards the web based installation of ClipBucket. To do so, we'll need to point our web browser to http://ip-address/ or http://domain.com according to the configuration of the server. Here, in this tutorial, we'll point our browser to http://clipbucket.linoxide.com/ . After the site is loaded in our browser, we'll see the first web installation page of Clipbucket asking us to accept the license and continue the installation.

ClipBucket Web Installation License

Once we have clicked on I agree and Continue, we'll be directed towards the next step of the installation where we'll see the components installed and missing in our system. Here, as PhpShield is an optional package, we haven't installed it so it must be showing red cross in it. Though, if you need to setup the missing dependencies for better performance, you can do that later too. And after that, we'll click on Continue to Next Step to continue further towards the next page.

Dependencies Check

In this page, we'll see everywhere green colored tick as we have successfully made those directories writeable in the above steps. So, we'll continue further towards the database page.

Directory Permission Check

We'll now further set the database configuration according to the database we had created above.  Here, we'll keep the hostname as localhost, database name as clipbucketdb, database user as clipbucketuser and password as Pa$$worD , and after done, we'll simply move forward by clicking on Check Connection in order to ensure that our ClipBucket application is able to connect to the database server.

Database Configuration Clipbucket

Next, we'll be asked to set the admin username, password and email address. Here, we set the default username and password ie admin and admin respectively.

Admin Login Config Clipbucket

Now, we'll be asked to enter the Website Title, Slogan and URL of our brand new video streaming site.

Setting Site Information

Then, finally we'll see another screen where we'll be said that Clipbucket has been successfully installed. After its installed, we'll need to further make sure to perform post installation tasks.

ClipBucket Installation Successfull

15. Post Installation

After its installed, we'll be asked to delete cb_install directory from the Clipbucket website path. To do so, we'll need to run the following command.

# rm -rf /var/www/clipbucket/cb_install/

After its done, we'll go to the login page and enter our username and password as admin and admin respectively. We strictly recommend everyone to change your administration username and password for the security measures.

Conclusion

Finally, we have successfully installed ClipBucket in our machine running Ubuntu 14.04 LTS and CentOS 7 as linux distributions. ClipBucket is a responsive web application enabling one to run their own video streaming site without necessary for much coding. This makes any one to setup an youtube clone in their own linux machine. It can also be installed via softaculous auto installer as its installer script is available in it. We can also follow this tutorial in other linux distributions which are the derivatives of the above linux distributions. 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 ClipBucket to Start Video Sharing Website in Linux appeared first on LinOxide.

How to Configure Citrix XenServer 6.5 on VMware Workstation

$
0
0

Citrix XenServer gives you everything that you need to manage, integrate and automate a virtualized server infrastructure which consolidates a physical server's computing power into multiple virtual machines and administers their performance and use, all emulating as a standard server. Citrix XenServer is built to provide the operational requirements of a standard server and supports most of the servers operating systems, such as Linux and Windows Server, on guest server machines. All on an enterprise-class and truly Open Source cloud-proven virtual platform.

In this article we will be showing you the installation and configurations of XenServer 6.5 on a VM using VMware Workstation.

System Requirements

Your system should run on an optimized and hardened Linux partition with a Xen-enabled kernel which controls the interaction between the virtualized devices seen by VMs and the physical hardware.

The system requirements for the XenServer host are as following according to its recommendations and our used figures.

CPU: 2 GHz (Recommended)
RAM: 4 GHz (Recommended)
Disk: 20 GB (Recommended 16 GB)

Download XenServer ISO

Open this LINK to download the latest available ISO image of XenServer.

XenServer ISO

Creating New VM

Create a new VM in your virtualization environment configure its new Host name and storage. After that choose the guest Operating System as 'Other' or 'VMware ESX' and version as 'VMware ESXi 5.x' as shown.

Choose Guest OS

Then choose system resources including its RAM, CPU and Disk space and click on the finish button after confirming the settings you see in its summary.

New VM Summary

Installing XenServer

Power On the newly created VM from the console of your Workstation, attach the ISO image by browsing it from your stored location and send the 'Ctlr+Alt+Del' button to start its installation setup.

Press 'OK' key after reading the Welcome note.

XenServer Setup

Then accept the License agreement as followed the terms and conditions of Citrix Systems, Inc.

License Agreement

1) Virtual Machine Storage

You will be asked to choose the disk storage for your Virtual Machines and Enable the thin provisioning option in order to optimize storage for XenDesktop and press 'OK' to proceed to next step.

VM Storage

2) Installation Source

Then choose the installation source from the 3 available option as shown in below image to 'Local media' and click on the 'OK' button to move next.

Installation Source

3) Supplemental Packs

Choose the 'Yes' option if you have suplimental packs otherwise you can choose the 'No' option.

Suplimental Packs

4) Verify Installation

Skip the verification or select the option to test your media and press 'OK' to proceed to the next option.

Verification

5) Set Password

Configure the password for your root account that will be used for connecting the XenServer Host from XenCenter.

Set Password

6) Networking

Choose from the options to configure networking as DHCP for your Management interface on the host.

Networking

7) DNS Settings

Here you have to configure the Hostname and DNS settings as per your requirements. We will be chooseing its DNS to set it automatically via DHCP as shown below and then click on the 'OK' button to move to next option.

Networking

8) Time Zone

Select the Time Zone and City as 'London'to configure the geographical location of your XenServer Host.

Time Zone

9) System Time

We will be choosing the system time as NTP while you can also choose it from its manual time entry but in that case you have to configure that at the end of installation.

System Time

10) NTP Configuration

After selecting the NTP option we will configure its settings using the DHCP server and click on the 'OK' key to proceed.

NTP Configuration

11) Installation Confirmation

We have configure all the required information for the installation of XenServer. Now click on the 'Install XenServer' to confirm that you have are are ready to make changes on your selected disk and the data will no longer be available after installation.

Installation Confirmation

During its installation process you will be asked for New Suplimental Packs, simply skip this step to complete the installation process.

New Media

The system will take some time to prepare and complete the installation setup.

Installation Process

12) Complete Installation

After completion of the installation process you will get the XenServer Installation Complete notification and asked for removal of any local media from the drive and press 'Enter' key to reboot your system.

Complete Installation

XenServer Dashboard

Once the server is back after reboot you will see the XenServer customization page where you will be able to see and configure its required settings from here.

XenServer Status

Conclusion

We have successfully installed XenServer 6.5 version on VMware Workstation 12, so following the similar steps you can easily install it on any VMware platform. Citrix XenServer is an awesome Open Source Virtualization platform that can fulfill all your required demands in the the field of virtualization. This was the basic installation of XenServer that you have learned in this article in the further articles we will show with the help of simple steps to create your guest operation system on XenServer. If you have any suggestions or feedback don't forget to leave us a comment. We hope you enjoyed reading this article.

The post How to Configure Citrix XenServer 6.5 on VMware Workstation appeared first on LinOxide.

How to Install Django with Gunicorn and Nginx on FreeBSD 10.2

$
0
0

Django is web framework based on python, maintain by Django Software Foundation. It is free and opensource python framework for building a macro web applications. Django is powerful, make your develpment process is so fast, make your application simple and useful. Make your developer easy to maintain and deploy the project. Django is a high-level python framework with MVC (Model-View-Controller) concept, used by big company like mozilla, pinterest, disquss, instagram, bitbucket etc. In this tutorial we will guide about django installation. We will install django 1.9 with gunicorn, supervisord and nginx as the web server. Nginx running on port 80 and django framework running under gunicorn with gunicorn sock file.

Prerequisite :

  • FreeBSD 10.2 - 64bit.
  • Root privileges.

Step 1 - Update FreeBSD Repository

Log in to your freebsd server and update the repository with 'freebsd-update' command :

freebsd-update fetch
freebsd-update install

Step 2 - Install Python, SQLite3 and Pip

In this step we will install python 2.7 with pip. If you want to use python3, please use MySQL or PostgreSQL as your django database. We will install python and pip from freebsd repository with command below :

pkg install python
pkg install py27-pip

And update the pip to latest version with command :

pip install --upgrade pip

Next, install sqlite3 databse and the python module py27-sqlite3 with pkg command :

pkg install sqlite3
pkg install py27-sqlite3

Python, pip and SQLite3 installed on the freebsd server.

Step 3 - Install Django on Virtual Environment

We will install and deploy django with the normal user called 'vagrant', not as root. We will install django under virtualenv, it is virtual python environment builder, tool to create the isolated python environment. Virtualenv is available on PyPI repository, we can install it with pip command :

pip install virtualenv

Next switch to the user 'vagrant' :

su - vagrant

Create new virtual environment called 'myenv' with python2.7 as the version of it. We can create it with virtualenv command below :

mkvirtualenv --python=python2.7 myenv

It will create new directory called 'myenv', go to the directory and activate the virtual environment that has been created before :

cd myenv
source bin/activate

And this our time to install django 1.9 and a gunicorn, install all it with pip command under the virtualenv :

pip install django==1.9
pip install gunicorn

Django and Gunicorn is installed, we can check it with pip command :

pip list

Django (1.9)
gunicorn (19.4.1)

Next, create new sample project with django. We will create new project named 'myproject' with django-admin command :

django-admin startproject myproject

That command will create new directory 'myproject', go to the directory and test the django installation by running manage.py file :

cd myproject/
python manage.py runserver

runserver = start our django project with port 8000.

Django_Virtualenv

If there is no error, then proceed with the next step by editing setting.py file inside django project directory :

nano -c myproject/settings.py

In the end of the line add configuration below :

STATIC_ROOT = '/home/vagrant/myenv/myproject/static/'
STATIC_URL = '/static/'

MEDIA_ROOT = '/home/vagrant/myenv/myproject/media/'
MEDIA_URL = '/media/'

Save and exit.

And generate the static file by running command below :

python manage.py collectstatic

collectstatic used to manage the static files, it will copied the django static file to directory 'static' on myproject dir.

Django_Collectstatic

Django is configured, and the last we need to configure the gunicorn. Go to the 'myenv' directory and activate the environment, then create new file on bin directory :

cd /home/vagrant/myenv/
source bin/activate
nano -c bin/gunicorn_start

Paste configuration below :

#!/bin/bash

NAME="myproject"                                             # Django Project Name
DJANGODIR=/home/vagrant/myenv/myproject                        # Django Project Directory
SOCKFILE=/home/vagrant/myenv/myproject/run/gunicorn.sock     # Gunicorn Sock File
USER=vagrant                                                # Django Project Running under user vagrant
GROUP=vagrant                                                # Django Project Running under group vagrant
NUM_WORKERS=3
DJANGO_SETTINGS_MODULE=myproject.settings                     # change 'myproject' with your project name
DJANGO_WSGI_MODULE=myproject.wsgi                             # change 'myproject' with your project name

echo "Starting $NAME as `whoami`"

# Activate the virtual environment
cd $DJANGODIR
source ../bin/activate
export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE
export PYTHONPATH=$DJANGODIR:$PYTHONPATH

# Create the run directory if it doesn't exist
RUNDIR=$(dirname $SOCKFILE)
test -d $RUNDIR || mkdir -p $RUNDIR

# Start your Django Unicorn
# Programs meant to be run under supervisor should not daemonize themselves (do not use --daemon)
exec ../bin/gunicorn ${DJANGO_WSGI_MODULE}:application \
--name $NAME \
--workers $NUM_WORKERS \
--user=$USER --group=$GROUP \
--bind=unix:$SOCKFILE \
--log-level=debug \
--log-file=-

Save and exit.

And make the script executable :

chmod u+x bin/gunicorn_start

Django is configured with gunicorn, django will run under gunicorn sock file.

Note : If you want to exit from the virtualenv, you can use command "deactivate".

Step 4 - Install Supervisord

Supervisor is a process control on Linux and Unix operating system that allow the users to monitor and control the number of process. In this tutorial we need a py-supervisor to control the gunicorn that running with our django project.

Install py-supervisor from freebsd repository with pkg command :

pkg install py-supervisor

If it's done, add supervisor to the boot time with sysrc command, and then start it:

sysrc supervisord_enable=yes
service supervisord start

Supervisor is started, but we need to add our application to it. We can do it by editing the supervisor configuration file, go to the directory and edit the file 'supervisord.conf' with nano :

cd /usr/local/etc/
nano -c supervisord.conf

In the end of the line, add our app configuration below :

[program:myproject]
command = sh /home/vagrant/myenv/bin/gunicorn_start
user = vagrant
stdout_logfile = /home/vagrant/myenv/logs/gunicorn_supervisor.log
redirect_stderr = true
environment=LANG=en_US.UTF-8,LC_ALL=en_US.UTF-8

Save and exit.

Now we must create new directory for the gunicorn log file with user vagrant  :

mkdir -p /home/vagrant/myenv/logs/
touch /home/vagrant/myenv/logs/gunicorn_supervisor.log

Restart the supervisor and check our application is running :

service supervisord restart
supervisorctl status

Supervisord

Step 5 - Install Nginx

We will use nginx as front end the server and run on port 80. If someone access from the browsers, the connection will be passed to gunicorn that running with the sock file.

Install nginx from the freebsd repository with pkg command :

pkg install nginx

Next configure the virtualhost for our django project. Go to the nginx configuration directory and create new directory called vhost there :

cd /usr/local/etc/nginx/
mkdir -p vhost/

Go to vhost directory and create new file conafiguration 'mydjango.conf' :

cd vhost/
nano -c mydjango.conf

Paste virtualhost configuration below :

upstream myproject_server {
server unix:/home/vagrant/myenv/myproject/run/gunicorn.sock fail_timeout=0;
}

server {

listen   80;
server_name www.djangofreebsd.com;

client_max_body_size 4G;

access_log /home/vagrant/myenv/logs/nginx-access.log;
error_log /home/vagrant/myenv/logs/nginx-error.log;

location /static/ {
alias   /home/vagrant/myenv/myproject/static/;
}

location /media/ {
alias   /home/vagrant/myenv/myproject/media/;
}

location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;

# Try to serve static files from nginx, no point in making an
# *application* server like Unicorn/Rainbows! serve static files.
if (!-f $request_filename) {
proxy_pass http://myproject_server;
break;
}
}

# Error pages
error_page 500 502 503 504 /500.html;
location = /500.html {
root /home/vagrant/myenv/myproject/static/;
}
}

Save and exit.

Now we must add the virtualhost configuration to the nginx.conf. Go back to the nginx directory, edit the file nginx.conf with nano :

cd /usr/local/etc/nginx/
nano -c nginx.conf

Before the end of the line, add line below :

include vhost/*.conf;

Save and exit.

Test the nginx configuration, if there is no error, add nginx to the boot time :

nginx -t
sysrc nginx_enable=yes

And the last, restart supervisord and start nginx :

service supervisord restart
service nginx start

Now we can access our django applications with the browser, in this tutorial we use domain www.mydjango.co.

Django_with Nginx_Done

Django admin page.

Djang_Admin

Django 1.9 and gunicorn with supervisor and nginx is done.

Conclusion

Django is web application framework based on python with MVC (Model-View-Controller) concept. Django is the best solutions for you if you want to build a macro web application. It is fast and simple, free and opensource and maintained by Django Software Foundation. Django can be up with standalone, but we can use apache or nginx too as the front end of the django project.

The post How to Install Django with Gunicorn and Nginx on FreeBSD 10.2 appeared first on LinOxide.


How to Install Wine 1.8 on Ubuntu 15.x / Centos 7

$
0
0

Wine (Wine Is Not an Emulator)) is a free and open source compatibility layer software application for the implementation of Windows based applications to run on Linux. Different applications have their own dependencies to run on any operating system. Windows programs won't run on Linux and Linux programs won't run on the Windows applications because both are the different operating operating systems developed in their own languages. So, in order to run Windows based applications on UNIX like operating system we need an intermediate application called WINE to be installed on Linux. Using WINE whenever a Windows based program tries to perform a function that Linux doesn't normally understand, it will translate that program's instruction into one supported by the system.

There are multiple features of using WINE like on the thin clients by simply installing Wine on a Linux server and access from any X Windows terminal by make existing Windows applications available on the Web by using VNC and its Java client.

1) Prerequisites

To install the latest version of Wine 1.8 on your Ubuntu 15 and CentOS 7 operating system, you need to complete the basic OS requirements before moving to the installation setup.

First of all open the command line terminal from the the drop down 'Applications' from your Ubuntu 15 or CentOS 7 desktop menu and run the commands below using root privileges to update your operating system with base system and security update.

On Ubuntu:

#apt-get update

On CentOS:

#yum install update

2) Download Wine 1.8 Source

You can download latest package 1.8 version of Wine to download.

Download wine 1.8

You can directly download it on your system using the 'wget' command by copying the source link address by using the command below that would be same for both Ubuntu and CentOS systems.

# wget http://dl.winehq.org/wine/source/1.8/wine-1.8.tar.bz2

Wget Wine

3) Extract the Archive

Change your directory to the extracted folder of Wine and then configure the source package by running the below command.

# tar -xvjf wine-1.8.tar.bz2

4) Compiling Wine 1.8

You need to enable 32 bit architecture in your 64 bit operating system for installing 32 Bit supporting packages. So, run the below commands as per your requirements.

For 32 Bit:

# ./configure

For 64 Bit:

# ./configure --enable-win64

You might get few warnings about some missing libraries that you can install on your Desktop system upon requirements and then proceed to with the compilation process by using the below command in your system.

# make

compile wine 1.8

The compilation process would take some time to complete its compilation process. Once the compilation completes the finally run this command to install Wine on your Ubuntu or CentOS 7 system.

# make install

make install

5) Installing Wine 1.8 Through PPA

You have the option to install the latest version of Wine 1.8 from the Official PPA of Ubuntu by using the following below commands on Ubuntu 15.

Enable 32 Bit Architecture

To enable 32 Bit software architecture system run the below command.

#dpkg --add-architecture i386

After adding teh Wine PPA repository Update your system packages by using the below commands.

#apt-get update

# add-apt-repository ppa:wine/wine-builds

More info: https://launchpad.net/~wine/+archive/ubuntu/wine-builds
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keyring `/tmp/tmp2c2c3jtl/secring.gpg' created
gpg: keyring `/tmp/tmp2c2c3jtl/pubring.gpg' created
gpg: requesting key 77C899CB from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp2c2c3jtl/trustdb.gpg: trustdb created
gpg: key 77C899CB: public key "Launchpad PPA for Wine" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK

# apt-get install --install-recommends winehq-devel

You will be prompted to accept or reject by choose from the available options whether to proceed with installation or not.

6) Using Wine 1.8

You can check the version of your currently installed Wine 1.8 by executing the below command and see its version as shown in the image.

For 32 Bit and 64 bit installation of Wine you can execute the following commands respectively on your installation

# wine --version

# wine64 --version

Wine Version check

To get help about using the Wine you can run the following command.

root@ubuntu:~/wine-1.8# wine64 --help
Usage: wine PROGRAM [ARGUMENTS...] Run the specified program
wine --help Display this help and exit
wine --version Output version information and exit

To run any windows based application on your Ubuntu and CentOS 7 Desktop run the below command.

root@ubuntu:~/wine-1.8# wine64 vlc-2.2.1-win64.exe

root@ubuntu:~# wine putty.exe

You can run the windows based applications by doing a right click and openning it with "Wine Windows Program Loader" as shown in the image.

Using Wine 1.8

7) Configure Wine

You can configure your Wine application by opening its configuration panel by running the below command in the terminal and then configure is different settings like adding new applications and Drivers as shown.

Wine Conf

Conclusion

That's it, we are successful in installing the latest version on Wine 1.8 on Ubuntu 15 and CentOS 7 by following the simple steps mentioned in this post. Now you can easily run your window's based software applications on your Linux system and enjoy with your best X window operating System on Linux. You will get every thing in your Linux System that you want from your Windows system. Let's enjoy using Wine on Linux and feel free to leave your comment for your valuable suggestions and comments, Cheers.

The post How to Install Wine 1.8 on Ubuntu 15.x / Centos 7 appeared first on LinOxide.

How to Setup jBilling a Billing Solution On Ubuntu 15.10

$
0
0

Hello and welcome to our today's article on jBilling, the enterprise open source billing system. jBilling is a mature and rapidly evolving billing system that delivers a rich of set of features that provides you an easy to use and web-based billing solution. Because of its open source means you can get its source code and run it on any open source stack. You can easily customize its plugins and user friendly extensions to fulfill your special requirements that you are want in your billing system by adding bundles, creating different billing plans and solution for your products and customers.

So, jBilling is one of the best choice for you if you are thinking of developing your own billing system that includes automatic invoicing, payment processing, ordering and can be easily extended by adding new business rules.

Download jBilling

Login to your Ubuntu server using the root credentials or a user with sudo privileges. Configure its basic network settings, hostname and IP address configurations and make sure your are connected with Internet to install the necessary updates.

To download jBilling Community edition open this LINK and you will be directed to sourceforge web page where the latest jBilling package is available to download.

jBilling download

Alternatively you can copy the direct link to download the package on the server using 'wget' command following with the download link.

# wget http://downloads.sourceforge.net/project/jbilling/jbilling%20Latest%20Stable/jbilling-4.1.1/jbilling-community-4.1.1.zip

Setup JAVA_HOME

You need to define the JAVA_HOME or the JRE_HOME environment variable that must be needed to start the installation of jbilling on your server.

So, the first thing is that you need to install the Java on your ubuntu server and the define its JAVA_HOME environment variable by using the below command.

# apt-get install openjdk-8-jre-headless

To check the current JAVA_HOME or JRE_HOME environment variables you can use the below commands depending upon your Java version that you are currently using.

# echo $JAVA_HOME
# echo $JRE_HOME

If you have got the blank output, that means your JAVA_HOME is not setup, to do so you can use the below command.

# export JAVA_HOME=/usr/lib/jvm/openjdk-8-jre
# export JRE_HOME=/usr/lib/jvm/openjdk-8-jre

Extract the Archive

Now moving to the installation of jbilling, extract the downloaded package using 'unzip' command and make sure that 'unzip' package utility is installed on your system, if its not then use the command below to install it first.

# apt-get install unzip

After this you can extract the package using the below command.

# unzip jbilling-community-4.1.1.zip

Setup Permissions

Change your directory to the 'bin' directory with in extracted folder of JBilling and then assign the executable permissions to all shell scripted files within this directory as shown in the image.

# cd jbilling-community-4.1.1/bin/
# chmod +x *.sh

Setup Permissions

Start jBilling Installation

To start jbilling, execute the 'startup.sh' script and you will be surprised to the following lines of successfully startup of Tomcat service.

# ./startup.sh
Using CATALINA_BASE: /root/jbilling-community-4.1.1
Using CATALINA_HOME: /root/jbilling-community-4.1.1
Using CATALINA_TMPDIR: /root/jbilling-community-4.1.1/temp
Using JRE_HOME: /usr/lib/jvm/openjdk-8-jre
Using CLASSPATH: /root/jbilling-community-4.1.1/bin/bootstrap.jar:/root/jbilling-community-4.1.1/bin/tomcat-juli.jar
Tomcat started.

installing jbilling

jBilling Web Access:

JBilling installation setup has been done your Ubuntu 15.10 server now open your web browser and access the below local host URL and signup for a new user.

http://localhost:8080/jbilling/signup

jbilling signup

Now login to your jbilling account using the credentials you have got in your mailbox.

To configure your mail server and other SMTP setting, open the 'jbilling.properties' file located under the mentioned path in the command below.

kashif@ubuntu-15:~/jbilling_install/jbilling$vim jbilling.properties

Change the settings according to your own mail server setup and then save the file.

If you are working on localhost then you can reset your password by getting the email from the following location in your server where all localhost emails arrived.

Open the file below and copy the link address from here.

kashif@ubuntu-15:~/jbilling_install/jbilling/resources$ vim emails_sent.txt

reset jbilling passowrd

Copy this link and open in your web browser by replacing http://yourcompany.com with http://localhost:8080 follwed by the URL. Then configure your new password and login using your newly created account as shown.

jbilling login

jBilling Dashboard

After acceptance of your login credentials your will be directed towards its awesome billing dashboard where you can see a number of its available options including Customers, agents, Invoice, Payments and Orders etc as shown below.

jbilling dashboard

Simply click on the option available in the tabs and start using your own billing system, if you want configure your jbilling system then click on the configuration button and configure your own required settings.

jbilling configuration

Conclusion

At the end of this article, you are now able to install and configure your own billing system without any cost by using the jBilling system. The jBilling system source is freely available for the multiple operating systems but using it on Ubuntu has its own taste, stability and high performance level, while the installation steps are also much easy to perform. so, we hope you really enjoyed while reading this article find this much helpful while on the way to start using jBilling on Linux.

The post How to Setup jBilling a Billing Solution On Ubuntu 15.10 appeared first on LinOxide.

How to Install Tails Security Distribution on USB

$
0
0

In this tutorial, our focus is persistent installation of Tails security distribution on USB stick which is based on Debian GNU/Linux. Tails is a live system which is used to preserve privacy and anonymity  while using internet. It does not left any trace on computer unless explicitly ask by the user. It can be used from a DVD/CD and USB device.  Tails distribution comes with  built-in  security applications such as web browser, instant messaging client, email client etc.

Installation

Following are the prerequisite for this article.

  • USB device (at least 4GB size)
  • Tails iso (available on the Tails web site)
  • Plop Boot Manager (to start the Boot Manager )

In this tutorial, Tails distribution will be installed on the Virtual Box VM. The detail of our VM is given below.

VM details

ISO file is loaded into the VM to boot it in the live mode for further installation.

tails iso loaded

Click on the "start" button to run the VM. Select "Live" option for the following menu.

live modeAfter few minutes, following welcome screen appears on the screen and by default "No" button is checked.

welcome screen

Click on the "Yes" button to see more setting for Tails.

selected Yes option

After clicking on the "Forward" button, following window appears.

  • Enter password for Administrator  (this password will be use to become root to perform administration tasks).
  • Click on "Activate Microsoft Windows 8 Camouflage" button to avoid attracting suspicious on public places.   Tails gives camouflage option based on installed host OS. (optional)

main screen 1

  • Click on the "Spoof all MAC addresses" option to enable spoofing MAC addresses on the local network. (optional)
  • By default  Internet connection on the Tails will not use TOR for anonymity . It need to be enabled by selecting "this computer's internet connection is censored, filtered or proxied. You need to configured bridge,firewall or proxy setting on the computer".  (optional)

main screen 2

After clicking on the login button, screen similar to windows 8 appears which is shown below.

tails background

Similar windows 8 start menu, Tails menu is also on the left most corner. Now we will install Tails on Persistent volume (USB).  Click on the "Tails Installer"  from Tails menu which is shown below.

Tails installer

Tails installer shows following three options for installation on the USB/SD card. In this tutorial, our selected option is "Clone & Install" due to fresh installation of Tails on portable media.

installation options

On the next step, Tails check the available USB device to start installation process. As shown in the figure that no USB device is detected.  error

As shown in the following figure that USB device (/dev/sdb) is detected.

found usb

Click on the "Install Tails" option to start installation process.

installation start

Click on "Yes" to start installation on the selected USB device.  All data on the selected device will be lost.

prompt before installation

Tails installation progress is shown in the below figure.  Tails automatically creates partition and sets FAT32 file system on the attached device.

installation information

Successful installation of Tails on USB device is  shown below.

installation complete

After installation on the portable device, next option is configuration of persistent volume. Click on the "configure persistent volume" for the selection of application/software to use persistent volume.

configure persistent volume

However, following error comes because currently Tails is not booted from USB device.

error while configuring persistent volume

VirtualBox software does not support VM boot using USB device. Therefore following error comes on boot time.

error on booting after installation

In this article, Plop Boot Manager (plpbt) is used to boot VM from USB device. It is very easy to use, extract it on the host machine after downloading and select plpbt.iso file to boot VM.

plpbt iso for boot from usb

Now start the Tails  VM and select USB option.

usb selected to boot from

Tails is booting from the portable media.

booting from persistent volume

Tails shows the similar options such as " password for administrator"  etc.  Again click on the "configure persistent volume" option from the Tails menu to start creation of persistent volume.  Few instruction are also given about persistence volume. Passphrase is used to protect data stored on the persistent volume.

volume creation

Persistent volume creation progress is shown below.

volume creation start

Select application/software to use persistence volume on the next screen.  In this article, options on the following screenshots, shown with mark () symbol are selected to store files on encrypted volume (/dev/sdb2) of 1.29 GB size.

persistent 1persistent 2persistent 3

Configuration will take effect after restarting the VM.

finsih

Now at welcome screen, enter passphrase to use persistence volume.

now use persistence volume

As shown in the following snapshot that the

Persistent folder

As shown below, default user on the Tails distribution  is "amnesia".

amnesia

Enter administration password to become root on the terminal.

root user

In our previous article, uTox installation (instant messaging software) on the Tails is explained.

 Conclusion

Tails installation on persistent device and its configuration is the focus of this article. By default Tails does not store / save any thing on the persistence volume. It can be configured by the administrator/user to save certain files / folder on the protected persistence volume.

The post How to Install Tails Security Distribution on USB appeared first on LinOxide.

How to Install and Configure IPFire Firewall

$
0
0

IPFire is an open source firewall distribution. It can be used as a firewall, a proxy server or a VPN gateway.It has following features.

  • Easily configurable
  • Support true random generator
  • High availability
  • Hardware accelerator for cryptography algorithm (AES-NI)

IPFire is forked from IPCop and Endian firewall distro's. Installation and basic configuration of firewall is given in following section.

Installation

In this tutorial, IPfire firewall will be installed on the VM, created on the Virtual Box software. The detail of our VM is given below.

VM details

After clicking on start button, following window appears for IPfire installation.

installation using iso

Press "Enter" button to start installation procedure.  Select the desired language from the given list.

language selection

Press "Enter" button to start installation and accept GPL license.

start installation

GPL license acceptance is shown following.

accept gpl lincese

After GPL license acceptance, windows appear for the partition of  hard disk and filesystem. Ext4 file system is selected in this installation of IPfire.

disk setup

File system selection is shown below.

file system selection

IPfire installation progress is shown in the below figure.

installation of the system

IPfire firewall successfully  installed on the VM.

successfully installed

Configuration

After reboot, basic configuration of IPfire firewall will be done. First of all, keyboard layout and time zone  are selected.

keyboard selection

time zone

Host name and local domain setting for IPfire firewall.

setting hostname

setting local domainPassword setting for root user which is used for CLI access of IPfire.

setting root user password

Password setting for admin user which is used for web access of IPfire.

admin user setting

Network configuration of IPfire is shown below. As shown in the figure that the default network configuration is GREEN & RED zones . However, it supports BLUE and ORANGE zones as well

networking creation greenandred

IPfire supported zones are shown in the following figure.

networking configuration types

In a standard IPfire  firewall installation, Green + Red means 2 Networks. Green network for home or LAN side and  Red network for  internet/external connection.

Usage of each zone is given in the following table.

zone

Assignment of available NICs to GREEN and RED zone is shown in the following snapshots.

GREEN zone

assinging cards

RED zone

red selection

Interfaces assigned to both GREEN and RED zones are shown in the below figure.

card selected

IP address setting for GREEN zone is shown below.

address selection on green

Assigned IP address and net mask is following IP = 192.168.1.115 , Net mask = 255.255.255.0

 ip address on green

IP address setting for RED zone is shown below.

red ip address setting

Assigned Static IP address and net mask are  following.  However, DHCP and PPP DIALUP (PPPoE) modes are also supported on RED interface for IP assignment.

IP = 192.168.100.1 , Net mask = 255.255.255.0

red ip address

DNS and Gateway setting for  RED interface are shown in the following snapshot.

dns and gateway setting

DHCP configuration on the GREEN interface for automatic IP assignment is given below.

dhcp server on green side configuraiton

After DHCP configuration, basic setting of IPfire are complete.

coplete setup

IPfire will reboot to apply changes and gives CLI access to user "root".

setup complete and restarting

To access CLI , enter password for user "root".

cli login

root login

Web Access of IPfire is required for further configuration. It is also used to configure firewall rules, snort configuration and VPN setting etc.

Enter IP address of GREEN interface along port 444 for web interface access. All web browsers gives exception due to untrusted certificates. Therefore accept the exception  to view the web pages.

web interface access

accept exception

Enter password for "admin" user to access the pages.

web access cred

After correct username and password, following main dashboard appears, which shows the network configuration (IP addresses on RED and GREEN zones).

main dashboard

IPFire Menu

System

This menu is used for basic setting of the  IPFire machine such as enabling ssh access, backup and setting web access password etc. System sub menu is shown in the following figure.

system menu

Status

In this menu, firewall administrator view the status of system resources such as RAM & CPU, internal and external network, entropy for TRNG and statistics for VPN's.

status

Network

As shown in the following figure that network settings such as static routing, webproxy, url filtering and wake on Lan etc is available under this menu

network menu

Services

Services such as VPN which include IPsec & OpenVPN , intrusion detection, QoS , time server etc  are listed under this menu.

services

Firewall

Main feature of IPFire distribution is providing firewall feature. Administrator or user  uses this menu to push  iptables rules on back end.

firewall

IPFire

Pakfire is used to install Addons/packages on the IPFire machine for more feature.

ipfire

Logs

As shown in the following figure that, logs of services such has IDS, firewall, proxy  and system can be view from Logs menu.

logs

Conclusion

In this article, our focus was installation and configuration of another open source firewall, IPFire. It is forked from well-known open source firewalls IPCop and Endian. It provides high availability, usage of TRNG and AES-NI features.

The post How to Install and Configure IPFire Firewall appeared first on LinOxide.

How to Manage Public Key Infrastructure with OpenSSL

$
0
0

OpenSSL is an open source cryptographic toolkit with focus on Secure Socket Layer/Transport Layer Security or SSL/TLS, widely deployed on GNU/Linux systems, it performs key part on our daily experience on the Internet. Today I will point some commands to help you manage X.509 Public Key Infrastructure (PKI) and  also use this toolkit to and encrypt/decrypt files and other data using this great tool

openssl-textcert

This document is mostly based on examples, you can refer to the examples as needed, in some cases you will see more than one way to perform an operation, others there will be passwords that you should change before using on your environment.

 OpenSSL Key Management

Most of the operations are based on keys and here are some commands to deal with private and public keys.

RSA 

RSA is one of the most deployed public-key cryptography algorithm system and here are some basic operations.

Generating Triple DES protected RSA private key 2048 bits long protected by the passphrase nonsense123

openssl genrsa -passout pass:nonsense123 -des3 -out rsa-2048-priv-key.pem 2048

You can write the corresponding public key to a file as you wish.

openssl rsa -in rsa-2048-priv-key.pem -pubout -out rsa-2048-public-key.pem

You can remove the password from a protected key and dump the key on a new file

openssl rsa -in priv-key.pem -out priv-key-no-pass.pem

The following command let verify your key.

openssl rsa -check -in server-key.pem

DSA 

The Digital Signature Algorithm is an alternative to RSA.

Generate DSA parameters.

openssl dsaparam -out dsa.param 2048

Generate DSA key using the existing parameters.

openssl gendsa -des3 -out ca.key dsa.param

X.509 Certificates

Now we are going to show some commands to manage certificates, signing requests and revocation lists.

Generating certificate

Generating certificate

Generating certificate signing request using an existing private key.

openssl req -new -key server-key.pem -out server-csr.csr

Creating a new certificate signing request and a new RSA private key 2048 bits long.

openssl req -out service-csr.pem -new -newkey rsa:2048 -nodes -keyout service-key.pem

Verify the certificate signing request.

openssl req -in server-csr.pem -noout -verify -key server-key.pem

Signing a certificate request.

openssl x509 -req -days 3650 -signkey ca.key -in ca.csr -out ca.crt

Generating a self-signed certificate with key in batch mode.

openssl req -subj "/C=BR/L=Rio de Janeiro/O=My Company/CN=www.mycomp.com" -newkey rsa:2048 -nodes -keyout domain.key -x509 -days 365 -out domain.crt

Dump certificate dates and info.

openssl x509 -noout -in apache.crt -text -purpose -dates -hash -ocspid

OpenSSL Certificate text info

OpenSSL Certificate text info

Revoke a certificate.

openssl ca -revoke mycert.pem

Generating a CRL.

openssl ca -gencrl -config openssl.cnf -crldays 7 -crlexts crl_ext -out $crl_dir/file.crl

Parsing objects with ASN1 to standard output.

openssl asn1parse -in ca.crt

ASN1 Parse certificate

ASN1 Parse certificate

Converting Encoding formats

There will be times that you will need to convert a certificate encoding to another,  you may face this for instance if you work on a mixed environment with Unices,  Windows and Java.

Converting DER, PEM and NET

Base64 encoded PEM on top, followed by the two bynaries,; the obsolete NET on the center and DER below it.

Convert a PEM encoded certificate to DER.

openssl x509 -inform PEM -outform DER -in ca.crt -out ca.der

So is the opposite, converting a DER to PEM.

openssl x509 -inform DER -outform PEM -in ca.der -out ca.pem

Testing with s_client and s_server subcommands

You can make tests on keys/ certificates and services with the s_client and the s_server.

Test your certificate and key starting s_server.

openssl s_server -key ca.key -cert ca.crt

Connecting to the test server using s_client.

openssl s_client -host localhost -port 4433 -CApath /etc/ssl/certs/

Another s_client connection using and showing certificate, key and in debug mode.

openssl s_client -connect localhost:4433 -key ca.k'ey -cert ca.crt -debug -showcerts

Start a Transport Layer Secured  to connection to a mail server.

openssl s_client -connect test.smtp.org:25 -starttls smtp -showcerts

File and Streams Encryption with OpenSSL

You can also use OpenSSL to encrypt data on your computer directly.

Encrypting files

Encrypt files using AES-256-CBC with SHA1 as Message Digest.

openssl enc -aes-256-cbc -md sha1 -e -in arquivo -out arquivo.crypt

Decrypting goes  AES-256-CBC file should be as follows.

openssl enc -aes-256-cbc -md sha1 -d -in arquivo.crypt -out arquivo

Encrypting file with Triple DES.

openssl enc -des3 -e -in arquivo -out arquivo

Decrypt the Triple DES encrypted file.

openssl enc -des3 -d -in arquivo.crypt -out arquivo.decrypted

Encrypting streams

Along with files, you can also encrypt streams such as network sockets, pipes and other *nix I/O. On the following example we use OpenSSL to safely send the passwd file through an insecure network link.

Server

First we setup a Netcat server with that will be waiting for connection. You can download Netcat here.

nc -l -p 99 8| xz -d | openssl enc -aes-256-cbc -d > /client/bkp/etc/passwd

Client

You could  now use netcat as client to connect and send your file.

cat /etc/passwd | openssl enc -e -aes-256-cbc  | xz -z | nc servidor 99

Conclusion

These are some of the most commonly used commands, you can use these commands to manage your keys, certificates and sensitive data. For more information please take a look at the official documentation, there you will find details of these and other commands and everything else to fit your needs.

Thanks for reading!

The post How to Manage Public Key Infrastructure with OpenSSL appeared first on LinOxide.

How to Install ManageEngine ServiceDesk Plus on CentOS 7

$
0
0

ManageEngine is the Enterprise IT Management Software division of ZOHO Corporation that simplifies IT management with affordable software that offers the powerful features of largest enterprises demand. It serves a diverse range of enterprise IT, networking and Telecom customers. In our today’s article we are going to show you the installation and configuration of ManageEngine's ServiceDesk Plus. ServiceDesk Plus is an ITIL-ready help desk software with integrated Asset and Project Management capabilities. With advanced ITSM functionality and easy-to-use capability, ServiceDesk Plus helps IT support teams deliver world-class service to end users with reduced costs and complexity.

ManageEngine's ServiceDesk Plus helps the enterprises in their incident management, problem management and change management. Create and publish their service catalog with custom service level agreements (SLAs) and multi-stage approvals. You can easily create projects, manage resources, track progress and integrate IT projects with requests and changes to fine-tune overall IT service delivery.

System Requirements

The system requirements for installing ServiceDesk Plus depends upon the number of technicians and nodes to used on the server. In this article will be using the minimum system resources that are required by 5-20 technicians. Following the system resources we are using in our test environment.

  • RAM: 1GB
  • CPU: 2vCPU
  • Disk: 20 GB
  • No. of Nodes: 50-200
  • Technician Login: 5-20
  • Operating System: CentOS 7 Core
  • Database: PostgreSQL

Download ServiceDesk Plus

First you have to download the ServiceDesk Plus package for Linux. Then click on the Linux 64 Bit package to start downloading your ServceDesk package.

ServiceDesk Download

If you wish to download it using 'wget' command then copy the download link address and run the command as shown below.

# wget https://www.manageengine.com/products/service-desk/91677414/ManageEngine_ServiceDesk_Plus_64bit.bin

ServiceDesk Installer

Installing ServiceDesk without GUI

To execute .bin type files, we need to assign the executable permission on this by entering the command as given below in your command prompt.

# chmod +x ManageEngine_ServiceDesk_Plus_64bit.bin

Now execute the .bin file to start the installation wizard and follow the instructions to proceed to the Next step as shown below.

# ./ManageEngine_ServiceDesk_Plus_64bit.bin -console

Starting Installation

installing servicedesk

License Agreement

Read the license agreement or type 'q' to guit and then choose the option 1 to accept the license agreement.

License Agreement

Technical Support

This is information is optional, if you wish to add your information for the technical support from ManageEngine then mention your details here.

Supprt registration

Select Country

Choose from the available options and update your country number as shown.

select country

Select Edition

We are going to choose the First Enterprise Edition. You can choose from the three available editions, that you want to install for your environment.

Select Edition

Installation Location

Here you need to specify a directory or press Enter to accept the default directory. We are going to choose another location for this as shown in the image below.

installation directory

Installation Details

The system will start preparing the summary of your selected components and then start installing on your server. This may take a while so stay calm and wait for its completion.

installation details

Installation Complete

Once the installation process is complete, you will see the message that InstallShield Wizard has successfully installed ManageEngine ServiceDesk Plus.

servicedesk installed

Starting ServiceDesk Server

After completing the installation process we need to start the server , to do so change your directory to 'bin' folder of your installation directory and then run the 'run.sh' script to start the serviceDesk server.

# cd /etc/ServiceDesk/bin/

# sh run.sh

This will takes a while to check and setup the JBoss Bootstrap environment andJBoss_HOME as shown in the below image.

start Sever

Make sure that mentioned port is opened in your firewall and SELinux. You can use the following command to allow port 8080 in CentOS 7 firewall

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

ServiceDesk Web Access

Now you can access your ServiceDesk Plus web portal by opening the link as shown above with your server IP and port '8080', then login using the 'administrator' credentials as shown.

http://your_servers_ip:8080

ServiceDesk Portal

ServiceDesk Dashboard

After providing the successful login credentials you will be welcomed by the ManageEngine ServiceDesk Plus Portal. Click on any of of the option and you will find a detailed information about its usage and customization.

Here is first look at your ServiceDesk Plus Home Page.

ServiceDesk Home

Installing ServiceDesk as a Linux Service

We need to install Service Desk Plus as a Linux Service on our CentOS 7 server other wise after closing the session the ServiceDesk server will be stopped.

So, the download the servicedesk script or copy this link location and use the 'wget' command as shown below.

# wget https://www.manageengine.com/products/service-desk/help/adminguide/servicedesk.txt

Then copy this '/etc/init.d' directory and change it permission to '755' using the below below command.

# cp servicedesk.txt /etc/init.d/servicedesk

# chmod 755 /etc/init.d/servicedesk

Use 'chkconfig' command to add the script as a startup process and Create a blank file under '/var/log' directory for logging purposes.

ServiceDesk Service

Conclusion

ServiceDesk Plus is one of the most widely used proprietary product of ManageEngine that has a large number of its features that are required by every organization. You can give it a try by getting its 1 Month trial license. The installation method is simple and quite easy to follow as you have seen in this article. so, thanks for reading and feel free to post your suggestions and leave your valuable comments.

The post How to Install ManageEngine ServiceDesk Plus on CentOS 7 appeared first on LinOxide.

How to Setup GMVault Gmail Backup on Ubuntu / CentOS

$
0
0

GMVault is a user friendly cross-platform and very lightweight command-line tool that setup most of the necessary rich features to backup and restore your gmail account. You can download it for free and install it on your computer using CLI. You can use it to backup your Gmail account to your computer, and use quick sync mode to update the backup regularly with recent emails. You can even only backup certain emails using search parameter or date range, and also encrypt the emails you backup. Plus, using some advanced parameters, you can clone your one Gmail account to another, including labels and other attributes.

Although there are bunch of ways to backup your Gmai but Gmvault is one of the most favourable for being feature-rich and highly customizable available for Windows/Mac/Linux.

Downloading GMVault

Download the latest version of Gmvault and select the right version according to your platform from its download page.

Gmvault Download

We will be using the Python Source distribution which is recommended for installing on Linux and valid for all platforms (Linux, Mac OSX, Windows). The only requirement for this is that you must have a Python 2.7.x or 2.6.x preinstalled on your Linux server whether it is Ubuntu or CentOS.

Let's copy the link location for the package and then execute the command as shown below to download the package on your Linux server.

# wget https://bitbucket.org/gaubert/gmvault-official-download/downloads/gmvault-v1.9-src.tar.gz

Extract the Archive

After downloading the Gmvault latest package, we need to extract this archive using the below command.

# tar -zxvf gmvault-v1.9-src.tar.gz

extract archive

Installing Gmvault

Before starting the installation of GM vault, make sure that the Python packages are installed on your server as a prerequisites. If they are not available on your default server then install by using below command.

Ubuntu

# apt-get install python python-setuptools

CentOS

# yum install python python-setuptools

After that change your directory to the extracted Gmvault folder and execute the below command as to run the installation setup.

# python setup.py install

gmvault installation

Using Gmvault

Run the following command to get help about all available options before using Gmvault.

# gmvault -h

using gmvault

Once the the installation process complete then we will be using the below command to sync our gmail account with Gmvault.

# gmvault sync keshifs@gmail.com

gmvault setup

The will ask you to press enter to open a new windows of your browser and takes you through an authentication process with your email account.

So login to your gmail account that you wish to integrate with Gmvault and allow it access to view and manage your Emails.

gmvault authentication

After authentication you will be provided and OAuth tokento run custom synchronization of your certain emails but it could be a better if you use your user and the password for manual authentication.

If you want a quick sync betwen your emails then run the following command on your server.

# gmvault sync --type quick your_email@gmail.com

By default, Gmvault restore the emails from $HOME/gmvault-db or %HOME%/gmvault-db into the given account. You can use the -d or --db-dir to point to another local email repository.
You might have to enter into an authentication phase if it is a new account for gmvault. Gmvault will store all credentials into $HOME/.gmvault (or %HOME%/.gmvault for Windows) and you can always go this directory and delete them if you wish.

Gmail Settings

To configure Gmail to working optimally with Gmvault, we need to check that Gmail is properly configured to let Gmvault work optimally. In Gmail, the IMAP access needs to be enable and the limit of number of emails per IMAP folders needs to be disabled.
Let's choose the 'settings' option and then click on the 'Forwarding and POP/IMAP' option to Enable your POP and IMAP for all your emails as shown in the image below.

Enable IMAP

After saving these changes click on the 'Label' option on the top bar to enable option for enabling the IMAP for Chat and all of your Emials.

Gmail setup

Conclusion

Great, Gmvault is a user friendly command-line tool that setup most of the necessary defaults to quickly sync (backup) your gmail account or restore it to a gmail account. Now you don't need to be worry about losing your important emails backup after setting up the Gmvault backup on your Linux server. Thank you for reading this article will be get back with new article for you. Don't hesitate to leave your valuable comments and suggestions.

The post How to Setup GMVault Gmail Backup on Ubuntu / CentOS appeared first on LinOxide.


How to Install Flussonic Streaming Server Ubuntu / CentOS

$
0
0

Hello and welcome to our today's article on installation Flussonic Streaming Server on Ubuntu15 and CentOS 7. Flussonic is a modern video streaming server written in Erlang. On the delivery end, Flussonic is a true multi screen platform and can serve up live streaming and video on demand content that currently serves millions of live and video on demand feeds per day. It has a complete functionality array for setting up a media resource to distribute files and broadcast satellite video or TV channels.

You can use Flussonic to ingest Flash using RTMP, HLS, MPEG-TS over HTTP or UDP, even RTSP. On the delivery end, Flussonic is a true multi screen platform and can serve up live streaming and video on demand content to iPhones, iPads, Android devices, BlackBerries, Set Top Boxes, IPTV middleware platforms and other streaming platforms.

System Resources

The minimum system requirements to the host server for running Flussonic depends on the number of concurrent connections to Flussonic server. We will be setting up the Flussonic Streaming server with minimum concurrent connections using the following system resources.

RAM: 1Gb
Processor: 2 vCPUs
Disk Space: 20 Gb
Network Adapter: 100 Mbits/s
Operating System: Ubuntu/CentOS
Concurrent Connections: 10

For stable streaming video playback with a high volume of concurrent connections, its recommended to distribute the traffic load among several real servers.

Installing Flussonic on Ubuntu 15

Connect to your Ubuntu server using the root credentials and the run the commands as shown below to add the source key for installing the Flussonic Streaming server from the debian package manager.

# wget -q -O - http://debian.erlyvideo.org/binary/gpg.key | apt-key add -;

# echo "deb http://debian.erlyvideo.org binary/" > /etc/apt/sources.list.d/erlyvideo.list;

Flussonic key

After adding the Flussonic key to the source list, update your system using the update command.

# apt-get update

system update

Once your system is updated then run the command to install the Flussonic and its derivative packages.

# apt-get install flussonic flussonic-ffmpeg flussonic-python

Press 'Y' key and hit Enter to continue.

Flussonic installation

Installing Flussonic on CentOS 7

To install Flussonic on CentOS/Red Hat Linux using the 'YUM', the first thing we need is to enable its yum repository by adding the RPM GPG key for flussonic.

# cat > /etc/yum.repos.d/Flussonic.repo <<EOF
[flussonic]
name=Flussonic
baseurl=http://debian.erlyvideo.org/rpm
enabled=1
gpgcheck=1
gpgkey=http://debian.erlyvideo.org/rpm/RPM-GPG-KEY-flussonic.com
EOF

Then run the 'yum' command as shown below to install the Flussonic server on your CentOS 7 server.

# yum --nogpgcheck install flussonic-erlang flussonic flussonic-ffmpeg flussonic-python

Installing Flussonic

Updating License

After successful installation of flussonic, you need get the trial license or purchase if you wish to use it for long in production by signing up or requesting for a trial lincese using this LINK.

Then open the license key file using any of your command line editor and add the licese key in it and close the file after sving the license key in it as shown below.

# vim /etc/flussonic/license.txt

Starting Services

To start flussonic services on Ubuntu or Linux you can use the same below command.

# /etc/init.d/flussonic restart

To check the status of flussonic service if its working fine or not, run the below command.

# /etc/init.d/flussonic status

flussonic services

You can use the below commands to stop or restart the flusonic services with the help of following commands.

# /etc/init.d/flussonic stop

# /etc/init.d/flussonic restart

To reconfigure with client connections live use the below command to reload its services.

# /etc/init.d/flussonic reload

Flussonic Version

You can check the current installed version of Flussonic on Linux by using the below commands.

On Ubuntu

# dpkg -l | grep flussonic

Flussonic Version

On CentOS

# rpm -qa | grep flussonic

Flussonic version

Flussonic Web Access

After starting the Flussonic services, open the web browser followed by the link as shown below containing your flussonic server's IP adddress and port '8080'. You will be asked to provide the administrative credentials to log in onto admin panel. So use the same credeitials that you will got in with your trial license key.

http://servers_IP:8080

Flussonic Dashboard

Now you can configure and use your flussonic streaming server mainly for IPTV OTT , CDN Organizations and Operator Video surveillance.

Conclusion

You have learned about installation of Flussonic on Ubuntu 15 and CentOS 7. Now get ready to enjoy its awesome features like VOD Streaming including streaming from mp4 and flv files,Multibitrate and multilanguage mp4 streaming, Live streaming including Satellite capturing, IP cameras support, Republishing between servers and Video Streaming including automatic DVR cleanup, timeshifted restreaming, screenshots recording, server side playlists. So, we hope you have got this article much helpful. Feel free to comment us back to show your interests.

The post How to Install Flussonic Streaming Server Ubuntu / CentOS appeared first on LinOxide.

How to Install Alfrasco ECM on CentOS 7

$
0
0

Alfrasco is a java based Electronic Content Management tool that is available with an Open Source license. This open platform helps you regain control of critical business content, strengthen compliance, optimize processes and make collaboration easy with its simple, smart and secure ways. Alfresco facilitates in multiple solutions like Electronic content management, Web Content Management and Digital Image management. You can organize and consolidate content to improve productivity and regain control of valuable corporate information. Share information and work effectively with people inside and outside the organization, including partners and customers. Using the process management solution of Alfresco you can reduce costs and gain new operating efficiencies. Automate and optimize critical business processes such as invoice processing and expense approvals etc.

Download Alfrasco Community Edition

In order to get Alfresco up and running on CentOS 7 Operating System we will be using the binary installer that is available on Alfrasco site to Download Alfrasco Community Edition .

Alfrasco Download

If you have Internet access then use 'wget' command as shown below to directly download the package for your required OS on your server.

# wget http://dl.alfresco.com/release/community/5.0.d-build-00002/alfresco-community-5.0.d-installer-linux-x64.bin

This binary installation script will allows you to install all the components that are needed to run Alfresco, including Java, Tomcat and MySQL etc.

Installing Alfrasco Community Edition

After downloading the binary installer of Alfrasco you need to execute it to start its setup wizard. To do so make sure that the binary script has executable permissions. Before starting installation you should modify your umask to at least "0022" before launching the installer. After the installation has completed, you can reset the umask permissions to your original values.

# chmod +x alfresco-community-5.0.d-installer-linux-x64.bin

# umask 0022

Once you have executed the binary installation script after setting up the proper umask, you will go through a number of steps to complete the installation wizard.

# ./alfresco-community-5.0.d-installer-linux-x64.bin

1) Language Selection

First of all you will be asked for Language Selection. You can simply hit the 'Enter' key to choose the default 'English' language as shown in below image.

alfresco setup

2) Installation Type

The Alfresco Community Setup Wizard be starts from where you have to choose the Installation Type from the two available options 'EASY' and Advance. We will be choosing the First option indicating the Easy installation as a starting user.

installation type

3) Installation Folder

Choose the default option for '[/opt/alfresco-5.0.d]' by pressing the Enter key or specify your own location that you wish to choose for installing the Alfresco tool.

4) Admin Password

Then you need to configure the password to use for the Alfresco administrator account before moving to the next step.

admin password

5) Alfresco as a Service

Type 'Y' for Yes to Install Alfresco Community as a service on you Linux server. This will be automatically starting its service every time the machine is started.

alfresco as a service

Warning:
You might need to ignore the following Warning by pressing the "Enter" key to continue if you are using less than the recommended amount of RAM.

----------------------------------------------------------------------------
Warning!

This environment is not configured optimally for Alfresco - please carefully
review this list before continuing.

While these issues will not prevent Alfresco from functioning, some product
features may be unavailable, or the system may not perform optimally.

Insufficient system RAM (4.0GB+): 3.69GB
Press [Enter] to continue:

----------------------------------------------------------------------------

7) Starting Setup

Your Alfresco Setup is now ready to begin installing Alfresco Community on your Linux server. Press the 'Y' key to continue and wait while Setup installs Alfresco Community on your system. After taking few minutes depending upon your network speed the setup will be finished after installing Alfresco Community. Type 'Y' or 'n' if you don't want to view Readme file.

completeing the installation

8) Setup Alfresco Share

This one is the last setup to complete the installation, just hit the 'y' key to launch Alfresco Community Share. After this you will that PostgreSQL and Tomcat services will be starts as shown below.

Launch share

The Alfresco server is launched automatically as a service called alfresco. This service is comprises of the "postgresql" and "Tomcat Server".

9) Starting Alfresco Services Manually

If you did not automatically launch Alfresco at the end of the setup wizard, to start Alfresco, you need to start all the services manually. Use the following commands to stop and start alfresco services on your CentOS 7 server.

[root@alfresco alfresco-5.0.d]# ./alfresco.sh stop

[root@alfresco alfresco-5.0.d]# ./alfresco.sh start

Alfresco services

10) Firewall Access

If you are working under your restricted environment with firewall enabled. Then make sure to allow the following port in your system firewall as well any external firewall and keep. If you find any issue while accessing Alfresco then make sure that your "SELinux" is not permitting it. You can set it to "Permissiove" for the time being.

For Tomcat Server Port:

# firewall-cmd --permanent --zone=public --add-port=8080/tcp

Tomcat Shutdown Port:

# firewall-cmd --permanent --zone=public --add-port=8005/tcp

Tomcat SSL Port:

# firewall-cmd --permanent --zone=public --add-port=8443/tcp

Tomcat AJP Port:

# firewall-cmd --permanent --zone=public --add-port=8009/tcp

Then run the command to reload your firewall and check if you can see the newly added rules in your firewall.

[root@alfresco ~]# firewall-cmd --reload

[root@alfresco ~]# iptables -L -n -v

To configure your SELinux you can use below commands.

For Permissive:

# setenfroce 0

For Inforcing:

# setenforce 1

Firewall rules

Access to Alfresco Dashboard

Once your alfresco services are up and running, then open your web browser using port 8080 and Log on to Alfresco as the admin user. Enter the password that you have specified in the Admin Password window during the wizard.

http://your_servers_ip:8080/share

Alfresco Login

Upon successful login credentials you be greeted to your dashboard, Administrator account. The personal dashboard shows you what's going on in the sites you belong to. Learn to see what you can do with Alfresco by watching a video tutorial available on your dashboard. Or start create a new site to share content with other site members.

Alfresco Dashboard

Conclusion

Welcome to your new start with Alfresco, there's never an end in learning. Hope you have enjoyed this article. Now start using Alfresco whether you are using Alfresco offers a fully fledged free version to test and it has an opensource model which will allow for the development of a “best of breed” application. Alfresco offers integration into MS Office Alfresco provides access via CIFs protocol to provide a familiar environment for new users. You can simplify the content control required to meet government regulations, corporate policies and audit requirements etc. Let's get back to you with awesome articles and don't forget to comment us back, Cheers.

The post How to Install Alfrasco ECM on CentOS 7 appeared first on LinOxide.

How to Install CPanel 11.52 on CentOS 7

$
0
0

In September 2015, the product was launched. And it is available in the STABLE release tier now. The new brand cPanel 54 version is launched and it is available in the current release tier for this installation. Cpanel & WHM version 11.52 supports the CloudLinux 7/RHEL 7/CentOS 7 operating systems for fresh installations.

In this article, I'm going to discuss about the features/Pre-requisites/installation of latest LTS release of cPanel & WHM 11.52 on CentOS 7 OS version. Before going to the installation, we can take a look on some of the new features of this release comparing the rest of the releases.

New features:

CloudLinux/RHEL/CentOS 7 support
Quota support & XFS file system
Amazon Linux AMI support
Webmail Branding
MultiPHP
Easy Apache 3 to 4 updates
Linux Container support
Common Mail providers tabs to WHM's Greylisting.

Network Requirements

  • Hostname should be a fully qualified domain name.
  • Should have a valid ipaddress, subnet address and default gateway
  • Ethernet device with a static IP & hostname
  • Disable OS Firewall

Hardware Requirements

  1. Processor : 226 Mhz
  2. RAM : Minimum 1GB ( 2GB recommended for smooth functioning)
  3. Disk Space : Minimun 20 GB (40GB recommended for smooth functioning )

Disable Selinux

Need to edit the selinux configuration file located at : /etc/selinux/config

Modify the SELINUX parameter to disabled and reboot the server.

Installation steps followed for installing cPanel 11.52 on CentOS 7

Before installation make sure the server meets all the pre-requisites.

1. Set hostname to a fully qualified domain

This is how we set the hostname for the server to a fully qualified domain name "server1.centos7-test.com" and confirm the hostname status once it is done.

root@server1 [~]# hostnamectl set-hostname server1.centos7-test.com –static
root@server1 [~]# hostnamectl status
Static hostname: server1.centos7-test.com
Icon name: computer-vm
Chassis: vm
Machine ID: 72863e389b584a4dab36fae7f3bffda2
Boot ID: 8bd4f714d7ba4ebf9d53f059d0a1fe8b
Virtualization: xen
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 4.1.5-x86_64-linode61
Architecture: x86-64
root@server1 [~]#

2. Check for the IP addr, subnet addr and gateway

Make sure we have a static IP with a proper subnet mask and default gateway. In this case our IP address is 45.79.183.73 with a proper subnet mask and gateway.

root@server1 [~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 45.79.183.73 netmask 255.255.255.0 broadcast 45.79.183.255
inet6 fe80::f03c:91ff:fef1:78d9 prefixlen 64 scopeid 0x20<link>
inet6 2600:3c03::f03c:91ff:fef1:78d9 prefixlen 64 scopeid 0x0<global>
ether f2:3c:91:f1:78:d9 txqueuelen 1000 (Ethernet)
RX packets 38095 bytes 13241381 (12.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 41505 bytes 45527241 (43.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

3. Check the OS, disk usage and RAM usage for the server

Our server is installed with CentOS 7.2, having a disk space of 20GB and around 1GB RAM. Please see the results of the hardware checks below:

OS version check:

#cat/etc/redhat-release

root@server1 [~]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
root@server1 [~]#

Disk usage check:

#df-h

root@server1 [~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 20G 5.9G 14G 31% /
devtmpfs 492M 0 492M 0% /dev
tmpfs 494M 0 494M 0% /dev/shm
tmpfs 494M 14M 480M 3% /run
tmpfs 494M 0 494M 0% /sys/fs/cgroup
/dev/loop0 662M 736K 627M 1% /tmp
tmpfs 99M 0 99M 0% /run/user/0

RAM usage check:

free -m or cat /proc/meminfo

root@server1 [~]# free -m
total used free shared buff/cache available
Mem: 987 336 275 12 375 607
Swap: 511 1 510

4. Disable Firewall

It is recommended to disable the OS firewalls before the cPanel & WHM installations. First of all we need to save the firewall rules and then stop the firewalld service. And make sure the service is disabled.

iptables-save > ~/firewall.rules
systemctl stop firewalld.service
systemctl disable firewalld.service

root@server1 [~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)

Jan 09 06:50:28 server1.centos7-test.com systemd[1]: Stopped firewalld - dynamic firewall daemon.

5. Disable Selinux

Modify the SELINUX parameter to disabled in /etc/selinux/config and reboot the server.
root@server1 [~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

5. Installation of Perl

cPanel is programmed in Perl language. Hence, we need to install Perl prior to the cPanel installation if it isn't installed in the server before.

yum install -y perl

6. Download/Install/Run cPanel/WHM script.

We need to download the cPanel installation script into the /home directory and run the script from there.

#cd /home
#curl -o latest -L https://securedownloads.cpanel.net/latest
#sh latest

This is how we download and install the cPanel installation script from our server's home directory.

The script can take half an hour or more to complete the installation procedures.

Installation log

2016-01-07 07:15:51 227 ( INFO): cPanel install finished in 32 minutes and 14 seconds!
2016-01-07 07:15:51 964 ( INFO): Congratulations! Your installation of cPanel & WHM 11.52 is now complete. The next step is to configure your server.
2016-01-07 07:15:51 964 ( INFO):
2016-01-07 07:15:51 964 ( INFO): Before you configure your server, ensure that your firewall allows access on port 2087.
2016-01-07 07:15:51 964 ( INFO): On RHEL, CentOS, and CloudLinux systems, execute /scripts/configure_firewall_for_cpanel to accomplish this.
2016-01-07 07:15:51 964 ( INFO):
2016-01-07 07:15:51 964 ( INFO): After ensuring that your firewall allows access on port 2087, you can configure your server.
2016-01-07 07:15:51 964 ( INFO):
2016-01-07 07:15:51 964 ( INFO): 1. Open your preferred browser
2016-01-07 07:15:51 964 ( INFO):
2016-01-07 07:15:51 964 ( INFO): 2. Type https://45.79.183.73:2087 in the address bar
2016-01-07 07:15:51 964 ( INFO):
2016-01-07 07:15:51 964 ( INFO): 3. Enter the word root in the Username text box
2016-01-07 07:15:51 964 ( INFO):
2016-01-07 07:15:51 964 ( INFO): 4. Enter your root password in the Password text box
2016-01-07 07:15:51 964 ( INFO):
2016-01-07 07:15:51 964 ( INFO): 5. Click the Login button
2016-01-07 07:15:51 964 ( INFO):
2016-01-07 07:15:51 964 ( INFO): Visit http://go.cpanel.net/whminit for more information about first-time configuration of your server.
2016-01-07 07:15:51 964 ( INFO):
2016-01-07 07:15:51 964 ( INFO): Visit http://support.cpanel.net or http://go.cpanel.net/whmfaq for additional support
2016-01-07 07:15:51 964 ( INFO):
2016-01-07 07:15:51 964 ( INFO): Thank you for installing cPanel & WHM 11.52!
2016-01-07 07:15:51 835 ( WARN): !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

7. Adding ports 2087/2086 to the firewalld service

After completing the installation procedures, we need to ensure that our server allows the required service ports in the firewall.

[root@server1 zones]# firewall-cmd --zone=public --add-port=2087/udp
success
[root@server1 zones]# firewall-cmd --zone=public --add-port=2086/udp
success
[root@server1 zones]# firewall-cmd --zone=public --add-port=2086/tcp
success
[root@server1 zones]# firewall-cmd --zone=public –add-port=2087/tcp

[root@server1 zones]#firewall-cmd --reload

If your server has enough resources, then it is always advised to disable the OS firewall and configure CSF/APF to ensure better security and allow all required cPanel service ports by default. I would recommend to go with CSF for a cPanel server.

CSF Installation steps:

 wget http://configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf & ./install.cpanel.sh

Access the WHM via the URL

You can access WHM using the URL https://server-hostname:2087 or http://server-hostname:2086

After accessing the URL mentioned above, you can put your username as root and its password to login.

Read through the terms and conditions & accept the license agreement.

Now you can do your initial configuration steps one by one as below:

1. Setup Networking
2. Setup IP address
3. Nameservers
4. Services
5. Setup quotas

Visit http://go.cpanel.net/whminit for more information about first-time configuration of your server.

Now you will have your WHM ready to use!!!

cpanelwhm

 

I believe this article will be a great help for you guys! Thank you for referring to this. I would appreciate your valuable comments for further improvements.

The post How to Install CPanel 11.52 on CentOS 7 appeared first on LinOxide.

How to Setup Drupal 8 with LEMP Stack on Ubuntu 15.04 / CentOS 7

$
0
0

Durpal is a free and open-source content-management system written in PHP language which allows us to create and maintain our websites without needing to know any coding languages. It is freely distributed under the GNU General Public License version or later. It is used as a back-end framework for at least 2.1% of all Web sites worldwide ranging from personal blogs to corporate, political, and government sites. The Drupal Developers has recently released a new version with a huge updates and bugfixes and is called as Drupal 8. The latest build Drupal 8 has over 200 new features and improvements and is also known as the world' best free and open source content management system. Here are some of the hundreds features and improvements made in the latest release of Drupal 8.

  • It has a comprehensive content modeling out of the box with entities, fields, and views.
  • It consists of an awesome Administrative Interface for the customization of content page, even forms and administrative pages.
  • The localization and translability of Drupal has been improved.
  • Mobile-first, responsive, HTML5 output with awesome frontend design and REST-first native web services.
  • It has the ability to integrate some modern PHP standards and practices with popular libraries such as Composer, Symfony2, Guzzle, and Twig.
  • Drupal 8 contains enhanced caching and integration with CDNs and reverse proxies.
  • It is made full compatibility with PHP7, and the PostgreSQL and SQLite databases and many more.

Here in this article, we'll learn how to install Drupal 8 Content Management System with LEMP Stack on machine running Ubuntu 15.04 and CentOS 7.

1. Installing LEMP Stack

First of all, we’ll need to setup a complete LEMP Stack in our machine running Ubuntu 15.04 or CentOS 7. LEMP stack is the composition of Nginx web server, MariaDB database server and PHP modules. To install the LEMP stack in our machine, we’ll need to open a terminal or console and run the following command in it according to the distribution we're running.

On Ubuntu 15.04

# apt-get update
# apt-get install nginx mariadb-server mariadb-client php5-mysql php-pear php5-gd php5-intl php5-curl php5-xdebug php5-dev php5-xcache php5-fpm

In Ubuntu 15.04, we'll be asked to enter a new password for the MariaDB root user as shown below. We'll need this password in future for accessing the root user of MariaDB database server.

On CentOS 7

# yum update
# yum install nginx mariadb-­server mariadb-client php-­mysql php-­pear php-gd php-­xml php­-intl php­-curl php­xdebug php­-dev php-mbstring php-­xcache php5-fpm

2. Configuring MariaDB

As we have already configured password for our MariaDB root user in our Ubuntu 15.04 machine, we'll simply skip this step of configuring MariaDB and continue the next step of creating the database for our Drupal 8. But if we are running CentOS in our machine, we'll need to follow this step in order to configure our MariaDB and set a password for the database root user. To configure MariaDB and assign a root password, we’ll need to run the following command.

# 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!

After its done, we'll start the MariaDB server by running the following command.

# systemctl start mysql

Then, we'll move forward towards the creation of a database user and a database so that Drupal 8 can use it to store its data.

3. Creating MariaDB Database

Next, we'll go further towards the creation of our new database so that drupal 8 can utilize it to store its data. To do so, we’ll need to first login to the MariaDB command prompt as root. Here, we’ll need to enter the password of the MariaDB root account that we had set above.

# mysql -u root -p

After we’re logged in into the mariadb command prompt, we’ll create the database, database user, password and assign full privileges to that database. To do so, we'll need to run the following MariaDB console commands.

> CREATE DATABASE drupaldb;
> CREATE USER 'drupaluser'@'localhost' IDENTIFIED BY 'Pa$$worD';
> GRANT ALL PRIVILEGES ON drupaldb.* TO 'drupaluser'@'localhost';
> FLUSH PRIVILEGES;
> EXIT;

Drupal 8 mariadb database creation

4. Configuring PHP5-FPM

Next, we'll configure our PHP5-FPM configuration which is located at /etc/php5/fpm/php.ini using our favorite text editor.

# nano /etc/php5/fpm/php.ini

After the file is opened with the text editor, we'll need to append the file using the following configuration required to run Drupal 8.

cgi.fix_pathinfo=0
xdebug.max_nesting_level=256

PHP-FPM Configuration

Once done, we'll simply save the file and exit the text editor.

5. Configuring Nginx Server

We'll now configure our Nginx server and create the configuration file for making our drupal site working. To do so, we'll need to open /etc/nginx/sites-available/drupal.linoxide.com using a text editor.

# nano /etc/nginx/sites-available/drupal.linoxide.com

Then, we'll simply append the following configuration into the file.

server {
listen 80;
root /var/www/drupal.linoxide.com;
index index.php index.html index.htm;
server_name drupal.linoxide.com;
location / {
try_files $uri $uri/ /index.php?$args;
}

location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_index index.php;
fastcgi_pass unix://var/run/php5-fpm.sock;
include fastcgi.conf;
}
}

Drupal 8 Nginx Configuration

Once done, we'll save and exit the file. After that, we'll need to activate the configuration file. To do so, we'll need to create a new link of the newly created nginx file under /etc/nginx/sites-enabled/ directory.

# sudo ln -s /etc/nginx/sites-available/drupal.linoxide.com /etc/nginx/sites-enabled/drupal.linoxide.com

6. Downloading Drupal 8

Now, we'll download the latest release of Drupal ie version 8 from the Official Download Page. We'll open the download site and get the link of the tarball file. Then, we'll simply download it using wget command in a terminal or console under /tmp/ directory.

# cd /tmp/
# wget http://ftp.drupal.org/files/projects/drupal-8.0.2.tar.gz

--2016-01-16 12:48:04-- http://ftp.drupal.org/files/projects/drupal-8.0.2.tar.gz
Resolving ftp.drupal.org (ftp.drupal.org)... 103.245.222.68
...
Connecting to ftp.drupal.org (ftp.drupal.org)|103.245.222.68|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11720487 (11M) [application/octet-stream]
Saving to: 'drupal-8.0.2.tar.gz'
drupal-8.0.2.tar.gz 100%[=====================>] 11.18M 69.8MB/s in 0.2s
2016-01-16 12:48:04 (69.8 MB/s) - 'drupal-8.0.2.tar.gz' saved [11720487/11720487]

Once the Drupal 8 tarball is downloaded successfully, we'll gonna extract it.

# tar -xzf drupal-8.0.1.tar.gz

Then, we'll move the entire files extracted from the tarball to our webroot we had set above in the nginx server configuration file ie /var/www/drupal.linoxide.com . We can do that by running the following command.

# mkdir -p /var/www/drupal.linoxide.com
# mv drupal-8.0.1/* /var/www/drupal.linoxide.com

7. Enabling and Restarting Services

As all the configurations are done, we'll simply restart our servers in order to take those configurations into effect. Once done, we'll set our servers to start in every system boot. To do so, we'll need to run the following systemctl command.

On Ubuntu 15.04

# systemctl restart mysql nginx php5-fpm
# systemctl enable mysql nginx php5-fpm

On CentOS 7

# systemctl restart mariadb nginx php5-fpm
# systemctl enable mariadb nginx php5-fpm

8. Allowing Firewall

We'll need to allow port 80 to expose on the internet so that our site is accessible in the same network. To enable http or allow port 80, we'll need to run the following command.

On Ubuntu 15.04

As we know, iptables is a very popular firewall solution program used in Ubuntu system. So, to allow or expose port 80, we'll need to execute the following iptables command.

# iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
# iptables-save > /etc/iptables-up.rules

On CentOS 7

CentOS 7 is shipped with systemd as the default init system and we'll have firewalld installed for as a firewall solution. To allow port 80 or http service, we'll need to run the following commands.

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

9. Web Installation

Once everything is setup and configured as in the above steps, we'll now go forward towards the web installation of Drupal 8. We need to point our web browser to our server's ip address or domain name as http://ip-address/ or http://domain.com/ according to the configuration. Here, in this tutorial, we'll point our web browser to http://drupal.linoxide.com/ as shown in the image below.

Choosing Language Web Installation

We'll now need to select our language then click on Save and Continue to proceed further towards the installation. Then, we'll be asked to choose an installation profile between Standard and Minimal. In this tutorial, we'll go with Standard profile as it installs drupal configured with the commonly used features.

Choose Installation Profile

A database setup page will load in which we are required to enter the MariaDB database login details so that Drupal 8 can use that database for storing its data.

Database Configuration Drupal 8

Once done, the web installer will then setup our Drupal 8 according to the configuration as shown below.

Installing Drupal

After the installation is completed, we're required to configure our website with the required information like Site name, email address, site maintenance account login details and more.

Drupal Configure Site

If everything went correct as expected, we'll see the homepage of our Drupal 8 website. Later, in order to login to the admin panel, we'll require the username and password we had just create above.

Drupal 8 Website Homepage

Conclusion

Finally, we have successfully installed Drupal 8 in our server running ubuntu 15.04  and CentOS 7 linux distributions. Once, the installation is completed, we can customize and develop beautiful websites of our requirements and desire. The above installation steps are pretty easy making Drupal 8 very simple and easy to setup by anyone with basic linux command knowledge. 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 Drupal 8 with LEMP Stack on Ubuntu 15.04 / CentOS 7 appeared first on LinOxide.

How to Install Apache ServiceMix on CentOS 7

$
0
0

Hi, welcome to our today's article on Apache ServiceMix. Let me give you an overview of what ServiceMix is and what you can do with it. Apache ServiceMix is a runtime container for service-oriented architecture components, web services or legacy system connectivity services. Apache ServiceMix is an enterprise-class open-source distributed enterprise service bus (ESB) based on the SOA model released under the Apache license. It is one of the most mature, open-source implementations of an enterprise service bus and an Apache top-level project. Apache ServiceMix provides an OSGi container in which we can run, configure and manage Camel and ActiveMQ instances and you can explore the other services that it can provide.

So, in the mean time, we'll be showing thine stall ServiceMix on CentOS 7 machine to deploy some basic integration routes and extend the container with some additional features.

System Requirements

Before starting the installation, we need to prepare our CentOS 7 server with some basic requirements. Atleast 200 MB of free disk space is required for the Apache, Karaf and few other binary distributions.

Let's connect to your server using the sudo or root user credentials and perform the following tasks,

OS Update

Run the command as given below to update your Operating system with latest updates and missing patches.

# yum update

Java Setup

For running Apache ServiceMix itself, you'll need Java Runtime Environment (JRE) 1.6.x (Java 6) or greater. Make sure that the JAVA_HOME environment variable must be set to the directory where the Java runtime is installed.

You check the installed version of Java and current settings of your JAVA_HOME and PATH variables using the below commands.

[root@servicemix ~]# java -version
java version "1.7.0_91"

[root@servicemix ~]# echo $JAVA_HOME
/usr/lib/jvm/jre

[root@servicemix ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin

Apache Maven

Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information. Run the below command get it install on your server before installing Apache ServiceMix.

# ]# wget http://www.eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz

Now extract this to the '/usr/local/' directory using the below command.

# tar -zxvf apache-maven-3.3.9-bin.tar.gz -C /usr/local/

Now change directory to '/usr/local/' folder and create a soft link with below command.

#cd /usr/local/

# ln -s apache-maven-3.3.9 maven

Now we will setup the Maven path system-wide by creating a new file and adding the parameters in as shown below.

# vim /etc/profile.d/maven.sh
export M2_HOME=/usr/local/maven
export PATH=${M2_HOME}/bin:${PATH}

After saving file you have to logout and then login back to implement environment variables. Then to verify successful installation of maven, check the version of maven by using the below command.

# mvn -version

maven version

Download Apache ServiceMix

After setting up the Java, you need to download the Apache ServiceMix by choosing the required package.

download servicemix

Copy the source link address and download it using the wget command in your server.

]# wget http://archive.apache.org/dist/servicemix/servicemix-4/4.5.3/apache-servicemix-4.5.3.tar.gz

Use below command to extract the package.

# tar -zxvf apache-servicemix-4.5.3.tar.gz

Installing Apache ServiceMix

Change your directory to the 'bin' directory of your extracted package and execute the the following command to start installation of ServiceMix as shown below.

[root@servicemix ~]# cd apache-servicemix-4.5.3/bin/
[root@servicemix bin]# ./servicemix

installing servicemix

Using Apache ServiceMix Console

We have successfully installed and started Apache ServiceMix. Now we are going to show you that how you can manage your ServiceMix instance, add and remove bundles and install optional features.

Let run the following command to get a list of all bundles currently installed on your server.

karaf@root> osgi:list

installed bundles

If you're looking for something specific in the list, you can use unix-like pipes and utilities to help you. Just for example run the below command to see all Apache related bundles in the list.

karaf@root> osgi:list | grep Apache

Apache Bundles

Many of the applications you write will have some form of log output. To look at the message in the log file, you can us the log:diplay command.

karaf@root> log:display

karaf@root> log:display-exception

Optional Features

You can open the list of features using 'features:list' command. The overview shows you whether or not the feature is currently installed, the version and the name of the feature as shown below.

karaf@root> features:list

list features

To get the web console installed in ServiceMix, install the feature from your console using the command as shown below.

karaf@root> features:install webconsole

Now verify that the feature is marked installed in the overview by executing the below command to grep the webconsole.

karaf@root> features:install webconsole

installing webconsole

Now you will be able to point your browser to http://localhost:8181/system/console and login with user 'smx' and password 'smx' to access the web console.

Apache Karaft WebConsole

From the webconsole, now you can start and stop bundles, configure settings, install optional features or view system information all from your web console as shown below.

managing from console

Conclusion

At the end of this article we have learned the one of the most mature, open-source implementations of an enterprise service bus and an Apache top-level project that is Apache ServiceMix. ServiceMix for sure is not the first choice for application development, in terms of desktop software. But if you have to deal with more complex environments, where different applications are involved and need to interact with each other, an enterprise service bus can alleviate the burden of dealing with such systems to a great extent.

The post How to Install Apache ServiceMix on CentOS 7 appeared first on LinOxide.

Viewing all 1287 articles
Browse latest View live