Install and Run UnixBench on CentOS or Debian VPS

UnixBench is a popular server benchmarking tool. To install and run UnixBench, just do the following (for CentOS):

# yum install gcc gcc-c++ make libXext-devel

# wget -c http://byte-unixbench.googlecode.com/files/unixbench-5.1.2.tar.gz

# tar xvzf unixbench-5.1.2.tar.gz

# cd unixbench-5.1.2

# make

# ./Run

UnixBench should begin running tests and output a final score. For Debian/Ubuntu:

# apt-get install libx11-dev libgl1-mesa-dev libxext-dev perl  perl-modules make

# wget http://byte-unixbench.googlecode.com/files/unixbench-5.1.2.tar.gz

# tar xvf unixbench-5.1.2.tar.gz

# cd unixbench-5.1.2

# ./Run

Posted in Uncategorized | Tagged , , | Comments closed

How to use Ping and Traceroute Commands

“Ping” and “traceroute” are two common commands that can be executed to determine information about a hostname or IP address (like the IP address of your VPS). Ping will tell you if a server is online and responding, as well as the speed (latency) of the response:

1. Open a shell, either by logging into your VPS with SSH or by using a program like Terminal or, for Windows, Putty.

2. Type the following, replacing 127.0.0.1 with the destination IP (or domain name):

 

# ping 127.0.0.1

 

A traceroute, appropriately, traces the route taken from your local machine (wherever the traceroute is executed from) to the destination host:

 

# traceroute 127.0.0.1

Posted in Uncategorized | Tagged , , , | Comments closed

Internet Security Risks at an All-Time High

When you talk about code problems and bugs affecting billions of users across the globe, you know you are dealing with a serious issue.

Earlier this year, Google Security, along with the Finnish security firm Codenomicon, realized there was a major issue concerning OpenSSL software. It all started on the last day of 2011, when new code created by German engineer Dr. Robin Seggelmann was added to OpenSSL.

There was a programming error within Seggelmann’s code, and it occurred in an area where security mattered.

“It was not intended at all, especially since I have previously fixed OpenSSL bugs myself, and was trying to contribute to the project,” Seggelmann said.

Regardless of the intent, the error resulted in the Heartbleed bug on OpenSSL software that allowed hackers to eavesdrop and monitor secure communications. Desktop browsing became an instant concern for fear of users visiting sites that had fake server code. Mobile devices soon followed, “Yet little attention has been paid to the global problem of 40-60 billion active smartphone applications that may share some of those same servers or connect to their own group of servers that may also be compromised,” reported Bob Egan from Forbes.com.

So what does all this mean for your Internet and hosting security? At the end of the day it all comes down to your actual provider and the built in firewalls and security options already in place. At VPS6.net, we only use the fastest hardware and technology on our VPS6 Supernodes, so you know you are always getting the most reliable service at a price that works with your budget. VPS6.net offers seamless scalability and around the clock support, so no matter the issue, your hosting service will continue to work for you.

Sources: PCWorld.com, Forbes.com

Posted in Uncategorized | Comments closed

How to Update VPS Timezone (OpenVZ)

Your OpenVZ will reflect the host server’s time settings by default; however, it is possible to configure your VPS to use a custom timezone, such as the one you (or your users) reside in.

To set your server’s timezone, first log in as the root user via SSH, then run the following command to list all available timezones:

# 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

Posted in Uncategorized | Tagged , , , | Comments closed

How to Check CPU Info with SSH on Linux VPS

To check the CPU allocation and information on your VPS, simply log in to SSH as root, and run the following command:

# cat /proc/cpuinfo

Posted in Uncategorized | Tagged , , | Comments closed

How to Install WHM/cPanel on RHEL or CentOS VPS

To install cPanel, run the following commands while logged in to your VPS as the root user:

# cd /home

# wget -N http://httpupdate.cpanel.net/latest

# sh latest

Installation usually takes 1-2 hours. Once complete, the WHM Setup Wizard will be accessible at http://xx.xx.xx.xx:2086 (login with the root login for your VPS).

Run the following script to update your license key:

# /usr/local/cpanel/cpkeyclt

Posted in VPS | Tagged , , , , | Comments closed

General Linux Shell Usage & Basic Commands

