Virtual private server hosting news, reviews, tips, and tutorials from an industry-leading provider.

How to Install RapidLeech v42 on Debian or Ubuntu VPS

Posted: January 20th, 2012 | By: | Filed under: Tutorials | Tags: , , , | No Comments »

This guide will walk you through the installation of RapidLeech v42 r358 on a VPS running Debian or Ubuntu.

To begin, log in to your VPS via SSH as the root user, and run the following commands:

# apt-get -y update

# apt-get -y upgrade

Install dependencies:

# apt-get -y install apache2-prefork-dev apache2-utils apache2.2-bin apache2.2-common apache2

# apt-get -y install php5 php5-cgi php5-cli php5-common php5-curl php5-dev php5-gd php5-tidy php5-xmlrpc php5-xsl php5-suhosin php5-mcrypt php5-imap php5-imagick libapache2-mod-php5

Download RapidLeech:

# cd /var/www

# wget http://rapidleech.googlecode.com/files/Rapidleech.v42.r358.zip

Install RapidLeech:

# unzip Rapidleech.v42.r358.zip

# rm -rf Rapidleech.v42.r358.zip

# chown -hR www-data:www-data Rapidleech.v42.r358

# chmod 777 Rapidleech.v42.r358/files

# mv Rapidleech Rapidleech.v42.r358 rapidleech

Restart Apache:

# /etc/init.d/apache2 restart

RapidLeech should now be accessible at: http://xx.xx.xx.xx/rapidleech/

This article is also available in the VPS6.NET Knowledgebase:

https://vps6.net/my/knowledgebase/62/How-to-Install-RapidLeech-v42-on-Debian-or-Ubuntu-VPS.html


How to Install Nginx on CentOS with Yum

Posted: January 16th, 2012 | By: | Filed under: Tutorials | Tags: , , | No Comments »

Nginx is a popular lightweight alternative to Apache. Installing it with the yum package manager is simple:

# yum update

# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5Server/x86_64/epel-release-5-4.noarch.rpm

# yum install nginx

Start Nginx:

# /etc/init.d/nginx start

Check if Nginx is running at: http://xx.xx.xx.xx – You should see a default Nginx page.

Set Nginx to start automatically in case of reboot:

# /sbin/chkconfig nginx on

For more information, see: http://wiki.nginx.org

This article is also available in the VPS6.NET Knowledgebase:

https://vps6.net/my/knowledgebase/61/How-to-Install-Nginx-with-Yum-on-CentOS.html


How to Install Deluge Seedbox VPS on Ubuntu

Posted: January 16th, 2012 | By: | Filed under: Seedbox, Tutorials | No Comments »

Though it is one of the newest seedbox Web UIs, Deluge has proven to be a tested favorite among seeders. Deluge offers one of the most polished and efficient graphical front-ends, and is often called the fastest seedbox VPS UI. This guide will walk you through the setup of a Deluge/deluge-web VPS based on Ubuntu (recommended for 10.04 or above).

Access your VPS as the root user via SSH, and run the following commands:

# adduser –disabled-password –system –home /var/lib/deluge –gecos “Deluge server” –group deluge

# touch /var/log/deluged.log

# touch /var/log/deluge-web.log

# chown deluge:deluge /var/log/deluge*

Install Deluge:

# apt-get update && apt-get upgrade

# apt-get install deluge-common deluged deluge-web

Open the deluge-daemon file:

# vi /etc/default/deluge-daemon

Press “A” to enter edit mode, and copy in the following:

# Configuration for /etc/init.d/deluge-daemon

# The init.d script will only run if this variable non-empty.

DELUGED_USER=”deluge”

# Should we run at startup?

RUN_AT_STARTUP=”YES”

Press ESC, then type :wq and press enter to save and exit the file. Now we will create an init script for the Deluge daemon:

# vi /etc/init.d/deluge-daemon

Copy the following into the file:

#!/bin/sh

### BEGIN INIT INFO

# Provides:          deluge-daemon

# Required-Start:    $local_fs $remote_fs

# Required-Stop:     $local_fs $remote_fs

# Should-Start:      $network

# Should-Stop:       $network

# Default-Start:     2 3 4 5

# Default-Stop:      0 1 6

# Short-Description: Daemonized version of deluge and webui.

# Description:       Starts the deluge daemon with the user specified in

#                    /etc/default/deluge-daemon.

### END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

DESC=”Deluge Daemon”

NAME1=”deluged”

NAME2=”deluge”

DAEMON1=/usr/bin/deluged

