How to setup your Linode with Red Hat Linux Small

How to setup your Linode with Red Hat Linux Small

by Craig Spurrier of Craigweb

Step One

Add to your Apt sources list theFedora Legacy Project updates.

joe /etc/apt/sources.list

Add````
rpm http://download.fedoralegacy.org/apt redhat/9/i386 os updates legacy-utils

to /etc/apt/sources.list

Save(Ctrl-K S) and Exit(Ctrl-C).

****Step Two****

Update the sources file

Run

apt-get update

****Step Three****

Upgrade to the lastest version of any installed programs.

Run

apt-get upgrade

****Step Four****

Update your hostname

echo yourdomainnamehere >/etc/hostname

````
 /bin/hostname -F /etc/hostname 

Step Five

wget http://dag.wieers.com/packages/perl-Net-SSLeay/perl-Net-SSLeay-1.25-1.0.rh9.dag.i386.rpm

rpm -Uvh perl*

Step Six

Test your install

 perl -e 'use Net::SSLeay' 

No output means success.

Step SevenInstall Webmin

Install Webmin

wget http://aleron.dl.sourceforge.net/sourceforge/webadmin/webmin-1.180-1.noarch.rpm
rpm -Uvh webmin*

Step Eight

On your local computer point your web browser to https://yourdomain.com:10000 login as root.

Goto networking –> Network Configuration --> DNS Client change your hostname to your domain name.

Step Nine

Click Servers –> Apache and follow the prompts

Click Start Apache (at the top)

Step Ten

On your local computer point your web browser to http://yourdomain.com you should see a test page if you do your website is now working.

Step Eleven

Set Apache to start on boot.

Click on System –> Bootup and Shutdown. Put a chek by httpd and click start select on boot.

Step Twelve

Set up E-mail, Virtualmin, Ftp, Etc.

Rebooting may be required on some Linodes.

Fixed a few problems

31 Replies

I don't get it - why do you uninstall the openssl package and then custom compile a different version?

There is a bug in Net::SSLeay/Red Hat that requires Net::SSLeay and OpenSSl installed from source not RPM for Net::SSLeay. Net::SSLeay was the easiest (only?)way to use Webmin in SSl mode.

@mcowger:

Stunnel?
:? I am not sure what you are asking (commenting?) by Stunnel.

From looking at the Stunnel site it looks like it to would allow secure access, but it does not seem as if it would be as easy as using Net::SSLeay. If the question is why do we install it in step ten, it is because we removed it as a dependency in step six.

First, thanks for such an easy-to-follow method for getting the initial groundwork done.

A couple of notes…

  • Step 4: the link to Webmin doesn't work for me. I had to use something like http://aleron.dl.sourceforge.net/source … noarch.rpm">http://aleron.dl.sourceforge.net/sourceforge/webadmin/webmin-1.130-1.noarch.rpm . The prdownloads link is a link to the main "Select a Mirror" page for me.

  • Step 9: When I test with perl -e 'use Net::SSLeay', it appears as though nothing happens – is this the proper behavior to expect here?

  • Step 10: For anyone copying/pasting in step 10, the whitespace after openssh-server needs to be deleted and replaced with a single blank space -- there are additional characters in there that cause apt-get to report that openssh-server does not exist.

  • Step 11: This step is apparently redundant, as proftpd is one of the items listed in Step 10, so executing this just results in an alert that proftpd is already installed.

  • Finally, even though I followed the instructions and was doing so with a fresh Red Hat 9 (Small) setup, trying to access https://mylinodeFQDN:10000 was unsuccessful. I had to first reboot for it to be accessible.