Below is a brief guide for basic usage of a Linux shell (command line). Once you’ve mastered the commands to move between directories and search for files, using a shell will become very efficient!

 

A few commands to restart common services:

 

SSH:

(CentOS) service sshd restart

(Debian) /etc/init.d/ssh restart

 

Apache:

(CentOS) service httpd restart

(Debian) /etc/init.d/apache2 restart

 

cPanel:

(CentOS) service cpanel restart

 

MySQL:

(CentOS) service mysql restart

(Debian) /etc/init.d/mysql restart

 

 

For detailed information on any of the commands below, type “man [command]” at the command line.

 

Processes

top – Displays a summary of all running processes, with CPU and memory usage for each.

kill -9 PID – Kills a process. Use ‘top’ to find the PID of a running process.

 

Search

grep root /etc/passwd – Shows all matches of root in /etc/passwd.

grep -v root /etc/passwd – Shows all lines that do NOT match root.

find /etc -name config – Lists all files in /etc containing ‘config’ in their name.

 

File Manipulation

rm filename.ext – Deletes filename.ext.

rm -f filename.ext – Deletes filename.ext, bypassing confirmation.

tar xvfz file.tar.gz – Extracts a .tar.gz file.

bzip2 filename.ext – Zips filename.ext to filename.ext.

bz2.
bunzip2 filename.ext.bz2 – Unzips filename.ext.bz2 to filename.ext

cp – Copy file.

mv – Moves a file, and can also change a filename.

chown – Change ownership permissions on a file.

 

Directory Manipulation

mkdir – Creates a new directory with the name you specify, ex. ‘mkdir downloads’

cd – Change directory, for example to move to the directory /root, do “cd /root”

ls – List all files in the current directory.

 

Network

netstat -an – Shows all open connections to the server.

ifconfig – Shows info for all configured network interfaces.

 

Misc

df -h : Displays a summary of total and used disk space.

passwd – Change your account password. If logged in as root, you can specify a user, e.g. “passwd user”

vi – A basic text editor included with all Linux distributions.

touch – Generates an empty file, ex. ‘touch index.php’ will create a blank index.php.

Posted in VPS | Tagged , , | Comments closed

How to Setup FTP with ProFTPD in Webmin

After installing Webmin on a VPS, you may be wondering how to add and configure FTP users. With Webmin it is not a one-click process, but the procedure is still fairly simple. To install proftpd and add a user, follow these steps:

 

  1. Login to webmin at http://xx.xx.xx.xx:10000 (may be https:// for Debian/Ubuntu systems)
  2. Access the Webmin Modules option via Webmin > Webmin Configuration
  3. Select Standard module from www.webmin.com
  4. Click the button on the right of that option
  5. Choose: proftpd
  6. Click Install Module
  7. On the left sidebar, after installation, click Refresh Modules
  8. Click Create a new user accessed via System > Users and Groups
  9. Provide a username for what is to be your FTP account
  10. Select Normal Password and provide a unique, complex password for the account
  11. If desired, select a custom home directory, otherwise choose Create home directory near the bottom of the options.
  12. Select New Group with same name as user
  13. Click Create

Once this is done, you should be able to access FTP with the username and password you selected, using your server’s IP address as the host.

Posted in VPS | Tagged , | Comments closed

How to Install OpenVPN on CentOS VPS

OpenVPN is an open source virtual private network (VPN) software. Follow the steps below to configure OpenVPN on CentOS:

1. Install dependencies:

# yum install gcc make rpm-build autoconf.noarch zlib-devel pam-devel openssl-devel

 

2. Get OpenVPN:

# wget http://openvpn.net/release/lzo-1.08-4.rf.src.rpm

# wget http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

 

3. Prepare to install:

# rpmbuild –rebuild lzo-1.08-4.rf.src.rpm

# rpm -Uvh /usr/src/redhat/RPMS/x86_64/lzo-*.rpm

# rpm -Uvh rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm

 

4. Install OpenVPN:

# yum install openvpn

 

5. Copy the OpenVPN directory:

# cp -r /usr/share/doc/openvpn-2.2.0/easy-rsa/ /etc/openvpn/

 

6. Build SSL keys. When prompted for key information, you can simply press enter to bypass:

#cd /etc/openvpn/easy-rsa/2.0

