个人工具

“UbuntuHelp:HomeServer”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
 
(未显示同一用户的2个中间版本)
第2行: 第2行:
 
{{Languages|UbuntuHelp:HomeServer}}
 
{{Languages|UbuntuHelp:HomeServer}}
 
== Introduction ==
 
== Introduction ==
'''''This guide has been created using Ubuntu 7.10 Server Addition. It will be updated some time after Ubuntu 8.04's official release.''''' This Guide will show how to create a server for a typical home environment. This guide is a work in progress and parts of it (where noted) are taken from other parts of the Ubuntu site and the Ubuntu Forums.The locations where the instructions have been taken from are also noted. '''''Please DO NOT Edit this guide until I have finished writing it. Thanks!'''''
+
'''''This guide has been created using Ubuntu 7.10 Server Edition. It will be updated some time after Ubuntu 8.04's official release.''''' This Guide will show how to create a server for a typical home environment. This guide is a work in progress and parts of it (where noted) are taken from other parts of the Ubuntu site and the Ubuntu Forums.The locations where the instructions have been taken from are also noted.
 
== Background ==
 
== Background ==
 
For a while now, I had been wanting to create a dedicated home server using an older machine I had lying around in my house. I had been trying to decide what Operating System to load on it. My main choices were Windows Home Server, Microsoft, costing about $180, and Ubuntu Server, costing only my time. So obviously I decided to go with Ubuntu because;
 
For a while now, I had been wanting to create a dedicated home server using an older machine I had lying around in my house. I had been trying to decide what Operating System to load on it. My main choices were Windows Home Server, Microsoft, costing about $180, and Ubuntu Server, costing only my time. So obviously I decided to go with Ubuntu because;
第15行: 第15行:
 
* Time on your hands
 
* Time on your hands
 
== Installing Ubuntu 7.10 "Gutsy Gibbon" Server Edition ==
 
== Installing Ubuntu 7.10 "Gutsy Gibbon" Server Edition ==
The install is fairly straight forward. You insert your '''''server edition''''' disk and wait for the computer to boot it. You follow all the steps from the installer until you reach the partioner. Here choose, advanced/user (do not choose guided). Set up a small partion (20 gb) for the Operating System. Format it as <code><nowiki>ext3</nowiki></code> and mount it as <code><nowiki>\</nowiki></code>. Then create another partition format as <code><nowiki>ext3</nowiki></code> and mount as <code><nowiki>\server data</nowiki></code> (or something of your own choice). Then continue with the wizard till you get to the select components page. select all of them (or which ever your server needs) by scrolling up and down and pressing the spacebar. Only press enter after you have selected them all. (Note: here I hit enter and ended up having to re-install the entire system from the beginning because it did not install all my components). Follow on with the wizard. About 30 minutes later (on my machine) you should see the disc eject and the screen will tell to restart. Remove the disk and tell it to continue with the restart.
+
The install is fairly straight forward. You insert your '''''server edition''''' disk and wait for the computer to boot it. You follow all the steps from the installer until you reach the partitioner. Here choose, advanced/user (do not choose guided). Set up a small partition (20GB) for the Operating System. Format it as <code><nowiki>ext3</nowiki></code> and mount it as <code><nowiki>\</nowiki></code>. Then create another partition format as <code><nowiki>ext3</nowiki></code> and mount as <code><nowiki>\server data</nowiki></code> (or something of your own choice). Then continue with the wizard till you get to the select components page. select all of them (or which ever your server needs) by scrolling up and down and pressing the spacebar. Only press enter after you have selected them all. (Note: here I hit enter and ended up having to re-install the entire system from the beginning because it did not install all my components). Follow on with the wizard. About 30 minutes later (on my machine) you should see the disc eject and the screen will tell to restart. Remove the disk and tell it to continue with the restart.
 
== Problems with the Install ==
 
== Problems with the Install ==
 
So the system rebooted and said <code><nowiki>Grub Loading</nowiki></code>, then it restarted, and did the same thing again and again. I searched on the Ubuntu Forums for other people who have had the problem and found a solution.  
 