If you are just downloading it via website, easiest thing for me to remember is going to www.webmin.com and clicking on the download link (which points to http://prdownloads.sourceforge.net/weba … noarch.rpm">http://prdownloads.sourceforge.net/webadmin/webmin-1.130-1.noarch.rpm)

@Wespionage:

  • Step 4: the link to Webmin doesn't work for me. I had to use something like http://aleron.dl.sourceforge.net/source … noarch.rpm">http://aleron.dl.sourceforge.net/sourceforge/webadmin/webmin-1.130-1.noarch.rpm . The prdownloads link is a link to the main "Select a Mirror" page for me.

The link in step four had an extra space, I have now fixed that, it should work now.

@Wespionage:

  • Step 9: When I test with perl -e 'use Net::SSLeay', it appears as though nothing happens – is this the proper behavior to expect here?
    I think so. If any one with more Perl knowledge can say for sure it would be great.

@Wespionage:

  • Step 10: For anyone copying/pasting in step 10, the whitespace after openssh-server needs to be deleted and replaced with a single blank space – there are additional characters in there that cause apt-get to report that openssh-server does not exist.
    Thank You, I have remove the space.

@Wespionage:

  • Step 11: This step is apparently redundant, as proftpd is one of the items listed in Step 10, so executing this just results in an alert that proftpd is already installed.
    You are right, I have removed Step 11.

@Wespionage:

  • Finally, even though I followed the instructions and was doing so with a fresh Red Hat 9 (Small) setup, trying to access https://mylinodeFQDN:10000 was unsuccessful. I had to first reboot for it to be accessible.
    I guess I got lucky when I did it, I did not have to reboot when I set up my system I have added a note to the original post about it.

hi,

after following the steps above, to which domain name servers should i update at my registrar's (namesdirect.com) website?

thanks,

  • hoan

@bridgein:

hi,

after following the steps above, to which domain name servers should i update at my registrar's (namesdirect.com) website?

thanks,

  • hoan

The directions above do not cover DNS. You will need to either set up your own DNS server or use one of many good free services (Zoneedit.com). From a quick look at namesdirect site they do not appear to offer this service. When you have DNS set up either using your own DNS server or using a service you whould enter the information provide by the service the ip address of your DNS server.

@CSpurrier:

@Wespionage:

  • Step 9: When I test with perl -e 'use Net::SSLeay', it appears as though nothing happens – is this the proper behavior to expect here?
    I think so. If any one with more Perl knowledge can say for sure it would be great.

That's correct: no output means success. If it couldn't find and load Net::SSLeay, you'd get an error message. That doesn't mean the that module works, of course, just that perl can find and load it.

Thanks for the tutorial, but i'm a real newbie to linux server and i've a problem at the first line!!! :(

i've a lot of error, it look like the server can't connect to internet:

Failed to fetch http://ayo.freshrpms.net/redhat/8.0/i38 … release.os">http://ayo.freshrpms.net/redhat/8.0/i386/base/release.os Temporary failure resolving 'ayo.freshrpms.net'

Failed to fetch http://ayo.freshrpms.net/redhat/8.0/i38 … st.updates">http://ayo.freshrpms.net/redhat/8.0/i386/base/pkglist.updates Temporary failure resolving 'ayo.freshrpms.net'

Failed to fetch http://ayo.freshrpms.net/redhat/8.0/i38 … se.updates">http://ayo.freshrpms.net/redhat/8.0/i386/base/release.updates Temporary failure resolving 'ayo.freshrpms.net'

….

and for example when i want to ping yahoo, i've this message:

yahping: unknown host www.yahoo.com :?

i've search for this problem on internet and find nothing

If you can help me, thanks a lot

@Pzero:

Thanks for the tutorial, but i'm a real newbie to linux server and i've a problem at the first line!!! :(

i've a lot of error, it look like the server can't connect to internet:

Failed to fetch http://ayo.freshrpms.net/redhat/8.0/i38 … release.os">http://ayo.freshrpms.net/redhat/8.0/i386/base/release.os Temporary failure resolving 'ayo.freshrpms.net'

Failed to fetch http://ayo.freshrpms.net/redhat/8.0/i38 … st.updates">http://ayo.freshrpms.net/redhat/8.0/i386/base/pkglist.updates Temporary failure resolving 'ayo.freshrpms.net'

Failed to fetch http://ayo.freshrpms.net/redhat/8.0/i38 … se.updates">http://ayo.freshrpms.net/redhat/8.0/i386/base/release.updates Temporary failure resolving 'ayo.freshrpms.net'

….

and for example when i want to ping yahoo, i've this message:

yahping: unknown host www.yahoo.com :?

i've search for this problem on internet and find nothing

If you can help me, thanks a lot

http://www.linode.com/forums/viewtopic.php?t=693

:)

Sorry, i miss this :? , it's ok now

thanks :)

This thread has been very helpful, thanks. I've just got a new Linode 128 account with Red Hat Linux 9 Small and followed these steps exactly. It seemed to all worked fine, however now my account is showing no free disk space at all.

Total: 6144 Megabytes

Used: 6144 Megabytes

Free: 0 Megabytes

Any ideas what's gone wrong, or how to fix it ? Thanks.

Hi,

If that is through the LPM it just means you have assigned all your disk space to images.

Do a df -h via ssh and it will list what you actually have used and what you have free.

Adam

Great, many thanks for that.

Just one other thing, is assigning all the disk space to images like this a good/bad move ? It wasn't something I explicity specified, I just followed the default. I'm a newbie at this so appreciate any advice!

It is up to you.

Some people like to put things like /var and /home on seperate partitions.

Usually due to security and to stop some side effects of DDoS attacks.

You can always resize your image to get some space to make some more.

Adam

The disk space on the control panel shows how much space you have allocated toward disk images (for filesystems and swap areas). To find out how much free space you have on your filesystem(s), use the df command from within your Linode.

@mikel:

This thread has been very helpful, thanks. I've just got a new Linode 128 account with Red Hat Linux 9 Small and followed these steps exactly. It seemed to all worked fine, however now my account is showing no free disk space at all.

Total: 6144 Megabytes

Used: 6144 Megabytes

Free: 0 Megabytes

Any ideas what's gone wrong, or how to fix it ? Thanks.

Sorry all, didn't realize that I was just rehashing what was already written by other posters, I didn't realize that this was a multi-page topic and missed the responses to the original poster before providing mine.

The account page lists how much free space you have that is not used by any of your virtual disks. You want to have 0 megabytes free because you want it all to be in a virtual disk, and thus actually available to your running Linode.

Mine also lists 0 megabytes free because I've used it all for my root filesystem. Which doesn't mean that my root filesystem is full - if I log into my Linode directly and check the disk usage, I'm at about 74%.

If you ever upgrade to more disk space, you will see this space appear as free space in your Linode account page, until you assign it to a virtual disk, at which point it will be available to your running Linode process, and will once again show up as 0 megabytes free on your Linode account page.

Hope I've explained this in a way that is clearer rather than more confusing.

@mikel:

Great, many thanks for that.

Just one other thing, is assigning all the disk space to images like this a good/bad move ? It wasn't something I explicity specified, I just followed the default. I'm a newbie at this so appreciate any advice!

I put all of my disk space into one partition, my root partition. I've been running my own Linux systems for almost 10 years, and have done some for employers as well, and started out using multiple partitions, but found that they never actually realized any of the theoretical benefits. So I've switched to using just one partitition as it's easier to deal with and the situations in which multiple partitions are useful turn out to be so very very rare.

apt-get install PyXML autofs bind bind-utils caching-nameserver curl cyrus-sasl cyrus-sasl-md5 cyrus-sasl-plain fetchmail gettext gnupg httpd imap kbd lftp libuser libwvstreams lynx mod_auth_mysql mod_python mod_ssl mutt openldap openssh openssh-clients openssh-server passwd php php-imap php-ldap php-mysql php-odbc pine postfix proftpd pyOpenSSL pygtk2 pygtk2-libglade pyorbit python python-optik pyxf86config redhat-config-securitylevel redhat-switch-mail rhnlib rhpl rpm-python sendmail stunnel up2date usermode usermode-gtk w3m wget

NICE!! Thank you for your step-by-step tutorial…. It's people like you that keep this community alive and kicking! Thanks!

A word of advise for those who'd like to use this tutorial… BACKUP your pref. and conf files! And it's best if done from the very beginning before your server is in production becuase it WILL interrupt your services….

@bji:

I put all of my disk space into one partition, my root partition.

…snip…

So I've switched to using just one partitition as it's easier to deal with and the situations in which multiple partitions are useful turn out to be so very very rare.
I tend to use 3 partitions: 1=root, 2=swap, 3=datadisk. datadisk is where /home, /usr/local, webroot etc all live (symlinks as required). Basically it means I can upgrade the OS on the root disk without risk of losing data. Worked well when I upgraded one of my home machines from RH7.3 to Fedora 1 a few weeks back :-)

