- Part 1: the hardware
- Part 2: the software choices
- Part 3: Linux Basics / Ubuntu 10.10
- Part 4: XBMC Live CD
Some Linux Basics
Root or sudo
In the beginning there was root
Unix-like operating systems like linux do not protect you from doing something stupid. When you execute a command as root (or super user), it does it without asking for confirmation. If you tell it to delete everything, it will assume you know what you are doing and delete everything.
Ubuntu by default does not have the root user enabled. Instead, an administrator can temporarily invoke root privilege by using the sudo command (superuser do). This has two advantages, 1) decreases the chances of errant and catastrophic commands being issued while logged in as the root user and 2) decreases the chances of your server being brute-force hacked because root is a commonly username - not using it means not only must the password be guessed, so must the username (unless you pick something else obvious like administrator) . (Of course, remote login, such as SSH, can always be disabled for the root user.)
Any command preceded by sudo will be executed as root, ever if the root user is disabled. You will be asked to enter your password, and you must have admin privileges. Once entered, the password may be good for a while, so you can continue entering sudo commands without having to reenter your password. After a bit you will be prompted to reenter the password.
Installing software in Linux
The preferred way of installing software may be a bit confusing at first. Rather than downloading software from individual websites and installing, a package manager is used to download software from preset or user-specified repositories. Repositories can be official and contain only fully GPL'd application, or the can be third-party maintained and contain just about anything.
If this sounds familiar, now you know from where the idea for "app stores" came.
It is more than just convenience, though. Many packages have a complex set of dependencies, that are unlikely to be preinstalled by default. It is absolute hell to try and manually keep track of what needs to be downloaded and installed to make a particular application function correctly. It gets even more complicated since many applications share dependencies. After uninstalling an application, a package manager would know which dependencies are safe to remove and which are still being used by other applications.
Two common package managers are the Advanced Packaging Tool (apt), used by Ubuntu and other Debian-based systems, or RPM used by Fedora and Red Hat, SUSE, and CentOS. Each of these can be used entirely from the command line, or also from GUI frontends.
As an example of installing xbmc on a standard Ubuntu server, such as the 10.10 install that I aborted, you would simply do the following:
- Add the XBMC repository
sudo add-apt-repository ppa:team-xbmc
- Refresh the list of available packages, including the newly added repository
sudo apt-get update
- Install XBMC
sudo apt-get install xbmc
The last commands can be combined into one:
sudo apt-get update install xbmc
No comments:
Post a Comment