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

How to Install Moodle LMS on Ubuntu 14 / 15

$
0
0

Moodle is one of the most widely used Open Source Learning Management System by different institutions in the World due to its cost effective and distance learning features for the students. It can be customized for its management features and used to create private on line courses for educators and trainers to achieve learning goals like online content resource repositories, enterprise solutions for managing course registration, course schedules, payment and enrollment, training resources, compliance management and student or employee records.

Moodle is a web based portal that can be used by everyone for the schools, businesses, colleges, charities, universities, and the public sector to manage their account creation, enrollments and permissions etc.

Setup Prerequisites

Moodle is primarily developed in Linux using LAMP Stack that is Apache, MySQL and PHP. So, the basic requirements for Moodle are as follows:

1) System Resources

The recommended system resources to setup Moodle on ubuntu 14/15 requires 5GB of Disk space and 1 GB RAM, a static IP address and FQDN host name.

2) System Update

Login to ubuntu server using the sudo or root credentials and update your system all latest patches and updates by using the below command.

#apt-get update

3) LAMP Setup

We need to setup the LAMP stack on our Ubuntu server in order to install Moodle as its prerequisite. To do so we will installing the Apache web server, MySQL database and PHP by using the below below command.

# apt-get install apache2 mysql-server mysql-client php5

Press "Y" to proceed the installation, you will be asked to configure the mysql root password during the process, choose the strongest one for your security and then press "OK" to proceed the installation.

The installation of Moodle depends upon some extra PHP libraries that are necessary for its successful setup. Let's run the below command to install.

# apt-get install php5-pspell php5-curl php5-gd php5-intl php5-mysql php5-xmlrpc php5-ldap graphviz aspell

After this restart Apache web server and MySQL database services.

# service apache2 restart

Downloading Moodle

To download the latest package of moodle go to the Moodle Download Page and get the latest available package from here.

Moodle Download

You can also get the latest package of Moodle using Git. To do so we will be using the below command in '/opt' directory.

# cd /opt/
# git clone git://git.moodle.org/moodle.git

git clone moodle

root@moodle:/opt/moodle# git branch --track MOODLE_29_STABLE origin/MOODLE_29_STABLE
Branch MOODLE_29_STABLE set up to track remote branch MOODLE_29_STABLE from origin.

root@moodle:/opt/moodle# git checkout MOODLE_29_STABLE
Switched to branch 'MOODLE_29_STABLE'
Your branch is up-to-date with 'origin/MOODLE_29_STABLE'.

Now we will have to place the contents into the document root directory of Apache web server and then give it the right permissions by using the below commands.

# cp -R /opt/moodle /var/www/html/
# mkdir /var/moodledata
# chown -R www-data /var/moodledata
# chmod -R 777 /var/moodledata
# chmod -R 0755 /var/www/html/moodle

MySQL Server Setup

In MySQL server setup first we will configure the default storage engine to innodb by opening the 'my.cnf' file.

# vim /etc/my.cnf
[mysqld]
default-storage-engine = innodb
:wq!

Close the file after saving the changes, then connect to the mysql server with root credentials and create a new database and a user for moodle using the below commands.

mysql> CREATE DATABASE moodle DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
Query OK, 1 row affected (0.03 sec)

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,CREATE TEMPORARY TABLES,DROP,INDEX,ALTER ON moodle.* TO moodleu@localhost IDENTIFIED BY 'moodleu123';
Query OK, 0 rows affected (0.00 sec)

mysql> quit;
Bye

Now restart both the services of MySQL and Apahe web server and move to the next step to start installation of Moodle.

# service mysql restart
# service apache2 restart

Installing Moodle

To complete the installation setup of moodle, open the below link in your web browser to start its web installation by completing the steps.

http://your_servers_ip/moodle/

installing Moodle

Choose the appropriate language that you want to use and click on the NEXT button.

You will be asked to confirm different installation paths for the Web address, Moodle directory and data directory.

Moodle Paths

Make sure that the 'www' diretory has the write permissions other wise you might get the rror unless you fixed the permissions.

Next choose the database drivers according to your installed data base server.

database type

Then in the next section provide the data base settings according the previous configurations and click on the Next button to proceed as shown below.

database settings

After this you will be asked to accept the term and conditions to use Moodle and press Continue.

Moodle Terms

Now in the below section you will be able see that all the required plug ins and libraries are successfully setup. Then press on the Continue button to complete the setup.

final server check

The web installation setup will take a while to install all these plugins and libraries. Once all the packages are installed successfully press "Continue" button to move to the next step where you configure your main administrator account which will have complete control over the site. Make sure you give it a secure username and password as well as a valid email address. You can create more admin accounts later on.

Once you have configured your profile and front page setting you will be directed to the administration console of Moodle.

Moodle Dashboard

Conclusion

We have successfully setup Moodle Learning Management system on Ubuntu. Now you can easily use it by adding new users, courses and upload contents with specific permissions according to your requirements from its user friendly web dashboard. Leave us a comment if you find any difficulty during its setup.

The post How to Install Moodle LMS on Ubuntu 14 / 15 appeared first on LinOxide.


How to Install Revive Adserver on Ubuntu 15.04 / CentOS 7

$
0
0

Revive AdserverHow to Install Revive Adserver on Ubuntu 15.04 / CentOS 7 is a free and open source advertisement management system that enables publishers, ad networks and advertisers to serve ads on websites, apps, videos and manage campaigns for multiple advertiser with many features. Revive Adserver is licensed under GNU Public License which is also known as OpenX Source. It features an integrated banner management interface, URL targeting, geo-targeting and tracking system for gathering statistics. This application enables website owners to manage banners from both in-house advertisement campaigns as well as from paid or third-party sources, such as Google's AdSense. Here, in this tutorial, we'll gonna install Revive Adserver in our machine running Ubuntu 15.04 or CentOS 7.

Installing LAMP Stack

First of all, as Revive Adserver requires a complete LAMP Stack to work, we'll gonna install it. LAMP Stack is the combination of Apache Web Server, MySQL/MariaDB Database Server and PHP modules. To run Revive properly, we'll need to install some PHP modules like apc, zlib, xml, pcre, mysql and mbstring. To setup LAMP Stack, we'll need to run the following command with respect to the distribution of linux we are currently running.

On Ubuntu 15.04

# apt-get install apache2 mariadb-server php5 php5-gd php5-mysql php5-curl php-apc zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev libapache2-mod-php5 zip

On CentOS 7

# yum install httpd mariadb php php-gd php-mysql php-curl php-mbstring php-xml php-apc zlibc zlib1g zlib1g-dev libpcre3 libpcre3-dev zip

Starting Apache and MariaDB server

We’ll now start our newly installed Apache web server and MariaDB database server in our linux machine. To do so, we'll need to execute the following commands.

On Ubuntu 15.04

Ubuntu 15.04 is shipped with Systemd as its default init system, so we'll need to execute the following commands to start apache and mariadb daemons.

# systemctl start apache2 mysql

After its started, we'll now make it able to start automatically in every system boot by running the following command.

# systemctl enable apache2 mysql

Synchronizing state for apache2.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d apache2 defaults
Executing /usr/sbin/update-rc.d apache2 enable
Synchronizing state for mysql.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d mysql defaults
Executing /usr/sbin/update-rc.d mysql enable

On CentOS 7

Also in CentOS 7, systemd is the default init system so, we'll run the following command to start them.

# systemctl start httpd mariadb

Next, we'll enable them to start automatically in every startup of init system using the following command.

# systemctl enable httpd mariadb

ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service'

Configuring MariaDB

On CentOS 7/Ubuntu 15.04

Now, as we are starting MariaDB for the first time and no password has been assigned for MariaDB so, we’ll first need to configure a root password for it. Then, we’ll gonna create a new database so that it can store data for our Revive Adserver installation.

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!

Configuring MariaDB

Creating new Database

After we have assigned the password to our root user of mariadb server, we'll now create a new database for Revive Adserver application so that it can store its data into the database server. To do so, first we'll need to login to our MariaDB console by running the following command.

# mysql -u root -p

Then, it will ask us to enter the password of root user which we had just set in the above step. Then, we'll be welcomed into the MariaDB console in which we'll create our new database, database user and assign its password and grant all privileges to create, remove and edit the tables and data stored in it.

> CREATE DATABASE revivedb;
> CREATE USER 'reviveuser'@'localhost' IDENTIFIED BY 'Pa$$worD123';
> GRANT ALL PRIVILEGES ON revivedb.* TO 'reviveuser'@'localhost';
> FLUSH PRIVILEGES;
> EXIT;

Creating Mariadb Revive Database

Downloading Revive Adserver Package

Next, we'll download the latest release of Revive Adserver ie version 3.2.2 in the time of writing this article. So, we'll first get the download link from the official Download Page of Revive Adserver ie http://www.revive-adserver.com/download/ then we'll download the compressed zip file using wget command under /tmp/ directory as shown bellow.

# cd /tmp/
# wget http://download.revive-adserver.com/revive-adserver-3.2.2.zip

--2015-11-09 17:03:48-- http://download.revive-adserver.com/revive-adserver-3.2.2.zip
Resolving download.revive-adserver.com (download.revive-adserver.com)... 54.230.119.219, 54.239.132.177, 54.230.116.214, ...
Connecting to download.revive-adserver.com (download.revive-adserver.com)|54.230.119.219|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11663620 (11M) [application/zip]
Saving to: 'revive-adserver-3.2.2.zip'
revive-adserver-3.2 100%[=====================>] 11.12M 1.80MB/s in 13s
2015-11-09 17:04:02 (906 KB/s) - 'revive-adserver-3.2.2.zip' saved [11663620/11663620]

After the file is downloaded, we'll simply extract its files and directories using unzip command.

# unzip revive-adserver-3.2.2.zip

Then, we'll gonna move the entire Revive directories including every files from /tmp to the default webroot of Apache Web Server ie /var/www/html/ directory.

# mv revive-adserver-3.2.2 /var/www/html/reviveads

Configuring Apache Web Server

We'll now configure our Apache Server so that revive will run with proper configuration. To do so, we'll create a new virtualhost by creating a new configuration file named reviveads.conf . The directory here may differ from one distribution to another, here is how we create in the following distributions of linux.

On Ubuntu 15.04

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

Now, we'll gonna add the following lines of configuration into this file using our favorite text editor.

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

Configuring Apache2 Ubuntu

After done, we'll gonna save the file and exit our text editor. Then, we'll restart our Apache Web server.

# systemctl restart apache2

On CentOS 7

In CentOS, we'll directly create the file reviveads.conf under /etc/httpd/conf.d/ directory using our favorite text editor.

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

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

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

Configuring httpd Centos

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

Fixing Permissions and Ownership

Now, we'll gonna fix some file permissions and ownership of the installation path. First, we'll gonna set the ownership of the installation directory to Apache process owner so that apache web server will have full access of the files and directories to edit, create and delete.

On Ubuntu 15.04

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

On CentOS 7

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

Allowing Firewall

Now, we'll gonna configure our firewall programs to allow port 80 (http) so that our apache web server running Revive Adserver will be accessible from other machines in the network across the default http port ie 80.

On Ubuntu 15.04/CentOS 7

As CentOS 7 and Ubuntu 15.04 both has systemd installed by default, it contains firewalld running as firewall program. In order to open the port 80 (http service) on firewalld, we'll need to execute the following commands.

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

success

# firewall-cmd --reload

success

Web Installation

Finally, after everything is done as expected, we'll now be able to access the web interface of the application using a web browser. We can go further towards the web installation, by pointing the web browser to the web server we are running in our linux machine. To do so, we'll need to point our web browser to http://ip-address/ or http://domain.com assigned to our linux machine. Here, in this tutorial, we'll point our browser to http://reviveads.linoxide.com/ .

Revive Adserver Web Installation Welcome

Here, we'll see the Welcome page of the installation of Revive Adserver with the GNU General Public License V2 as Revive Adserver is released under this license. Then, we'll simply click on I agree button in order to continue the installation.

Connecting Revive Adserver Database

In the next page, we'll need to enter the required database information in order to connect Revive Adserver with the MariaDB database server. Here, we'll need to enter the database name, user and password that we had set in the above step. In this tutorial, we entered database name, user and password as revivedb, reviveuser and Pa$$worD123 respectively then, we set the hostname as localhost and continue further.

Configuring Revive Adserver

We'll now enter the required information like administration username, password and email address so that we can use these information to login to the dashboard of our Adserver. After done, we'll head towards the Finish page in which we'll see that we have successfully installed Revive Adserver in our server.

Revive Adserver Installation Finished

Next, we'll be redirected to the Adverstiser page where we'll add new Advertisers and manage them. Then, we'll be able to navigate to our Dashboard, add new users to the adserver, add new campaign for our advertisers, banners, websites, video ads and everything that its built with.

Revive Adserver Advertisers Page

For enabling more configurations and access towards the administrative settings, we can switch our Dashboard user to the Administrator account. This will add new administrative menus in the dashboard like Plugins, Configuration through which we can add and manage plugins and configure many features and elements of Revive Adserver.

Conclusion

In this article, we learned some information on what is Revive Adserver and how we can setup on linux machine running Ubuntu 15.04 and CentOS 7 distributions. Though Revive Adserver's initial source code was bought from OpenX, currently the code base for OpenX Enterprise and Revive Adserver are completely separate. To extend more features, we can install more plugins which we can also find from http://www.adserverplugins.com/ . Really, this piece of software has changed the way of managing the ads for websites, apps, videos and made it very easy and efficient. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you !

The post How to Install Revive Adserver on Ubuntu 15.04 / CentOS 7 appeared first on LinOxide.

How to Install uTox Client on Tails

$
0
0

In this tutorial, our focus is persistent installation of  uTox software on the Tails security distribution. uTox is lightweight TOX client for instant messaging. TOX application provides an easy and secure way  to users to connect with friends/family over insecure network. It is available for Windows, Linux, Mac OS and Android platforms. We assume that user gives Passphrase on login screen at startup which is mandatory for encrypted Persistent (permanent) storage of files/folder.

Setting Passphrase for Persistence volume at startup

login

Setting Administrator password for Tails at startup is shown below.

more options

Installation of uTox for Tails can be used for other Linux distribution with little modification (because other distributions already have persistent storage). In this tutorial we will install all required packages for uTox from sources and the installation path will be Persistent directory.

Prerequisite

Following packages required  for uTox client.

Libsodium

Sodium is a modern, easy-to-use software library for crypto operations such as encryption ,decryption, signatures, password hashing.

Libopus  and Libvpx

Above mentioned libraries are required for audio/video (A/V) support in ToxCore.

Toxcore

It is main implementation of TOX project.

Filter audio

It is Lightweight audio filtering library required for the uTox and it must be installed on Tails before  uTox compilation.

Installation

Persistence path under Tails distribution is /home/amnesia/Persistent. It is also shown in the following snapshot.  Every installation on Tails should be under  persistence path for permanent storage of files/folders.

persistence

Create new directory utox_install under /home/amnesia/Persistent.

$sudo mkdir utox_install

$sudo chown -R amnesia:amnesia utox_install

utox_install

amnesia is the default user in the Tails.

Following packages are required before compilation of  sources.

$sudo apt-get update && apt-get install --force-yes -y  build-essential libtool autotools-dev automake checkinstall check git yasm pkg-config

Libsodium extraction and installation under /home/amnesia/Persistent/utox_install is shown in the following figures.

$tar -xzf libsodium-1.0.0.tar.gz

$cd libsodium-1.0.0

libsodium-extraction

$./configure --prefix=/home/amnesia/Persistent/utox_install/

configure

$make

make-libsodiu

$make install

make install libsodium

Libvpx extraction and installation under /home/amnesia/Persistent/utox_install is shown in the following figures.

$tar -xzf  libvpx.tar.gz

$cd libvpx

extraction of libvpx

$./configure --prefix=/home/amnesia/Persistent/utox_install/

configure of libvpx

$make

make libvpx

$make install

make install libvpx

Libopus extraction and installation under /home/amnesia/Persistent/utox_install/ is shown in the following figures.

$tar -xzf opus-1.0.3.tar.gz

$cd opus-1.0.3

extraction of libopux