@mikel:

This thread has been very helpful, thanks. I've just got a new Linode 128 account with Red Hat Linux 9 Small and followed these steps exactly. It seemed to all worked fine, however now my account is showing no free disk space at all.

Total: 6144 Megabytes

Used: 6144 Megabytes

Free: 0 Megabytes

Any ideas what's gone wrong, or how to fix it ? Thanks.

If you are talking about the screen in the linode webpage then it is disk space allocated not used

mikel: Is that in the LPM that these figures are showing? If so, it's nothing to worry about. That simply means that all of the space available on your account is assigned to your Linode - it doesn't show how much of it is actually being used. To find that out, type df -h at a console, and it'll list all of the partitions along with how much free space, etc. they have.

[edit: Sorry! Didn't click through to the second page. :oops:]

@CSpurrier:

Step Three

Update your hostname

 echo yourdomainnamehere >/etc/hostname  
 /bin/hostname -F /etc/hostname 

Just a question – shouldn't the hostname file have a fully qualified domain name? (i.e. host.domain.com)… If so, would you consider changing "yourdomainhere" to "host.domain.com" or something similar? I think that yourdomainhere tempts people to put only the "domain.com" part…

But that's if the hostname should have a FQDN…

j.

@jsalloum:

@CSpurrier:

Step Three

Update your hostname

 echo yourdomainnamehere >/etc/hostname  
 /bin/hostname -F /etc/hostname 

Just a question – shouldn't the hostname file have a fully qualified domain name? (i.e. host.domain.com)… If so, would you consider changing "yourdomainhere" to "host.domain.com" or something similar? I think that yourdomainhere tempts people to put only the "domain.com" part…

But that's if the hostname should have a FQDN…

j.
I am not sure if it should be a FQDN from what I have found it does not need to be. If any one can prove it does need to be please let me know and I will change it.

@sweh:

I tend to use 3 partitions: 1=root, 2=swap, 3=datadisk. datadisk is where /home, /usr/local, webroot etc all live (symlinks as required). Basically it means I can upgrade the OS on the root disk without risk of losing data. Worked well when I upgraded one of my home machines from RH7.3 to Fedora 1 a few weeks back :-)

