Debian: understanding /etc/apt/sources.list - linux

I'm pretty new in Debian world. I just got a private virtual server to host my websites, and i'm currently learning how to correctly secure a webserver.
If I understand well, when doing apt-get update && apt-get upgrade, apt will retrieve updates of my installed packages in the repositories listed in /etc/apt/sources.list. My sources.list looks like this :
deb http://http.debian.net/debian wheezy main
deb-src http://http.debian.net/debian wheezy main
deb http://http.debian.net/debian wheezy-updates main
deb-src http://http.debian.net/debian wheezy-updates main
deb http://security.debian.org/ wheezy/updates main
deb-src http://security.debian.org/ wheezy/updates main
And here come my questions :)
Can I remove the lines starting with "deb-src"? Am I correct if I say I don't need packages sources unless I want to modify them myself (which, obviously, i'm just not able to do)?
What's the point of having several repositories (http://http.debian.net/debian and http://security.debian.org/)? I keep reading documentations about apt, but I don't find any explanations. Are there any packages that are in security.debian.org that are not in http.debian.net/debian? And vice versa?
after the repository URI comes the component. I understand the differences between wheezy / stable / testing etc. But what's the differences between wheezy and wheezy/updates?
Thanks!

deb-src is for source packages. You would use those for cross compiling and other neat dev stuff.
The security repo is where the security related updates are stored.
Lastly the updates repo is for updates released after the distribution is live, I believe.
Take a look at https://wiki.debian.org/SourcesList
And this SE question https://unix.stackexchange.com/questions/4255/why-is-there-a-separate-package-repository-for-debian-security-updates

Related

Install qmake in debian 7.11

I'm using debian 7.11.
I is said qt5 is not supported by apt-get.
$apt-get install qt4-qmake
it works.
However,
$apt-get install qt5-qmake
E: Unable to locate package qt5-qmake
Is there any work-around way to install qt5 in debian 7?
These are my sources.list
$less /etc/apt/sources.list
deb http://apt.readynas.com/packages/readynasos 6.5.1 updates apps main
deb http://mirrors.kernel.org/debian wheezy main
deb http://security.debian.org/ wheezy/updates main
deb http://egnyte-cdn.egnyte.com/storagesync/netgear6/en-us 6.5 egnyte
deb ftp://ftp.nerim.net/debian-marillat/ stable main
Take a look at this gist:
https://gist.github.com/iginosilva/fff315ff3072045e9819b6a268b4fdf2
sudo apt-get install qt5-default
It worked for Ubuntu 16 xenial
qmake --version
QMake version 3.0
Using Qt version 5.6.1 in /usr/lib/x86_64-linux-gnu
Which I think that is the correct qmake. you can check the build input on GitHub:
https://github.com/qt/qtbase/tree/5.6/qmake
At present the latest Qt version seems to be something like 5.11 or better. However one must acknowledge that released packages will (needs be) lag the bleeding edge.
If I saw things correctly, Qt 5 is available in the Jessie repositories
You should either install a debian based on Jessie (so you only use packages from it) or add the repositories from Jessie in your sources.list (copy the lines from stable and change the target to testing), sync and install Qt 5
Change Wheezy example:
deb http://http.debian.net/debian wheezy main
to Jessie:
deb http://http.debian.net/debian jessie main
Hope it helps

installing linux kernel headers for Debian 2.6.32-48 squeeze 6

I cannot install the kernel header package for debian. Its not found with apt-get install, even 'apt-cache search linux-headers' yields no results for my version.
My sources.list:
deb http://ftp.us.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.us.debian.org/debian/ wheezy main contrib non-free
Any help would be appreciated

How to upgrade phpMyAdmin in Debian 7?

