Jump to content

Recommended Posts

Posted

So I had my first attempt at using a VPS the other day and my god it just left me in the dust. I'm someone that taught myself how to set up my own websites on a normal shared hosting account with the odd google if I couldn't find something but this completely threw me off so much that I've since left it alone.

 

The worse thing about it is that I was excepting to find a guide on 'Introduction to your VPS' somewhere out there on the internet but it was nowhere to be found and suddenly all I have is a button to start, restart and shutdown my VPS.

 

:pinch:

Posted

It was a Linux and I voted to get cPanel included in my package. I was attempting to follow a guide onto how to compile a program but these commands just didn't seem to appear from anywhere. I couldn't even get the website to setup properly.

Posted

I actually got rid of it. I payed for the month but I couldn't get my head around it and gave up with that idea.

Posted

I don't host anything anymore. It was a half educational half fun little trial for me to see if i could get the VPS to work with that program.

Posted

The worse thing about it is that I was excepting to find a guide on 'Introduction to your VPS' somewhere out there on the internet but it was nowhere to be found and suddenly all I have is a button to start, restart and shutdown my VPS.

 

Ditto.

 

I was honestly shocked by the appalling lack of information most hosts provide for VPS. The documentation generally looks like it was written by a geek with the language skills of a hedgehog: they know what they're talking about but I'm buggered if they can express it in any kind of useful way. And that just makes it worse because they're so vague, you're never sure if you're doing the right thing.

 

Someone write a proper guide, send it to me for checking and editing and we'll make a mint selling the ebook. ;)

Posted

My host made it very clear that if it was unmanaged as long as it was connected to the internet then they wouldn't step in.

The only guides they gave us were:

What is a VPS?

A VPS is a Virtual Private Server, which contains most of the same functionality as a dedicated server without the cost. A VPS is essentially, in highly general terms, similar to a Windows partition of your hard disk. VPSs are better than a shared hosting account, because they offer the freedom to install your own versions of the software you need, with as little or as many features as you desire.

Even if you were to max out the resources on your VPS, the other users with VPSs on the same host server would not be affected in any way.

What can I do with my VPS?

Well, to start, you can host things like your own IRC server. Many users purchase a VPS in order to create custom installs of PHP, MySQL and Apache which allow for more flexibility than a shared hosting account; mainly because a shared hosting account has to provide features to many users and thus must be able to cater to most general needs of each user, and cannot possibly be configured to meet each users needs. When you use a VPS, you have the freedom to do what wish, enable or disable what you want or don't want, and more. You can do whatever you want with your VPS, so long as it does not break the law.

 

Are there Disadvantages to a VPS?

There are a few disadvantages to running a VPS. The biggest, and most obvious, is the learning curve involved for users who are native to Windows, or some other GUI based operating system. Purchasing a VPS is a big step in your Internet repituar, and must be approached tenderly.

x10Hosting provides only unmanaged VPSs, which means that we cannot provide support for any third party scripts, aplications, or software, and and are only able to provide support for hardware issues and if you should accidentally lock yourself out of your VPS. For you, the end-user, means that you should be fairly familiar with Unix and working at the command line.

However, there are some options for our users who are new to Unix. The first, and most obvious, is to open Google in your Web browser, and search for "Unix Tutorials" or "Getting Started In Unix". Read a few articles, check out Freenode (irc.freenode.net) for channels geared toward helping people with Unix or *nix based systems. Many of the basic *nix management commands remain similar from operating system to operating system.

Another such option for those users who have simply out-grown their shared hosting account, is to install a control pannel such as cPanel, which x10 offers for only a few extra dollars a month for the licensing. This is ideal if you're only looking to manage a few Websites and don't plan on delving into working at the Shell. However, it is important to understand that issues may arise outside of cPanel's limited realm of capabilities, wherein you will have to delve into the woeful world of SSH and the shell. The best advice we can give you here at x10 is to learn first, to save yourself the hassel in the future.

NOTICE:

x10Hosting does not suppport any third party software. This KB article is intended for reference use only. We do not support our VPSs beyond hardware. We will not offer help on these commands. To get help on these commands, use the help system included with your OS, by typing man command orcommand --help.

A few commands to help out on the command line / SSH login

 

ls Displays everything in the current directory

ls -a Displays all files, including hidden

ls -l Displays all files, along with the size and timestamp

tar -zxpf Uncompresses tar.gz files

tar -xpf Uncompresses .tar files

gunzip Uncompresses .gz files

cp /path/to/old /path/to/new Copies a file to a new file

mv /path/to/old /path/to/newMoves a file to a new file, or rename

mkdir Creates a directory

rmdir Deletes a directory

rm Deletes a file

rm -rf Deletes a directory

cd /path/to/dir Moves to a directory

cd .. Move up one directory

cd ~ Moves to your home directory

cd - Moves to the previous directory