DAEMON1_ARGS=”-d”             # Consult `man deluged` for more options

DAEMON2=/usr/bin/deluge-web

DAEMON2_ARGS=”"               # Consult `man deluge-web` for more options

PIDFILE1=/var/run/$NAME1.pid

PIDFILE2=/var/run/$NAME2.pid

UMASK=022                     # Change this to 0 if running deluged as its own user

PKGNAME=deluge-daemon

SCRIPTNAME=/etc/init.d/$PKGNAME

 

# Exit if the package is not installed

[ -x "$DAEMON1" -a -x "$DAEMON2" ] || exit 0

 

# Read configuration variable file if it is present

[ -r /etc/default/$PKGNAME ] && . /etc/default/$PKGNAME

 

# Load the VERBOSE setting and other rcS variables

[ -f /etc/default/rcS ] && . /etc/default/rcS

 

# Define LSB log_* functions.

# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.

. /lib/lsb/init-functions

 

if [ -z "$RUN_AT_STARTUP" -o "$RUN_AT_STARTUP" != "YES" ]

then

log_warning_msg “Not starting $PKGNAME, edit /etc/default/$PKGNAME to start it.”

exit 0

fi

 

if [ -z "$DELUGED_USER" ]

then

log_warning_msg “Not starting $PKGNAME, DELUGED_USER not set in /etc/default/$PKGNAME.”

exit 0

fi

 

#

# Function that starts the daemon/service

#

do_start()

{

# Return

#   0 if daemon has been started

#   1 if daemon was already running

#   2 if daemon could not be started

start-stop-daemon –start –background –quiet –pidfile $PIDFILE1 –exec $DAEMON1 \

–chuid $DELUGED_USER –user $DELUGED_USER –umask $UMASK –test > /dev/null

RETVAL1=”$?”

start-stop-daemon –start –background –quiet –pidfile $PIDFILE2 –exec $DAEMON2 \

–chuid $DELUGED_USER –user $DELUGED_USER –umask $UMASK –test > /dev/null

RETVAL2=”$?”

[ "$RETVAL1" = "0" -a "$RETVAL2" = "0" ] || return 1

 

start-stop-daemon –start –background –quiet –pidfile $PIDFILE1 –make-pidfile –exec $DAEMON1 \

–chuid $DELUGED_USER –user $DELUGED_USER –umask $UMASK — $DAEMON1_ARGS

RETVAL1=”$?”

sleep 2

start-stop-daemon –start –background –quiet –pidfile $PIDFILE2 –make-pidfile –exec $DAEMON2 \

–chuid $DELUGED_USER –user $DELUGED_USER –umask $UMASK — $DAEMON2_ARGS

RETVAL2=”$?”

[ "$RETVAL1" = "0" -a "$RETVAL2" = "0" ] || return 2

}

 

#

# Function that stops the daemon/service

#

do_stop()

{

# Return

#   0 if daemon has been stopped

#   1 if daemon was already stopped

#   2 if daemon could not be stopped

#   other if a failure occurred

 

start-stop-daemon –stop –quiet –retry=TERM/30/KILL/5 –user $DELUGED_USER –pidfile $PIDFILE2

RETVAL2=”$?”

start-stop-daemon –stop –quiet –retry=TERM/30/KILL/5 –user $DELUGED_USER –pidfile $PIDFILE1

RETVAL1=”$?”

[ "$RETVAL1" = "2" -o "$RETVAL2" = "2" ] && return 2

 

rm -f $PIDFILE1 $PIDFILE2

 

[ "$RETVAL1" = "0" -a "$RETVAL2" = "0" ] && return 0 || return 1

}

 

case “$1″ in

start)

[ "$VERBOSE" != no ] && log_daemon_msg “Starting $DESC” “$NAME1″

do_start

case “$?” in

0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;

2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;

esac

;;

stop)

[ "$VERBOSE" != no ] && log_daemon_msg “Stopping $DESC” “$NAME1″

do_stop

case “$?” in

0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;

2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;

esac

;;

restart|force-reload)

log_daemon_msg “Restarting $DESC” “$NAME1″

do_stop

case “$?” in

0|1)

do_start

case “$?” in

0) log_end_msg 0 ;;

1) log_end_msg 1 ;; # Old process is still running

*) log_end_msg 1 ;; # Failed to start

esac

;;

*)

# Failed to stop

log_end_msg 1

;;

esac

;;

*)

echo “Usage: $SCRIPTNAME {start|stop|restart|force-reload}” >&2