$./configure --prefix=/home/amnesia/Persistent/utox_install/

configure of libopus

Output of configure script.

configure of libopus output

$make

make libopus

$make install

make install libopus

By default installation path of Filter Audio tool is  /usr/local/, however we need to install it under persistent path. Therefore we have to change prefix line in Makefile of Filter Audio package.

#PREFIX ?= /usr/local
PREFIX ?= /home/amnesia/Persistent/utox_install

Filter Audio extraction and installation under /home/amnesia/Persistent/utox_install/ is shown in the following figures.

$tar -xzf  filter_audio-master.tar.gz

$cd filter_audio-master

extraction of filter audio

Run following sed command in the Filter Audio code to change the Prefix path.

$sed -i 's|PREFIX ?= /usr/local|PREFIX ?= /home/amnesia/Persistent/utox_install|g' Makefile

sed

$make

make filter audio

$make install

make install filter audio

Run following export command in the terminal for the detection of Audio/Video Packages using pkgconfig tool. These are required for toxcore package compilation.

$export PKG_CONFIG_PATH="/home/amnesia/Persistent/utox_install/lib/pkgconfig"

pkgconfig export

Toxcore package  extraction and installation under /home/amnesia/Persistent/utox_install/ is shown in the following figures.

$tar -xzf  toxcore.tar.gz

$cd toxcore

extraction of toxcore

Run autoreconf command for the generation of configure script in the source code of Toxcore.

$autoreconf -i

autoreconig

./configure --prefix=/home/amnesia/Persistent/utox_install/ --with-libsodium-headers=/home/amnesia/Persistent/utox_install/include   --with-libsodium-libs=/home/amnesia/Persistent/utox_install/lib/

configure toxcore

$make

make toxcore

$make install

make install toxocre

Now at this stage , we will install  uTox client . Following dependencies are required for uTox compilation on the Tails.

sudo apt-get install --force-yes -y libx11-dev libv4l-dev libopenal-dev libfreetype6-dev libdbus-1-dev libxrender-dev libfontconfig1-dev libxext-dev

By default installation path of uTox client is  /usr/local/, however we need to install it under persistent path. Therefore we have to change prefix line in Makefile of uTox package.

#PREFIX ?= /usr/local
PREFIX ?= /home/amnesia/Persistent/utox_install

uTox package extraction and installation under /home/amnesia/Persistent/utox_install/ is shown in the following figures.

$tar -xzf  uTox.tar.gz

$cd uTox

extraction of uToxRun following sed command in the uTox client code to change the Prefix path.

$sed -i 's|PREFIX ?= /usr/local|PREFIX ?= /home/amnesia/Persistent/utox_install|g' Makefile

sed utox

$make

make utox

$make install

make install utox

After successful installation of uTox from source, now run it from the bin directory under persistent path of installation.

$ cd /home/amnesia/Persistent/utox_install/bin

$./utox

utox run

Running uTox client application in the Tails.

utox app

Conclusion

In this article we compiled uTox latest release on the Tails security distribution. Tails loses setting after reboots therefore we installed every thing related to uTox at Persistent path. uTox is the lightweight client for the open source instant messaging tool Toxcore. It is used in the community due to open source and security feature.

The post How to Install uTox Client on Tails appeared first on LinOxide.

How to install Android Studio on Ubuntu 15.04 / CentOS 7

$
0
0

With the advancement of smart phones in the recent years, Android has become one of the biggest phone platforms and all the tools required to build Android applications are also freely available. Android Studio is an Integrated Development Environment (IDE) for developing Android applications based on IntelliJ IDEA.  It is a free and open source software by Google released in 2014 and succeeds Eclipse as the main IDE.

In this article, we will learn how to install Android Studio on Ubuntu 15.04 and CentOS 7.

Installation on Ubuntu 15.04

We can install Android Studio in two ways. One is to set up the required repository and install it; other is to download it from the official Android site and install it locally.  In the following example,  we will be setting up the repo using command line and install it.  Before proceeding, we need to make sure that we have JDK  version1.6 or greater installed.

Here, I'm installing JDK 1.8.

$ sudo add-apt-repository ppa:webupd8team/java

$ sudo apt-get update

$ sudo apt-get install oracle-java8-installer oracle-java8-set-default

Verify if java installation was successful:

poornima@poornima-Lenovo:~$ java  -version

Now,  setup the repo for installing Android Studio

$ sudo apt-add-repository ppa:paolorotolo/android-studio

Android-Studio-repo

$ sudo apt-get update

$ sudo apt-get install android-studio

Above install command will install android-studio in the directory /opt.

Now, run the following command to start the setup wizard:

$ /opt/android-studio/bin/studio.sh

This will invoke the setup screen. Following are the screen shots that follow to set up Android studio:

Android Studio setup

Install-type

 

Emulator Settings

Once you press the Finish button, Licence agreement will be displayed. After you accept the licence, it starts downloading the required components.

Download components

Android studio installation will be complete after this step. When you relaunch Android studio, you will be shown the following welcome screen from where you will be able to start working with your Android Studio.

Welcome screen

Installation on CentOS 7

Let us now learn how to install Android Studio on CentOS 7. Here also, you need to install JDK 1.6 or later.  Remember to use 'sudo' before the commands if you are not a root user.  You can download the latest version of JDK. In case you already have an older version installed, remove the same before installing the new one. In the below example, I will be installing JDK version 1.8.0_65 by downloading the required rpm.

[root@li1260-39 ~]# rpm -ivh jdk-8u65-linux-x64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:jdk1.8.0_65-2000:1.8.0_65-fcs ################################# [100%]
Unpacking JAR files...
tools.jar...
plugin.jar...
javaws.jar...
deploy.jar...
rt.jar...
jsse.jar...
charsets.jar...
localedata.jar...
jfxrt.jar...

If Java path is not set properly, you will get error messages. Hence, set the correct path:

export JAVA_HOME=/usr/java/jdk1.8.0_25/
export PATH=$PATH:$JAVA_HOME

Check if the correct version has been installed:

[root@li1260-39 ~]# java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

If you notice any error message of the sort  "unable-to-run-mksdcard-sdk-tool:" while trying to install Android Studio, you might also have to install the following packages on CentOS 7 64-bit:

glibc.i686

glibc-devel.i686

libstdc++.i686

zlib-devel.i686

ncurses-devel.i686

libX11-devel.i686

libXrender.i686

libXrandr.i686

Let us know install studio by downloading the ide file from Android site and unzipping the same.

[root@li1260-39 tmp]# unzip android-studio-ide-141.2343393-linux.zip

Move android-studio directory to /opt directory

[root@li1260-39 tmp]# mv /tmp/android-studio/ /opt/

You can create a simlink to the studio executable to quickly start it whenever you need it.

[root@li1260-39 tmp]# ln -s /opt/android-studio/bin/studio.sh /usr/local/bin/android-studio

Now launch the studio from a terminal:

[root@localhost ~]#studio

The screens that follow for completing the installation are same as the ones shown above for Ubuntu.  When the installation completes, you can start creating your own Android applications.

Conclusion

Within a year of its release, Android Studio has taken over as the primary IDE for Android development by eclipsing Eclipse.  It is the only official IDE tool that will  support future  Android SDKs and other Android features that will be provided by Google. So, what are you waiting for? Go install Android Studio and have fun developing Android apps.

The post How to install Android Studio on Ubuntu 15.04 / CentOS 7 appeared first on LinOxide.

How to Install Cockpit in Fedora / CentOS / RHEL/ Arch Linux

$
0
0

Cockpit is a free and open source server management software that makes us easy to administer our GNU/Linux servers via its beautiful web interface frontend. Cockpit helps make linux system administrator, system maintainers and DevOps easy to manage their server and to perform simple tasks, such as administering storage, inspecting journals, starting and stopping services and more. Its journal interface adds aroma in flower making people easy to switch between the terminal and web interface. And moreover, it makes easy to manage not only one server but several multiple networked servers from a single place at the same time with just a single click. It is very light weight and has easy to use web based interface. In this tutorial, we'll learn how we can setup Cockpit and use it to manage our server running Fedora, CentOS, Arch Linux and RHEL distributions as their operating system software. Some of the awesome benefits of Cockpit in our GNU/Linux servers are as follows:

  1. It consist of systemd service manager for ease.
  2. It has a Journal log viewer to perform troubleshoots and log analysis.
  3. Storage setup including LVM was never easier before.
  4. Basic Network configuration can be applied with Cockpit
  5. We can easily add and remove local users and manage multiple servers.

1. Installing Cockpit

First of all, we'll need to setup Cockpit in our linux based server. In most of the distributions, the cockpit package is already available in their official repositories. Here, in this tutorial, we'll setup Cockpit in Fedora 22, CentOS 7, Arch Linux and RHEL 7 from their official repositories.

On CentOS / RHEL

Cockpit is available in the official repository of CenOS and RHEL. So, we'll simply install it using yum manager. To do so, we'll simply run the following command under sudo/root access.

# yum install cockpit

Install Cockpit Centos

On Fedora 22/21

Alike, CentOS, it is also available by default in Fedora's official repository, we'll simply install cockpit using dnf package manager.

# dnf install cockpit

Install Cockpit Fedora

 On Arch Linux

Cockpit is currently not available in the official repository of Arch Linux but it is available in the Arch User Repository also know as AUR. So, we'll simply run the following yaourt command to install it.

# yaourt cockpit

Install Cockpit Archlinux

2. Starting and Enabling Cockpit

After we have successfully installed it, we'll gonna start the cockpit server with our service/daemon manager. As of 2015, most of the linux distributions have adopted Systemd whereas some of the linux distributions still run SysVinit to manage daemon, but Cockpit uses systemd for almost everything from running daemons to services. So, we can only setup Cockpit in the latest releases of linux distributions running Systemd. In order to start Cockpit and make it start in every boot of the system, we'll need to run the following command in a terminal or a console.

# systemctl start cockpit

# systemctl enable cockpit.socket

Created symlink from /etc/systemd/system/sockets.target.wants/cockpit.socket to /usr/lib/systemd/system/cockpit.socket.

3. Allowing Firewall

After we have started our cockpit server and enable it to start in every boot, we'll now go for configuring firewall. As we have firewall programs running in our server, we'll need to allow ports in order to make cockpit accessible outside of the server.

On Firewalld

# firewall-cmd --add-service=cockpit --permanent

success

# firewall-cmd --reload

success

Cockpit Allowing Firewalld

On Iptables

# iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT

# service iptables save

4. Accessing Cockpit Web Interface

Next, we'll gonna finally access the Cockpit web interface using a web browser. We'll simply need to point our web browser to https://ip-address:9090 or https://server.domain.com:9090 according to the configuration. Here, in our tutorial, we'll gonna point our browser to https://128.199.114.17:9090 as shown in the image below.

Cockpit Webserver SSL Proceed

We'll be displayed an SSL certification warning as we are using a self-signed SSL certificate. So, we'll simply ignore it and go forward towards the login page, in chrome/chromium, we'll need to click on Show Advanced and then we'll need to click on Proceed to 128.199.114.17 (unsafe) .

Cockpit Login Screen

Now, we'll be asked to enter the login details in order to enter into the dashboard. Here, the username and password is the same as that of the login details we use to login to our linux server. After we enter the login details and click on Log In button, we will be welcomed into the Cockpit Dashboard.

Cockpit Dashboard

Here, we'll see all the menu and visualization of CPU, Disk, Network, Storage usages of the server. We'll see the dashboard as shown above.

Services

To manage services, we'll need to click on Services button on the menu situated in the right side of the web page. Then, we'll see the services under 5 categories, Targets, System Services, Sockets, Timers and Paths.

Cockpit Services

 

Docker Containers

We can even manage docker containers with Cockpit. It is pretty easy to monitor and administer Docker containers with Cockpit. As docker isn't installed and running in our server, we'll need to click on Start Docker.

Cockpit Container

Cockpit will automatically install and run docker in our server. After its running, we see the following screen. Then, we can manage the docker images, containers as per our requirement.

Cockpit Containers Mangement

Journal Log Viewer

Cockpit has a managed log viewer which separates the Errors, Warnings, Notices into different tabs. And we also have a tab All where we can see them all in a single place.

Cockpit Journal Logs

Networking

Under the networking section, we see two graphs in which there is the visualization of Sending and Receiving speed. And we can see there the list of available interfaces with option to Add Bond, Bridge, VLAN. If we need to configure an interface, we can do so by simply clicking on the interface name. Below everything, we can see the Journal Log Viewer for Networking.

Cockpit Network

Storage

Now, its easy with Cockpit to see the R/W speed of our hard disk. We can see the Journal log of the Storage in order to perform troubleshoot and fixes. A clear visualization bar of how much space is occupied is shown in the page. We can even Unmount, Format, Delete a partition of a Hard Disk and more. Features like creating RAID Device, Volume Group is also available in it.

Cockpit Storage

Account Management

We can easily create new accounts with Cockpit Web Interface. The accounts created in it is applied to the system's user account. We can change password, specify roles, delete, rename user accounts with it.

Cockpit Accounts

Live Terminal

This is an awesome feature built-in with Cockpit. Yes, we can execute commands, do stuffs with the live terminal provided by Cockpit interface. This makes us really easy to switch between the web interface and terminal according to our need.

Cockpit Terminal

Conclusion

Cockpit is a good free and open source software developed by Red Hat for making the server management easy and simple. It is best for performing simple system administration tasks and is good for the new system administrators. It is still under pre-release as its stable release hasn't been released yet. So, it is not suitable for production. It is currently developed on the latest release of Fedora, CentOS, Arch Linux, RHEL where systemd is installed by default. If you are willing to install Cockpit in Ubuntu, you can get the PPA access but is currently outdated. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank You !

The post How to Install Cockpit in Fedora / CentOS / RHEL/ Arch Linux appeared first on LinOxide.

How to Configure Apache Solr on Ubuntu 14 / 15

$
0
0

Hello and welcome to our today's article on Apache Solr. The brief description about Apache Solr is that it is an Open Source most famous search platform with Apache Lucene at the back end for Web sites that enables you to easily create search engines which searches websites, databases and files. It can index and search multiple sites and return recommendations for related contents based on the searched text.

Solr works with HTTP Extensible Markup Language (XML) that offers application program interfaces (APIs) for Javascript Object Notation, Python, and Ruby. According to the Apache Lucene Project, Solr offers capabilities that have made it popular with administrators including it many featuring like:

  • Full Text Search
  • Faceted Navigation
  • Snippet generation/highting
  • Spell Suggestion/Auto complete
  • Custom document ranking/ordering

Prerequisites:

On a fresh Linux Ubuntu 14/15 with minimal packages installed, you only have to take care of few prerequisites in order to install Apache Solr.

1)System Update

Login to your Ubuntu server with a non-root sudo user that will be used to perform all the steps to install and use Solr.

After successful login, issue the following command to update your system with latest updates and patches.

$ sudo apt-get update

2) JRE Setup

The Solr setup needs Java Runtime Environment to be installed on the system as its basic requirement because solr and tomcat both are the Java based applications. So, we need to install and configure its home environment with latest Java.

To install the latest version on Oracle Java 8, we need to install Python Software Properties using the below command.

$ sudo apt-get install python-software-properties

Upon completion, run the setup its the repository for the latest version of Java 8.

$ sudo add-apt-repository ppa:webupd8team/java

Now you are able to install the latest version of Oracle Java 8 with 'wget' by issuing the below commands to update the packages source list and then to install Java.

$ sudo apt-get update

$ sudo apt-get install oracle-java8-installer

Accept the Oracle Binary Code License Agreement for the Java SE Platform Products and JavaFX as you will be asked during the Java installation and configuration process by a click on the 'OK' button.

When the installation process complete, run the below command to test the successful installation of Java and check its version.

kash@solr:~$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

The output indicates that we have successfully fulfilled the basic requirement of Solr by installing the Java. Now move to the next step to install Solr.

Installing Solr

Installing Solr on Ubuntu can be done by using two different ways but in this article we prefer to install its latest package from the source.

To install Solr from its source, download its available package with latest version from there Official Web Page, copy the link address and get it using 'wget' command.

$ wget http://www.us.apache.org/dist/lucene/solr/5.3.1/solr-5.3.1.tgz

