How To Install Lighttpd on Ubuntu 14.10

Install Lighttpd on Ubuntu

Lighttpd is a fast and secure web-server which has been optimized for high-performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, SCGI, Auth, Output-Compression, URL-Rewriting and many more) lighttpd is the perfect solution for every server that is suffering load problems. 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. Here’s a brief tutorial will explain you the installation of Lighttpd web server on Ubuntu.

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

Install Lighttpd on Ubuntu 14.10

Step 1. Installing Lighttpd.

Lighttpd is available to install from the official Ubuntu repositories, So if you want to install Lighttpd, you only have to run this command.

 sudo apt-get install lighttpd

Step 2. Installing PHP5 and modules.

Ubuntu provides a FastCGI-enabled PHP5 package. We can install by issuing the following command.

 sudo apt-get install php5-cgi php5-mysql

Enable fast-cgi support.

sudo lighttpd-enable-mod fastcgi
sudo lighttpd-enable-mod fastcgi-php

Step 3. Start Lighttpd server.

 /etc/init.d/lighttpd force-reload

Step 4. Testing Lighttpd webserver.

To make sure everything installed correctly we will now test Lighttpd to ensure it is working properly. Open up any web browser and then enter the following into the web address:

 http://localhost/ or http://your.ip.addr.ess

lighttpd-ubuntu

Note: Lighttpd’s default document root is /var/www on Ubuntu, and the configuration file is /etc/lighttpd/lighttpd.conf. Additional configurations are stored in files in the /etc/lighttpd/conf-available.

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

You Might Also Like: How To Install Lighttpd on CentOS

How To Install Fail2Ban on Ubuntu

Install Fail2Ban on Ubuntu

Fail2Ban is a utility that is used to detect and prevent brute force intrusion. By scanning logs for certain actions, such as repeated failed login attempts, Fail2Ban is able to alter firewall configurations to halt further events. 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. Follow guide how to install Fail2Ban on Ubuntu.

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

Install Fail2Ban on Ubuntu

Step 1. First log-in as root user and enter the following command to install Fail2ban.

 apt-get install fail2ban

Step 2. Once that has finished, go ahead and create your “local” jail (this is where you define your overrides of jail.conf). You can read more about jails here.

 cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local

Step 3. Setup Fail2ban default configuration.

 nano /etc/fail2ban/jail.local

Now, you will see default section with some basic rules that are followed by fail2ban itself. If you want to add some extra layer of protection to your server, then you can customize the each rule section as per your needs. There are few lines act as basic setup you can edit as necessary to suit your need including: ignoreip, bantime, findtime, and maxretry. You can read what each line means in the explanation available there.

[DEFAULT]

# "ignoreip" can be an IP address, a CIDR mask or a DNS host. Fail2ban will not
# ban a host which matches an address in this list. Several addresses can be
# defined using space separator.
ignoreip = 127.0.0.1/8

# "bantime" is the number of seconds that a host is banned.
bantime = 600

# A host is banned if it has generated "maxretry" during the last "findtime"
# seconds.
findtime = 600
maxretry = 3

# Destination email address used solely for the interpolations in
# jail.{conf,local} configuration files.
destemail = root@localhost

Step 4. Restarting Fail2Ban service.

 service fail2ban restart

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

How To Install Webmin on Ubuntu

Install Webmin on Ubuntu

Webmin is a free control Panel for managing VPS. Webmin is a web based interface which is used to manage VPS web hosting server. With the help of webmin you can setup user account, apache, dns & file sharing and other actions. Webmin very suitable for beginners who do not know much about the unix or linux command line. For future reference, I will show you a steps to setup on Webmin on Ubuntu server.

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 Webmin on Ubuntu server.

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

Install Webmin on Ubuntu

Step 1. First add repository.

 nano /etc/apt/sources.list

Then, add the following lines:

deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib

Step 2. Fetch and install the GPG key:

sudo wget http://www.webmin.com/jcameron-key.asc
sudo apt-key add jcameron-key.asc

Step 3. Install Webmin.

Install Webmin on Ubuntu with the following command:

sudo apt-get update
sudo apt-get install webmin

Step 4. Start webmin.

 /etc/init.d/webmin start

Step 5. Finaly, we can access the webmin panel using our web browser. Webmin use 10000 as its default port. Type this into our URL address web browser. https://ip-address:10000 then login as super user or root access priviliges. If you are using a firewall, please open port 80 and 10000 to enable access to the control panel.

webmin-ubuntu-server

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

You Might Also Like: How To Install Webmin on CentOS

How To Install phpMyAdmin on Nginx