So the system rebooted and said <code><nowiki>Grub Loading</nowiki></code>, then it restarted, and did the same thing again and again. I searched on the Ubuntu Forums for other people who have had the problem and found a solution.  
'''''This solution will only help you if your MBR (Master Boot Record) has been destroyed!'''''If you have the problem, it can probably help you too! '''''If this does not work please see the next section.''''' '''''(The following has been created by "Catlett from the [[http://ubuntuforums.org/showthread.php?t=182752&page=2|Ubuntu Forums]])'''''
+
'''''This solution will only help you if your MBR (Master Boot Record) has been destroyed!'''''If you have the problem, it can probably help you too! '''''If this does not work please see the next section.''''' '''''(The following has been created by "Catlett from the [http://ubuntuforums.org/showthread.php?t=182752&page=2 Ubuntu Forums])'''''
Get the Ubuntu live cd (or any live cd but this is ubuntu based instruction)
+
Get the Ubuntu [[UbuntuHelp:LiveCD|LiveCD]] (or any [[UbuntuHelp:LiveCD|LiveCD]] but this is Ubuntu-based instruction)
Boot to the cd. Open the terminal type
+
Boot to the CD. Open the terminal type
 
Code:
 
Code:
 
<code><nowiki>sudo fdisk -l</nowiki></code>
 
<code><nowiki>sudo fdisk -l</nowiki></code>
 
Find your Ubuntu partition. I am going to use <code><nowiki>/dev/hda3</nowiki></code> as an example.
 
Find your Ubuntu partition. I am going to use <code><nowiki>/dev/hda3</nowiki></code> as an example.
Now make a directory for the partition to be mounted to, for the example I am goimg to make a folder "ubuntu" in the media folder (I use the media folder because it will put an icon on your desktop).
+
Now make a directory for the partition to be mounted to; for the example I am going to make a folder "ubuntu" in the media folder (I use the media folder because it will put an icon on your desktop).
 
Code:
 
Code:
 
<code><nowiki>sudo mkdir /media/ubuntu</nowiki></code>
 
<code><nowiki>sudo mkdir /media/ubuntu</nowiki></code>
第30行: 第30行:
 
Code:
 
Code:
 
<code><nowiki>sudo mount /dev/hda3 -t ext3 /media/ubuntu</nowiki></code>
 
<code><nowiki>sudo mount /dev/hda3 -t ext3 /media/ubuntu</nowiki></code>
Now your Ubuntu partition is mounted and you should be able to edit the grub list. You already know how but I'll finish in case someone stunbles upon this thread for help.
+
Now your Ubuntu partition is mounted and you should be able to edit the grub list. You already know how, but I'll finish in case someone stumbles upon this thread for help.
 
Code:
 
Code:
 
<code><nowiki>sudo nano /media/ubuntu/boot/grub/menu.lst</nowiki></code>
 
<code><nowiki>sudo nano /media/ubuntu/boot/grub/menu.lst</nowiki></code>
All you should have to do is comment out the line with the splashimage and the line for the hiddenmenu but leaving the timeout and default lines. That will leave the menu like a regular text grub menu.
+
All you should have to do is comment out the line with the splashimage and the line for the hiddenmenu, but leaving the timeout and default lines. That will leave the menu like a regular text grub menu.
 
'''''(End copied information)'''''
 
'''''(End copied information)'''''
However this leaves your Grub menu in black and white. I am waiting for a response on the same Ubuntu Forums thread posted above on how to change it back to color while still allowing it to boot.
+
However, this leaves your Grub menu in black and white. I am waiting for a response on the same Ubuntu Forums thread posted above on how to change it back to color while still allowing it to boot.
 
== Problems with Intel/Via Chipsets and Ubuntu 7.10 ==
 
== Problems with Intel/Via Chipsets and Ubuntu 7.10 ==
It turns out that my problem had to do with the grub version on Ubuntu 7.10 having issues with my intel chipset. I found this solution '''''(written by Chaos51 from the [[http://ubuntuforums.org/showthread.php?t=714999&highlight=reboot+loop|Ubuntu Forums]])'''''
+
It turns out that my problem had to do with the grub version on Ubuntu 7.10 having issues with my Intel chipset. I found this solution '''''(written by Chaos51 from the [http://ubuntuforums.org/showthread.php?t=714999&highlight=reboot+loop Ubuntu Forums])'''''
 
I did eventually get my systems installed. I installed 7.10 ( with the server install I think ) and basically made it not install the boot loader at all.
 
I did eventually get my systems installed. I installed 7.10 ( with the server install I think ) and basically made it not install the boot loader at all.
 