Run the command below to extract the archived service into '/bin' folder.

$ tar -xzf solr-5.3.1.tgz solr-5.3.1/bin/install_solr_service.sh --strip-components=2

Then run the script to start Solr service that will creates a new 'solr' user and then installs solr as a service.

$ sudo bash ./install_solr_service.sh solr-5.3.1.tgz

Solr Installation

To check the status of Solr service, you use the below command.

$ service solr status

Solr Status

Creating Solr Collection:

Now we can create multiple collections using Solr user. To do so just run the below command by mentioning the name of the collection you want to create and by specifying its configuration set as shown.

$ sudo su - solr -c "/opt/solr/bin/solr create -c myfirstcollection -n data_driven_schema_configs"

creating collection

We have successfully created the new core instance directory for our our first collection where we can add new data in it. To view its default schema file in directory '/opt/solr/server/solr/configsets/data_driven_schema_configs/conf' .

Using Solr Web

Apache Solr can be accessible on the default port of Solr that 8983. Open your favorite browser and navigate to http://your_server_ip:8983/solr or http://your-domain.com:8983/solr. Make sure that the port is allowed in your firewall.

http://172.25.10.171:8983/solr/

Solr Web Access

From the Solr Web Console click on the 'Core Admin' button from the left bar, then you will see your first collection that we created earlier using CLI. While you can also create new cores by pointing on the 'Add Core' button.

Adding Core

You can also add the document and query from the document as shown in below image by selecting your particular collection and pointing the document. Add the data in the specified format as shown in the box.

{
"number": 1,
"Name": "George Washington",
"birth_year": 1989,
"Starting_Job": 2002,
"End_Job": "2009-04-30",
"Qualification": "Graduation",
"skills": "Linux and Virtualization"
}

After adding the document click on the 'Submit Document' button.

adding Document

Conclusion

You are now able to insert and query data using the Solr web interface after its successful installation on Ubuntu. Now add more collections and insert you own data and documents that you wish to put and manage through Solr. We hope you have got this article much helpful and enjoyed reading this.

The post How to Configure Apache Solr on Ubuntu 14 / 15 appeared first on LinOxide.

How to Build Our Own Social Networking Site with Dolphin Pro

$
0
0

Dolphin Pro is a free and open source Content Mangement System (CMS) built for developing highly advanced and featured social networking websites. It has a complete set of features needed for a beautiful social networking site like forums, photos, video, music, blogs, polls, events, groups, chat, messenger, templates, languages and many more. We can develop awesome social networking, dating, community website and many more. Simply, we can build our own new social site like facebook, twitter, etc with all the necessary features out of the box. Dolphin is often known as the world's top social networking CMS so far. It has many beautiful theme, templates and more over has a super clean and elegant web interface and design.

Here are some easy steps on how we can setup Dolphin Pro and build our own Social Networking site in a Linux machine.

1. Installing LAMP Stack

First of all, we'll gonna install LAMP Stack, LAMP is the combination of Apache Web Server, MySQL/MariaDB Database server and PHP modules. To setup it, we'll need to run the following command as shown below.

On Ubuntu 14.04

# apt-get update
# apt-get install apache2 mariadb-server php5 php5-gd php5-mysql php5-curl php5-xsl php5-cli zip

Ubuntu Mysql Config

While installing the lamp stack, it will pop a screen as shown bellow to configure our mariadb server and will ask us to enter a new password for the root user of database server. We'll enter the root password we wanna assign and then continue for the installation. This root password should be noted which we'll need to configure the database for dolphin.

On CentOS 7

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

On Fedora 22

# dnf install httpd mariadb mariadb-server php php-gd php-mysql php-curl php-xsl php-cli php-mbstring zip

2. Installing Java and ImageMagick

As some of dolphin’s features requires media streaming capabilities, we'll need to setup Java and ImageMagick in our machine. To do so, we'll need to execute the following command with respect to our distribution of linux.

On Ubuntu 14.04

# apt-get install openjdk-7-jdk ImageMagick

On CentOS 7

# yum install java-1.7.0-openjdk ImageMagick

On Fedora 22

# dnf install java-1.7.0-openjdk ImageMagick

3. Installing an MTA

If we want enable our Dolphin application to send emails, then we'll need to setup an MTA. The most popular MTA (Mail Transfer Agent) in linux is Postfix. We'll need to install postfix and configure it.

On Ubuntu 14.04

We can install postfix in ubuntu by running the following apt command.

# apt-get install postfix

On CentOS 7

We can install postfix in CentOS  by running the following yum command.

# yum install postfix

On Fedora 22

In Fedora 22, we can install it using dnf package manager.

# dnf install postfix

After installing, we'll need to edit the configuration of our postfix configuration using a text editor.

# nano /etc/postfix/main.cf

Then, we'll need to replace the value of myhostname parameter to our FQDN ie social.linoxide.com .

myhostname = social.linoxide.com

4. Starting Apache and MariaDB server

Next, we’ll gonna start our newly installed apache web server and mariadb database server in our linux box. To do so, we'll need to execute the following commands.

On Ubuntu 14.04

As Ubuntu 14.04 is shipped with SysVinit as init system, we'll need to run the following command to start our apache web server and mariadb

# service mysql start
# service apache2 start

In Ubuntu, both mariadb and apache servers are set to start automatically in every system boot by default. So, we'll no need to configure it for that.

On CentOS 7/Fedora 22

Both CentOS 7 and Fedora 22 runs systemd as the default init system, we'll run the following command to start our httpd and mariadb services.

# systemctl start httpd mariadb

Next, we'll enable them to start automatically in every startup of init system using the following command.

# systemctl enable httpd and mariadb

ln -s '/usr/lib/systemd/system/httpd.service' '/etc/systemd/system/multi-user.target.wants/httpd.service'
ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service'

5. Configuring MariaDB

As we have already assigned a root password for our mariadb database server in Ubuntu, we'll simply skip this step for Ubuntu. But as we haven't assigned it for our CentOS and Fedora, if we are running CentOS or Fedora, we'll need to follow this step in order to configure it.

On CentOS 7/Fedora 22

Now, as we are starting MariaDB for the first time and no password has been assigned for MariaDB so, we’ll first need to configure a root password for it. Then, we’ll gonna create a new database so that it can store data for our Dolphin Pro installation.

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!

6. Creating new Database

Once we have assigned password to our root user of database server, we'll start creating our new database for Dolphin Pro. To do so, first we'll need to login to our MariaDB console by running the following command.

# mysql -u root -p

After executing the above command, it will ask us to enter the password for our root which we had just defined in the above step. Then, we'll be welcomed into the MariaDB console in which we'll create our new database, database user and assign its password and permissions to create, remove and edit the tables and data stored in it.

> CREATE DATABASE dolphindb;
> CREATE USER 'dolphinuser'@'localhost' IDENTIFIED BY 'Pa$$worD123';
> GRANT ALL PRIVILEGES ON dolphindb.* TO 'dolphinuser'@'localhost';
> FLUSH PRIVILEGES;
> EXIT;

Creating New Database

Once everything above is done as expected, we’ve successfully created a database named dolphindb with username dolphinuser and password as Pa$$worD123 .

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

7. Downloading Dolphin Pro

We'll now download the latest release of Dolphin Pro from their Official SourceForge.net page ie http://sourceforge.net/projects/boonex-dolphin/ . As the latest release of Dolphin Pro while writing this article was version 7.2.1, we'll gonna download it via curl and then extract it under the Apache Webroot.

# cd /tmp/
# curl -LJO http://sourceforge.net/projects/boonex-dolphin/files/Dolphin/7.2/Dolphin-v.7.2.1.zip/download

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
4 456 0 0 100 19 0 26 --:--:-- --:--:-- --:--:-- 26
0 351 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
100 29.8M 100 29.8M 0 0 6646k 0 0:00:04 0:00:04 --:--:-- 9.8M
curl: Saved to filename 'Dolphin-v.7.2.1.zip'

After its extracted, we'll run the following unzip command to extract it and then we'll move it to the default apache webroot directory ie /var/www/html/ .

# unzip Dolphin-v.7.2.1.zip
# mv Dolphin-v.7.2.1 /var/www/html/dolphin

8. Configuring Apache Server

Next, we'll gonna configure our Apache Server so that dolphin will run with proper configuration. To do so, we'll create a new virtualhost by creating a new conf file named dolphinpro.conf . The directory here may differ from one distribution to another, here is how we create in the following distributions of linux.

On Ubuntu 14.04

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

Now, we'll gonna add the following lines of configuration into this file using our favorite text editor.

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

After done, we'll gonna save the file and exit our text editor. Then, we'll restart our Apache Web server.

# service apache2 restart

On CentOS 7/Fedora 22

In CentOS and Fedora, we'll directly create the file dolphin.conf under /etc/httpd/conf.d/ directory using our favorite text editor.

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

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

<VirtualHost *:80>
ServerAdmin info@social.linoxide.com
DocumentRoot /var/www/html/dolphin/
ServerName social.linoxide.com
ServerAlias www.social.linoxide.com
<Directory /var/www/html/dolphin/>
Options FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/log/httpd/social.linoxide.com-error_log
CustomLog /var/log/httpd/social.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

9. Configuring PHP

We'll now configure our PHP configuration file so that it will fulfill the requirements of Dolphin Pro. Configuring PHP as required for Dolphin will result in the best performance it can give. To configure PHP, we'll need to edit the php.ini file in our linux machine whose path differs from distribution to distribution.

On Ubuntu

Php.ini file is located under /etc/php5/apache2/ directory in Ubuntu distributions. So, we'll need to run the following command to edit php.ini with our favorite text editor.

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

On CentOS 7/Fedora 22

It is located under /etc directory in CentOS and Fedora distributions. So, we'll run the following command to edit it.

# nano /etc/php.ini

After the file is opened using a text editor, we'll need to append the file with the following configurations.

register_globals = Off
safe_mode = Off
memory_limit = 128M
short_open_tag = On
file_uploads = On
allow_url_fopen = On
allow_url_include = Off
magic_quotes_gpc = Off
default_charset = "UTF-8"

10. Fixing Permissions and Ownership

Now, we'll gonna fix some file permissions and ownership of the dolphin's installation path. First, we'll gonna set the ownership of the dolphin's installation directory to Apache process owner so that apache web server will have full access of the files and directories to edit, create and delete.

On Ubuntu 14.04

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

On CentOS 7/Fedora 22

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

Setting Permission

Then, we'll need to change the permission of some directories and files as follows.

# cd /var/www/html/dolphin
# chmod 755 flash/modules/global/app/ffmpeg.exe

11. Allowing Firewall

Now, we'll gonna configure our firewall programs to allow port 80 (http) so that our apache web server running Dolphin Pro will be accessible from other machines in the network across the default http port ie 80.

On Ubuntu 14.04

Iptables is a popular firewall program which is installed in the ubuntu distributions by default. To expose port 80, we'll need to run the following commands in a terminal or console.

# iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
# /etc/init.d/iptables save

On CentOS 7/Fedora 22

As CentOS 7 has systemd installed by default, it contains firewalld running as firewall program. In order to open the port 80 (http service) on firewalld, we'll need to execute the following commands.

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

success

# firewall-cmd --reload

success

12. Accessing Web Interface

Finally, after everything is setup and configured in above steps, we'll now go for accessing the web installation process of Dolphin Pro. To do so, we'll need to point our web browser to http://ip-address/ or http://domain.com . Here, in this tutorial, we'll point our browser to http://social.linoxide.com/ . After done, we'll be welcomed by the Dolphin Pro Installation Page as shown below.

Dolphin Web Installation Homepage

Now, we'll gonna click on INSTALL button and get started towards the installation of Dolphin. After that, we'll navigated to next page which shows if all the files and directories have all the required permissions or not. As we have already set the permissions and ownership in the above step, we'll see everything correct with all the things in green color. Then, we'll click on Next button to continue.

Checking Directory File Permission

We can see that Dolphin checks general script paths and as we have already completed those required things, we'll see everything green in color. Then, we'll go further by clicking on Next.

Checking Scripts Path

Now here is the main part of the installation where we'll set the database information so that Dolphin will be able to have full control over its database. We'll keep host port number and socket path blank so that they will pick the default configurations. We'll need to set the database name, database user and password that we had set while creating our new database. Here, in this article, we have set dolphindb, dolphinuser and Pa$$worD123 as the database name, user and password respectively.

Configuring Database Web Interface

After done, we'll click Next and go further towards the Site Configuration page where we'll set the information of our Social networking site.

Configuring Site Information

Now, we'll need to add a new cron job which will run the script in every minute by running the following command in our linux machine.

Add Dolphin Cron Jobs

# crontab -e

We'll need to add the following lines into the opened text editor.

MAILTO=admin@social.linoxide.com
* * * * * cd /var/www/html/dolphin/periodic; /usr/bin/php -q cron.php

Permission Reversal

After done, we'll need to set Non-writable permission to the inc directory as we can seen above. And it can be done by running the following command.

# chmod -w /var/www/html/dolphin/inc

Dolphin Installed Successfully

 

13. Post Installation

Finally, as everything is setup and ready to go, we'll now need to complete a post installation task. We'll now need to remove the install directory for security measures. That can be done by executing the following command.

# rm -rf /var/www/html/dolphin/install/

Now, we'll be able to login to the Dashboard by logging in using username and password that we had just assigned in the above step. Next, we'll first need to add all those modules needed for our social networking site.

Dolphin Modules Page

And the default homepage of our social networking site will look as below.

Dolphin Social Site Homepage

Conclusion

Dolphin powers more than 300,000 web communities, online dating sites and social networking sites. It is highly extensible with its thousands of extensions, integrations, templates and language packs available at BoonEx Market. There are native open-source iOS and Android apps that we can customise as well as re-brand on our desire for our social networking website. This CMS fulfills the dream of many non technical people to run their own social networking website. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you !

The post How to Build Our Own Social Networking Site with Dolphin Pro appeared first on LinOxide.

How to Configure Xibo CMS on Ubuntu 14 / 15

$
0
0

Hi All, Today we are going to setup Xibo which is an open source digital signage(public display signs) solution that comprised of a web based content management system (CMS) and choice of Windows or Android signage players. The best way to capture the attention of people for your very important announcements can be done with digital signs using Xibo. It lets us to turn PCs and TVs into a distinctive way of getting the word out, transforming them into information desks which you can place in strategic locations to draw people's attention.

Using Xibo, you can set up your own digital signage server that can push out images, video, and even PowerPoint presentations to kioks automatically, allowing you to keep your entire organization up to date on your latest news without resorting to mass e-mailings or having to hand-edit files or slideshows on multiple machines.

Xibo Prerequisites

Xibo is a web based application developed in PHP language, so we need to install a Web server, database and PHP5 including its some extra supporting libraries.

Let's follow the below steps to complete the prerequisites.

1) System Update

Prepare your system with latest updates, to do so must have access to the Internet and sudo privileges. Once you are login to your Ubuntu server run the below command to update your system.

# apt-get update

2) Installing Packages

As we discussed earlier Xibo is a web based application, so we have to install a web server, database and PHP5. To install all these required packages including some of the shown below PHP libraries run the below command.

# apt-get install apache2 mysql-server php5 php5-curl php5-gd php5-mysql php5-mcrypt

Configure the password for the mysql root user as you will be asked to do so during the first time installation of MySQL database.

3) Downloading Xibo

After installing the required packages, download the Xibo installation package by using wget command as shown below.

# wget https://github.com/xibosignage/xibo-cms/archive/1.7.5.tar.gz -O xibo-server.tar.gz

Download Xibo

To extract the compressed archive run the below command to extract it.

# tar -zxvf xibo-server.tar.gz

4) Setup Web Server

Before moving to the installation process of Xibo, we will configure the document root directory for Xibo and assign it the apache rights. First run the below command to move the extracted package into the document root directory and give it permissions of Apache Web server so that you can have access its web interface.

# mv xibo-cms-1.7.5/ /var/www/html/xibo-server

# chown www-data:www-data -R /var/www/html/xibo-server

Then create a directory for the media files to be stored in by using the below command.

# mkdir /media/xibo-library

# chown www-data:www-data -R /media/xibo-library

