How To Install PHP 5.5 on CentOS

Install PHP 5.5 on CentOS

PHP (PHP: Hypertext Preprocessor) is a server-side scripting language designed for web development but also used as a general-purpose programming language. PHP code is interpreted by a web server with a PHP processor module, which generates the resulting web page: PHP commands can be embedded directly into an HTML source document rather than calling an external file to process data.

This tutorial we will show you how to install PHP 5.5 on CentOS.

Install PHP 5.5 on CentOS

To install, first you must add the Webtatic yum repository information corresponding to your CentOS/RHEL version to yum:

For CentOS 6.x use:

 #rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm

For CentOS 5.x use:

 #rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm

Now you can install PHP 5.5:

 #yum install php55w --enablerepo=webtatic-archive[/#yum install php55w --enablerepo=webtatic-archive

Restart apache after PHP installation:

#service httpd restart
#php -v

PHP should now be installed. You can check by creating a file called info.php in /var/www/html/ with the following content:

<?php
 phpinfo();
 ?>

Congratulation’s! You have successfully installed PHP. Thanks for using this tutorial for installing PHP 5.5 in CentOS system. For additional help or useful information, we recommend you to check the official PHP web site.

You Might Also Like: How To Install and Enable Alternative PHP Cache (APC) on CentOS

How To Install Transmission on Ubuntu 14.04

Install Transmission on Ubuntu

Transmission BitTorrent Client features a simple interface on top of a cross-platform back-end. Transmission is licensed as a free software under the terms of the GNU General Public License (GPL), with parts under the MIT License. Transmission, like any other BitTorrent client allows users to download files from the Internet and upload their own files or torrents. By grabbing items and adding them to the interface, users can create queues of files to be downloaded and uploaded.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation Transmission on Ubuntu 14.04.

In this tutorial we will show you how to will help you with your install and configuration of Transmission on your Ubuntu 14.04 server.

Install Transmission on Ubuntu 14.04

Step 1. First, add transmission into the repository.

 sudo add-apt-repository ppa:transmissionbt/ppa

Step 2. Install Transmission.

sudo apt-get update
sudo apt-get install transmission-cli transmission-common transmission-daemon

Step 3. Configure users and permissions for Transmission.

After the installation, create the directory where you want to put all your downloaded files.

cd /var/www/html/
mkdir transmission
cd transmission
mkdir completed incomplete torrents

Add the current user to debian-transmission group.

 sudo usermod -a -G debian-transmission wpcademy

Now, when Transmission downloads torrents, it automatically sets the rights of the files that it downloads to the Transmission user group. We need to make sure that our username is a part of that group, and we need to set the correct permissions on the downloads folders. Issue the following commands:

sudo chgrp -R debian-transmission /var/www/html/transmission
sudo chmod -R 775 /var/www/html/transmission

Configure Transmission

Step 4. Configure Transmission.

The configuration file is easy to understand. Here is my sample configuration:

#sudo nano /etc/transmission-daemon/settings.json

"download-dir": "/var/www/html/trasmission/completed",
...
"incomplete-dir": "/var/www/html/trasmission/incomplete",
"incomplete-dir-enabled": true,
...
"rpc-authentication-required": true,
"rpc-bind-address": "0.0.0.0",
"rpc-enabled": true,
"rpc-password": "password",
"rpc-port": 9091,
"rpc-username": "username",
"rpc-whitelist": "127.0.0.1,*.*.*.*",
"rpc-whitelist-enabled": true,
...
"umask": 2,
...
"watch-dir": "/media/datadrive/downloads",
"watch-dir-enabled": true

Step 5. Start Transmission daemon.

 sudo service transmission-daemon start

Once it has reloaded and if it starts back up, go ahead and go to your browser and navigate to: 0.0.0.0:9091 (where 0.0.0.0 is the IP address of your Ubuntu server). You should be greeted with the Transmission WebUI. After logging in, you will notice that the value for the rpc-password inside the settings.json file will be hashed.

Congratulation’s! You have successfully installed transmission. Thanks for using this tutorial for installing Transmission BitTorrent Client in Ubuntu 14.04 system. For additional help or useful information, we recommend you to check the official transmission web site

You Might Also Like: How To Install Transmission on CentOS 6

How To Install GNOME on Ubuntu 14.04

Install GNOME on Ubuntu

By default, Ubuntu 14.04 Trusty Tahr LTS server installed as minimal without any Graphical Desktop support. Installing GNOME desktop on Ubuntu is faily straightforward. Most Ubuntu servers are run on CLI (Command-Line Interface) mode. But in some cases, one may need to have a desktop to install some applications with GUI (Grapich User Interface) mode. In this case, we will use GNOME, the most popular user-friendly desktop for any UNIX based system.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. We will show you through the step by step installation GNOME on Ubuntu 14.04.

Install GNOME on Ubuntu 14.04

Step 1. First, You just need to install a couple of Gnome apps, add the gnome3-staging prepository and do a dist-upgrade:

sudo add-apt-repository ppa:gnome3-team/gnome3-staging
sudo apt-get update
sudo apt-get dist-upgrade