I then used my Hardy disk as a rescue and installed grub from hardy. This worked fine. Once I got one machine setup I just used ghost to to a drive to drive copy to my other workstations and some I had still fix with the hardy disk and re-install grub but for now I've got 12 workstations up and going.
 
I then used my Hardy disk as a rescue and installed grub from hardy. This worked fine. Once I got one machine setup I just used ghost to to a drive to drive copy to my other workstations and some I had still fix with the hardy disk and re-install grub but for now I've got 12 workstations up and going.
After installing 7.10, boot into the hardy live cd.
+
After installing 7.10, boot into the Hardy [[UbuntuHelp:LiveCD|LiveCD]].
 
Open a root terminal window ( start a terminal and sudo su - )
 
Open a root terminal window ( start a terminal and sudo su - )
 
mount your existing 7.10 partitions if they don't get automatically mounted. I do it manually so I know exactly what I'm mounting and where.
 
mount your existing 7.10 partitions if they don't get automatically mounted. I do it manually so I know exactly what I'm mounting and where.
If you don't know if you have a sda or hda or don't know which partition has what you might find disk info by doing:
+
If you don't know if you have a sda or hda or don't know which partition has what you might find disk info by doing "fdisk -l".  From that you can mount one partition at a time and find the one that contains the root partition.
fdisk -l
+
So assuming that you have 7.10 installed on sda (where /dev/sda1 == /boot and /dev/sda2 == /), I usually do something like the following:
from that you can mount one partition at a time and find the one that contains the root partition.
+
So assuming that you have 7.10 installed on sda.
+
I usually do something like the following assuming /dev/sda1 == /boot and /dev/sda2 == /
+
 
#create a mount point for the root partition
 
#create a mount point for the root partition
 
1. <code><nowiki>mkdir /mnt/target</nowiki></code>
 
1. <code><nowiki>mkdir /mnt/target</nowiki></code>
第60行: 第57行:
 
5. <code><nowiki>reboot and hopefully 7.10 will boot</nowiki></code>
 
5. <code><nowiki>reboot and hopefully 7.10 will boot</nowiki></code>
  
If you have the default install method which I believe puts boot and / on the same partition you'll only have to mount the root partition so assuming:
+
If you used the default install method, which I believe puts boot and / on the same partition, you'll only have to mount the root partition.  So assuming
 
/dev/sda1 = /
 
/dev/sda1 = /
(assumes you are booted into hardy live cd and in a root terminal window )
+
(assumes you are booted into Hardy [[UbuntuHelp:LiveCD|LiveCD]] and in a root terminal window )
you'd just have to
+
you'd just have to:
 
1. <code><nowiki>mkdir /mnt/target</nowiki></code>
 
1. <code><nowiki>mkdir /mnt/target</nowiki></code>
 
2. <code><nowiki>mount /dev/sda1 /mnt/target</nowiki></code>
 
2. <code><nowiki>mount /dev/sda1 /mnt/target</nowiki></code>
第73行: 第70行:
 
You should have already installed Samba during your install of the system.  
 
You should have already installed Samba during your install of the system.  
 
----
 
