 |
Linode.com Forum Linode Community Forums
|
| Author |
Message |
CSpurrier
Joined: 23 Feb 2004
Posts: 22
Location: Aiken,SC USA
|
| Posted: Sat Jul 17, 2004 9:46 pm Post subject: How to setup your Linode with CentOS |
|
|
How to setup your Linode with CentOS
by Craig Spurrier of Craigweb
Based off of How To Set Up Your Server on Linode by schof and neorder.
CentOS is a distro based off of Red Hat Linux Enterprise Server.
Step One
Create a directory to work in, then switch to it.
Code:
mkdir work
cd work
Step two
Install APT, the Debian package tools. Yes, you can you yum or any of the other packaging tools, I however learned to use APT first so that is what this guide uses.
Code:
wget ftp://ftp.pbone.net/mirror/dag.wieers.com/packages/apt/apt-0.5.15cnc6-3.1.el3.dag.i386.rpm
rpm -Uvh apt*
Step Three
Update the sources file
Run
Code: apt-get update
Step Four
Upgrade to the lastest version of any installed programs.
Run
Code: apt-get upgrade
Step Five
Update your hostname
Code: echo yourdomainnamehere >/etc/hostname
Code: /bin/hostname -F /etc/hostname
Step Six
Install Net-SSLeay the Perl module that allows secure access to webmin.
Code:
wget ftp://ftp.freshrpms.net/pub/dag/packages/perl-Net-SSLeay/perl-Net-SSLeay-1.23-0.dag.rhel3.i386.rpm
rpm -Uvh perl*
Step Seven
Test your install Code:
perl -e 'use Net::SSLeay'
No output means success.
Step Eight
Install Webmin
Code:
wget http://aleron.dl.sourceforge.net/sourceforge/webadmin/webmin-1.180-1.noarch.rpm
rpm -Uvh webmin*
Step Nine
On your local computer point your web browser to https://yourdomain.com:10000 login as root.
Step Ten
Click Servers --> Apache and follow the prompts
Click Start Apache (at the top)
Step Eleven
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 Twelve
Set Apache to start on boot.
Click on System --> Bootup and Shutdown. Put a chek by httpd and click start select on boot.
Step Thirteen
Set up E-mail, Virtualmin, Ftp, Etc.
Enjoy your new server!
If any one needs help please reply. |
|
| Back to top |
|
CSpurrier
Joined: 23 Feb 2004
Posts: 22
Location: Aiken,SC USA
|
| Posted: Sat Jul 17, 2004 9:48 pm Post subject: |
|
|
Advanced:
You can also run these steps as two big ones just copy and paste.
Code:
mkdir work
cd work
wget ftp://ftp.freshrpms.net/pub/dag/packages/apt/apt-0.5.15cnc6-3.1.el3.dag.i386.rpm
rpm -Uvh apt*
apt-get update
apt-get upgrade
Code:
echo yourdomainnamehere >/etc/hostname
/bin/hostname -F /etc/hostname
wget ftp://ftp.freshrpms.net/pub/dag/packages/perl-Net-SSLeay/perl-Net-SSLeay-1.23-0.dag.rhel3.i386.rpm
rpm -Uvh perl*
perl -e 'use Net::SSLeay'
wget http://aleron.dl.sourceforge.net/sourceforge/webadmin/webmin-1.150-1.noarch.rpm
rpm -Uvh webmin*
On your local computer point your web browser to https://yourdomain.com:10000 login as root.
Click Servers --> Apache and follow the prompts
Click Start Apache (at the top)
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.
Set Apache to start on boot.
Click on System --> Bootup and Shutdown. Put a chek by httpd and click start select on boot.
Set up E-mail, Virtualmin, Ftp, Etc. |
|
| Back to top |
|
fieschko
Joined: 21 Jun 2004
Posts: 19
|
| Posted: Sun Jul 18, 2004 3:57 pm Post subject: |
|
|
CSpurrier wrote: On your local computer point your web browser to https://yourdomain.com:10000 login as root.
Click Servers --> Apache and follow the prompts
Click Start Apache (at the top)
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.
Set Apache to start on boot.
Click on System --> Bootup and Shutdown. Put a chek by httpd and click start select on boot.
Set up E-mail, Virtualmin, Ftp, Etc.
I've had some log entries recently showing someone trying port 10000 as root.
Suggestion: do this after upgrading the Debian webmin to fix the recently discovered security vulnerabilities:
http://www.debian.org/security/2004/dsa-526
Then ssh into your linode and do
/etc/init.d/webmin stop
and use update-rc.d to keep webmin from starting on boot, so no one can use webmin to connect to your linode as root from the outside. |
|
| Back to top |
|
CSpurrier
Joined: 23 Feb 2004
Posts: 22
Location: Aiken,SC USA
|
| Posted: Sun Jul 18, 2004 4:32 pm Post subject: |
|
|
Hello,
I would recommend that you do not follow fieschko's advice, It will disable automatic loading of Webmin. I do not think Webmin is that useful without it being able to be booted on start. You will then have to start Webmin manually every-time you wish to use it.
The Security Advisory you linked to applies to Webmin 1.140 the directions above install Webmin 1.150. Make sure you remember CentOS, is Red Hat based not Debian based this issue does apply to CentOS but not Debian Security Advisorys all will. (I know you know this but I want to make sure any one reading this also knows).
Two things that can help secure Webmin.
Changing Webmin Passwords from the Command Line
Generally, once Webmin is installed all configuration of Webmin can be performed from within Webmin. However, there are a few things that can lead to being unable to log in. A common question is how to log in if you've forgotten the Webmin administrator password. If you have root access to the machine in question (i.e. you haven't also forgotten your system password), you can use the changepass.pl tool, that is found in the same directory as all of the other Webmin executable files (this is the directory in which you installed Webmin). For example, to use changepass.pl to change the root password, you could use the following command:
# ./changepass.pl /etc/webmin root newpassword
In the preceding example, the first option should be the directory where your Webmin configuration files are located. The second is the login name of the user whose password you'd like to change. The third is what you'd like the password to be changed to. Note that this script only works if you are logged in as the system root user, and can change any Webmin users password.
Changing the Webmin Port from the Command Line
Another problem after installation may be that a firewall prevents access to the Webmin port from across a WAN link (if, for example, you are remotely maintaining your Webmin server). If this is the case, you will want to consult with the firewall administrator to find out whether port 10000 can be opened, or if not, what port you can use for your Webmin installation. Changing the port on which Webmin runs after installation is also a pretty simple process. Simply edit the file miniserv.conf in the /etc directory where your Webmin configuration files were installed (this is likely one of the following: /etc/webmin, /usr/local/webmin/etc, or /opt/webmin/etc). You'll find a port directive. Change this to whatever port you need Webmin to listen on, and then restart the Webmin web server.
From http://www.swelltech.com/support/webminguide/ch01.html#wmchangingpassword |
|
| Back to top |
|
CSpurrier
Joined: 23 Feb 2004
Posts: 22
Location: Aiken,SC USA
|
| Posted: Sat Sep 18, 2004 3:43 pm Post subject: |
|
|
| Updated for new version of Webmin |
|
| Back to top |
|
veggieman
Joined: 01 Oct 2004
Posts: 19
|
| Posted: Fri Oct 01, 2004 8:13 am Post subject: additional steps |
|
|
I would add that to save a lot of time figuring out why some things don't work to add these steps right away.
To update the CentOS to the current version which today is CentOS 3.3:
Code: yum check-update
yum update
To fix why some things like host, nslookup and Bind named don't work on the first install of CentOS:
Code: mv /lib/tls /lib/tls-disabled
Then you can find ready made rpms for CentOS at this URL:
http://mirror.centos.org/centos-3/ |
|
| Back to top |
|
twaern
Joined: 08 May 2006
Posts: 3
Location: Greater Sudbury, Canada
|
| Posted: Sat May 13, 2006 7:01 pm Post subject: question |
|
|
could you elaborate more on setting up the following type of servers for Centos 4
1. mailserver (smtp & pop3) dont care about imap right now
and maybe some information about how to install / update php, etc .. |
|
| Back to top |
|
dswartz
Joined: 18 Feb 2008
Posts: 11
|
| Posted: Tue Feb 19, 2008 2:41 pm Post subject: This should be renamed to refer to centos4 |
|
|
| since centos5 uses yum, not apt. |
|
| Back to top |
|
| |
|