Step 2. Installing additional applications.

GNOME 3.12 has some new applications like: gnome-weather, gnome-maps, gnome-photos and gnome-music etc, which are not installed by default on Ubuntu GNOME 14.04. To install additional applications, run the following command:

sudo apt-get update
sudo apt-get install bijiben polari gnome-clocks gnome-weather gnome-maps gnome-music gnome-photos gnome-documents gnome-contacts epiphany-browser gnome-sushi gnome-boxes gnome-shell-extensions

Step 3. Reboot the system.

After you reboot the system, the system will enter into the Gnome GUI interface automatically.

ubuntu gnome interface

If you encounter issues of you simply don’t like GNOME 3.12, you can revert the changes by using PPA Purge. To purge the GNOME 3 PPAs and go back to GNOME 3.10 (which is default in Ubuntu 14.04), use the following commands:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:gnome3-team/gnome3
sudo ppa-purge ppa:gnome3-team/gnome3-staging

Congratulation’s! You have successfully installed GNOME. Thanks for using this tutorial for installing GNOME in Ubuntu 14.04 system. For additional help or useful information, we recommend you to check the official GNOME web site.

You Might Also Like: How To Install Gnome GUI on CentOS 7

How To Install Apache SVN on Ubuntu 14.04

Install Apache SVN on Ubuntu

Apache Subversion which is commonly referred to in its abbreviated form as SVN, (named after the command name SVN) is a popular software versioning and revision control system which is distributed as a free software under the Apache License. Mainly used by developers to maintain present and historic file versions like documentation, source code, and web pages, it primarily aims to be a compatible successor to the extensively used CVS (Concurrent Versions System).

SVN supports several protocols for network access: SVN, SVN+SSH, HTTP, HTTPS. If you are behind a firewall, HTTP-based Subversion is advantageous since SVN traffic will go through the firewall without any additional firewall rule setting. This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. In this tutorial we will guide you through the step by step installation Apache SVN on Ubuntu 14.04 server.

Install Apache SVN on Ubuntu 14.04

Step 1. First, you need update the repositories using the following command.

 sudo apt-get update

Step 2. Install SVN and apache webserver.

 sudo apt-get install subversion apache2 libapache2-svn apache2-utils

Step 3. Create and configure SVN repository.

mkdir -p /svn/repos/
cd /svn/repos/
svnadmin create testrepo
chown -R www-data:www-data /testrepo

Step 4. Configure Subversion with Apache.

Once installing the package, you must open the subversion httpd config file.

#nano /etc/apache2/mods-enabled/dav_svn.conf

## Uncomment following lines ##

<Location /svn>
DAV svn
SVNParentPath /svn/repos/
AuthType Basic
AuthName "Subversion Repository"
AuthUserFile /etc/subversion/passwd
Require valid-user
</Location>

Step 5. Create account and password for SVN.

Following commands will add two users for svn. It will prompt for users password to be assigned.

htpasswd -cm /etc/svn-users wpcademy
htpasswd -m /etc/svn-users userwpcad

Step 6. Restart Apache2 Server.

 etc/init.d/apache2 restart

Step 7. Finally, You can visit the url http://your-ip-address/svn/testrepo to check out the content, you will be asked to enter the user name and password.

Congratulation’s! You have successfully installed Apache SVN. Thanks for using this tutorial for installing Apache Subversion server on Ubuntu 14.04 system. For additional help or useful information, we recommend you to check the official Apache Subversion web site.

You Might Also Like: How To Install Apache SVN on CentOS 7

How To Install MongoDB on Ubuntu 14.04

Install MongoDB on Ubuntu

MongoDB is a NoSQL document-oriented database. Refers to a database with a data model other than the tabular format used in relational databases such as MySQL, PostgreSQL, and Microsoft SQL. MongoDB features include: full index support, replication, high availability, and auto-sharding. It is a cross-platform and it makes the process of data integration faster and much easier. Since it is free and open-source, MongoDB is used by number of websites and organizations.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. We will show you through the step by step installation MongoDB on Ubuntu 14.04 in this tutorial.

Step 1. First, add the official MongoDB public key used by the package management system.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list

Step 2. Install mongoDB packages.

sudo apt-get update
sudo apt-get install -y mongodb-org

If you want to install any specific version of MongoDB, define the version number like below:

 apt-get install mongodb-org=2.6.0 mongodb-org-server=2.6.0 mongodb-org-shell=2.6.0 mongodb-org-mongos=2.6.0 mongodb-org-tools=2.6.0

MongoDB daemon should be enabled to start on boot:

service mongod start
chkconfig mongod on

The main configuration file is located in the /etc directory on your Linux VPS as mongod.conf. To edit it, you can use your favorite text editor.

 nano /etc/mongod.conf

Step 3. Verifying mongoDB database.

Connect MongoDB using command line and execute some test commands for checking proper working.

#mongo

MongoDB shell version: 2.6.7
connecting to: test
Welcome to the MongoDB shell.

A good way to start using MongoDB on your CentOS 6 is to read the MongoDB manual on the official web site.