Installing Xibo Server

Let's start the web installation of Xibo Server and complete the steps to complete its setup by using the below steps by open the below URL in your favorite web browser.

http://your_servers_ip/xibo-server/

1) Extensions Test

Installing Xibo

You might get an error of missing libraries in ubuntu 15 like Mcrypt extension. To resolve the mcrypt issue let's do the following.

# updatedb
# locate mcrypt.ini
# locate mcrypt.so

Enabling Mcrypt

Then open the 'mcrypt.ini' file to configure its extension.

# vim /etc/php5/mods-available/mcrypt.ini

; configuration for php MCrypt module
extension=/usr/lib/php5/20131226/mcrypt.so
:wq!

After saving the file create the symbolic links in between the below files and then restart Apache web service.

# ln -s /etc/php5/mods-available/mcrypt.ini /etc/php5/cli/conf.d/20-mcrypt.ini
# ln -s /etc/php5/mods-available/mcrypt.ini /etc/php5/apache2/conf.d/20-mcrypt.ini

# service apache2 restart

After that click on the 'Retest' button to verify the successful installation of all extensions and press the Next key to proceed forward upon success.

2) Database Settings

Xibo needs to set-up a connection to your MySQL database.

If you have not yet created an empty database and database user for Xibo to use, and know the user name / password of a MySQL administrator stay on this tab, otherwise click "Use Existing" as shown below.

Xibo DB setup

3) Setup Admin

Xibo needs an administrator user account to be the first user account that has access to the CMS, choose the appropriate user and then click on the Next button to proceed.

Xibo Admin

4) Media Location

Xibo needs somewhere to store the things you upload to be shown, so configure the location and its secret key here as shown.

Xibo Storage Location

5) Xibo Login

Congratulations, initial web installation setup is complete now login to your Xibo server by providing the admin account user credentials.

Xibo Login

Welcome to the Xibo CMS dashboard now enjoy using Xibo, to get further help in using Xibo CMS click on the Getting Started Guide as shown.

Xibo CMS Dashboard

Conclusion

I hope you get this article much helpful to setup Xibo on Ubuntu 14/15. If you wish to upload large size of images, you can do so by the configuration of 'Php.ini' fil. For further settings and customization of Xibo CMS you can consider reading its official documentation for more details. Thank you for reading, and get back to us if you face any issue and leave your valuable comments.

The post How to Configure Xibo CMS on Ubuntu 14 / 15 appeared first on LinOxide.


How to Configure vTiger CRM on CentOS 7

$
0
0

vTiger CRM is a web based, modular and complete Open Source full-fledged customer relationship management system for sales force automation, customer support & service, marketing automation, procurement & fulfillment effectively. In addition to managing your customer data, vtiger offers also connectivity to a variety of other software systems in the existing software architecture. So vtiger can be connected to enterprise resource planning (ERP) systems without any problems, for example, to integrate already existing data into other critical processes of your business.

Vtiger CRM is a native thin-client, browser-based application built on the LAMP/WAMP (Linux/Windows, Apache, MySQL and PHP) stack. We will be going to install it on Linux CentOS 7 with LAMP setup.

1) Basic System Setup

Prepare your system with your minimum required system resources to install CentOS 7 and minimal packages on it and make sure that you have configured your server with a fully qualified domain name and are connected to Internet.

Then login to your server with root user or sudo user and update your with latest update with below command.

# yum update

2) LAMP Setup

You consider following our previous article to setup LAMP setup on CentOS 7 in details. We will be using Apache web server with MySQL MariaDB and PHP as a prerequisites of vTiger CRM installation on CentOS 7.

Starting the installation process of LAMP stack, let's run the below command that is all in one for installing Apache,MySLQ and PHP with required libraries.

# yum install httpd php gd gd-devel php-gd php55w php55w-mysql mariadb-server php55w-mcrypt php55w-dom php55w-imap php55w-mbstring

Press on the 'Y' key and enter to continue installing all the packages including their dependencies as shown in the image below.

AMP installation

To start and enable services run automatically at the time of boot up, run the following commands.

# systemctl start httpd
# systemctl enable httpd

# systemctl start mariadb
# systemctl enable mariadb

3) vTiger DB Setup

After LAMP installation, now we connect to the MySQL/MariaDB after setting up its root user using below commands.

# mysql_secure_installation

After executing the above command you will asked for few configurations to secure your database. Let's choose the appropriate options as shown.

Secure MySQL

Now we can connect to the MySQL/MariaDB console using the root password. After connecting run the commands below to create a new database and its user with specific user rights on the vtiger DB.

# mysql -u root -p
> CREATE DATABASE vtiger;
> CREATE USER 'vtiger'@'localhost' IDENTIFIED BY 'tiger***';
> grant all privileges on `vtiger`.* to 'vtiger'@'localhost';
> FLUSH PRIVILEGES;
> exit

vtiger DB

4) Setup vTiger Download

To download the installation package of vTiger for Linux, open the link of vTiger Download Page .

vTiger Download

You can also copy the link of download source then use the below command to get it on your server.

# wget http://sourceforge.net/projects/vtigercrm/files/vtiger%20CRM%206.4.0/Core%20Product/vtigercrm6.4.0.tar.gz

To extract and move the package into the web document root directory use below commands.

# tar -zxvf vtigercrm6.4.0.tar.gz

# mv vtigercrm /var/www/html/

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

5) vTiger Web Installation

Its time to start the web installation of vTiger on CentOS 7. Open your web browser and point the URL below.

http://172.25.10.173/vtigercrm/

Installing vTiger

Welcome to Vtiger CRM 6 Setup Wizard.
This wizard will guide you through the installation of Vtiger CRM6, click on the 'INSTALL' button to proceed forward and accept the License agreement for using vTiger CRM.

License Agreement
vTiger Agreement

Next you will reach at the Prerequisites check page where you will see the difference between and required and the current values. You might need to fix some parameters in the configuration file of PHP that 'php.ini' according the recommended settings shown in this section.

Make sure to restart Apache services after make changes in PHP file and click on the retest button to verify all the prerequisites are fine.

Prerequisites Check
Prerequisites check

Choose the system configurations with data base and admin user settings.

System Configurations
system configurations

In the next step you can verify all settings to finalize database, system and admin user settings.

Final Configurations
final configurations

The last step is to choose the type of your industry then it will takes few minutes to complete the installation.

Installation Progress
installation process

Choose you required CRM modules from the list of its different available features and click on the NExt button to complete the installation.

vTiger Modules
vTiger Modules

That's it, you have completed the web installation setup of vTiger CRM. Now you can see its web dashboard where you can add widgets to customize your dashboard according to your own way.

vTiger CRM dashboard

Conclusion

You can use the VTiger to enhance your marketing campaign creation and management, sales force automation, using the same solid features, benefits and more than those solutions. They support security, inventory and activity management. vTiger is all in one CRM solution that provide the complete solution for managing your users, sales or support department of your industry. Thanks for reading this article and leave your valuable comments or suggestions.

The post How to Configure vTiger CRM on CentOS 7 appeared first on LinOxide.

How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2

$
0
0

Nginx is free and open source HTTP server and reverse proxy, as well as an mail proxy server for IMAP/POP3. Nginx is high performance web server with rich of features, simple configuration and low memory usage. Originally written by Igor Sysoev on 2002, and until now has been used by a big technology company including Netflix, Github, Cloudflare, WordPress.com etc.

In this tutorial we will "install and configure nginx web server as reverse proxy for apache on freebsd 10.2". Apache will run with php on port 8080, and then we need to configure nginx run on port 80 to receive a request from user/visitor. If user request for web page from the browser on port 80, then nginx will pass the request to apache webserver and PHP that running on port 8080.

Prerequisite 

  • FreeBSD 10.2.
  • Root privileges.

Step 1 - Update the System

Log in to your freebsd server with ssh credential and update system with command below :

freebsd-update fetch
freebsd-update install

Step 2 - Install Apache

pache is open source HTTP server and the most widely used web server. Apache is not installed by default on freebsd, but we can install it from the ports or package on "/usr/ports/www/apache24" or install it from freebsd repository with pkg command. In this tutorial we will use pkg command to install from the freebsd repository :

pkg install apache24

Step 3 - Install PHP

Once apache is installed, followed with installing php for handling a PHP file request by a user. We will install php with pkg command as below :

pkg install php56 mod_php56 php56-mysql php56-mysqli

Step 4 - Configure Apache and PHP

Once all is installed, we will configure apache to run on port 8080, and php working with apache. To configure apache, we can edit the configuration file "httpd.conf", and for PHP we just need to copy the php configuration file php.ini on "/usr/local/etc/" directory.

Go to "/usr/local/etc/" directory and copy php.ini-production file to php.ini :

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

Next, configure apache by editing file "httpd.conf" on apache directory :

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

Port configuration on line 52 :

Listen 8080

ServerName configuration on line 219 :

ServerName 127.0.0.1:8080

Add DirectoryIndex file that apache will serve it if a directory requested on line 277 :

DirectoryIndex index.php index.html

Configure apache to work with php by adding script below under line 287 :

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

Save and exit.

Now add apache to start at boot time with sysrc command :

sysrc apache24_enable=yes

And test apache configuration with command below :

apachectl configtest

If there is no error, start apache :

service apache24 start

If all is done, verify that php is running well with apache by creating phpinfo file on "/usr/local/www/apache24/data" directory :

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

Now visit the freebsd server IP : 192.168.1.123:8080/info.php.

Apache and PHP on Port 8080

Apache is working with php on port 8080.

Step 5 - Install Nginx

Nginx high performance web server and reverse proxy with low memory consumption. In this step we will use nginx as reverse proxy for apache, so let's install it with pkg command :

pkg install nginx

Step 6 - Configure Nginx

Once nginx is installed, we must configure it by replacing nginx file "nginx.conf" with new configuration below. Change the directory to "/usr/local/etc/nginx/" and backup default nginx.conf :

cd /usr/local/etc/nginx/
mv nginx.conf nginx.conf.oroginal

Now create new nginx configuration file :

nano -c nginx.conf

and paste configuration below :

user  www;
worker_processes  1;
error_log  /var/log/nginx/error.log;

events {
worker_connections  1024;
}