#chmod 755 *

#source ./vars

#./vars

#./clean-all

#./build-ca

#./build-key-server server

#./build-dh

 

7. Create the OpenVPN config:

# cd /etc/openvpn

# vi server.conf

 

Copy the following sample config into the document, edit the IP address and port to your main IP address and desired port, then press ESC, then :wq and enter to save and exit the document.

 

local 123.123.123.123 #- change it with your server ip address

port 1234 #- change the port you want

proto udp #- protocol can be tcp or udp

dev tun

tun-mtu 1500

tun-mtu-extra 32

mssfix 1450

ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt

cert /etc/openvpn/easy-rsa/2.0/keys/server.crt

key /etc/openvpn/easy-rsa/2.0/keys/server.key

dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem

plugin /usr/share/openvpn/plugin/lib/openvpn-auth-pam.so /etc/pam.d/login

client-cert-not-required

username-as-common-name

server 10.8.0.0 255.255.255.0

push “redirect-gateway def1”

push “dhcp-option DNS 208.67.222.222”

push “dhcp-option DNS 4.2.2.1”

keepalive 5 30

comp-lzo

persist-key

persist-tun

status server-tcp.log

verb 3

 

8. Start OpenVPN:

# openvpn /etc/openvpn/server.conf

Check that it returns “Initialization Sequence Completed.” If so, press ctrl-c to quit.

 

9. Setup NAT rules:

# echo 1 > /proc/sys/net/ipv4/ip_forward

# iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT –to 0.0.0.0

(Modify “0.0.0.0” to your server’s IP)

 

Create a user to login to the VPN with:

#useradd username -s /bin/false

#passwd username

 

10. Create an OpenVPN config file on your local machine with name vpn1.ovpn, copy the sample below with your IP and port, and place it in your OpenVPN configurations folder:

client

dev tun

proto udp

remote 123.123.123.123 4567 #- your OPENVPN server ip and port

resolv-retry infinite

nobind

tun-mtu 1500

tun-mtu-extra 32

mssfix 1450

persist-key

persist-tun

ca ca.crt

auth-user-pass

comp-lzo

verb 3

 

11. Download ca.crt from /etc/openvpn/easy-rsa/2.0/keys to the same OpenVPN configs folder.

12. Start the VPN on the VPS:

# openvpn /etc/openvpn/server.conf

 

Log in to the VPN from your local machine (using OpenVPN or another desktop client) with the username/password you created.

Posted in VPS | Tagged , , | Comments closed

How to Install Minecraft Server on CentOS VPS

Virtual servers are the ideal hosts for minecraft servers. Setting up a Minecraft server is simple, but there are a few requirements you must double-check:

Xen-based VPS. Due to differences in how Java works with OpenVZ and Xen, a Xen server is recommended for best performance.

At least 1gb of RAM. Less will work for a small server, but 1gb or more is recommended.

CentOS operating system installed.

 

On to the Minecraft server setup:

 

1. Start by installing Java-JDK:

# yum install java-1.6.0-openjdk

2. Check if Java was installed:

# which java

The following will be displayed if it was properly installed:

# /usr/bin/java

3. Switch to the root directory, if you’re not there already:

# cd

4. Create a directory for Minecraft:

# mkdir Minecraft

5. Enter the directory:

# cd Minecraft

6. Download Minecraft:

# wget http://minecraft.net/download/minecraft_server.jar

7. CHMOD the Minecraft .jar like so:

# chmod +x minecraft_server.jar

8. Minecraft is now installed. You’ll now need to install “screen” to keep the Minecraft server running after the SSH session is closed.

# yum install screen

9. Use the screen and run Minecraft. Enter screen:

# screen

10. Start up Minecraft (you can edit the 1024M value to match your server’s RAM):

# java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

To get back to the normal screen, press these keys: Control+A+D

To get back to the screen where Minecraft is running:

# screen -r

You should now be off and running with a fully functional Minecraft server!

For a guide to configuring your new Minecraft VPS, see: https://vps6.net/my/knowledgebase/44/How-to-Configure-Minecraft-Server.html

We offer CentOS+Minecraft templates pre-configured with Minecraft and McMyAdmin: https://vps6.net/template-minecraft.php

Posted in VPS | Tagged , , | Comments closed