pwd Displays the present working directory (the one you're in)

pico Edits a file

ftp Connect to a FTP server

lynx View a webpage

df Displays the hard drive stats

quota Displays your quota

uptime Displays the uptime of the server

uname -a Displays the operating system stats

whoami Displays your info

who Displays others connected to the server

last Displays the last login

whereis Tells where a file is located

BitchX IRC Client

mail Check your email

ps -x Displays processes your running

ps -a Displays all processes running

ps -ux Displays running processes, with CPU/Memory usage

kill pid# Kills a process

kill -9 pid# Kills an eggdrop process

killall proc_name Kills all running process of the same type

whatis Description of commands

man command Displays help on the command (manual)

nano Same as Pico (Use yum install nano if it doesn't first work)

Top - gives an overall view of what is going on with the server including memory usage, serve load and running processes "q" to exit top

sar -q gives a report of the process list, 1 minute and 5 minute average load every 10 minutes since midnight server time

tar -zcf filename.tar.gz file Tars up the file or directory of your choice, replacefilename.tar.gz with the name you want your tar file to have...with the tar.gz extension on the end and replace file with the file or directory you want to tar up. Can also use a path/to/file for both.

updatedb - Updates the locate/search DB.

 

netstat -n -p

Useful to see who is connected to your server, this also resolves hostnames to IP addresses and the -p switch shows you what each person connected is doing and provides a PID for it if there is one... useful if you need to kill something

 

find / -user username

Replace username with a username of one of your account to find all the files that belong to them. Also useful to add the |more switch so you can scroll one screen at a time. Ever have a client who seems to show a lot more files than are actually in their home directory? This is how you find those files and fix them. Common problem is cpmove files that don't get properly deleted and get added to a users account.

 

/scripts/pkgacct2 username

Replace username with a user on your system. This should be done from the home directory. Useful for manually backing up an account if whm copy account doesn't work. Then just move (mv) the file to a home directory accessible via the web and

chown user.user filename

and chmod to 750 or 755 and you can wget it from a different server if need be.

 

/scripts/restorepkg username

Once you've got the file and need to unpack it you use this command. The file should be in the /home directory to use this though. Remember folks.... username.... not cpmove-username.tar.gz

 

crontab -e

edit the crontab file and see what is set to run in there.

 

--help (add to end of the command following a single space)

Such as tar --help, similar to man it digs up info on any given command.

 

tail -10 filename

gives you the last 10 lines of a file. Can change the # to whatever you want.

 

cp -R FileOrDirectory path/to/destination

the -R allows you to copy an entire directory to somewhere else.

 

kill -9

not just for eggdrops... it's called a "hard kill" and handy for killing off any stubborn process that refuses to die.

whereis filename (use the * as a wildcard or for broader search)

can also use locate or find (although locate is faster)

 

killall

not just for killing programs.. you can also killall to kill all processes being run by a user. Handy if you have an abuser eating up system resources.

 

 

RESTART SERVICES:

 

service servicename restart

 

Stop a service:

service servicename stop

 

Start a service:

service servicename start

 

Status (doesn't work on all):

service servicename status

 

On a RedHat CPanel server, here are the useful services: (CentOS, x10's default OS for VPSs, is a stripped-down RedHat OS.)

bandmin

chkservd

cpanel

crond

exim

httpd

mysql

named

proftpd

 

CRON INFO:

Root crontab: (can be used by any user with crontab permissions to edit their crontab. If you are running this as "root" it will edit root's crontab, and the same goes for any other user. When "bob" runs crontab -e, he will edit his own crontab and not root's, though he can only edit his own crontab if he has permissions.)

 

crontab -e

 

To edit a users cron jobs: (run as a super-user, such as root. not available to regular users.)

 

crontab -u username -e

 

Replace username with the actual username of the client you want to edit.

 

(We're still talking about RedHat [CentOS] that is running cPanel below. You can do most, if not all, of this from the WHM, so feel free to skip ahead a bit. :P)

/scripts/adddns Add a Dns Entry

/scripts/addfpmail Install Frontpage Mail Exts

/scripts/addservlets Add JavaServlets to an account (jsp plugin required)

/scripts/adduser Add a User

/scripts/admin Run WHM Lite

/scripts/apachelimits Add Rlimits (cpu and mem limits) to apache.

/scripts/dnstransfer Resync with a master DNS Server

/scripts/editquota Edit A User's Quota

/scripts/finddev Search For Trojans in /dev

/scripts/findtrojans Locate Trojan Horses

 

Suggested Usage:

/scripts/findtrojans < /var/log/trojans

/scripts/fixtrojans < /var/log/trojans

/scripts/fixcartwithsuexec Make Interchange work with suexec

/scripts/fixinterchange Fix Most Problems with Interchange

/scripts/fixtrojans Run on a trojans horse file created by findtrojans to remove them

/scripts/fixwebalizer Run this if a user's stats stop working

/scripts/fixvaliases Fix a broken valias file

/scripts/hdparamify Turn on DMA and 32bit IDE hard drive access (once per boot)

/scripts/initquotas Re-scan quotas. Usually fixes Disk space display problems

/scripts/initsuexec Turn on SUEXEC (probably a bad idea)

/scripts/installzendopt Fetch + Install Zend Optimizer

/scripts/ipusage Display Ipusage Report

/scripts/killacct Terminate an Account

/scripts/killbadrpms Delete \"Security Problem Infested RPMS\"

/scripts/mailperm Fix Various Mail Permission Problems

/scripts/mailtroubleshoot Attempt to Troubleshoot a Mail Problem

/scripts/mysqlpasswd Change a Mysql Password

/scripts/quicksecure Kill Potential Security Problem Services

/scripts/rebuildippool Rebuild Ip Address Pool

/scripts/remdefssl Delete Nasty SSL entry in apache default httpd.conf

/scripts/restartsrv Restart a Service (valid services: httpd,proftpd,exim,sshd,cppop,bind,mysql)

/scripts/rpmup Syncup Security Updates from RedHat/Mandrake

/scripts/runlogsnow Force a webalizer/analog update.

/scripts/secureit Remove non-important suid binaries

/scripts/setupfp4 Install Frontpage 4+ on an account.

/scripts/simpleps Return a Simple process list. Useful for finding where cgi scripts are running from.

/scripts/suspendacct Suspend an account

/scripts/sysup Syncup Cpanel RPM Updates

/scripts/ulimitnamed RH 6 only. Install a version of bind to handle many many zones.

/scripts/unblockip Unblock an IP

/scripts/unsuspendacct UnSuspend an account

/scripts/upcp Update Cpanel

/scripts/updatenow Update /scripts

/scripts/wwwacct Create a New Account

 

Delete MRTG

rpm -e --nodeps `rpm -qa|grep mrtg`

 

Empty /tmp folder

rm -R -f /tmp/c*

rm -R -f /tmp/s*

rm -R -f /tmp/p*

rm -R -f /tmp/*_*

rm -R -f /tmp/*-*

 

Source: http://support.vaserv.com/index.php?_m=knowledgebase&_a=viewarticle&kbarticleid=20&nav=0,9

From https://clients.x10hosting.com/knowledgebase.php

 

Now to me, a new user to VPS I had no idea what I was getting myself into.

  • Administrators
Posted

Ditto.

 

I was honestly shocked by the appalling lack of information most hosts provide for VPS. The documentation generally looks like it was written by a geek with the language skills of a hedgehog: they know what they're talking about but I'm buggered if they can express it in any kind of useful way. And that just makes it worse because they're so vague, you're never sure if you're doing the right thing.

 

Someone write a proper guide, send it to me for checking and editing and we'll make a mint selling the ebook. ;)

An ebook on just how to setup a VPS through GoDaddy? I could do that easily, but my way of putting words on paper is not as much.

 

If you really are interested in proofing and making it read better I would definitely write it and split with you.

Posted

No, a guide to setting up your VPS. Not necessarily through GoDaddy. All the stuff about choosing a hostname, DNS A records, NS settings, why each domain has to have a separate login to cPanel/WHM (do they?) and all that other incredibly confusing stuff that is the basic setup to attach a domain name to a server and make everything usable.

 

The biggest part of the problem - from my point of view as a fairly solid techie who has nonetheless never done networking - was the simple fact that they say things like "You can change your hostname here". That's phenomenally unhelpful because the fundamental assumption is that the reader KNOWS what the hostname is and what it's used for. A newbie instantly thinks: Should I change it? Must I change it? What happens if I do or don't? What's the hostname got to do with the domain name? Or with anything else?

 

The lack of clarity, guidance and background info is frightening, to be honest. And even if you go out looking on Google, there's almost nothing available that wasn't written by a tech-head who makes precisely the same sweeping assumptions.

 

And yes, I'd happily edit you if you want to write it. But it ain't a small job because there's a LOT of background needed. Guides should always be more than "click this, click that" - they should explain what you're doing, why you're doing it and the consequences of the action. :D

Posted

It actually isn't really hard if there's someone with you and helping you how to use one. I got a VPS a couple weeks ago and now I'm loving how I can do almost everything on it!

Posted

It actually isn't really hard if there's someone with you and helping you how to use one. I got a VPS a couple weeks ago and now I'm loving how I can do almost everything on it!

How did you find out how to do everything you needed? Is it a managed or unmanaged? And did you have prior knowledge before logging into it for the first time?

Posted

My mistake. VPS is a whole new ball game compared to setting up a local web server.

 

It's like comparing space invaders and space travel.

Posted

How did you find out how to do everything you needed? Is it a managed or unmanaged? And did you have prior knowledge before logging into it for the first time?

 

Well it's unmanaged supposedly but they have a toll free number. I call each time I need help so I guess you can say it's managed. :P

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...