exit 3

;;

esac

 

:

Give the script proper permissions:

# chmod 755 /etc/init.d/deluge-daemon

# update-rc.d deluge-daemon defaults

You can now reboot your VPS; if everything worked, you will be able to access Deluge at http://xx.xx.xx.xx:8112 with the default password “deluge”. Enjoy!

Click here for information about Deluge Seedbox VPS templates available from VPS6.NET.

This article is also available in the VPS6.NET Knowledgebase:

https://vps6.net/my/knowledgebase/60/How-to-Install-Deluge-Seedbox-VPS-with-Ubuntu.html


How to Install VNC w/ Ubuntu Desktop on VPS

Posted: January 15th, 2012 | By: | Filed under: Tutorials, VNC Remote Desktop | No Comments »

Similar to RDP for Windows servers, Ubuntu desktop and TightVNCServer will allow you to connect to a remote desktop running on your Linux VPS. This tutorial will guide you through the setup of a basic desktop and VNC server.

Before anything, update your system:

# apt-get update

# apt-get upgrade

Install Ubuntu Desktop:

# apt-get install ubuntu-desktop

Setup gdm:

# apt-get install gdm

# /etc/init.d/gdm start

Install and configure TightVNCServer:

# apt-get install tightvncserver

# vncserver :1 -geometry 1024×768 

# vncserver -kill :1

Open the VNC configuration file with vi:

# vi  ~/.vnc/xstartup

Press “a” to enter edit mode, then add the following to the bottom of the file:

gnome-session &

Log in to SolusVM and reboot the VPS. Then, access the VPS via SSH again, and start the VNC server:

# vncserver :1 -geometry 1024×768 

