UK WEB HOSTING FORUM FOR DISCUSSION ON WEB HOSTING SERVICE AND SUPPORT
LINUX HOSTING WINDOWS HOSTING PACKAGES SHOPPING CART OSCOMMERCE ZEN CART AGORA
ECOMMERCE HOSTING ASP MSSQL FRONTPAGE HOSTING PHP MYSQL HOSTING DISCUSSION FORUM
CPANEL RESELLER HOSTING DEDICATED SERVER VPS HOSTING PLESK VIRTUOZZO
Quick Search
Your forum announcement here!

  UK Web Hosting | Dedicated Server Windows and Linux VPS Forum > Technical Support > Linux Dedicated Servers

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 25-06-2008, 22:43
new member
 
Join Date: Jun 2008
Posts: 2
Default Configuring a server without using cpanel

Hi,

I've just signed up for a dedicated Linux server with eukhost and thought it might be fun to post about my experience of setting it up in the hope that it may help others in the future and those more experienced might cast their wisdom over it.

A bit about me; I'm a software developer of 20 years experience, almost all Windows based C++ - tho I do a small amount of cross-platform development (Redhat/Montavista/Windows) these days. First and only experience of installing/configuring Linux was back in 1998/9 with an Intel 486 and Kernels 2.0/2.2.. just basic installation on a home PC (no email, webserver) but did have to recompile the kernel (can't remember the reason - it was a long-time ago!)

This morning I received the welcome email... lots of information to digest.. and a few thoughts of what have I let myself in for

After reading the email the first step is to try and log in.

Don't try and telnet the Primary IP Address it doesn't work.. (on windows) you need to use something like WinSCP. After entering your username/password and Primary IP Address you can connect and browse the directories on your server.. and if your keen open a terminal (command prompt) too.

Now back to the email...

Quote:
1) Hostname:
Hostname is the name of your Dedicated Server and should point to your server's Main IP. It should be FQDN (Fully Qualified Domain Name) like server. or ns., which should be hosted on your Dedicated Server.
Please also change the hostname of the server once you are logged in.
So how to do this? Well googling threw up a very easy to follow set of instructions;

Quote:
If you want to change your server hostname you have to make changes in following file.
1) /etc/hosts
your server IP address serverfullname (like server.domainname ) shortname (server)
for example
91.186.30.32 server.eukhost.com servr
2) /etc/sysconfig/network
HOSTNAME=server.domainname
3) run following command on ssh shell to set hostname
hostname server.domainname
Back to the email to see what's next...

Quote:
) Nameservers:
You have to set the default nameservers for your Dedicated Server. These nameservers will be assigned by default to all the accounts or domains which would be created on your Dedicated Server. You may use any of the spare IP's you have for your DNS.
If you want the DNS to be the same as your domain name i.e. for instance if your domain name is myself.com & you wish to have your DNS as ns1.myself.com & ns2.myself.com, then you would have to register the DNS from the same registrar where you have registered the domain name myself.com.
If you have registered your domain name with eukhost.com, then please contact our billing department to have your DNS registered free of cost!
Must admit I haven't done this yet.. since the web site hosting is currently running on a shared server, and I can access the new server via it's IP address for the time being (got to leave something to do tomorrow!)

Next how do I install apache, MySQL Server and php? Again googling throws up a gold nugget... in the form of'

Quote:
Installing Apache, MySQL and PHP on a Linux Server in under 10 minutes

Apache, MySql and PHP; these three products are open source programs available for use on most well known operating systems. In this article I will explain how you can install Apache, MySql and PHP on a Linux box using yum in under 10 minutes.

1 - Checking and Removing Any Existing Installations of the 3 of Them

Run the following command to make sure that any existing installations of Apache, MySql or PHP are removed:

yum -y remove httpd mysqld mysql-server php

2 - Installing Apache

Run the following to install the Apache web server:

yum -y install httpd

3 - Installing MySql Server

Run the following command to install MySql Server:

yum -y install mysqld mysql-server

4 - Install PHP

Run the following command to install PHP:

yum -y install php php-mysql

5 - Installing PHP Libraries

PHP has many different libraries and add-ons which you want or need to utilize; in your case we want to install the PHP GD image library and the PHP IMAP library, to do this we’ll be using the following command:

yum -y install php-gd php-imap