Install phpMyAdmin on Nginx

PhpMyaAdmin is the web based administration tool for managing the MySQL, MariaDB and Drizzle servers, it helps in performing databases activities such as creating, deleting ,querying , tables, columns, relations, indexes, users, permissions, etc. 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 and asume and that you already have Nginx installed on the system. You will also need php-fpm to have phpmyadmin working on Nginx.

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

Install phpMyAdmin on Nginx

Step 1. First add EPEL yum repository your system.

CentOS 6:

 rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

CentOS 7:

 rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-1.noarch.rpm

Step 2. Install phpMyAdmin using the following command.

 yum -y install phpmyadmin php

Step 3. Configure nginx to serve phpMyAdmin.

In Nginx, virtual host file can be found in /etc/nginx/conf.d directory. Lets create file called “phpmyadmin.conf”.

#nano /etc/nginx/conf.d/phpmyadmin.wpcademy.com.conf

server {
listen   80;
server_name phpmyadmin.wpcademy.com;
root /var/www/html/phpMyAdmin;
 
location / {
index  index.php;
}
 
## Images and static content is treated different
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log        off;
expires           30d;
}
 
location ~ /\.ht {
deny  all;
}
 
location ~ /(libraries|setup/frames|setup/libs) {
deny all;
return 404;
}
 
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html/phpMyAdmin$fastcgi_script_name;
}
}

Create required directory and enable Nginx virtual host for phpmyadmin.

 mkdir -p /var/www/html/phpMyAdmin

Step 4. Restart the services.

service nginx restart
service php-fpm restart


Step 5. Finally, test phpMyAdmin.

Now open your browser and surf to http://youripaddress/phpMyAdmin or http://yourdomin.com/phpMyAdmin and your phpmyadmin will ask you for user and password of your mysql installation, you can use root as user and the root mysql password, or any other mysql user/password.

phpMyAdmin-login

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

How To Install Eclipse Luna on Ubuntu 14.04

Install Eclipse Luna on Ubuntu 14.04

Eclipse is an open source and free multi-language and multi-platform (Windows , Linux and Mac) software development program that used to build JAVA based web applications. It is written in Java program and can be used to develop Java based applications and other various plugins, including languages like C, C++, PHP, Perl, Python, Ruby and Rails framework and much more.

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 and assumes you are running in the root account, if not you may need to add ‘sudo’ to the commands to get root privileges. I will show you through the step by step installation Eclipse in Ubuntu 14.04 server.

Install Eclipse Luna on Ubuntu 14.04

Step 1. First, Install Java required packages.

sudo apt-get update
sudo apt-get install openjdk-7-jdk

Step 2. Download Eclipse Luna.

Download latest eclipse package. This guide uses Eclipse IDE for Java Developers version. Another popular versions are Eclipse IDE for Java EE Developers and Eclipse for PHP Developers. Select also 32-bit or 64-bit version depending on your system:

 tar -zxvf eclipse-java-luna-SR1-linux-gtk-x86_64.tar.gz -C /opt

Making a Symlink:

 sudo ln -s /opt/eclipse/eclipse /usr/local/bin/

Step 3. Create desktop launcher.

Create a new file eclipse.desktop in /usr/share/applications/ and add the below code:

[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE;
Name[en]=eclipse.desktop

Now install that desktop file using the below command:

 sudo desktop-file-install /usr/share/applications/eclipse.desktop

For Eclipse icon to be displayed in dash, run following command:

 sudo cp /opt/eclipse/icon.xpm /usr/share/pixmaps/eclipse.xpm

Install Eclipse Luna on Ubuntu 14.04

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

You Might Also Like: How To Install Eclipse Luna on CentOS 7

How To Install Seafile on Ubuntu 14.04

Install Seafile on Ubuntu 14

Seafile is a open source cloud storage software. It offers file sharing and syncing for individual users and groups, it provides client side encryption and easy access from mobile devices. Also easily integrated with local services such as LDAP and WebDAV or can be deployed using advanced network services and databases like MySQL, SQLite, PostgreSQL, Memcached, Nginx or Apache Web Server.

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 How To Install Seafile on Ubuntu 14.04.

Install Seafile on Ubuntu 14.04

Step 1. First, you need to update the system to ensure that we have all of the latest software installed.

 apt-get update

Step 2. Install required packages.

Install LAMP:

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

Install Python modules:

 sudo apt-get install python2.7 sqlite python-simplejson python-setuptools python-imaging python-mysqldb

Step 3. Download the Seafile components.

You need to download the last relase of Seafile:

 wget https://bitbucket.org/haiwen/seafile/downloads/seafile-server_4.0.6_x86-64.tar.gz

Extract the tarball into the current directory:

 
tar xzvf seafile-server*
cd seafile-server*

Step 4. Install Seafile server.

Run this script which will create the required databases and directories for the Seafile server and and answer all questions using the following configuration options, after the script verifies the existence of all Python required modules:

 ./setup-seafile-mysql.sh

After Seafile server successfully installs, it will generate some useful information such as what ports needs to be open on your Firewall to allow external connection and what scripts to handle in order to start the server.

Step 5. Starting the Seafile services.

Create startup script for the Seafile server like this:

 #nano /etc/init.d/seafile
#!/bin/bash
# Change the value of "user" to your linux user name
user=haiwen
# Change the value of "seafile_dir" to your path of seafile installation
seafile_dir=/data/haiwen
script_path=${seafile_dir}/seafile-server-latest
seafile_init_log=${seafile_dir}/logs/seafile.init.log
seahub_init_log=${seafile_dir}/logs/seahub.init.log
# Change the value of fastcgi to true if fastcgi is to be used
fastcgi=false
# Set the port of fastcgi, default is 8000. Change it if you need different.
fastcgi_port=8000
case "$1" in
        start)
                sudo -u ${user} ${script_path}/seafile.sh start >> ${seafile_init_log}
                if [  $fastcgi = true ];
                then
                        sudo -u ${user} ${script_path}/seahub.sh start-fastcgi ${fastcgi_port} >> ${seahub_init_log}
                else
                        sudo -u ${user} ${script_path}/seahub.sh start >> ${seahub_init_log}
                fi
        ;;
        restart)
                sudo -u ${user} ${script_path}/seafile.sh restart >> ${seafile_init_log}
                if [  $fastcgi = true ];
                then
                        sudo -u ${user} ${script_path}/seahub.sh restart-fastcgi ${fastcgi_port} >> ${seahub_init_log}
                else
                        sudo -u ${user} ${script_path}/seahub.sh restart >> ${seahub_init_log}
                fi
        ;;
        stop)
                sudo -u ${user} ${script_path}/seafile.sh $1 >> ${seafile_init_log}
                sudo -u ${user} ${script_path}/seahub.sh $1 >> ${seahub_init_log}
        ;;
        *)
                echo "Usage: /etc/init.d/seafile {start|stop|restart}"
                exit 1
        ;;
esac

Add directory for log files:

 mkdir /path/to/seafile/dir/logs

Create a file /etc/init/seafile.conf:

 #nano /etc/init/seafile.conf
start on (started mysql
and runlevel [2345])
stop on (runlevel [016])

pre-start script
/etc/init.d/seafile-server start
end script

post-stop script
/etc/init.d/seafile-server stop
end script,

Make the seafile-sever script executable:

 sudo chmod +x /etc/init.d/seafile

Now try using the service and command to start a new Seafile server instance:

 service seafile start

Step 6. Accessing Seafile.

Seafile cloud storage will be available on HTTP port 8000 by default. Open your favorite browser and navigate to http://yourdomain.com:8000 or http://server-ip:8000. Enter the admin email id and password to login  which you have created at the time of installation. If you are using a firewall, please open port 8000 to enable access to the control panel.

Install Seafile on Ubuntu 14.04

Congratulation’s! You have successfully installed Seafile. Thanks for using this tutorial for installing Seafile open source cloud storage on Ubuntu 14.04 system.

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

How To Install Virtualmin on Ubuntu 14.04

install virtualmin on ubuntu

Virtualmin is an advanced web server management panel, and a very good alternative to cPanel, with the same administration structure based on root users, resellers, and clients. Once installed, you will be able to manage Apache, Nginx, PHP, DNS, MySQL, PostgreSQL, mailboxes, FTP, SSH, SSL, Subversion/Git repositories and many more.

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

Step 1. First, you need to update the system to ensure that we have all of the latest software installed.

 apt-get update

Step 2. Downloading and install Virtualmin script.

 wget http://software.virtualmin.com/gpl/scripts/install.sh

Once downloaded, do a chmod +x to make the script executable:

 chmod +x install.sh

Now it is time to running virtualmin install script. Installation will take approximately 5-15 minutes depends on your server speed and power. To do so, use the command below:

./install.sh
### During the installation it will ask you for the host name make sure you enter this correctly ###

Step 3. Accessing Virtualmin.

Virtualmin web based monitoring will be available on HTTPS port 10000 by default. Open your favorite browser and navigate to http://yourdomain.com:10000 or http://server-ip:10000. If you are using a firewall, please open port 10000 to enable access to the control panel.

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

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