I installed some time ago phpMyAdmin on my Debian 7 server via apt-get install phpmyadmin and the version which has been installed was "3.4.11.1deb2". Current the latest version is 4.1.12 (I looked for that on the phpMyAdmin website).
My problem is, when I run the command apt-get update and apt-get upgrade it should normally update all installed packages but it doesn't update phpMyAdmin to the latest version. Do I have to do that manually and if yes, how do I to do that?
No, it behaves as expected.
Any release of Debian comes with the software versions that were considered "stable" at the time of the Debian release. Actually a "bit" earlier, as Debian goes to great lengths to make sure that the software in the release really is stable and that it plays together nicely with all other packages in that release (and there are quite a lot of packages too: iirc, Debian 7 comes with almost 50000 different software packages!).
Debian 7 (codename "wheezy") has been released on May 4th, 2013. At that time, there probably was no phpmyadmin-4.x available anywhere (not even on the harddisks of the phpmyadmin-developers). That's why Debian 7 comes with phpmyadmin-3.4.11.1.
Sometimes packages get updated after a Debian release. This is only to fix severe security problems, and never to just get a new "hot and fresh" version of a given package.
Whenever you do an aptitude update && aptitude upgrade, you will only upgrade packages in your chosen Debian release (automatically upgrading to a new release might involve downloading thousands of packages and surprise you with a completely new system the next time you look at it).
There's an online interface where you can check which version of a given package is in which (currently supported) Debian release.
So in order to get an up-to-date version of a given package you have the following options:
check whether somebody has backported a recent version of your favourite package to the Debian release you are using.
upgrade your Debian to a version that supports it
download/build the package yourself (preferably creating a proper Debian package, which you can share with other people)
You can leverage the Jessie repository to upgrade certain Wheezy packages, but all the usual admonitions apply. Testing this on a backup machine is a really good idea,
Copy /etc/apt/sources.list > /etc/apt/sources.list.wheezy
Edit the /etc/apt/sources.list file:
gedit /etc/apt/sources.list
and replace the contents of /etc/apt/sources.list
with the following lines:
deb h.t.t.p://ftp.de.debian.org/debian/ jessie main contrib non-free
deb-src h.t.t.p://ftp.de.debian.org/debian/ jessie main contrib non-free
deb h.t.t.p://httpredir.debian.org/debian jessie-updates main contrib non-free
deb-src h.t.t.p://httpredir.debian.org/debian jessie-updates main contrib non-free
deb h.t.t.p://security.debian.org/ jessie/updates main contrib non-free
deb-src h.t.t.p://security.debian.org/ jessie/updates main contrib non-free
(Change h.t.t.p > http. You can replace "de" with e.g. "us" or your country code, but it should make no difference).
Save the file and run the following command to update the sources database:
apt-get update
DO NOT RUN apt-get upgrade!
Next,
apt-get install phpmyadmin
choose your options. I didn't modify my config but did upgrade the database.
Then, just to be safe, I ran
php5enmod mcrypt
service php5-fpm restart
IMPORTANT!!! Change your repository back to wheezy!
Rename /etc/apt/sources.list to /etc/apt/sources.list.jessie
Rename /etc/apt/sources.list.wheezy to /etc/apt/sources.list
Run
apt-get update
You should be back on the Wheezy repositories.
That should do it.

Latest nginx source on debian wheezy

In tutorials I have seen people talk about adding a source.list to get the latest nginx version. I found this one for debian 6:
deb http://nginx.org/packages/debian/ squeeze nginx
deb-src http://nginx.org/packages/debian/ squeeze nginx
Can anyone tell me what it is for debain 7 please? I can't seem to find it, and I am not sure if exists yet.
Try with this :
deb http://nginx.org/packages/debian/ wheezy nginx
deb-src http://nginx.org/packages/debian/ wheezy nginx
Because the name of Debian 7 is "Wheezy".
You can
browse the development source tree at http://hg.nginx.org/nginx/file/
or clone that reposity to your local machine by hg clone http://hg.nginx.org/nginx

Debian Squeeze apt-get errors when installing Git?

I'm new to Linux/Debian (squeeze). I'm trying to do an apt-get to install git and receive this error message.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package git-core is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'git-core' has no installation candidate
i tried editing my sources.list to the following
# deb cdrom:[Debian GNU/Linux 6.0.5 Squeeze - Official i386 DVD Binary-1 20120512-13:45]/ > squeeze contrib main
# deb cdrom:[Debian GNU/Linux 6.0.5 Squeeze - Official i386 DVD Binary-1 20120512-13:45]/ squeeze contrib main
deb http://security.debian.org/ squeeze/updates main contrib
deb-src http://security.debian.org/ squeeze/updates main contrib
deb http://ftp.us.debian.org/debian/ squeeze/updates main contrib
deb-src http://ftp.us.debian.org/debian/ squeeze/updates main contrib
deb http://http.us.debian.org/debian squeeze/updates main contrib
deb-src http://http.us.debian.org/debian squeeze/updates main contrib
# squeeze-updates, previously known as 'volatile'
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
deb http://ftp.debian.org/debian/ squeeze-updates main contrib
deb-src http://ftp.debian.org/debian/ squeeze-updates main contrib
as i said i'm very new to this so i don't know what needs to be in the sources.list file. I can't actually install anything right now. i tried installing php as well and got the same error. please help :(
The git-core package is obsolete, try installing git.
EDIT
Furthermore you only have squeeze updates repositories in your sources.list, add at least one regular squeeze repository to get access to all packages, not just updated ones:
deb http://ftp.debian.org/debian/ squeeze main contrib non-free
Afterwards run apt-get update to update your local package index.

Resources