A site for solving at least some of your technical problems...
A site for solving at least some of your technical problems...
First go to http://www.ubuntu.com and get the latest version you're interesting in. They offer server version that they support for 5 years or so. I suggest one of those if you want to run a server. This is an ISO, in generate around 600Mb so be ready to wait a few hours... Even with a really fast connection, because the transfer will be limited by the mirror in most cases.
|Unless you know better, I strongly suggest you get the Ubuntu Server version. Maybe a bit more annoying to use BUT it works on ALL computers. And if the Desktop (or graphical) version does not work, you'd have to download the Ubuntu Server version anyway.|
You need a CD burner. Ask a friend if you do not have one, but if you do so, test the CD before coming back home. To do so, boot the CD in your Friends machine and select the 2nd menu entry (after you selected the language if you are forced to do so, it is like that in 8.04, it may have happened before though.)
And if you're lucky as a champ, the first burn worked. I had to do 3 to get it to work!
Remember that writing on a Flash drive is very slow. Writing a 700Mb ISO file decompressed can take 2 to 3 hours... it is normal. Now the difference with the CD is that the boot will work first time (assuming that your computer supports booting up from a USB port.)
Insert the CD in your computer, and reboot or turn the computer on (whichever works best for you.) Select your language if queried, then select the top entry to install everything. Note that the server version uses a console based installer (i.e. text only.) This is very practical since that way you avoid problems with your graphics card until later (or even better, if you install a server you should never have X11 anyway... so not doing a graphical installation makes sense since you'll never have to bother with the graphical interface.)
Linux is great for servers. That's the best around these days (methink). However, the installation will attempt to connect you to some Network and possibly even to the Internet. Whether this is required, I do not know. I noticed apt-get being used for the install, but from what I can tell, it only reads data from your CD-ROM at the time it is installing your system.
Yet, if you do not have a box with a firewall, DO NOT CONNECT YOUR NETWORK CARD TO ANYTHING. That way you will avoid potential problems. Connect the computer to your Internet connect only AFTER you setup the firewall. Somehow, Ubuntu does not provide any kind of default for the firewall. It still seems strange to me, but well...
In my latest installation the system would tell me that it couldn't properly mount the CD. I thought that was strange since I could go to the shell and see the files (although not all of them) on the CD drive and thus it was clearly mounted.
After searching the Internet, I found out that the Ubuntu forum had the answer: the CD drive was not properly recognized. I've used that drive with many motherboards installing Ubuntu and had no problem. So I guess that was a problem with that one mother board.
|Note that the user you create at that time will be the only user on the system and you MUST remember the login name and password. Otherwise you won't be able to use that system. There is not "reset password" option on Linux.|
If you are installing a server and want to use software RAID, then you will need to do a manual installation of your partitions. First, set the partitions to Physical volume for RAID. Then edit the RAID setup (another menu at the top of the manual setup) and finally, when you are done linking partitions, define what's what.
I strongly suggest RAID1 if you want to use RAID. Others are not as safe for your data (i.e. RAID1, if a drive dies, you still have the other 100% functioning except maybe for the boot sector, but that can be re-installed safely.)
When asked what you want to install, for the Server, it is safe to install everything unless you know for sure that certain things won't be necessary. (Not that on 8.10 they do not offer you to choose what is going to be installed. Instead you'll have to use apt-get later to add the modules, etc. that you want to run with.)
If installing a Desktop version, watch out because installing everything won't usually work correctly. Actually, often you should only install the base system including X11 and when you reboot, use apt-get to install other software. This is my experience of the installer. You may have better luck too. (after all, it has been several years since I tried to install a Desktop Ubuntu!)
At some point, the installation will tell you that you're done. It's not so bad, time wise. It took me only 1h total on a PowerEdge to get the OS installed. And I would think that the installer does not run with both processors.
Again, remember that the firewall will be totally open and you will have many servers started on first boot (SMTP, Apache, BIND and a few others that are generally okay, but you may have servers like Samba and DHCP which are not! And you may not know for sure what's running until you reboot...)
So really, frankly, disconnect that computer network card until you know for sure what you're doing (unless that computer is connected to a 100% trusted network.)
Let the computer boot. If you installed a weird sendmail system, then it will get stuck for a minute on that one. It looks like they now use postfix which works properly. Otherwise, change the /etc/init.d/sendmail script or remove the S??sendmail from the /etc/rc2.d folder.
Once booted, you should get a Login prompt. Enter the name of the user you created at the time you ran the installation and his password. If you forgot the password, and wrote it really badly on that old envelope, then you will be good for a reboot to the rescue system that will let you fix it (good luck) or to re-install.
Now a day, it is often that your server will be setup for DHCP automatically. I find it annoying since in most cases a server will be on a static address (or am I a weirdo?) In any event, you will have to edit the network interface setup. This is in /etc/network/interfaces. The following is a basic sample that will work in most cases. Obviously, do not use 192.168.1.1 if you were assigned another IP. Change the network and broadcast IPs accordingly too. The definition for a DHCP has only the first line and it says 'dhcp' instead of 'static'.
auto eth0 iface eth0 inet static address 192.168.1.1 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.254
As a side note, your DHCP may be setup properly, mine never works in regard to giving proper name server information. That means you need to change those IP addresses in /etc/resolv.conf, but do that AFTER you changed your interface from DHCP to static IP. Otherwise the DHCP server will overwrite the file. Also, you need to kill the dhclient by hand. The following should help you on that one:
The routing table won't work too well if you do not first kill the dhclient. It could also be that you should do ifdown eth0 BEFORE editing the /etc/network/interfaces file so it knows it was using a dhcp client... but where is that written in the docs?
By default your server is setup to reset its clock on boot. It will query a server that is assumed to be available (namely, ntp.ubuntu.com which up until 2008 has not been accessible to my servers...)
Then, what I do is change the /etc/ntpd.conf file to use a few US servers that are much more responsive to me (I'm in California, after all!) Also, I restrict the computers that can access my NTP server to my local network. I prevent ALL computers to change the clock. So only the NTP server has that right.
For instance, UC Davis offers an NTP and I can use it with the following:
restrict ntp.ucdavis.edu mask 255.255.255.255 nomodify notrap noquery server ntp.ucdavis.edu
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap restrict 192.168.2.0 mask 255.255.255.0 nomodify notrap restrict 192.168.3.0 mask 255.255.255.0 nomodify notrap ...
Of course, you could even restrict to specific computers... Note that if you have many computers & networks, you will need to find a way to replicate the clock on different servers to not bog down your main server. Possibly, you'd need to setup a clock server.
Note: with Ubuntu 10.04, that flag is set to 1 by default so you do not need this extra flag.
Forwarding packets, meaning forwarding network traffic from one computer through your server and back to that computer, requires setting up the net.ipv4.ip_forward variable to 1. You can just do this to do it on the fly:
# Note that this first example does not work on newer kernels echo 1 >/proc/sys/net/ipv4/ip_forward # or sysctl -w net.ipv4.ip_forward=1
# Uncomment the next line to enable packet forwarding for IPv4 net.ipv4.ip_forward=1
If using IPv6, obviously, use 6 instead of 4.
Once that flag is set, you also will need to setup your iptables to include a POSTROUTING otherwise, it is not likely to work properly. The post routing tells the server how to "rename" the different IP addresses. In general, your internal network will be on a different IP address and you need to change that IP to the main server IP so the packets can go outside. The following shows an example:
*nat :POSTROUTING - [0,0] -A POSTROUTING -o eth0 -s 192.168.2.2 -j SNAT --to-source 192.168.1.1 -A POSTROUTING -o eth0 -s 192.168.2.3 -j SNAT --to-source 192.168.1.1 ...
Somewhere in your file you will see:
# "security = user" is always a good idea. This will require a Unix account # in this server for every user accessing the server. See # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html # in the samba-doc package for details. security = userAnd this is correct. However, what they do NOT say clearly is that you also need to define the password BY HAND for you to be able to connect. This is done with the
smbpasswd -a <username>The username must be one of your Linux users (i.e. one of /home/*). The password should be made the same as the Linux password, also that is not enforced. Now, don't ask me why this is done that way...
This is Samba, what do you expect?!? 1 warning or two? I guess we all learn something every day. Today, I learned that if 99% of the companies out there give you permissions to connect to multiple "accounts" (folders, really) that's done using the
Another really ugly solution is to create a set of names for your server in the hosts file of your Windows boxes. Use one name per user/folder as each different host can accepts a different user name and password. See here
Yes. Most of the time, your customers have some sort of Win32 box seating somewhere and you've got to attach that box with your Ubuntu server. In that case, you need to install the samba server. You may want to avoid the winbind server. That can cause problems, especially if you are using a static IP address as I have shown here so far.
If you installed the documentation, then you will find it here: /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/index.html
Samba is very difficult to debug, outside of that, it works just fine. First you need to tweak the configuration file. It is under /etc/samba/smb.conf. Just in case you do not feel confident enough, first make a read-only copy of that file so you can always look back (hmmm). I think that a better method is to learn using
man smb.confand reading the definitions of each entry for your samba server.
The big lines... the file looks like a .ini file (it is a .ini file). The [globals] define an array of options for all connections. The other [<name>] entries represent a drive or a printer or some other strange thing as defined by Netbios.
The file include a workgroup, a server name, wins support yet/no, etc. You probably want the name of the workgroup to be different from the name of your computer. This is important if you do not want to have errors in your logs saying that another computer is the master, not you.
The interfaces should be defined with the acceptable interfaces. For instance, if your Intranet is defined on 192.168.111.0/24 running on eth3, then put that in there. It will prevent connections from any other computer if you also set bind interfaces only to true.
The problem I have with that simple statement is that it gives you no options... So you don't always get what you're looking for. And all the defaults may not exactly be what you wanted. Yet, in 10.04 it was so very easy to use all of that, I was impressed!
To install kubuntu desktop, use the following instead:
The one main thing that I do not want my server to do, however, is starting the GDM automatically on a reboot. There are many reasons, but I just don't want that to happen.
The command line to remove the GDM is as follow:
sudo update-rc.d -f gdm remove
In case you change your mind, you can revert the remove with this one:
sudo update-rc.d -f gdm defaults
The 'defaults' defines the default init levels.
There may be a cleaner way to fix this but at this point all I have found is edit the GRUB configuration file and add the text flag. Search for a line that starts with linux (note that the line may start with spaces or tabs) and add the word text at the end:
and change the default command line this way:
The graphical terminal gives you full UTF-8 support (i.e. multi-language,) colors, wider console (132 characters), etc. which the PC text video support may not give you (especially if you have more than 200 or so characters in your language.)
All software make use of numbers. Everything is a number. The most basic number in a computer is 0 or 1. This is called a bit. These are represented with electricity. Although in most cases we see it as 0 - Ground and 1 - Voltage (i.e. 1 volt), the bit representation in software and in hardware may be interpreted either way (i.e. a 0 could mean that the voltage is 1V and not 0V.)
Combining these zeroes and ones we offer end users to handle much larger numbers. With 8 bits, you can have numbers from 0 to 255 (unsigned) or -128 to +127 (signed.) Now a day, computers can handle a much larger number of bits in one cycle. Most processors use 64 bits but they can calculate numbers on 128, 256, and for some 1024 bits at once. Also with parallelism, the size can be viewed as even larger (i.e. handling a 64 bit number in 1,536 threads like on my old nVidra Quadro 600 is equivalent to one large number of 98,304 bits! That would be 2 power 98,304 possibilitie or about 2.8359e+29592 in decimal.)
Integers are easy to handle. Although when working on math problems you generally see the set of avaialble numbers as equivalent to N although mathematicians know that computers can really only handle a limited set of numbers. For example, on a 64 bit computer, the usual range is -9223372036854775808 to 9223372036854775807, This is generally enough although at times some equations have to be reworked to avoid really large or small intermediate numbers that work fine in math equations, but not so well on computers.
Now, math also includes other sets of numbers such as D, R, and C. Computers do not offer any way to represent numbers in R or C but they can offer D to some extend. These numbers are called floating point numbers because we do math using an exponent. The exponent makes the decimal point "float" in any location as the number used for the exponent offers. Using a 64 bit floating point, you can have positive and negative numbers with precision varing betwee 10-308 and 10+308. This includes a positive zero (+0) and a negative zero (-0), which is import in a few cases (although +0 = -0 is true, you can get the sign of a number and distinguish both zeroes). Note that at first decimal numbers were going to also have a positive and negative zero, but it was instead decided to have one more negative number (remember, with 8 bits we have signed numbers from -128 to +127, this is because in the positive numbers we have a 0 which we don't have in the negative numbers.)