----
[[category:CategoryDocumentation]] [[category:CategoryNetworking]]
+
[[category:CategoryNetworking]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2009年5月12日 (二) 17:09的最新版本

Introduction

This guide has been created using Ubuntu 7.10 Server Edition. It will be updated some time after Ubuntu 8.04's official release. This Guide will show how to create a server for a typical home environment. This guide is a work in progress and parts of it (where noted) are taken from other parts of the Ubuntu site and the Ubuntu Forums.The locations where the instructions have been taken from are also noted.

Background

For a while now, I had been wanting to create a dedicated home server using an older machine I had lying around in my house. I had been trying to decide what Operating System to load on it. My main choices were Windows Home Server, Microsoft, costing about $180, and Ubuntu Server, costing only my time. So obviously I decided to go with Ubuntu because;

  • It's free.
  • It's open-source
  • It's probably more reliable and has better free support.

This is what I came up with:

Prerequisites

  • An Ubuntu 7.10 Server Edition disk
  • An Ubuntu 8.04 Desktop Edition disk
  • A relatively new (5 year old) computer
  • Time on your hands

Installing Ubuntu 7.10 "Gutsy Gibbon" Server Edition

The install is fairly straight forward. You insert your server edition disk and wait for the computer to boot it. You follow all the steps from the installer until you reach the partitioner. Here choose, advanced/user (do not choose guided). Set up a small partition (20GB) for the Operating System. Format it as ext3 and mount it as \. Then create another partition format as ext3 and mount as \server data (or something of your own choice). Then continue with the wizard till you get to the select components page. select all of them (or which ever your server needs) by scrolling up and down and pressing the spacebar. Only press enter after you have selected them all. (Note: here I hit enter and ended up having to re-install the entire system from the beginning because it did not install all my components). Follow on with the wizard. About 30 minutes later (on my machine) you should see the disc eject and the screen will tell to restart. Remove the disk and tell it to continue with the restart.

Problems with the Install

So the system rebooted and said Grub Loading, then it restarted, and did the same thing again and again. I searched on the Ubuntu Forums for other people who have had the problem and found a solution. This solution will only help you if your MBR (Master Boot Record) has been destroyed!If you have the problem, it can probably help you too! If this does not work please see the next section. (The following has been created by "Catlett from the Ubuntu Forums) Get the Ubuntu LiveCD (or any LiveCD but this is Ubuntu-based instruction) Boot to the CD. Open the terminal type Code: sudo fdisk -l Find your Ubuntu partition. I am going to use /dev/hda3 as an example. Now make a directory for the partition to be mounted to; for the example I am going to make a folder "ubuntu" in the media folder (I use the media folder because it will put an icon on your desktop). Code: sudo mkdir /media/ubuntu Now mount the partition Code: sudo mount /dev/hda3 -t ext3 /media/ubuntu Now your Ubuntu partition is mounted and you should be able to edit the grub list. You already know how, but I'll finish in case someone stumbles upon this thread for help. Code: sudo nano /media/ubuntu/boot/grub/menu.lst All you should have to do is comment out the line with the splashimage and the line for the hiddenmenu, but leaving the timeout and default lines. That will leave the menu like a regular text grub menu. (End copied information) However, this leaves your Grub menu in black and white. I am waiting for a response on the same Ubuntu Forums thread posted above on how to change it back to color while still allowing it to boot.

Problems with Intel/Via Chipsets and Ubuntu 7.10

It turns out that my problem had to do with the grub version on Ubuntu 7.10 having issues with my Intel chipset. I found this solution (written by Chaos51 from the Ubuntu Forums) I did eventually get my systems installed. I installed 7.10 ( with the server install I think ) and basically made it not install the boot loader at all. I then used my Hardy disk as a rescue and installed grub from hardy. This worked fine. Once I got one machine setup I just used ghost to to a drive to drive copy to my other workstations and some I had still fix with the hardy disk and re-install grub but for now I've got 12 workstations up and going. After installing 7.10, boot into the Hardy LiveCD. Open a root terminal window ( start a terminal and sudo su - ) mount your existing 7.10 partitions if they don't get automatically mounted. I do it manually so I know exactly what I'm mounting and where. If you don't know if you have a sda or hda or don't know which partition has what you might find disk info by doing "fdisk -l". From that you can mount one partition at a time and find the one that contains the root partition. So assuming that you have 7.10 installed on sda (where /dev/sda1 == /boot and /dev/sda2 == /), I usually do something like the following:

  1. create a mount point for the root partition

1. mkdir /mnt/target 2. mount /dev/sda2 /mnt/target

  1. now if you have separate partitions for boot or usr or which ever you may have to mount those as well but I'm not for sure. I think all you really need is the boot partition
  2. I'm assuming that the boot partition is a separate partition so I would mount it like this:

3. mount /dev/sda1 /mnt/target/boot

  1. now what we need to do is install grub into the master boot record using the grub-install from hardy but using the grub configuration and destination boot partition of the 7.10 install, which would be something like:

4. grub-install --root-directory=/mnt/target/ /dev/sda 5. reboot and hopefully 7.10 will boot

If you used the default install method, which I believe puts boot and / on the same partition, you'll only have to mount the root partition. So assuming /dev/sda1 = / (assumes you are booted into Hardy LiveCD and in a root terminal window ) you'd just have to: 1. mkdir /mnt/target 2. mount /dev/sda1 /mnt/target 3. grub-install --root-directory=/mnt/target/ /dev/sda 4. reboot and hopefully 7.10 will boot

(End Copied Information)

Setting up a File Server

You should have already installed Samba during your install of the system.