You should now be able to use a desktop VNC client to access the remote desktop at:

  • IP Address: [your server's main IP]
  • Port: 1 (or 5901, 5902 for desktop :2, etc)
  • Password: [password you set earlier]

Note that some VNC clients will not have a Port setting; instead, you will need to enter IP Address: xx.xx.xx.xx:1

In case you forget your password, or want to reset it later:

# vncpasswd

This article is also available in the VPS6.NET Knowledgebase:

https://vps6.net/my/knowledgebase/59/How-to-Install-VNC-wor-Ubuntu-Desktop-on-VPS.html


How to Setup Ruby on Rails for CentOS or Fedora

Posted: January 14th, 2012 | By: | Filed under: Tutorials | Tags: , , | No Comments »

This tutorial will guide you through setting up a basic Ruby on Rails environment, installing:

  • Ruby 1.8.7
  • RubyGems 1.8.15
  • Rails 3.1.3
  • Sqlite3
This tutorial was written for CentOS, Fedora, and other EL-based systems.
To start, log in to your VPS via SSH and update your system:
# yum update
Install Ruby:
# yum install ruby ruby-devel ruby-irb ruby-rdoc ruby-ri
Check the version installed:
# ruby -v
Install RubyGems:
# mkdir ~/sources
# cd ~/sources
# wget http://rubyforge.org/frs/download.php/45905/rubygems-1.3.1.tgz
# tar xzvf rubygems-1.3.1.tgz
# cd  rubygems-1.3.1
# ruby setup.rb
Update RubyGems:
# gem update –system
Install Rails:
# gem install rails
Install Sqlite3:
# yum install sqlite-devel
# gem install sqlite3-ruby
Install Postfix and Subversion:
# yum install postfix subversion -y
You should now have an updated and functional RoR environment!
This article is also available in the VPS6.NET Knowledgebase:
https://vps6.net/my/knowledgebase/57/How-to-Setup-Ruby-on-Rails-for-CentOSorFedora-VPS.html

 


How to Update Your VPS Timezone

Posted: January 9th, 2012 | By: | Filed under: Security & Optimization, Tutorials | Tags: , | No Comments »

You may find that your virtual server’s default timezone is not the timezone you (or your users) reside in. Updating your timezone is simple:

First, log in to your VPS as the root user via SSH, then run the following command to list all available timezones (there will be many):

# find /usr/share/zoneinfo/

You can use grep to refine the search:

# find /usr/share/zoneinfo/ | grep -i turkey

Once you have selected a timezone, create a symbolic link to /etc/localtime:

# ln -f -s /usr/share/zoneinfo/CST6CDT /etc/localtime

To verify the timezone change, use date:

# date

That’s it! Your new timezone should be set.

This article is also available in the VPS6.NET Knowledgebase:

https://vps6.net/my/knowledgebase/53/How-to-Update-VPS-Timezone-OpenVZ.html


How to Install VNC w/ GNOME on Debian VPS

Posted: January 8th, 2012 | By: | Filed under: Tutorials | Tags: , , | No Comments »

VNC is a desktop sharing system that will allow you to connect to a Linux desktop from your home PC, for easy remote management of your VPS. This walkthrough will guide you through the installation of a VNC server on Debian.

Before starting, log in to your VPS as the root user, and run the following:

# apt-get update

# apt-get upgrade

1. Install GNOME:

#apt-get install gnome-desktop-environment

2. Install some required fonts:

# apt-get install xfonts-100dpi

# apt-get install xfonts-100dpi-transcoded

# apt-get install xfonts-75dpi

# apt-get install xfonts-75dpi-transcoded

# apt-get install xfonts-base

3. Install the VNC server:

# apt-get install tightvncserver

4. Start TightVNCServer for the first time, it will copy config files and prompt you for a password:

# tightvncserver :1

5. Stop the VNC server, for additional configuration:

# tightvncserver -kill :1

6. Edit the xstartup file:

# vi ~/.vnc/xstartup

Press “A” to enter edit mode. Replace the contents of the file with the following (or edit to match):

#!/bin/shxrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# x-window-manager &

gnome-session &

Press ESC, type :wq, then press enter to save and close the file.

7. Start the VNC server with your desired resolution:

# tightvncserver -geometry 1024×768 :1

You can now use a desktop VNC client to access your server’s GNOME desktop. In your VNC client (TightVNC, for example), enter your server’s main IP address, Port 1 (or 5901, alternately), and the password you set earlier to connect to the desktop.

This article is also available in the VPS6.NET Knowledgebase:

https://vps6.net/my/knowledgebase/52/How-to-Install-VNC-wor-GNOME-on-Debian-or-Ubuntu-VPS.html


How to Check VPS Memory/RAM Usage

Posted: January 8th, 2012 | By: | Filed under: OpenVZ, Security & Optimization, Tutorials, Xen | Tags: , , | 1 Comment »

In the course of monitoring your VPS, one of the first things you will want to check is RAM (memory usage). Linux includes a few easy-to-use tools, including free and ps, described here:

The simplest memory reporting tool is free. To use it, simply run:

# free -m

You will see an output like this:

total       used       free     shared    buffers     cached
Mem:           512        462         49          0         46        127
-/+ buffers/cache:        287        224
Swap:         2047          0       2047
The most important figure to look at is the value under “used” in the “buffers/cache” row. This will tell you how much RAM your processes are currently using, in megabytes. Memory fork errors will occur if the total amount of memory and swap space is lower than this number. To see how much RAM is free, check the “free” column in the “buffers/cache” row.
Another useful tool is ps, which will show you the percent of total RAM used by each running process:
# ps aux
Sample output:
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1  10368   632 ?        Ss   Jan07   0:00 init [3]
root         2  0.0  0.0      0     0 ?        S<   Jan07   0:00 [migration/0]
root         3  0.0  0.0      0     0 ?        SN   Jan07   0:00 [ksoftirqd/0]
This article is also available in the VPS6.NET Knowledgebase:
https://vps6.net/my/knowledgebase/51/How-to-Check-VPS-MemoryorRAM-Usage-with-SSH.html

How to Import/Export MySQL Databases with SSH

Posted: January 8th, 2012 | By: | Filed under: Tutorials | Tags: , | No Comments »
To export a MySQL database, access your VPS via SSH and run:
# mysqldump -u username -p database_name > dumpfile.sql
To import a MySQL Database, run:
# mysql -u username -p database_name < dumpfile.sql
This article is also available in the VPS6.NET Knowledgebase:
https://vps6.net/my/knowledgebase/37/How-to-ImportorExport-MySQL-Databases-with-SSH.html

How to Update MySQL Root/User Password

Posted: January 8th, 2012 | By: | Filed under: Tutorials | Tags: , | No Comments »

If MySQL is installed, but you have never set a root password, you can do so by running this command via SSH:

# mysqladmin -u root password NEWPASSWORD

To update the root password for MySQL from an existing password, use the following instead:

# mysqladmin -u root -p’oldpassword’ password newpass

To update the password of a MySQL user besides root:

# mysqladmin -u vivek -p oldpassword password newpass

 

This article is also available in the VPS6.NET Knowledgebase:

https://vps6.net/my/knowledgebase/36/How-to-Change-MySQL-RootorUser-Password.html