Thats it - you have now AMP’d a server! All you need to do now is start the individual services, to do this run the following commands (individually):

service httpd start

service mysqld start

PHP will be seen by Apache as a library and so does not need to be started.
Within 10 minutes the installation is complete.. and time to try it out.

First I created a test.html under /var/www/html containing;

Quote:
<html>
<head>
<title>Testing</title>
</head>
<body>
<p>This is a test page )</p>
</body>
</html>
Now browse to http://<your primary ip address>/test.html

Next to test php, I created a test.php also under /var/www/html containing;

Quote:
<html>
<head>
<title>Testing</title>
</head>
<body>
<?php
for($i=0; $i<10; ++$i) {
echo "<p>This is a test $i</p>\n";
}
?>
</body>
</html>
And to see the result, browse http://<your primary ip address>/test.php

That's enough excitement for today, tomorrow I'm going to try and tackle setting up; nameservers, ftp and uploading a copy of the existing site.

Cheers
Mark

Last edited by mb7674; 25-06-2008 at 22:52.
Reply With Quote
  #2 (permalink)  
Old 25-06-2008, 22:53
eUKhost.com's Avatar
Chief Marketing Officer
 
Join Date: Sep 2005
Posts: 4,560
Send a message via AIM to eUKhost.com Send a message via MSN to eUKhost.com
Default

Mark

I'll stick this thread as information you have included will help other customers who wish to avoid control panel like cPanel. There's absolutely no need to pay £20 per month if you are going to host only 1 website hosting on your server.
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
||
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
||
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Toll Free : 0808 262 0255 || MSN : mark @ eukhost.com || AIM : eukmark
A bunch of Sheep led by a Lion is better than a bunch of Lions led by a Sheep.
__________________________________________________

Great Opportunity :: Join our
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
for FREE and earn 20% commission on each referral.
Reply With Quote
  #3 (permalink)  
Old 26-06-2008, 16:29
Junior Member
 
Join Date: May 2008
Posts: 18
Default

Quote:
Originally Posted by eUKhost.com View Post
Mark

I'll stick this thread as information you have included will help other customers who wish to avoid control panel like cPanel. There's absolutely no need to pay £20k per month if you are going to host only 1 website hosting on your server.
£20k a month wow thats an expensive version.

Cheers,
Clive.
Reply With Quote
  #4 (permalink)  
Old 26-06-2008, 22:08
eUKhost.com's Avatar
Chief Marketing Officer
 
Join Date: Sep 2005
Posts: 4,560
Send a message via AIM to eUKhost.com Send a message via MSN to eUKhost.com
Default

Quote:
Originally Posted by viking30 View Post
£20k a month wow thats an expensive version.

Cheers,
Clive.
lol. you can figure it out from time of my previous post
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
||
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
||
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Toll Free : 0808 262 0255 || MSN : mark @ eukhost.com || AIM : eukmark
A bunch of Sheep led by a Lion is better than a bunch of Lions led by a Sheep.
__________________________________________________

Great Opportunity :: Join our
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
for FREE and earn 20% commission on each referral.
Reply With Quote
  #5 (permalink)  
Old 27-06-2008, 10:09
new member
 
Join Date: Jun 2008
Posts: 2
Default

Quote:
Originally Posted by eUKhost.com View Post
Mark

I'll stick this thread as information you have included will help other customers who wish to avoid control panel like cPanel. There's absolutely no need to pay £20k per month if you are going to host only 1 website hosting on your server.

Thanks... yes 20k is a bit excessive

Round 2... nameservers, ftp and uploading the site

In my previous post I mentioned I hadn't followed the instructions to set up the nameservers... so late last night I fired off a ticket to billing (my domain was purchased via eukhost.. if yours wasn't you need to talk to the registrar of your domain name).

I've asked for ns1.mydomain.com and ns2.mydomain.com to be set up using 2 spare ip address, and got a message back saying it's done and needs time to propagate. So that's another task crossed off the list (is there anything i need to do to config the server? it's not clear from the welcome email)

Next ftp.

After the success with yum last night.. I thought more of the same please!

So running

Quote:
yum list "*ftp*"
Gives a list of all the packages containing 'ftp'.. googling shows vsftpd is the server, so to install;

