Now that I have convinced you into using Linux (I do hope I have :-)), it is time to get into action. This page is the first of the many pages which I am going to write as to how best you can customize linux to suit your needs. Now that we are all set, let's going.
Gettting and installing Simply Mepis
Simply Mepis is available for free and its ISO can be download from any of its mirror sites. Installing mepis is a child's play and the official mepis site have also provided some documentation related to it.
Notes:
Basics of Linux
In order to follow my articles, it is necessary that you have a basic understanding of what linux is, the console mode, the directory structure, some useful commands, etc. A book on basic linux usage may provide handy. Alternatively there will be many articles online which help you in getting started with linux. You can google for articles on introduction to linux on the net.
Below are some linux useful commands which I highly recommend you understand before proceeding any further. I have just given a brief description for each of the commands. You may want to refer its man page or google for more information. Also execute each of the commands at least once so that you understand properly how it works.
Mepis Configuration
Many gui-based tools are provided exclusively by Mepis for performing some basic configuration of Linux such as configuring mouse and monitor, configuring network, creating and deleting uers, copying between desktops, testing and repairing paritions, etc. Some of them are mentioned below.
Control Center
'kcontrol' is a utility provided by KDE to configure many settings of your system which include setting background and screen saver, session management, power management, etc.
Installing, uninstalling and upgrading packages from repository (using Synaptic and apt-get)
Before I get into the details of how to use the tools for package maintenance, I shall give a brief introduction about debian package maintenance (as MEPIS is based on Debian and is tightly integrated with the Debian repositories).
Debian provides a central repository for all the well-known Debian software. There may be other repositories provided by other debian software developers. The list of the repositories which we are using can be found in '/etc/apt/sources.list'. The database of what packages are available and their versions are stored locally on our machine. We need to update these databases regularly so that we know when newer versions of the packages are available. Please note that only the details of the debian packages and not the packages itself are what are stored on our machine locally. When you run a command to install a package, then only is the package actually transferred to our PC and installed.
Now that I have explained how debian package maintenance works, let me cover the tools which we use for this purpose. There are two tools which can be used currently:
Before installing a package or upgrading your system, it is very important that you update the database on your system which has information of the available packages and their versions. This can be done by running the command:
# apt-get update
In order to install a package, after running 'apt-get update', run:
# apt-get install packagename
In oder to uninstall a package, run:
# dpkg -r packagename
or if you want to remove the configuration files as well run:
# dpkg --purge packagename
The equivalent commands using apt for the above two operations are:
# apt-get remove packangename
# apt-get --purge remove packagename
In order to upgrade the entire system, after running 'apt-get update', run:
# apt-get upgrade
You can limit the rate at which apt downloads packages using one of the below methods:
#!/bin/bash
cd /var/cache/apt/archives || {
echo Failed to change to /var/cache/apt/archives >&2
exit 1
}
apt-get update
# first filter out all but the URIs with the grep
# next grab just the first arg in uri and second arg in name
apt-get --print-uris -y dist-upgrade | grep "^'" | while read uri name x;
do
# trim the leading and trailing quotes from the URI
uri=`echo $uri | sed -e "s/^'//; s/'$//"`
#echo $uri
wget -c -t 0 --limit-rate=8k "$uri" -O "$name"
done
This code had been taken from Bandwidth limited apt-get
Synaptic is a wonderful GUI tool using which you can install, remove, upgrade specific packages and also upgrade the entire system. Please note that before performing an install or an upgrade, it is important you click on 'Reload' button (this is equivalent to 'apt-get update'). In order to upgrade the entire system, after reloading, click on 'Mark All Upgrades' followed by the 'Apply Changes' button.
Notes:
In order to delete the downloaded packages you can just run:
# apt-get clean
In order to delete the downloaded packages which are no longer available in the repository you can run:
# apt-get autoclean
Here are some related links.
Debian Repository HOWTO
APT HOWTO
Installing a package not available in repository
While the above procedure tells you how to install from the debian repository sometimes the software may not be available in the repository. Instead a binary package (.deb/.rpm) or the source (.tar.gz/.tar.bz) may be provided. In that case you will have to use the below method.
From binary debian package (example: package.deb)
The procedure is straight-forward for a binary debian package. Run the following command"
# dpkg -i package.deb
From binary rpm package (example: package.rpm)
You will have to first convert the .rpm to .deb using 'alien' as below:
# alien package.rpm
This will generate a .deb binary file which can be installed as above:
# dpkg -i package.deb
From source (example: package.tar.gz / package.tar.bz2)
You will have to first extract the source using the below commands depending upon whether .tar.gz is provided or .tar.bz2 is provided:
# tar -xvzf package.tar.gz
or
# tar -xvjf package.tar.bz2
After extracting the source directory, enter it and read 'README' or 'INSTALL' file for instructions on how to build and install the package. Please note that building a package from source generally requires the development packages of the libraries which it uses to be installed (development packages end with '-dev'). While the libraries are necessary for running the application, the development packages of the libraries are not necessary and can be un-installed once the compilation is over. Generally the below steps are following while installing from sources:
Adding and removing startup services
Services can be added and removed from startup using 'update-rc.d' command. The start-up scripts are generally located in '/etc/init.d/' directory. For example if you want to start the service 'ssh' during boot-up, you would run the following command:
# update-rc.d ssh defaults
and to stop the service 'ssh' from starting, you would run the following command:
# update-rc.d -f ssh remove
While services can be added and removed from startup using the above method, please note that when upgrading the system, during the upgradation of the package providing the service, the service is added to boot at start-up automatically. Hence I recommend that if you are sure you are not going to use a particular service, it is best to completely uninstall the package providing that service rather than just removing it from start-up. I shall later cover how we can know as to which package does a particular service (or start-up script) belongs to.
Add new comment