http {
include       mime.types;
default_type  application/octet-stream;

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log;

sendfile        on;
keepalive_timeout  65;

# Nginx cache configuration
proxy_cache_path    /var/nginx/cache levels=1:2 keys_zone=my-cache:8m max_size=1000m inactive=600m;
proxy_temp_path     /var/nginx/cache/tmp;
proxy_cache_key     "$scheme$host$request_uri";

gzip  on;

server {
#listen       80;
server_name  _;

location /nginx_status {

stub_status on;
access_log off;
}

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

# proxy the PHP scripts to Apache listening on 127.0.0.1:8080
#
location ~ \.php$ {
proxy_pass   http://127.0.0.1:8080;
include /usr/local/etc/nginx/proxy.conf;
}
}

include /usr/local/etc/nginx/vhost/*;

}

Save and exit.

Next, create new file called proxy.conf for reverse proxy configuration on nginx directory :

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

Paste configuration below :

proxy_buffering         on;
proxy_redirect          off;
proxy_set_header        Host            $host;
proxy_set_header        X-Real-IP       $remote_addr;
proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size    10m;
client_body_buffer_size 128k;
proxy_connect_timeout   90;
proxy_send_timeout      90;
proxy_read_timeout      90;
proxy_buffers           100 8k;
add_header              X-Cache $upstream_cache_status;

Save and exit.

And the last, create new directory for nginx cache on "/var/nginx/cache" :

mkdir -p /var/nginx/cache

Step 7 - Configure Nginx VirtualHost

In this step we will create new virtualhost for domain "saitama.me", with document root on "/usr/local/www/saitama.me" and the log file on "/var/log/nginx" directory.

First thing we must do is creating new directory to store the virtualhost file, we here use new directory called "vhost". Let's create it :

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

vhost directory has been created, now go to the directory and create new file virtualhost. I'me here will create new file "saitama.conf" :

cd vhost/
nano -c saitama.conf

Paste virtualhost configuration below :

server {
# Replace with your freebsd IP
listen 192.168.1.123:80;

# Document Root
root /usr/local/www/saitama.me;
index index.php index.html index.htm;

# Domain
server_name www.saitama.me saitama.me;

# Error and Access log file
error_log  /var/log/nginx/saitama-error.log;
access_log /var/log/nginx/saitama-access.log main;

# Reverse Proxy Configuration
location ~ \.php$ {
proxy_pass http://127.0.0.1:8080;
include /usr/local/etc/nginx/proxy.conf;

# Cache configuration
proxy_cache my-cache;
proxy_cache_valid 10s;
proxy_no_cache $cookie_PHPSESSID;
proxy_cache_bypass $cookie_PHPSESSID;
proxy_cache_key "$scheme$host$request_uri";

}

# Disable Cache for the file type html, json
location ~* .(?:manifest|appcache|html?|xml|json)$ {
expires -1;
}

# Enable Cache the file 30 days
location ~* .(jpg|png|gif|jpeg|css|mp3|wav|swf|mov|doc|pdf|xls|ppt|docx|pptx|xlsx)$ {
proxy_cache_valid 200 120m;
expires 30d;
proxy_cache my-cache;
access_log off;
}

}

Save and exit.

Next, create new log directory for nginx and virtualhost on "/var/log/" :

mkdir -p /var/log/nginx/

If all is done, let's create a directory for document root for saitama.me :

cd /usr/local/www/
mkdir saitama.me

Step 8 - Testing

This step is just test our nginx configuration and test the nginx virtualhost.

Test nginx configuration with command below :

nginx -t

If there is no problem, add nginx to boot time with sysrc command, and then start it and restart apache:

sysrc nginx_enable=yes
service nginx start
service apache24 restart

All is done, now verify the the php is working by adding new file phpinfo on saitama.me directory :

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

Visit the domain : www.saitama.me/info.php.

Virtualhost Configured saitamame

Nginx as reverse proxy for apache is working, and php is working too.

And this is another results :

Test .html file with no-cache.

curl -I www.saitama.me

html with no-cache

Test .css file with 30day cache.

curl -I www.saitama.me/test.css

css file 30day cache

Test .php file with cache :

curl -I www.saitama.me/info.php

PHP file cached

All is done.

Conclusion

Nginx is most popular HTTP server and reverse proxy. Has a rich of features with high performance and low memory/RAM usage. Nginx use too for caching, we can cache a static file on the web to make the web fast load, and cache for php file if a user request for it. Nginx is easy to configure and use, use for HTTP server or act as reverse proxy for apache.

The post How to Install Nginx as Reverse Proxy for Apache on FreeBSD 10.2 appeared first on LinOxide.

How to Setup MEAN.IO Stack on Ubuntu 15.04 / CentOS 7

$
0
0

MEAN.IO is a complete stack of necessary framework which simplifies and accelerates web application development. MEAN.IO is a full-stack free and open source software that helps us to build and run MongoDB, Express, AngularJS, and Node.js based web applications. It acts as a robust framework to help developers use better practices while working with popular JavaScript components for their daily development. MEAN.IO stack helps us to start developing web application in a properly managed way. Its prime focus is to take care of the connection between existing popular frameworks and to solve common issues.

Here are some easy steps on how we can setup MEAN.IO stack on linux machine running Ubuntu 15.04 and CentOS 7 as operating system.

1. Installing NodeJS

First of all, we'll need to setup the most important and key program behind every scene ie NodeJS. NodeJS is pretty easy to install in linux machine running Ubuntu or CentOS.

Installing Dependencies

On Ubuntu 15.04

We'll first need to update our local repository index in order to retrieve required updates of the package lists available in the repository. To do so, we'll need to run the following apt-get command.

$ sudo apt-get update
$ sudo apt-get install gcc g++ make build-essential libssl-dev git

On CentOS 7

In the machine running CentOS 7, we'll need to run yum update in order to update every packages installed in the system. We'll need to run the command under root or sudo access.

$ sudo yum update

After that, we'll install the essential development packages need to compile our NodeJS.

$ sudo yum install gcc gcc-c++ git

Installing dependencies centos7

Downloading and Extracting

After the dependencies are installed, we'll download the latest release of NodeJS from the official download server using wget.

$ wget https://nodejs.org/download/release/node-latest.tar.gz -O /tmp/node-latest.tar.gz

--2015-11-22 05:01:17-- https://nodejs.org/download/release/node-latest.tar.gz
Resolving nodejs.org (nodejs.org)... 2400:cb00:2048:1::6814:172e, 2400:cb00:2048:1::6814:162e, 104.20.22.46, ...
Connecting to nodejs.org (nodejs.org)|2400:cb00:2048:1::6814:172e|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 22470092 (21M) [application/gzip]
Saving to: '/tmp/node-latest.tar.gz'
/tmp/node-latest.tar. 100%[=========================>] 21.43M 3.77MB/s in 6.9s
2015-11-22 05:01:25 (3.10 MB/s) - '/tmp/node-latest.tar.gz' saved [22470092/22470092]

$  tar -xvzf /tmp/node-latest.tar.gz

Compiling and Installing

Once the extraction of the tarball is completed, we'll continue further for the compilation of the source code of NodeJS. To do so, first, we'll need to check if every development dependencies are installed or not using ./configure command. Then, we'll compile the source code using make command which will take a lot time to finish the compilation and finally install the binary in our machine using make install command.

$ cd node-v5.1.0
$ ./configure
$ make
$ sudo make install

After the installation is complete, we'll gonna check if node was successfully installed or not by asking node its version.

$ node --version

v5.1.0

Common Error and Fixes in CentOS 7

On running node commands with sudo, we may get error sudo: npm: command not found on our shell. To fix that, we'll need to run the following commands in a terminal or console.

$ sudo ln -s /usr/local/bin/node /usr/bin/node
$ sudo ln -s /usr/local/lib/node /usr/lib/node
$ sudo ln -s /usr/local/bin/npm /usr/bin/npm
$ sudo ln -s /usr/local/bin/node-waf /usr/bin/node-waf

2. Installing MongoDB

Next, we'll install MongoDB, a free and open source document-oriented database server which is also know as NoSQL database server. It is designed for handling document-oriented storage and stores data in JSON-like documents with dynamic schema known as BSON which makes the integration of data in certain types of applications easier and faster. To install MongoDB, we'll need to follow the below setups with respect to the distribution of linux we are running.

On Ubuntu 15.04

We'll now need to add the MongoDB official repository to our source list so that we can fetch the package list and path of it. To do so, we'll need to run the following command in a terminal or console.

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
$ sudo echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list

After that, we'll gonna update our local repository index with that of the mongodb repository using apt-get command.

$ sudo apt-get update

Now, we'll need to run the following command in order to install it in our Ubuntu machine.

$ sudo apt-get install -y mongodb-org

On CentOS 7

In the machine running CentOS 7, we'll gonna install the latest stable mongodb release ie version 3.0 using yum package manager. To do so, first we'll need to add the repository in our operating system which can be done using a text editor.

$ sudo nano /etc/yum.repos.d/mongodb-org-3.0.repo

After opening the file with a text editor, we'll need to append the file with the following lines of configurations.

[mongodb-org-3.0]
name=MongoDB Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.0/x86_64/
gpgcheck=0
enabled=1

Adding MongoDB Repo Centos 7

Then, we'll save the file and exit the text editor. Next, we'll install the mongodb using yum package manager by running the following command.

$ sudo yum install mongodb-org

3. Starting and Enabling MongoDB

After our MongoDB is installed, we'll now gonna start our MongoDB server and make it run automatically in every boot. To do so, we'll need to run the following commands.

As Systemd is the default service/daemon, process manager replacing SysVinit in Ubuntu 15.04 and CentOS 7, we'll gonna run the following command in order to start the mongodb server.

$ sudo systemctl start mongod

Now, to enable mongod to start in every system boot, we'll need to execute the following command.

$ sudo systemctl enable mongod

4. Installing Bower

As we have got Nodejs and NPM installed, we'll now gonna install Bower package manager in our linux machine. Bower package manager manages front-end packages for our web application. It provides hooks to facilitate using packages in our tools and workflows. It fetches and installs necessary stuffs from all over making everything frameworks, libraries, assets, utilities, and rainbows managed for the developer. To install bower, we'll need to run the following command.

$ sudo npm install -g bower

/usr/local/bin/bower -> /usr/local/lib/node_modules/bower/bin/bower
/usr/local/lib
└── bower@1.6.5

5. Installing Gulp

Next, we'll also need to install gulp task manager to automate and enhance our workflow. Gulp is a free and open source JavaScript task runner which makes repetitive tasks like minification, compilation, linting, unit testing, etc pretty easy and fast with its primary feature ie automation. It is used to automate our development process which makes our repetitive task easy to perform. To install gulp globally, we'll need to run the following command.

$ sudo npm install -g gulp

6. Installing mean-cli

Now, we'll install the mean-cli package using npm. This will add mean command to our system which will let us to interact (install, manage, update, etc) our Mean based application. To install it, we'll need to run the following npm command.

$ sudo npm install -g mean-cli

7. Generating MEAN Application

The application generator will ask us some questions about our new application and will create a fresh copy of a MEAN.IO application in the working directory. To do so, we'll need to run the following yo command into our project directory.

$ mean init test-app

Next, we'll install all the dependencies required to run our mean application by running the following command.

$ cd test-app && npm install

mean@0.5.5 postinstall /home/arun/test-app
> node tools/scripts/postinstall.js

$ bower install

8. Running the Application

After the MEAN application has been generated, we'll now finally run our newly created application. To run our application, we'll need to execute gulp command into our MEAN application directory.

$ gulp

Running Mean App

Now, as our application is running, we should be able to browse our web application. To do so, we'll point our favorite web browser to the server running the application. As  gulp runs the applications under port 3000 by default so, we'll point our browser to http://ip-address:3000 or http://domain.com:3000.

Mean App Web Interface

If we wanna assign a port for our application, we can simply run the following command.

$ export PORT=3001 && gulp

Conclusion

Finally, we have successfully setup MEAN.IO stack for deploying our MEAN based application on our machine running CentOS 7 and Ubuntu 15.04. It is an awesome framework for an easy starting point with MongoDB, Node.js, Express, and AngularJS based applications. It a complete replacement for our traditional LAMP Stack. It helps us to save a long time required to build our custom MEAN stack as its pretty easy with just few commands to setup a complete MEAN stack. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you !

The post How to Setup MEAN.IO Stack on Ubuntu 15.04 / CentOS 7 appeared first on LinOxide.

How to Install Ajenti with Nginx and SSL on FreeBSD 10.2

$
0
0

Ajenti is open source web based system management tools, control panel for your server based on python. Support for many distro like Ubuntu, CentOS, Debian and Unix FreeBSD. Ajenti coded with python, it is lightweight control panel with beautiful interface. It is allow you to manage your services on your server, manage apache, cron jobs, firewall, mysql database etc. Ajenti is powerfull and easy to install.

In this tutorial we will guide you to install ajenti with nginx as the web server, and then configure SSL for ajenti on freebsd 10.2. we will guide you to install ajenti from pip (Package management in python), install all package needed by ajenti from freebsd ports, and then install and configure nginx to running in front of ajenti with SSL enabled.

Prerequisite

  • FreeBSD 10.2 - 64bit.
  • Root Privileges.

Step 1 - Update FreeBSD Ports

Log in to your freebsd server and update the repository :

freebsd-update fetch
freebsd-update install

Step 2 - Install Package needed

In this step we will install all package that needed by ajenti. We will install all of it from the freebsd ports. Just go to the ports directory "/usr/ports/", then choose the package, compile and install it.

Ajenti need py-gevent, so go to the directory of py-gevent :

cd /usr/ports/devel/py-gevent

then install it with command :

make install clean

install : Compile and install the ports.

clean : Remove the work directory and other temporary files used for building the ports.

Next, Install all of this ports just like install py-gevents above.

# Install py-lxml
cd /usr/ports/devel/py-lxml
make install clean

# Install Pyhton pip
cd /usr/ports/devel/py-pip
make install clean

# Install py-ldap module
cd /usr/ports/net/py-ldap
make install clean

# Install jpeg module that needed by Pillow python imaging library.
cd /usr/ports/graphics/jpeg
make install clean

Wait all of it.

Step 3 - Install Ajenti

On linux distribution like ubuntu and centos, we can install ajenti from the repository. But in this tutorial FreeBSD 10.2, we will install ajenti from the pip command. Pip is a package management system used to install and manage software packages written in Python.

So let's install :

pip install ajenti

Now configure it.

Step 4 - Configure Ajenti

Download ajenti service script from github to "/etc/rc.d/" directory with wget command :

wget --no-check-certificate https://raw.github.com/ajenti/ajenti/1.x/packaging/files/ajenti-bsd -O /etc/rc.d/ajenti

Next, change the permission of service file :

chmod +x /etc/rc.d/ajenti

Service script for ajenti is configured, so let's download the configuration file for ajenti. Before we download it, we need to make a symlink for python binary command :

ln -s /usr/local/bin/python2 /usr/bin/python

And create new directory for ajenti configuration file :

mkdir -p /usr/local/etc/ajenti/
mkdir -p /etc/ajenti/

Next, download the configuration file to directory "/usr/local/etc/ajenti/", and create a symlink for config file to directory "/etc/ajenti/" :

wget --no-check-certificate https://github.com/ajenti/ajenti/raw/1.x/config.json -O /usr/local/etc/ajenti/config.json
ln -s /usr/local/etc/ajenti/config.json /etc/ajenti/config.json

Then edit the config file with nano editor :

nano -c /etc/ajenti/config.json

On the line 35, change the value to "true".

"authentication": true,

Save and exit.

If all is done, add ajenti to run at boot time with sysrc command, and then start it :

sysrc ajenti_enable=yes
service ajenti start

Visit your server IP on port 8000, 192.168.1.103:8000.

Ajenti Home Page

Step 5 - Generate Self Signed SSL Certificate

In this step we will generate new self signed SSL certificate. Go to "/usr/local/etc/" directory and make new directory called "ssl".

cd /usr/local/etc/
mkdir ssl
cd /usr/local/etc/ssl

Now generate the self signed SSL certificate file with single openssl command :

openssl req -new -x509 -nodes -out ajenti.crt -keyout ajenti.key
FILL With YOUR INFO

Now change permission of the private key :

chmod 600 ajenti.key

SSL Generated on directory "/usr/local/etc/ssl/".

Step 6 - Install and Configure Nginx

In this tutorial we will use nginx as reverse proxy for ajenti that running on port 8000. Install nginx from the freebsd repository with pkg command :

pkg install nginx

Next, Configure the virtualhost for ajenti.

Go to nginx directory and create new directory for virtualhost called "vhost" :

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

Go to vhost directory and create new file ajenti.conf with nano editor :

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

Paste nginx virtualhost configuration below :

server {

# Domain
server_name myajenti.co;
client_max_body_size 20m;

# Nginx listening on port 80 and 443
listen 80;
listen [::]:80;
listen 443 default ssl;

# SSL Certificate File
ssl_certificate      /usr/local/etc/ssl/ajenti.crt;
ssl_certificate_key  /usr/local/etc/ssl/ajenti.key;

# Redirect HTTP to HTTPS
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}

# Proxy pass configuration for ajenti
location ~ /ajenti.* {
rewrite (/ajenti)$ / break;
rewrite /ajenti/(.*) /$1 break;
proxy_pass http://127.0.0.1:8000;
proxy_redirect / /ajenti/;
proxy_set_header Host $host;
proxy_set_header Origin http://$host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
}

}

Save and exit.

Now activate the nginx virtualhost by editing the main configuration file nginx.conf on nginx directory :

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

Add before the end of the line below :

 includ vhost/*.conf

Save and exit.

Now add nginx to the boot time, then start it and restart ajenti :

sysrc nginx_enable=yes
service nginx start
service ajenti restart

Visit your domian : myajenti.co/ajenti

ajenti with nginx and ssl

Log in to ajento with the default account username "root" and password "admin".

Ajenti Dashbord.

Ajenti Dashbord

List of Ajenti Plugins.

Ajenti Plugins

Service page to manage the service on the server.

Ajenti Service page

Ajenti with nginx and SSL is installed on FreeBSD 10.2.

Conclusion

Ajenti is web based system management tools based on python. It is lightweight and powerful, we can manage the service of the server from the admin web. Available on Linux and Unix distribution including FreeBSD. We can start and stop the service from the web page. Ajenti run on port 8000, and we can use Nginx or apache as the reverse proxy for ajenti with SSL enabled on the front end web server(Nginx or Apache). It is easy to install and configure an have a beautiful Interface.

The post How to Install Ajenti with Nginx and SSL on FreeBSD 10.2 appeared first on LinOxide.

How to Install Open-audIT on CentOS 6 / 7

$
0
0

Managing your IT infrastructure is always been a hard job if you are not taking advantage of free and Open Source network discovery, inventory and auditing application like Open-audit. It actually tell you exactly what is on your network, how it is configured and when it changes. So, we say that Open-AudIT is a database that contains the information about all the devices connected in our network then shows them on the web interface. The Open-AudIT application is written in php, bash and vbscript that makes the changes and customization both quick and easy.

To scan network and its devices automatically Open-AudIT can be configured with daily scan as per recommended for systems. That way, you can be assured of being notified if something changes. Its powerful reporting framework enables information such as software licensing, configuration changes, non-authorized devices, capacity utilization and hardware warranty status with its ability to request Reports to be run on a pre-defined schedule and emailed.

Basic Requirements

There are few basics requirements that must be figured out before the start of Open-audIT installation setup on CentOS 6/7.

1- FQDN, Hostname
2- System Update
3- Apache Web Server
4- PHP Configurations
5- MySQL Database
6- Nmap and SNMP

1) Hostname

Starting from first step, login to your centOS 6/7 server using the root or sudo user. Configure your network and host name settings by opening the hosts file with a text editor.

# vim /etc/hosts

2) System Update

If you are using an old version of CentOS, then you can upgrade it using below command.

# yum upgrade

After that make sure that your CentOS server is upto date with latest security updates and patches. You can update your system with below command.

# yum update

3) Apache, MySQL, PHP

Open-audIT is a web based apploication developed in PHP language. So we need to setup a web server, a data base server and some PHP libraries for a fully functional Open-Audit Web portal.

So, we will be installing all these required packages in one go using the below commands.

# yum -y install epel-release

# yum install httpd mysql mysql-server php php-cli php-mysql php-ldap php-mbstring php-mcrypt php-snmp php-xml nmap net-snmp zip curl perl wget sshpass screen samba-client

Press 'Y' to yes for starting installation of packages, then a list following packages will installed as shown in the image while n centOS 7 MariaDB package will be installed instead of MySQL. Open-AudIT uses Nmap for discovery, sshpass for Linux auditing and screen / samba-client / winexe for Windows auditing without these packages discovery will not work. If you are unable to install winexe using 'yum' the follow this link to get the Winexe RPM Package

# wget http://download.opensuse.org/repositories/home:/ahajda:/winexe/CentOS_CentOS-6/x86_64/winexe-1.00-2.5.x86_64.rpm
# rpm -i winexe-1.00-2.5.x86_64.rpm

Installing Packages

After installation completes start apache web server and and MySQL DB service and configure the both to run automatically at startup.

In centos6

# service httpd start
# chkconfig –levels 235 httpd on

# service mysqld start
# chkconfig –levels 235 mysqld on

In centos7

# systemctl start httpd.service
# systemctl enable httpd.service

# systemctl start mysqld.service
# systemctl enable mysqld.service

Run the command below to setup root password for the MySQL/MariaDB and choose the default options after setting up the new password.

# mysql_secure_installation

4) PHP and Apache Configuration

To configure PHP configurations, Open its default file with a text editor and update its parameters as shown.

[root@open-audit ~]# vim /etc/php.ini

# sed -i -e 's/memory_limit/;memory_limit/g' /etc/php.ini
# echo "memory_limit = 512M" >> /etc/php.ini
# sed -i -e 's/max_execution_time/;max_execution_time/g' /etc/php.ini
# echo "max_execution_time = 300" >> /etc/php.ini
# sed -i -e 's/max_input_time/;max_input_time/g' /etc/php.ini
# echo "max_input_time = 600" >> /etc/php.ini
# sed -i -e 's/error_reporting/;error_reporting/g' /etc/php.ini
# echo "error_reporting = E_ALL" >> /etc/php.ini
# sed -i -e 's/display_errors/;display_errors/g' /etc/php.ini
# echo "display_errors = On" >> /etc/php.ini
# sed -i -e 's/upload_max_filesize/;upload_max_filesize/g' /etc/php.ini
# echo "upload_max_filesize = 10M" >> /etc/php.ini
# sed -i -e 's/date.timezone/;date.timezone/g' /etc/php.ini
# echo "date.timezone = Europe/London" >> /etc/php.ini

PHP Configurations

Now configure the hostname in configuration file of apache web server using below command.

# echo "ServerName open-audit" >> /etc/httpd/conf/httpd.conf

Then change the shell for Apache and restart its services to take effect of the changes made.

[root@open-audit ~]# chsh -s /bin/bash apache
Changing shell for apache.
Shell changed.
[root@open-audit ~]# systemctl restart httpd.service

Using the commands below we will setup the SUID for the nmap binary so that it be used for apache front end to run scripts which call nmap.

[root@open-audit ~]# chmod u+s /usr/bin/nmap

Now run the below command and make sure that you see the IP Address of your Open-AudIT server.

[root@open-audit ~]# ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1'

172.25.10.173

It looks great, now our next step is to move forward to start the installation of Open-Audit after downloading its latest package.

Installing Open-Audit

To install Open-Audit, Let's Open the Offical Download Page of Open-Audit to get its latest package put your information.

Download Open-Audit

Or use the the command below after copying the download source to get its package on your server.

# wget http://dl-openaudit.opmantek.com/OAE-Linux-x86_64-release_1.8.4.tar.gz

wget open-audit

Extract the package into '/usr/local' directory using below command.

# tar -zxvf OAE-Linux-x86_64-release_1.8.4.tar.gz -C /usr/local/

Once the package is extracted move to that directory and run the installation script using below command.

[root@open-audit Open-AudIT-1.8.4]# ./installer -t /var/www/html/oa

Here you might come across the below error in CentOS 7.

Can't locate version.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./installer line 38.
BEGIN failed--compilation aborted at ./installer line 38.

To fix, Open the installation script using any editor and comment out line number 38.

After that re run the installation script and it will show that the installer will install Open-AudIT into /var/www/html/oa.

Open Audit Installation

Press "Y" key or Hit to proceed then you will see that a number steps will be performed by this installation script including "Web access", "Updating YUM metadata cache", "Checking Installed Packages" and will also install the missing packages. So, you don't need to worry about if you missed any package to be installed. After that a list of following post installation operations will be performed.

Installing Open-Audit

The installation script will integrates Open-Audit with Apache and Databases, where you will be asked to provide the password for the root user.

++++++++++++++++++++++++++++++++++++++++++++++++++++++
Integration of Open-AudIT with Apache
++++++++++++++++++++++++++++++++++++++++++++++++++++++

Ok to install the updated Apache proxy config file?
Type 'y' or hit to accept, any other key for 'no':
Restarting Apache

++++++++++++++++++++++++++++++++++++++++++++++++++++++
Installing Open-AudIT files
++++++++++++++++++++++++++++++++++++++++++++++++++++++

++++++++++++++++++++++++++++++++++++++++++++++++++++++
Copying Open-AudIT Web files
++++++++++++++++++++++++++++++++++++++++++++++++++++++

++++++++++++++++++++++++++++++++++++++++++++++++++++++
Open-AudIT Database Setup
++++++++++++++++++++++++++++++++++++++++++++++++++++++

We require the MySQL root user credentials to create the database and user.
Enter the MySQL root user's password:

After performing final update operations and Adjusting Open-AudIT for standalone operation to setup Opmantek Daemon Startup, the installation process will be completed as shown below.

Open-audit installation

Open-Audit Web Access

Let's Open you web browser and give your server's IP or FQDN in the address bar then click on the Open Audit button to get started with Open Audit.

Openmantek

Then login with default credentials providing the user and password after that change the credentials.

Open Audit Login

Upon successful credentials you will directed toward the welcome screen of Open Audit as shown.

Welcome to Open Audit

Now you free to use Open Audit by using its admin web console to discover new devices, adding new devices and groups of your choice.

Open Audit groups

Conclusion

At the end end of this article you have learned the installation of Open-Audit on CentOS 7/6 with LAMP stack and able to scan your system for auditing as well as adding new devices using its discovery or manually. This is one of the best and most important tool mostly used in large enterprise environments to keep record of their infrastructure.

The post How to Install Open-audIT on CentOS 6 / 7 appeared first on LinOxide.

How to Setup Chamilo, an E-Learning System on Ubuntu 15.04 / CentOS 7

$
0
0

Chamilo is a free and open source e-learning management system designed and developed for improving access to education and knowledge globally. It is released under the license of GNU General Public License version 3 or latter. It is currently backed up and supported by the Chamilo Association, a non-profit organization with several aims including the promotion of the software, ensuring the software 100% free, the maintenance and creation of network of services providers and software contributors. This piece of software allows us to create a virtual campus for the provision of online or semi-online training. Chamilo comes in two different tastes, one is the Chamilo Learning Managemt System (LMS) whereas the other is the Chamilo Learning Content Mangement System (LCMS) which offers a closely related but alternative platform model to the Chamilo LMS enabling users to manage their content in a particularly broad and flexible way. Here in this tutorial, we are talking about the LMS edition of Chamilo when we say Chamilo. To setup Chamilo in linux machine running Ubuntu 15.04 and CentOS 7, we'll need to follow the below steps.

1. Installing LAMP Stack

LAMP Stack stands for the combination of Apache Web Server, MariaDB or MySQL Database server and PHP modules in a Linux server. So, first of all we'll need to setup a LAMP Stack in our linux machine as Chamilo requires a server having an Apache Webserver (HTTPD), MySQL or MariDB  5.1 or latter and PHP 5.3 or latter installed and configured. Here in this tutorial, we'll install MariaDB instead of MySQL server for database as MariaDB is completely community driven with speed improvements and free extensions. To do so, we'll need to run the following commands under root or sudo privilege with respect to the distribution of linux installed in the machine.

On Ubuntu 15.04

# apt-get update
# apt-get install apache2 mariadb-server libapache2-mod-php5 php5-mysql php-pear php5-gd php5-intl php5-curl php5-xdebug php5-dev php5-ldap php5-xcache

On CentOS 7

# yum install httpd mariadb-­server php-­mysql php-­pear php-gd php-­xml php­-intl php­-curl php­xdebug php­-dev php-mbstring php-ldap php-­xcache

2. Installing Xapian

After we have installed our LAMP stack, we'll now need to setup Xapian in our linux machine. Though this is an optional package needed for Chamilo, we'll gonna install it in our system so that our Chamilo will work with its full features. Xapian PHP module has some license conflict with that of PHP so that, the binary formats of Xapian PHp module is not distributed only. That is the reason why php5-xapian is not available in the repository of Ubuntu or CentOS. So, what we'll need to do is install it manually using the latest stable release of Xapian. So, first we'll setup the dependencies required for configuring, compiling and installing Xapian in our linux machine.

Installing Dependencies

To setup the required dependencies for the installation of Xapian, we'll gonna run the following commands.

On Ubuntu 15.04

# apt-get update
# apt-get install gcc g++ build-essential uuid-dev

On CentOS 7

# yum install gcc-c++ libuuid-devel

Downloading Xapian Packages

Once the required dependencies are installed, we'll gonna download the latest and stable Xapian packages from its official download page ie http://xapian.org/download . While writing this article, the stable latest release of Xapian was 1.2.21 which we'll find the link from the site and then download the tarballs with wget.

# wget http://oligarchy.co.uk/xapian/1.2.21/xapian-core-1.2.21.tar.xz
# wget http://oligarchy.co.uk/xapian/1.2.21/xapian-omega-1.2.21.tar.xz
# wget http://oligarchy.co.uk/xapian/1.2.21/xapian-bindings-1.2.21.tar.xz

Next, we'll need to extract the downloaded tarballs using tar.

# tar xvfJ xapian-core-1.2.21.tar.xz
# tar xvfJ xapian-omega-1.2.21.tar.xz
# tar xvfJ xapian-bindings-1.2.21.tar.xz

Compiling and Installing

After the extraction has been completed, we'll gonna compile and install our xapian package. First, we'll gonna compile xapian-core then xapian-omega and at last, we'll compile xapian-bindings. While running ./configure command under xapian-bindings, we'll need to make sure that we add --with-php flag so that we can only install xapian php module out of the box.

# ./configure

# make

# make install

3. Configuring PHP

As we have installed all the required PHP modules in the above step, we'll now configure our PHP settings in order to gain the best performance out of Chamilo. To finetune our PHP configuration for Chamilo, we'll need to edit a file named php.ini which is located in different directory with respect to the distribution.

On Ubuntu 15.04

In Ubuntu distributions, php.ini file is located under /etc/php5/apache2/ directory so, we'll gonna edit he file using a text editor.

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

On CentOS 7

Whereas, in CentOS, its situated under /etc/ directory so, we can simply edit it by running the following.

# nano /etc/php.ini

Once, the file is opened using a text editor, we'll simply need to append the file to have the following configuration.

date.timezone = 'America/New_York'
max_execution_time = 300
max_input_time = 600
memory_limit = 256M
post_max_size = 100M
upload_max_filesize = 100M
short_open_tag = Off
safe_mode = Off
magic_quotes_gpc = Off
magic_quotes_runtime = Off
session.cookie_httponly = On
extension = xapian.so

4. Starting Apache and MariaDB server

After we have installed the required dependencies, we'll now start our Apache web server and MariaDB database server as we need to configure them to make them ready to go with Chamilo.

On Ubuntu 15.04

As Ubuntu 15.04 is shipped with systemd as the default init system, we'll use systemctl command to start them. To do so, we'll need to run the following command.

# systemctl start apache2 mysql

Then, we'll make them start automatically in every system boot by enabling the daemons.

# systemctl enable apache2 mysql

Synchronizing state for apache2.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d apache2 defaults
Executing /usr/sbin/update-rc.d apache2 enable
Synchronizing state for mysql.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d mysql defaults
Executing /usr/sbin/update-rc.d mysql enable

On CentOS 7

Likewise, CentOS 7 is also shipped with systemd as the default init system so, we'll simply need to execute the following command in the console.

# systemctl start httpd mysql

Next, as we did with Ubuntu, we'll simply enable the daemons to start in every system boot.

# systemctl enable httpd mysql

5. Setting MariaDB Root Password

On CentOS 7/Ubuntu 15.04

Now, as we are starting MariaDB for the first time and no password has been assigned for MariaDB so, we’ll first need to configure a root password for it. Then, we’ll gonna create a new database so that it can store data for our Chamilo installation.

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!

Configuring MariaDB

6. Creating Chamilo Database

We'll now go for creating a new database for our Chamilo LMS so that it can store its data into our MariDB database. To do so, first we'll need to login to our MariaDB console by running the following command.

# mysql -u root -p

Then, it will ask us to enter the password of root user which we had just set in the above step. Then, we'll be welcomed into the MariaDB console in which we'll create our new database, database user and assign its password and grant all privileges to create, remove and edit the tables and data stored in it. Here, we'll set database name, user and password as chamilodb, chamilouser and Pa$$worD123 respectively.

> CREATE DATABASE chamilodb;
> CREATE USER 'chamilouser'@'localhost' IDENTIFIED BY 'Pa$$worD123';
> GRANT ALL PRIVILEGES ON chamilodb.* TO 'chamilouser'@'localhost';
> FLUSH PRIVILEGES;
> EXIT;

Note: It is strongly recommended to replace all the above variables ie database name, user and password for security measure.

7. Downloading latest Chamilo LMS

Next, we'll download the latest release of Chamilo LMS ie 1.10 which we can download from the official download page ie https://chamilo.org/chamilo-lms/#downloads . Here, we'll gonna download the compressed zip file using wget file downloader by running the following command in a terminal or console.

# cd /tmp/
# wget https://github.com/chamilo/chamilo-lms/archive/v1.10.0.zip

--2015-11-14 19:56:47-- https://github.com/chamilo/chamilo-lms/archive/v1.10.0.zip
Resolving github.com (github.com)... 192.30.252.130
...
Connecting to codeload.github.com (codeload.github.com)|192.30.252.145|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 223918345 (214M) [application/zip]
Saving to: 'v1.10.0.zip'
v1.10.0.zip 100%[============================>] 213.54M 12.2MB/s in 20s
2015-11-14 19:57:09 (10.8 MB/s) - 'v1.10.0.zip' saved [223918345/223918345]

After the download is completed, we'll extract the zip file using zip command as show below.

# unzip v1.10.0.zip

Then, we'll gonna move the extracted folder into the Apache Webroot ie /var/www/html/ by default.

# mv chamilo-lms-1.10.0 /var/www/html/chamilo

8. Configuring Apache Web Server

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

On Ubuntu 15.04

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

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

<VirtualHost *:80>
ServerAdmin info@chamilo.linoxide.com
DocumentRoot /var/www/html/chamilo/
ServerName chamilo.linoxide.com
ServerAlias www.chamilo.linoxide.com
<Directory /var/www/html/chamilo/>
Options FollowSymLinks
AllowOverride All
</Directory>
ErrorLog /var/log/apache2/chamilo.linoxide.com-error_log
CustomLog /var/log/apache2/chamilo.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

Then, we'll restart our apache web server.

# systemctl restart apache2

On CentOS 7

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

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

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

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

Once done, we'll simply save the file and exit the editor. We'll now need to make sure that mod is enabled. To enable it, we'll need to execute the following command.

# a2enmod rewrite

And then, we'll gonna restart our apache web server.

# systemctl restart httpd

9. Fixing Ownership and Permission

We'll also need to set the ownership of the Chamilo installation path as the Apache process user so that apache web server will have full access over every directory and files of Chamilo. To do so, we'll need to run the following commands with respect to distribution of linux we are running, as there are different usernames used.

On Ubuntu 15.04

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

On CentOS 7

# chown ­-R apache: /var/www/html/chamilo

Then, we'll need to set the permission of some directories as writable by executing the following command.

# cd /var/www/html/chamilo
# chown -R 755  main/lang main/inc/ main/default_course_document/images/

10. Configuring Firewall

Next, we'll gonna configure the firewall program to allow http or port 80 to expose out of the box. This will allow Chamilo to be accessible within the network connected. As both CentOS 7 and Ubuntu 15.04 are shipped with systemd as init system, firewalld are installed in most machines. To allow http (port 80) we'll need to run the following command.

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

success

# firewall-cmd --reload

success

11. Chamilo Web Installation

Finally, as we have setup and configured everything correctly in above steps, we'll now go for the web based installation of Chamilo LMS. To do so, we'll need to point our web browser to http://ip-address/chamilo or http://domain.com . Here, in this tutorial, we'll point our browser to http://139.162.14.134/chamilo . After done, we'll be welcomed by the Chamilo LMS Installation Page as shown below in which we'll click on "Install Chamilo" button in order to continue the installation process.

Web Installation Chamilo

Then, we'll be navigated to our installation page in which we'll be required to select the installation language. Here, we'll select English and click on "Next" button to continue to the next page.

Selecting Language

After done, we'll head forward towards the Requirements section in which we'll see if the required dependencies, ownerships and permissions are configured correctly or not. As we have already configured everything needed for running Chamilo smoothly, we'll see everything in green and blue color. If we see any red color, we'll know that the respective requirement is missing or misconfigured.

Checking Permissions Dependencies

After verifying that everything is fine, we'll click on New Installation as we're going for a new installation of Chamilo. But if you are following this tutorial for Upgrading, then you can simply click on Upgrade button. Next, we'll be headed towards the License Agreement page in which we'll simply accept the license by ticking the box with I Accept text.

License Agreement

Now, here is the main part of the installation. Here, we'll need to enter the database configuration in order to connect Chamilo with the MariaDB database server so that it can store and retrieve its required data. Here, we'll need to enter the configuration according to the above step, database host as localhost, port as 3306 which is the default port of MariaDB whereas Database login, password and database name as chamilouser, Pa$$worD123 and chamilodb respectively.

Setting Database Info

After every configuration is done, Chamilo will gain access to the database and then will direct us to the overview page where we'll enter the information for our Chamilo application like Main Language, URL, Portal name, company's name, etc as shown below. After done, we'll go ahead towards the Install Page.

Configuring Admin Settings

Here, we'll be shown all the settings and information set for the installation of Chamilo LMS. Now, in order to for the installation of it with those configurations, we'll need to click on Install Chamilo button.

Confirming Changes

After the installation process is completed, we'll be redirected to a post installation page where we'll be asked to make the entire app/config/ directory read-only and delete the main/install directory.

Post Installation

We'll now go for the security measures and do as said in the above page. To make the whole app/config/ directory read-only, we'll run the following command.

# chmod -R 0555 /var/www/html/chamilo/app/config/

Then, to remove the main/install/ directory, we'll execute as follows.

# rm -rf /var/www/html/chamilo/main/install/

After done, we'll click on Go to  your newly created portal button then we'll enter the required login details that we had set above in order to login to the dashboard.

Chamilo Login Screen

Once we have logged in, we'll finally be directed to the Control Panel of Chamilo LMS as shown below.

Chamilo Dashboard

Conclusion

Finally, we've successfully configured and installed Chamilo LMS in our linux machine running Ubuntu 15.04 and CentOS 7. It is a beautiful web based learning management system (LMS) focusing on ease of use, re-usability, collaboration and sharing. It is full of different plugins which are essential for an e-learning system. The community of Chamilo is growing day by day as this project is highly stable and effective on managing all types of e-learning system. It consists of 27 gorgeous designs which one can use as base to design or customize according to one's requirement and desire. I wanna simply say that Chamilo is whole all-in-one Online Campus. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you !

The post How to Setup Chamilo, an E-Learning System on Ubuntu 15.04 / CentOS 7 appeared first on LinOxide.

How to Install Laravel PHP Framework on CentOS 7 / Ubuntu 15.04

$
0
0

Hi All, In this article we are going to setup Laravel on CentOS 7 and Ubuntu 15.04. If you are a PHP web developer then you don't need to worry about of all modern PHP frameworks, Laravel is the easiest to get up and running that saves your time and effort and makes web development a joy. Laravel embraces a general development philosophy that sets a high priority on creating maintainable code by following some simple guidelines, you should be able to keep a rapid pace of development and be free to change your code with little fear of breaking existing functionality.

Laravel's PHP framework installation is not a big deal. You can simply follow the step by step guide in this article for your CentOS 7 or Ubuntu 15 server.

1) Server Requirements

Laravel depends upon a number of prerequisites that must be setup before installing it. Those prerequisites includes some basic tuning parameter of server like your system update, sudo rights and installation of required packages.

Once you are connected to your server make sure to configure the fully qualified domain name then run the commands below to enable EPEL Repo and update your server.

CentOS-7

# yum install epel-release

# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

# yum update

Ubuntu

# apt-get install python-software-properties
# add-apt-repository ppa:ondrej/php5

# apt-get update

# apt-get install -y php5 mcrypt php5-mcrypt php5-gd

2) Firewall Setup

System Firewall and SELinux setup is an important part regarding the security of your applications in production. You can make firewall off if you are working on test server and keep SELinux to permissive mode using the below command, so that you installing setup won't be affected by it.

# setenforce 0

3) Apache, MariaDB, PHP Setup

Laravel installation requires a complete LAMP stack with OpenSSL, PDO, Mbstring and Tokenizer PHP Extensions. If you are already running LAMP server then you can skip this step to move on and just make sure that the required PHP extensions are installed.

To install AMP stack you can use the below commands on your respective server.

CentOS

# yum install httpd mariadb-server php56w php56w-mysql php56w-mcrypt php56w-dom php56w-mbstring

To start and enable Apache web and MySQL/Mariadb services at bootup on CentOS 7 , we will use below commands.

# systemctl start httpd
# systemctl enable httpd

#systemctl start mysqld
#systemctl enable mysqld

After starting MariaDB service, we will configure its secured password with below command.

#mysql_secure_installation

Ubuntu

# apt-get install mysql-server apache2 libapache2-mod-php5 php5-mysql

4) Install Composer

Now we are going to install composer that is one of the most important requirement before starting the Laravel installation that helps in installing Laravel's dependencies.

CentOS/Ubuntu
Run the below commands to setup 'composer' in CentOS/Ubuntu.

# curl -sS https://getcomposer.org/installer | php
# mv composer.phar /usr/local/bin/composer
# chmod +x /usr/local/bin/composer

composer installation

5) Installing Laravel

Laravel's installation package can be downloaded from github using the command below.

# wget https://github.com/laravel/laravel/archive/develop.zip

To extract the archived package and move into the document root directory use below commands.

# unzip develop.zip

# mv laravel-develop /var/www/

Now use the following compose command that will install all required dependencies for Laravel within its directory.

# cd /var/www/laravel-develop/
# composer install

compose laravel

6) Key Encryption

For encrypter service, we will be generating a 32 digit encryption key using the command below.

# php artisan key:generate

Application key [Lf54qK56s3qDh0ywgf9JdRxO2N0oV9qI] set successfully

Now put this key into the 'app.php' file as shown below.

# vim /var/www/laravel-develop/config/app.php

Key encryption

7) Virtua Host and Ownership

After composer installation assign the permissions and apache user ownership to the document root directory as shown.

# chmod 775 /var/www/laravel-develop/app/storage

# chown -R apache:apache /var/www/laravel-develop

Open the default configuration file of apache web server using any editor to add the following lines at the end file for new virtual host entry.

# vim /etc/httpd/conf/httpd.conf

ServerName laravel-develop
DocumentRoot /var/www/laravel/public

start Directory /var/www/laravel
AllowOverride All
Directory close

Now the time is to restart apache web server services as shown below and then open your web browser to check your localhost page.

CentOS

# systemctl restart httpd

Ubuntu

# service apache2 restart

8) Laravel 5 Web Access

Open your web browser and give your server IP or Fully Qualified Domain name and you will see the default web page of Laravel 5 frame work.

Laravel Default

Conclusion

Laravel Framework is a great tool to develop your web applications. So, at the end of this article you have learned its installation setup on Ubuntu 15 and CentOS 7 , Now start using this awesome PHP framework that provides you a lot of more features and comfort in your development work. Feel free to comment us back for your valuable suggestions an feedback to guide you in more specific and easiest way.

The post How to Install Laravel PHP Framework on CentOS 7 / Ubuntu 15.04 appeared first on LinOxide.


How to Install / Uninstall GIMP 2.8.16 on Ubuntu 14.04 / 15.10

$
0
0

GIMP is the acronym for GNU Image Manipulation Program. It is a free and open source cross-platform image editor available for GNU/Linux, Mac OS X, Windows etc.  It is frequently referred to as a free alternative to  Adobe Photoshop.  It is a highly versatile tool , it can be used for various purposes like a basic drawing program, high quality image manipulation, retouching, restoring images and so on. GIMP recently celebrated its 20th birthday and on the same day 2.8.16 version of it has been released.  GIMP comes with a wide array of features including layers, masks, filters and special effects.

In this tutorial, we will learn how to install and uninstall GIMP 2.8.16 on Ubuntu 14.04 and 15.10 versions.

Installing GIMP

We can install the latest stable version of GIMP in Ubuntu (>=12.04)  using Thorsten Stettin's PPA repository.  Use the following command:

sudo add-apt-repository ppa:otto-kesselgulasch/gimp

Below is the sample output that you see while setting up the repo.

root@li1254-59:~# sudo add-apt-repository ppa:otto-kesselgulasch/gimp
This PPA is for Ubuntu >=12.04 and Linux Mint >=13

Installing:
open a terminal and type:
sudo add-apt-repository ppa:otto-kesselgulasch/gimp
sudo apt-get update
sudo apt-get install gimp

Removing:
open a terminal and type:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:otto-kesselgulasch/gimp

Many thanks to David Tschumperlé for his masterpiece called G'MIC.
http://gmic.eu/
Look for the gmic packages!

We should not forget the Gimp crew!
http://www.gimp.org/

And many, many thanks to http://siduction.org. They helped me on my first steps making the Gimp packages.

I promise as long as I live this PPA will never die and the most recent packages will for ever be. ;-)

Regards

Otto Meier

If you had a really problem:
Skype: thorsten.stettin
G+: https://plus.google.com/u/0/117581776478455814502/posts
FB: https://www.facebook.com/otto06217

Some stats:

http://kesselgulasch.org/ppastats/gimp/

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

gpg: keyring `/tmp/tmp9q_ycgws/secring.gpg' created
gpg: keyring `/tmp/tmp9q_ycgws/pubring.gpg' created
gpg: requesting key 614C4B38 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp9q_ycgws/trustdb.gpg: trustdb created
gpg: key 614C4B38: public key "Launchpad otto06217" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK

After this, we can install the latest version either using command line or by launching software updater.

To install using command line, execute the following commands:

sudo apt-get update

sudo apt-get install gimp

If you want to install using GUI, then launch the software updater. Once it is launched, it will list GIMP as one of the softwares to be installed among others if any.  Go ahead and press the 'Install Now' button to complete the installation.

 

Software Updater

Once the installation is complete, cross check the version of GIMP that is installed using the 'gimp -v' command.

root@li1254-59:~# gimp -v
GNU Image Manipulation Program version 2.8.16
git-describe: GIMP_2_8_14-268-g3152b6e

Now, start the program by typing 'gimp' in the command line or by launching the application.

Starting GIMP

When the application is launched, you see the following window and you are ready to start using GIMP:

GIMP window

Uninstallation

If for some reason, you want to remove GIMP from your system, execute these commands:

sudo apt-get install ppa-purge

sudo ppa-purge ppa:otto-kesselgulasch/gimp

Conclusion

Compared to its proprietory counterpart Adobe Photoshop, GIMP is a good example of a free and open-source software delivering powerful features at no cost. Over its last 20 years of existence, it has evolved slowly in terms of complexity and ease of use.  Go ahead, install it and have fun working with your images!

The post How to Install / Uninstall GIMP 2.8.16 on Ubuntu 14.04 / 15.10 appeared first on LinOxide.

How to Install Bugzilla with Apache and SSL on FreeBSD 10.2

$
0
0

Bugzilla is open source web base application for bug tracker and testing tool, develop by mozilla project, and licensed under Mozilla Public License. It is used by high tech company like mozilla, redhat and gnome. Bugzilla was originally created by Terry Weissman in 1998. It written in perl, use MySQL as the database back-end. It is a server software designed to help you manage software development. Bugzilla has a lot of features, optimized database, excellent security, advanced search tool, integrated with email capabilities etc.

In this tutorial we will install bugzilla 5.0 with apache for the web server, and enable SSL for it. Then install mysql51 as the database system on freebsd 10.2.

Prerequisite

  • FreeBSD 10.2 - 64bit.
  • Root privileges.

Step 1 - Update System

Log in to the freebsd server with ssl login, and update the repository database :

sudo su
freebsd-update fetch
freebsd-update install

Step 2 - Install and Configure Apache

In this step we will install apache from the freebsd repositories with pkg command. Then configure apache by editing file "httpd.conf" on apache24 directory, configure apache to use SSL, and CGI support.

Install apache with pkg command :

pkg install apache24

Go to the apache directory and edit the file "httpd.conf" with nanao editor :

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

Uncomment the list line below :

#Line 70
LoadModule authn_socache_module libexec/apache24/mod_authn_socache.so

#Line 89
LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so

# Line 117
LoadModule expires_module libexec/apache24/mod_expires.so

#Line 141 to enabling SSL
LoadModule ssl_module libexec/apache24/mod_ssl.so

# Line 162 for cgi support
LoadModule cgi_module libexec/apache24/mod_cgi.so

# Line 174 to enable mod_rewrite
LoadModule rewrite_module libexec/apache24/mod_rewrite.so

# Line 219 for the servername configuration
ServerName 127.0.0.1:80

Save and exit.

Next, we need to install mod perl from freebsd repository, and then enable it :

pkg install ap24-mod_perl2

To enable mod_perl, edit httpd.conf and add to the "Loadmodule" line below :

nano -c httpd.conf

Add line below :

# Line 175
LoadModule perl_module libexec/apache24/mod_perl.so

Save and exit.

And before start apache, add it to start at boot time with sysrc command :

sysrc apache24_enable=yes
service apache24 start

Step 3 - Install and Configure MySQL Database

We will use mysql51 for the database back-end, and it is support for perl module for mysql. Install mysql51 with pkg command below :

pkg install p5-DBD-mysql51 mysql51-server mysql51-client

Now we must add mysql to the boot time, and then start and configure the root password for mysql.

Run command below to do it all :

sysrc mysql_enable=yes
service mysql-server start
mysqladmin -u root password aqwe123

Note :

mysql password : aqwe123

Configure MySQL Password

Next, we will log in to the mysql shell with user root and password that we've configured above, then we will create new database and user for bugzilla installation.

Log in to the mysql shell with command below :

mysql -u root -p
password: aqwe123

Add the database :

create database bugzilladb;
create user bugzillauser@localhost identified by 'bugzillauser@';
grant all privileges on bugzilladb.* to bugzillauser@localhost identified by 'bugzillauser@';
flush privileges;
\q

Creating Database for Bugzilla

Database for bugzilla is created, database "bugzilladb" with user "bugzillauser" and password "bugzillauser@".

Step 4 - Generate New SSL Certificate

Generate new self signed ssl certificate on directory "ssl" for bugzilla site.

Go to the apache24 directory and create new directory "ssl" on it :

cd /usr/local/etc/apache24/
mkdir ssl; cd ssl

Next, generate the certificate file with openssl command, then change the permission of the certificate file :

sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /usr/local/etc/apache24/ssl/bugzilla.key -out /usr/local/etc/apache24/ssl/bugzilla.crt
chmod 600 *

Step 5 - Configure Virtualhost

We will install bugzilla on directory "/usr/local/www/bugzilla", so we must create new virtualhost configuration for it.

Go to the apache directory and create new directory called "vhost" for virtualhost file :

cd /usr/local/etc/apache24/
mkdir vhost; cd vhost

Now create new file "bugzilla.conf" for the virtualhost file :

nano -c bugzilla.conf

Paste configuration below :

<VirtualHost *:80>
ServerName mybugzilla.me
ServerAlias www.mybuzilla.me
DocumentRoot /usr/local/www/bugzilla
Redirect permanent / https://mybugzilla.me/
</VirtualHost>

Listen 443
<VirtualHost _default_:443>
ServerName mybugzilla.me
DocumentRoot /usr/local/www/bugzilla

ErrorLog "/var/log/mybugzilla.me-error_log"
CustomLog "/var/log/mybugzilla.me-access_log" common

SSLEngine On
SSLCertificateFile /usr/local/etc/apache24/ssl/bugzilla.crt
SSLCertificateKeyFile /usr/local/etc/apache24/ssl/bugzilla.key

<Directory "/usr/local/www/bugzilla">
AddHandler cgi-script .cgi
Options +ExecCGI
DirectoryIndex index.cgi index.html
AllowOverride Limit FileInfo Indexes Options
Require all granted
</Directory>
</VirtualHost>

Save and exit.

If all is done, create new directory for bugzilla installation and then enable the bugzilla virtualhost by adding the virtualhost configuration to httpd.conf file.

Run command below on "apache24" directory :

mkdir -p /usr/local/www/bugzilla
cd /usr/local/etc/apache24/
nano -c httpd.conf

In the end of the line, add configuration below :

Include etc/apache24/vhost/*.conf

Save and exit.

Now test the apache configuration with "apachectl" command and restart it :

apachectl configtest
service apache24 restart

Step 6 - Install Bugzilla

We can install bugzilla manually by downloading the source, or install it from freebsd repository. In this step we will install bugzilla from freebsd repository with pkg command :

pkg install bugzilla50

If it's done, go to the bugzilla installation directory and install all perl module that needed by bugzilla.

cd /usr/local/www/bugzilla
./install-module --all

Wait it until all is finished, it is take the time.

Next, generate the configuration file "localconfig" by executing "checksetup.pl" file on bugzilla installation directory.

./checksetup.pl

You will see the error message about the database configuration, so edit the file "localconfig" with nano editor :

nano -c localconfig

Now add the database that was created on step 3.

#Line 57
$db_name = 'bugzilladb';

#Line 60
$db_user = 'bugzillauser';

#Line 67
$db_pass = 'bugzillauser@';

Save and exit.

Then run "checksetup.pl" again :

./checksetup.pl

You will be prompt about mail and administrator account, fill all of it with your email, user and password.

Admin Setup

In the last, we need to change the owner of the installation directory to user "www", then restart apache with service command :

cd /usr/local/www/
chown -R www:www bugzilla
service apache24 restart

Now Bugzilla is installed, you can see it by visiting mybugzilla.me and you will be redirect to the https connection.

Bugzilla home page.

Bugzilla Home

Bugzilla admin panel.

Bugzilla Admin Page

Conclusion

Bugzilla is web based application help you to manage the software development. It is written in perl and use MySQL as the database system. Bugzilla used by mozilla, redhat, gnome etc for help their software development. Bugzilla has a lot of features and easy to configure and install.

The post How to Install Bugzilla with Apache and SSL on FreeBSD 10.2 appeared first on LinOxide.

How to Install and Configure Snort on PFsense Firewall

$
0
0

Snort is well-known open source IDS/IPS which is integrated with several firewall distributions such as IPfire, Endian and PfSense. In this tutorial, our focus is installation, configuration of snort and  rules on PfSense firewall. Snort needs packet filter (pf) firewall to provide IPS feature which is also available in this distribution.

Installation

All software's of Pfsense firewall are available in the Packages sub menu . Go to System menu and select packages from drop down menu list.

packages

Click on Available Packages tab for different category of software's .

availablepackage

Available Packages  shows following sub menu options. Snort is an open source security tool, therefore click on security menu to list down available packages for installation on PfSense.

availablepackage options

Snort package is available under Security sub menu. Now click on the   icon_plus icon to install snort.

icon-snort

Installation of any new package on Pfsense ,  requires confirmation from firewall administrator which is shown below.

confirm

After confirmation, snort installation is shown in following snapshot

snort installation 1

Snort installation is shown below and  more instruction are also given for further setting.

snort installation complete

Snort setup instructions are shown in the above figure.

Snort Configuration

After successful information of snort on Pfsense, now we will configure snort on LAN interface for port scan detection. Snort is available in the services menu after installation.

snort in services menu

Following snapshot appears after clicking  on the snort sub menu.

services all menu

Snort either run on LAN or WAN interface of Pfsense. Therefore we have to create lan and wan interfaces setting by clicking on icon_plus icon.

snort interfac setting

LAN interface setting are shown below. We have checked the IPS options like block offenders and kill their states

snort interface setting-lan

Interface added for LAN and  currently snort is not running on it. Click on  cross (X) button to start Snort ids service  on LAN interface.

snort interface added

As shown in the following snapshot snort is running on LAN interface.

snort interface running

Warning notification is shown in the above figure. Therefore snort rules should be  added after rules updates step.

Following screen appears after clicking on the Global setting menu for the installation of rules of snort.

snort rules under global setting

Login on snort web site and generates  Onikcode to download "Snort VRT" rules.

oinkcode

Click on the Oinkcode on left side to get  Oinkcode.

oinkcode code

Again go to Global settings menu and enter Oinkcode to download Snort VRT rules.

enter oinkcode on snort setting

Now go to Updates menu to check the status of different rules. Click on the Update button to download or update snort rules on Pfsense.

updates menu

Click on the Update button to install rules  on the snort. Rule update step  is shown in the below figure. We have installed snort community ,VRT ,emerging threats rules.

updates rules

Before moving to next menu of snort, again click on the Snort interfaces tab and select LAN for editing.

lan interface

After clicking on edit button, select LAN Categories  option for snort rules. Select desirable rules from this comprehensive list for LAN interface.

snort rules

After installation  of  snort rules on Pfsense, next option is alerts menu.

alerts

Snort with packet filter (filter) gives capability of blocking malicious IP.  Blocked IP's will be shown on the following snapshot.

blocked

It is very common on the network that administrator ensures white listing of IP's. By default Local LAN is usually in the Pass List.

pass list

Suppress menu is shown  in the following snapshot. It is used to block false positive alerts.

suppressList of malicious ip addresses can be loaded on Pfsense in the snort configuration. Incoming traffic from the ip addresses stored in the reputation  list will be considered as the malicious.

ip listSetting for signatures ID (SID) of snort rules is managed using this menu.

sid mgmt

Setting relevant to log management are  shown in the following menu.

log management

Conclusion

In this tutorial, we have explored the Snort IDS/IPS which is an open source security software integrated with PfSense firewall. Snort works perfectly with packet filter (pf) based firewall . IPS feature of snort block the malicious or illegal IP's for network protection . It is very stable on Pfsense firewall  and easily configured using graphical front end.

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

How to Setup Munin Monitoring System on CentOS 7

$
0
0

Hello Everybody! Welcome to our today’s article on one the most widely used, free of cost and Open Source Munin Network Resource Monitoring System. Its a perl software application can help you monitoring your each and every asset that keeps record of it and sends you the critical alerts of services for your servers, switches, applications, and any any other devices connected to your network whether its your computers, network, storage or the whole IT infrastructure. It shows all the information in graphs through a web interface that emphasis on plug and play capabilities.

Munin has a master/node architecture in which the master connects to all the nodes at regular intervals and asks them for data, then stores the data in RRD files to updates the graphs if needed. So, after completing its installation a high number of monitoring plugins will be playing with no more effort.

Prerequisites

Your systems hardware resources depends upon your own requirements while in this article we will be using the following system resource for Munin installation on CentOS 7.

System Resources
Munin Version Munin 2.0.25
Base OS CentOS Linux 7 (Core), 64-bit
RAM 4 GB
CPU 2.0 GHZ
Hard Disk 30 G

Munin installation setup requires the basic web server packages to be installed on the server. So, after basic networking setup configure your hostname, IP address and firewall settings by keeping SELinux into permissive mode.

Then start installing packages by update your system first and enabling EPEL repository on it using below commands.

# yum install epel-release
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

# yum update

You will be asked to press "Y" key and hit Enter to proceed for installing all required updates. Once the updates are successfully installed on your system then proceed to the installation of Apache Web server.

Apache Web Setup

To setup your Apache web server, we need to start by installing its package using the below 'yum' command.

# yum install httpd

Upon completion of packages installation, start and enable its service and check that its active and enabled using the following commands respectively.

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

Apache Status

Installing Munin

We can install Munin and Munin Node using the below 'yum' command through its available repository on CentOS 7 as shown.

# yum install munin munin-node

Hit "Y" plus Enter key to start installation of Munin and Munin Noe including a large number its required dependencies.

Once the installation is complete, start its service and enable it at auto start during reboot by using the following commands.

Munin Node Status

Munin Configurations

Now configure Munin by open its default configuration using any editor as used in below command.

# vim /etc/munin/munin.conf

# a simple host tree, change localhost with your FQDN.

[localhost]
address 127.0.0.1
use_node_name yes
:wq!

After saving the Munin configuration file, Open its apache virtual host configuration file to add access permissions to your network.

# vim /etc/httpd/conf.d/munin.conf

Munin Network

After saving the configuration file changes , restart apache web server service using command below.

# systemctl restart httpd

Now we are going to add a new user and password to the /etc/munin/munin-htpasswd file as the Munin statistics are protected with a username and password, so we need to setup the basic Apache Authentication.

# htpasswd -c /etc/munin/munin-htpasswd admin

This will add a new user with the name "admin" and asks for the new password as shown.

Apache Auth

# vi /etc/munin/munin-node.conf

host_name munin.linoxide.com

Save and close the file and restart munin-node services and access the following link by mentioning your FQDN or IP from the client which is in your network that was allowed in configuration file.

http://your_servers_IP/munin

Munin Web Access

Welcome to Munin Web Console

Here is the Munin dashboard, now you can check the graphs of your required servers.

Munin Dashboard

We can customize Munin dashboard by adding different available plugins and add multiple node to it. While using its web console we have options to create multiple groups and categories according to the required group of services.

You can check and see the status of your critical service by opening its graph from the Munin web console that will show you the current and past data from its maintained hostory as shown in below image.

Munin Load Graph

Conclusion

Munin installation has been setup. We hope you have enjoyed reading this article. The installation of Munin is quite simple, now simply add the client node and start monitoring your whole IT infrastructure using this awesome tool without paying any charges. Now enjoy using Munin on your environment and feel free to share your thoughts or suggestions in comments section.

The post How to Setup Munin Monitoring System on CentOS 7 appeared first on LinOxide.

How to Setup Virtualmin Control Panel in CentOS 7.0

$
0
0

Virtualmin GPL is a free and open source powerful and flexible web hosting control panel for Linux machine based on the well-known web based application named Webmin. Virtualmin is a uniquely powerful and flexible web server administration tool. It is unmatched in features and ease of use. It offers a wide range of tools for hosting providers, web developers, web designers, and end users. There are two different editions in which we can get our Virtualmin application running, one is under Professional in which we'll need to buy license and another is under GPL edition which is free and open source. Here are some of the features responsible for making Virtualmin one of the top Web Based Hosting Control Panel.

  1. Virtualmin has a beautiful easy to use user interface with a well managed menu.
  2. It respects the user freedom as its pretty flexible and can be customized easily to everything according to the user's choice.
  3. The responsive design of its interface makes it easily accessible from any device which helps us to perform server tasks easily from anywhere.
  4. It has the ability to send SMS message if any problem arises before the user recognizes.
  5. It is pretty comprehensive as we can manage and run almost everything out of the box necessary to manage a web hosting server including emails, spams, network configurations, firewalls, databases, users and groups, system logs and statups, file managers filesystems, quotas, software packages, and many more .

Here are some easy steps to setup Virtualmin in a machine running CentOS 7 distribution of linux.

System Requirements

Before we hurry up for the installation of Virtualmin, we'll need to make sure that our system will support Virtualmin and will run with its full performance. To install and run Virtualmin, we'll require a machine having at least 1 GB RAM. If you have a machine with RAM less than 3GB memory size, then it is recommended to run 32 bit of linux distribution with 32 bit package of Virtualmin. It is highly recommeneded to setup Virtualmin in a freshly installed server in order to prevent conflicts. After the sytem requirements are fulfilled, we'll need to set the hostname of our machine to a fully qualified domain name.

To see the currently set hostname, we'll need to run the following command.

# hostname -f

li862-235.members.linode.com

And in order to change the hostname of our machine to a valid FQDN, we'll need to run the following command.

# hostname panel.linoxide.com

Updating the System

Once our system requirement has been checked and fulfilled, we'll go further towards the installation of Virtualmin in our machine. We'll first make sure that we have the latest software packages installed in our CentOS 7 machine, do update all the packages to the latest and stable versions, we'll need to run the following command under root or sudo access.

# yum update

Updating Centos7 System

Downloading VirtualMin

VirtualMin can be installed in many ways but as we are running CentOS 7, it is pretty easy for us to setup in a clean machine. We can setup using an automated script which will automatically install every dependencies and packages. To do so, first we'll need to download the script file of VirtualMin using wget.

# wget http://software.virtualmin.com/gpl/scripts/install.sh -O /tmp/virtualmin-install.sh

--2015-11-20 05:32:30-- http://software.virtualmin.com/gpl/scripts/install.sh
Resolving software.virtualmin.com (software.virtualmin.com)... 108.60.199.107
Connecting to software.virtualmin.com (software.virtualmin.com)|108.60.199.107|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 47633 (47K) [application/x-sh]
Saving to: ‘/tmp/virtualmin-install.sh’
100%[=========================================>] 47,633 114KB/s in 0.4s
2015-11-20 05:32:31 (114 KB/s) - ‘/tmp/virtualmin-install.sh’ saved [47633/47633]

Here, the script file named install.sh is downloaded from the official download server http://software.virtualmin.com/gpl/ using wget and is saved under /tmp/ directory as virtualmin-install.sh

Running the VirtualMin script

After the VirtualMin script has been downloaded successfully, we'll go for the execution of the script file. To do so, first we'll need to make the script file executable by running the following chmod command.

# chmod +x /tmp/virtualmin-install.sh

Once the file is made executable, we'll go further towards running it using a shell. Here, we'll run it using sh as shown below.

# sh /tmp/virtualmin-install.sh

Installing Virtualmin

Doing this will start the Virtualmin installation wizard. It will prompt a license agreement, to continue the installation, we'll need to press Y followed by Enter . The installer script will start performing several checks and installing the required components.

Allowing Firewall

As CentOS 7 is shipped with systemd as the default init system, firewalld is installed in most machines as a firewall solution. We'll configure the firewall program to allow port 10000 to expose out of the box. This will make VirtualMin accessible within the connected network. To allow port 10000 from the firewall, we'll need to run the following command.

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

success

# firewall-cmd --reload

success

Accessing VirtualMin

As our virtualmin has been successfully installed and the port 10000 is allowed to expose by the firewall program, we'll point our web browser to our server as https://ip-address:10000 or https://domain.com:10000 according to the system configuration. Here, according to our configuration, we'll point our web browser to https://panel.linoxide.com:10000. This will display some warning regarding SSL certificate as we have installed virtualmin under a self-signed SSL certifications. As we're running Google Chrome browser, we'll see the below warnings, we'll simply ignore it and continue it by clicking on Advanced button. After that, we'll simply click on Proceed to panel.linoxide.com (unsafe) to continue to the VirtualMin login page.

Virtualmin SSL Certificate

Next, we'll need to enter the root username and password which is same as of the linux system's to get access to the Web based Control Panel of VirtualMin.

Virtualmin Login

After we have entered the login details, we'll click on Login button which will load the Dashboard with the Post Installation Wizard interface.

Virtualmin Post Installation Wizard

Post Installation

We'll now click on Next in order to continue the post installation wizard which is essential in order to configure different packages and elements of VirtualMin for better performance. Here, we'll go through the wizard in which we'll need to select the required option we want to setup VirtualMin with. While configuring or running a service, we'll need to keep in mind if our RAM has the capacity to handle those service properly or not in order to ensure the quality of the server. Here, we'll choose Yes to both Preload Virtualmin libraries and Run email domain lookup server for improving the Virtualmin UI and mail processing speed respectively.

Virtualmin Tuning

Then, we'll click Next and continue further towards the Virus Scanning section. Here, as we want our mail processing to be fast, we'll select Yes to run ClamAV server scanner.

Enabling Clamav Scanner

We'll also enable SpamAssassin server filter in order to filter the unwanted spam messages coming through the emails from the internet.

SpamAssassin Mail Filter

After that, we'll go for the selection of database server to run with Virtualmin. As MySQL server is widely used and supported by most applications, we'll simply select Yes to MySQL and select No to PostgreSQL database server.

Choosing Database

We'll now need to set the root password for the MySQL server which will be used to access the MySQL Database server. Here, we'll set the password for the root user as Pa$$worD123 .

MySQL root password

Next, we'll be navigated to MySQL database size page where we'll need to select the MySQL configuration size, here we'll select Large System (1G) after that, we'll need to set a resolvable nameserver in the next page.

Database Size

Then, we'll be asked to choose the Password Storage Mode, we'll choose Only store hashed passwords for security concerns.

Password Storage Mode

After done, we'll see that our Virtualmin configuration was completed, to continue into the dashboard, we'll need to click Next. Finally, after everything is done, we'll be able to access our fully configured Virtualmin Control Panel.

Virtualmin Dashboard

Conclusion

Finally, we have successfully installed VirtualMin web based control panel in our machine running CentOS 7 as operating system. Now, we can easily manage our VPS, multiple websites, clusters, applications, servers, daemons and the whole system. Really, Virtualmin has made it possible to manage and administer our servers out of the box from any device from anywhere around the world. If you have any questions, suggestions, feedback please write them in the comment box below so that we can improve or update our contents. Thank you !

The post How to Setup Virtualmin Control Panel in CentOS 7.0 appeared first on LinOxide.

Viewing all 1287 articles
Browse latest View live