IMO this is some pretty damn good advice.

Bill Clinton

****These directions are now obsolete. I have posted them here as an alliterate way to install SSLeay. Use only if other directions do not work.

Please you the directions in the first post****
> *Step five*

Get OpenSSl and Net_SSLeay source code

 wget http://www.openssl.org/source/openssl-0.9.7d.tar.gz 
 wget http://www.cpan.org/modules/by-module/Net/Net_SSLeay.pm-1.25.tar.gz 

Step six

Uninstall openSSL RPM

 apt-get remove openssl 

You will be asked if you whould like to uninstall a lot of other packages type

"Yes, do as I say!"

Step Seven

Compile and Install openssl

 tar zxvf openssl-0.9.7d.tar.gz 
 cd openssl-0.9.7d 
 ./config 
 make 
 make install 
 cd .. 

Step Eight

Compile and Install Net_SSLeay

 tar zxvf Net_SSLeay.pm-1.25.tar.gz  
 cd Net_SSLeay.pm-1.25 
 perl Makefile.PL 
 make install 

Step Ten

Reinstall everything removed when OpenSSL was removed

 apt-get install PyXML autofs bind bind-utils caching-nameserver curl cyrus-sasl cyrus-sasl-md5 cyrus-sasl-plain fetchmail gettext gnupg httpd imap kbd lftp libuser libwvstreams lynx mod_auth_mysql mod_python mod_ssl mutt openldap openssh openssh-clients openssh-server passwd php php-imap php-ldap php-mysql php-odbc pine postfix proftpd pyOpenSSL pygtk2 pygtk2-libglade pyorbit python python-optik pyxf86config redhat-config-securitylevel redhat-switch-mail rhnlib rhpl rpm-python sendmail stunnel up2date usermode usermode-gtk w3m wget 

I had to install atrpms-56-1.rh9.at.i386.rpm to get these steps to work.

Use these steps:

wget http://download.atrpms.net/production/packages/redhat-9-i386/atrpms/atrpms-56-1.rh9.at.i386.rpm
rpm -Uvh atrpms-56-1.rh9.at.i386.rpm

The error that I was getting was:

error: Failed dependencies:

atrpms-perl-module-helper is needed by perl-Net_SSLeay.pm-1.25-2.rh9.at

Easy to find the fix, figured I would post this info in case someone following the steps runs into the same error.

Anyone have a guide like this for Mandrake? :) Fedora? :roll:

@zaz:

Easy to find the fix, figured I would post this info in case someone following the steps runs into the same error.
Thanks. I have updated it to reflect this.

@zaz:

Anyone have a guide like this for Mandrake? :) Fedora? :roll:
No guide yet, but if any one wants to loan me a spare Linode for a week or two I can write one.

@CSpurrier:

@jsalloum:

I think that yourdomainhere tempts people to put only the "domain.com" part…
I am not sure if it should be a FQDN from what I have found it does not need to be. If any one can prove it does need to be please let me know and I will change it.

It does not need to be the FQDN. It also does not need any domain name. It should be the hostname for the referenced machine. IMHO It is a good idea to set it up host.domain in case you are working within multiple domains. You can safely use host.domain.TLD but most people don't use multiple TLD's with the same host.domain pointing to different machines. You can just use host and use no domain or TLD and this is the minimum that should be used.

Use of domain.TLD should be limited to those folks who only intend to use one server ever within their entire domain. The hostname does not need to resolve locally or globally, it is only the name the OS thinks it should be called.

I do think jsalloum has a bit of a point. You want to stress that it is the hostname and not the domainname setting.

For reference, when forcing the eth0 up on my linode the other day it also assumed only the host portion (lix-abc) from the FQDN for the IP via reverse DNS.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct