How To Install OwnCloud 8 on CentOS 6

Install OwnCloud 8 on CentOS 6

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 CentOS 6.

Step 1. First, we need to install the latest EPEL and Remi repository RPM suited to your architecture.

wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm

wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm

Step 2. Install the necessary PHP components.

yum update
yum install httpd php php-mysql sqlite php-dom php-mbstring php-gd php-pdo php-json php-xml php-zip php-gd curl php-curl -y


Step 3.
Install MySQL.

 yum install mysql-server -y

Start MySQL:

 service mysql start

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 4. Create a new MySQL database using the following commands.

#mysql -uroot -p

CREATE DATABASE owncloud;
GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud_user'@'localhost' IDENTIFIED BY 'owncloud_user_pasword';
FLUSH PRIVILEGES;

Step 5. Install OwnCloud and dependencies.

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

Set the directory permissions:

 chown -R apache.apache /var/www/html/owncloud/

Step 5. 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/httpd/conf.d/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 httpd restart

Step 6. 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 Ubuntu 14.04

How To Install and Enable Remi Repository on CentOS

Install and Enable Remi Repository on CentOS

The Remi repository provides newer version of popular opensource software for CentOS and Red Hat Enterprise Linux. More than 5000 individual packages are included in the repository. It’s a great repository to add to your system if you’re running CentOS or Red Hat servers.

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 and enable Remi repository on CentOS 5, CentOS 6 and CentOS 7.

In this tutorial we will show you how to install and configuration of remi repository on your CentOS server.

Enable Remi Repository on CentOS 5, CentOS 6 and CentOS 7

On CentOS The Remi repository depends on the Epel repository which must be installed along with it, for it to work. If you already have epel repository setup then execute the following command:

  • CentOS 7
wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm
  • CentOS 6
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm
  • CentOS 5
wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
rpm -Uvh remi-release-5.rpm

If you want to permanently enable the Remi repository, you need to edit the yum configuration file for Remi. Open the repository configuration file by using a text editor of your choice:

 nano /etc/yum.repos.d/remi.repo

The very first section that starts with [remi] is the main repository. Change the value of enabled from 0 to 1 to enable it.

[remi]
name=Les RPM de remi pour Enterprise Linux 6 - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi

Now list out the installed repositories with command:

 yum repolist

Now, you’re ready to install packages. You can install packages using command:

yum update
yum install <package-name>

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

How To Install MariaDB on Ubuntu 14.04

Install MariaDB on Ubuntu 14.04

MariaDB is a drop-in replacement for MySQL. It is easy to install, offers many speed and performance improvements, and is easy to integrate into most MySQL deployments. MariaDB is widely used and several Linux distributions and large companies have already switched from MySQL to MariaDB.

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 MariaDB on Ubuntu 14.04.

Install MariaDB on Ubuntu 14.04

Step 1. First need to enable MariaDB repository.

sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db

Step 2. Installation of MariaDB.

Once the key is imported and the repository added you can install MariaDB with:

apt-get update
apt-get install mariadb-server

At the time of installation mariadb would ask for the password of user root. Enter the password and make sure not to forget.

Step 3. Secure MariaDB after installation to.

By default, MariaDB is not hardened. You can secure MariaDB 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 MariaDB.

# mysql_secure_installation 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we’ll need the current
password for the root user.  If you’ve just installed MariaDB, and
you haven’t set the root password yet, the password will be blank,
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!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from ‘localhost’.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named ‘test’ that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up…

All done!  If you’ve completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!
[root@wpcademy]#

Step 4. Start MariaDB service.

 service mysql start

Step 5. Login into MariaDB.

After completing installation you can connect to MariaDB using following command.

 mysql -u root -p

You Might Also Like: How To Install MariaDB On CentOS 6

How To Install MariaDB On CentOS 6

Install MariaDB On CentOS 6

MariaDB is a drop-in replacement for MySQL. It is easy to install, offers many speed and performance improvements, and is easy to integrate into most MySQL deployments. MariaDB is widely used and several Linux distributions and large companies have already switched from MySQL to MariaDB.

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 MariaDB on CentOS 6.

In this tutorial we will show you how to install and configuration of MariaDB on your CentOS 6 server.

Install MariaDB on CentOS 6

Step 1. First, you need to enable repository on your system.

Navigate to /etc/yum.repos.d/ on your CentOS box and create a new file called MariaDB repo.

## RHEL/CentOS 6 64-Bit ##

[mariadb]
name = MariaDB 
baseurl = http://yum.mariadb.org/5.5/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

## RHEL/CentOS 6 32-Bit ##

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-x86
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Step 2. Install MariaDB.

Installing MariaDB using yum:

yum update
yum install -y MariaDB-server MariaDB-client MariaDB-devel

After the installation is completed, start MariaDB:

 service mysql start

Set MariaDB to start on boot:

 chkconfig mysql on


Step 3.
Configuring MariaDB.

The configuration files and binaries for MariaDB are mostly the same as MySQL. For example, both use a configuration file called my.cnf.

 cp /usr/share/mysql/my-medium.cnf /etc/my.cnf

Step 4. Secure MariaDB after installation to.

By default, MariaDB is not hardened. You can secure MariaDB 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 MariaDB.

# mysql_secure_installation 
/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
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!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!
[root@wpcademy]#

Step 5. Login into MariaDB.

Login MariaDB with root credential which was set earlier.

 mysql  -u root -p

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

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

How To Install and Configure VSFTPD on Ubuntu 14.04

Install and Configure VSFTPD on Ubuntu 14.04

FTP stands for “file transfer protocol”, and it allows you to transfer files to a remote computer. The most common FTP server software for Ubuntu is the vsftpd package, which stands for “very secure FTP daemon.” It’s the default FTP package for Ubuntu, and most other Linux distributions as well.

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 vsftpd on Ubuntu 14.04.

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

Install and Configure VSFTPD on Ubuntu 14.04

Step 1. Install vsftpd (Very Secure FTP Deamon) package.

 apt-get install vsftpd

Step 2. Configure vsftpd.

Let’s edit the configuration file for vsftpd:

#nano /etc/vsftpd.conf

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
nopriv_user=vsftpd
virtual_use_local_privs=YES
guest_enable=YES
user_sub_token=$USER
chroot_local_user=YES
hide_ids=YES
guest_username=vsftpd

Step 3. Creating and applying the SSL certificate.

Lets go and create our encryption key or certificate to use to connect to the server. First, create a folder that will be used to store the keys.

 mkdir /etc/ssl/certificates

Then run the commands below to create the encryption key that will last for 365 days.

 sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/certificates/vsftpd.pem -out /etc/ssl/certificates/vsftpd.pem

Once creating the key, go and change add and change these parameters in the default VSFTPD configuration file.

#nano /etc/vsftpd.conf

rsa_cert_file=/etc/ssl/certificates/vsftpd.pem
rsa_private_key_file=/etc/ssl/certificates/vsftpd.pem
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES
require_ssl_reuse=NO
ssl_ciphers=HIGH

Step 4. Restart the vsftpd service.

 service vsftpd restart

Step 5. Configuring user access.

With the vsftpd FTP server you have the option to leave the FTP service authentication for only anonymous access or you can allow users , defined in /etc/passwd or in relevant access list, to login.

Step 6. Configure the user’s home directory.

With certain version of vsftpd you may receive the following error: 500 OOPS: vsftpd: refusing to run with writable root inside chroot(). Not to worry! Create a new directory for the user receiving the error(wpcademy in this case) that is a subdirectory of their home directory (/home/wpcademy). For example:

Fix permissions for wpcademy home directory:

 chmod a-w /home/wpcademy/

Make a new directory for uploading files:

mkdir /home/wpcademy/files
chown wpcademy:wpcademy/home/wpcademy/files/

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

You Might Also Like: How To Install Vesta Control Panel on Ubuntu 16.04 LTS

How To Install Fping on CentOS 6

Install Fping on CentOS 6

Fping is a program like ping which uses the Internet Control Message Protocol ( ICMP ) echo request to determine if a target host is responding. fping differs from ping in that you can specify any number of targets on the command line, or specify a file containing the lists of targets to ping.

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 Fping on CentOS 6.

In this tutorial we will show you how to install and configuration of Fping on your CentOS 6 server.

Install Fping on CentOS 6

Step 1. First, you need to enable repository on your system.

## RHEL/CentOS 6 64-Bit ##
# wget http://pkgs.repoforge.org/fping/fping-3.9-1.el6.rf.x86_64.rpm
# rpm -ivh fping-3.9-1.el6.rf.x86_64.rpm

## RHEL/CentOS 6 32-Bit ##
# wget http://pkgs.repoforge.org/fping/fping-3.9-1.el6.rf.i686.rpm
# rpm -ivh fping-3.9-1.el6.rf.i686.rpm

Step 2. Install Fping.

 yum install fping

Installing Fping from source

Step 1. First, download fping source package (latest version is 3.10) and install.

wget http://fping.org/dist/fping-3.10.tar.gz
tar -xvf fping-3.10.tar.gz
cd fping-3.10
./configure
make
make install

Example usage fping program:

#fping 8.8.8.8 8.8.4.4 74.125.200.113

8.8.4.4 is alive
8.8.8.8 is alive
74.125.200.113 is alive

Congratulation’s! You have successfully installed PunBB. Thanks for using this tutorial for installing Fping in CentOS 6 system. Those who wants to get more information with options about Fping command please visit Fping official website.

How To Install Transmission on CentOS 6

Install Transmission on CentOS 6

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 CentOS 6.

In this tutorial we will show you how to install and configuration of Transmission on your CentOS 6 server.

Install Transmission on CentOS 6

Step 1. First, you need to enable EPEL repository on your system.

## RHEL/CentOS 6 64-Bit ##
# wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

## RHEL/CentOS 6 32-Bit ##
# wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

Step 2. Install Transmission.

yum -y upgrade
yum -y install transmission transmission-daemon

Step 3. Configure Transmission.

Edit the settings.json file.

#find / -name settings.json
#nano /var/lib/transmission/.config/transmission/settings.json

"rpc-authentication-required": true,
"rpc-enabled": true,
"rpc-password": "mypassword",
"rpc-username": "mysuperlogin",
"rpc-whitelist-enabled": false,

Step 4. Start Transmission

 service transmission start

Installing Transmission from source

Step 1. Install dependencies and some tools we will use.

 yum -y install openssl-devel curl-devel intltool gettext wget nano

Step 2. Install libevent 2.0 dependency.

cd /usr/src
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
tar zxvf libevent-2.0.21-stable.tar.gz
cd libevent-2.0.21-stable
./configure --prefix=/opt/libevent
make
make install

Step 3. Get and unpack Transmission.

wget https://transmission.cachefly.net/transmission-2.84.tar.xz
tar xvf transmission-2.84.tar.xz
cd transmission-2.84
export PKG_CONFIG_PATH=/opt/libevent/lib/pkgconfig
./configure --prefix=/opt/transmission
make
make install

Step 4. Now we run it once to create the settings.json in ~ (home directory)

 transmission-daemon

Step 5. Kill the appending -HUP to force dump the settings.

 killall -HUP transmission-daemon

Step 6. OK now let’s edit the settings (to your liking) and don’t forget to save.

#cd ~
#nano .config/transmission-daemon/settings.json

"rpc-authentication-required": true,
"rpc-enabled": true,
"rpc-password": "mypassword",
"rpc-username": "mysuperlogin",
"rpc-whitelist-enabled": false,

Step 7. Finally re-run transmission-daemon. It only needs to be run once and then you can access the web interface on the port you setup.

 transmission-daemon

Step 8. Accessing Transmission.

Transmission will be available on HTTP port 9091 by default. Open your favorite browser and navigate to http://yourdomain.com:9091 or http://server-ip:9091. 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. If you are using a firewall, please open port 80 to enable access to the control panel.

You have successfully installed Transmission! Now, run the following command to view Transmission’s help guide:

 transmissioncli -h

Congratulation’s! You have successfully installed Transmission. Thanks for using this tutorial for installing Transmission BitTorrent Client on CentOS 6 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 Ubuntu 14.04