You Might Also Like: How To Install MongoDB on CentOS 6

How To Install MongoDB on CentOS 6

Install MongoDB on CentOS 6

MongoDB is a NoSQL document-oriented database. Refers to a database with a data model other than the tabular format used in relational databases such as MySQL, PostgreSQL, and Microsoft SQL. MongoDB features include: full index support, replication, high availability, and auto-sharding. It is a cross-platform and it makes the process of data integration faster and much easier. Since it is free and open-source, MongoDB is used by number of websites and organizations.

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. In this tutorial we are going to learn the step by step installation MongoDB on CentOS 6 machine.

Step 1. First, add the official MongoDB repository to your system.

Create a /etc/yum.repos.d/mongodb.repo file.

#nano /etc/yum.repos.d/mongodb.repo

## CentOS 64-bit ##

[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
gpgcheck=0
enabled=1

## CentOS 32-bit ##

[mongodb]
name=MongoDB Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686/
gpgcheck=0
enabled=1

Step 2. Install mongoDB packages.

 yum install mongo-10gen mongo-10gen-server

MongoDB daemon should be enabled to start on boot:

/etc/init.d/mongod start
chkconfig mongod on

The main configuration file is located in the /etc directory on your Linux VPS as mongod.conf. To edit it, you can use your favorite text editor.

 nano /etc/mongod.confp.

Step 3. Verifying mongoDB database.

Unlike MySQL, there aren’t a lot of graphical UIs and/or desktop clients available for MongoDB.  There are of course language bindings, to allow us to use PHP and other languages to access the database, but a lot of the fundamental work is done using the command-line client.

# mongo

MongoDB shell version: 2.6.7
connecting to: test
Welcome to the MongoDB shell.
>

A good way to start using MongoDB on your CentOS 6 is to read the MongoDB manual on the official web site.

You Might Also Like: How To Install MongoDB on Ubuntu 14.04

How To Install OwnCloud 8 on Ubuntu 14.04

Install OwnCloud 8 on Ubuntu

OwnCloud is a free and open-source software which enables you to create a private “file-hosting” cloud. OwnCloud is similar to DropBox service with the diference of being free to download and install on your private server. Owncloud made by PHP and backend database MySQL (MariaDB), SQLLite or PostgreSQL. OwnCloud also enables you to easily view and sync address book, calendar events, tasks and bookmarks. You can access it via the good looking and easy to use web interface or install OwnCloud client on your Desktop or Laptop machine (supports Linux, Windows and Mac OSX).

This article assumes you have at least basic knowledge of linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple. I will show you through the step by step installation OwnCloud 8 on Ubuntu 14.04.

Install OwnCloud 8 on Ubuntu 14.04

Step 1. First of all log in to your server as root and make sure that all packages are up to date.

apt-get update
apt-get upgrade

Step 2. Instal Apache web server on your Ubuntu 14.04 VPS if it is not already installed.

 apt-get install apache2

Step 3. Next, install PHP on your server.

 apt-get install php5 php5-mysql

Once the installation is done add the following PHP modules required by OwnCloud:

 apt-get install php5-gd php5-json php5-curl php5-intl php5-mcrypt php5-imagick

Step 4. Install MySQL database server.

 apt-get install mysql-server

By default, MySQL is not hardened. You can secure MySQL using the mysql_secure_installation script. you should read and below each steps carefully which will set root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MySQL.

 mysql_secure_installation

Step 5. Create a new MySQL database for OwnCloud using the following commands.

#mysql -u root -p
Enter password:

mysql> CREATE USER 'ownclouduser'@'localhost' IDENTIFIED BY 'YOURPASSWORD';
mysql> CREATE DATABASE ownclouddb;
mysql> GRANT ALL ON ownclouddb.* TO 'ownclouduser'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> exit

Step 6. Installing Owncloud 8.

First we will need to download the latest stable release of OwnCloud on your server (at the time version 8.0.0).

wget https://download.owncloud.org/community/owncloud-8.0.0.tar.bz2
tar -xvf owncloud-8.0.0.tar.bz2 -C /var/www/html/

Set the directory permissions:

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

Step 7. Configuring Apache for OwnCloud.

While configuring Apache web server, it is recommended that you to enable .htaccess to get a enhanced security features, by default .htaccess is disabled in Apache server. To enable it, open your virtual host file and make AllowOverride is set to All.For example, here i used external config file instead of modifying main file.

### nano /etc/apache2/sites-available/owncloud.conf

<IfModule mod_alias.c>
Alias /owncloud /var/www/html/owncloud
</IfModule>
<Directory “/var/www/html/owncloud”>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>

Remember to restart all services related to Apache server.

 service apache2 restart

Step 8. Access OwnCloud application.

Navigate to http://your-domain.com/ and follow the easy instructions. Enter username and password for the administrator user account, click on the ‘Advanced options’ hyperlink and enter the data directory (or leave the default setting), then enter database username, database password, database name, host (localhost) and click ‘Finish setup’.

You Might Also Like: How To Install OwnCloud 8 on CentOS 6