Quote:
yum -y install vsftpd
Next security starts to rear its head.. I'd like to restrict access to me (so I can upload the site) and disallow ftp access by anyone else.

Also logging in as root isn't good for day to day stuff, so time to create a new user which I'll use to manage the website hosting.

Running WinSCP;

Quote:
useradd newuser
passwd newuser
i found you can't run passwd when using WinSCP as it can't cope with commands that require user input.

So instead, download puTTy and login as root then issue the 'passwd newuser' command at which point you can enter and confirm the newuser password.

As a check, you should be able to login via WinSCP with your newuser details.

Next to configure vsftpd so you can connect with your newuser details.

First edit /etc/vsfttpd/user_list

Quote:
# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
newuser
Then edit /etc/vsftpd/vsftpd.conf and change the following entries;

Quote:
anonymous_enable=NO
xferlog_file=/var/log/vsftpd.log
idle_session_timeout=600
nopriv_user=nobody
ascii_upload_enable=YES
ftpd_banner= **** WARNING - Your actions are being logged ****
pam_service_name=vsftpd
userlist_enable=YES
listen=YES
tcp_wrappers=YES
userlist_deny=NO
Now you can start the ftp

Quote:
service vsftpd start
And run up your ftp client and connect using your newuser details.

newuser only has access to the directory /home/newuser .. so my plan is to make that the root directory of the website hosting.

Log on as newuser and under /home/newuser create the following directory structure;

Quote:
mkdir web cgi-bin private logs
cd web
mkdir stats
Next to configure apache to use the new directory (rather than the default /var/www/html)

As root you need to tell apache about the new directory to use so backup a copy then edit /etc/httpd/conf/httpd.conf and change;

Quote:
ServerAdmin admin@mydomain.com
ServerName www. mydomain .com:80
DocumentRoot "/home/newuser/web"
<Directory "/home/newuser/web">
ScriptAlias /cgi-bin/ "/home/newuser/cgi-bin/"
<Directory "/home/newuser/cgi-bin/">
ErrorLog /home/newuser/logs/error_log
TransferLog /home/newuser/logs/access_log
Now restart appache

Quote:
service httpd restart
If I've got it right, you should now be able to ftp to /home/newuser .. upload your html pages to the web subdirectory, and view them via your primary ip address

Cheers
Mark

... a disclaimer: I'm not an expert in this area, this is simply what I did and may have implications. Hopefully by posting here, other experienced sysadmins may spot a flaw in what I've done. If you have please post them! Thanks.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 08:26.

 

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by Web Hosting 3.1.0
Copyright © 2001-2008, eUKhost.com. All rights reserved.

 
Site Map

VPS Hosting
VPS Hosting plans

Dedicated Server Hosting
Dedicated Server plans

Business Web Hosting
100% uptime Hosting

Cpanel Hosting
cPanel Shared Hosting

Reseller Hosting
Reseller Web Hosting

Windows Hosting
Windows Shared Hosting

Windows VPS

Windows VPS Hosting

Semi Dedicated Servers
Semi-Dedicated Hosting

Dedicated Server Mirroring
Dedicated Server Mirroring

Webhosting Knowledgebase
Frequently asked Questions

Web Hosting Blog
eUKhost Blog

Web Hosting Support
Support Helpdesk

UK Data Center
eUKhost Datacenter

Web Hosting Forum
eUKhost Forum

Support Tutorials
Online Flash Tutorials

Offsite Back-up Plans
Remote Backup Service

Customer Testimonials
eUK Customer Testimonials


knowledgebase articles

eUKhost.com Services

Pre-Sales Questions
Pre-sales FAQ's

Domain Names
Domain registration FAQ's

cPanel Hosting
cPanel Hosting FAQ's

Windows Web Hosting
Plesk Control Panel

Reseller Hosting
Reseller Hosting FAQ's

VPS Hosting
Virtual Private Server

Semi-Dedicated Servers
Semi-Dedicated FAQ's

Dedicated Servers
Dedicated Server Hosting


popular blog categories


Web Hosting
Website Hosting articles

UK Web Hosting
UK Hosting articles

Dedicated Server Hosting
Dedicated Server guidelines

VPS Hosting
VPS hosting articles

cPanel Hosting
cPanel Hosting articles

Linux Operating System
Linux Operating techniques

Windows Web Hosting
Windows plesk articles