User Tools

Site Tools


docs:tips_n_tricks:debian:index.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
docs:tips_n_tricks:debian:index.html [27.09.2014 11:20 CEST] – [/etc/apt/sources.list.d/] peterdocs:tips_n_tricks:debian:index.html [23.09.2023 01:48 CEST] (current) – [Building Packages] peter
Line 4: Line 4:
  
   # For general use:   # For general use:
-  apt-get install aptitude zsh less strace psutils rcs screen \+  apt-get install aptitude zsh less strace psmisc rcs screen \
                   rsync sshfs ntpdate host exim4-daemon-light \                   rsync sshfs ntpdate host exim4-daemon-light \
-                  sudo file bc mlocate man uemacs+                  sudo file bc mlocate man cvs patch [uemacs|nano] 
 +  # For some diagnostics 
 +  apt-get install pciutils iftop tcpdump lshw
   # For systems running on the "bare metal"   # For systems running on the "bare metal"
-  apt-get install smartmontools+  apt-get install smartmontools ethtool
   # For server maintenance   # For server maintenance
   apt-get install munin-node munin-plugins-extra sysstat   apt-get install munin-node munin-plugins-extra sysstat
   # For development use   # For development use
-  apt-get install dpkg-dev debhelper devscripts patch+  apt-get install dpkg-dev debhelper devscripts liburi-perl \ 
 +                  fakeroot build-essential autoconf bison \ 
 +                  autotools-dev sharutils
  
 ===== Configuration ===== ===== Configuration =====
Line 18: Line 22:
 ==== /etc/apt/sources.list.d/ ==== ==== /etc/apt/sources.list.d/ ====
  
-At least for //uemacs// you need to access the ''/usr/local'' repositories. This ''/etc/apt/sources.list.d/usr-local.list'' will do:+At least for //uemacs// you need to access the ''/usr/local'' repositories. Get it by
  
-:!: This is outdated :!:\\  +  wget -/etc/apt/sources.list.d/usr-local-debian.list -http://debian.usr-local.de/debian.list
-FIXME +
- +
-  deb-src http://debian.usr-local.de/debian sarge local non-free contrib +
-  deb     http://debian.usr-local.de/debian sarge local non-free contrib +
-  deb-src http://debian.usr-local.de/debian etch  local non-free contrib +
-  deb     http://debian.usr-local.de/debian etch  local non-free contrib +
-  deb-src http://debian.usr-local.de/debian lenny local non-free contrib +
-  deb     http://debian.usr-local.de/debian lenny local non-free contrib +
-  deb-src http://debian.usr-local.de/debian lucid local non-free contrib +
-  deb     http://debian.usr-local.de/debian lucid local non-free contrib +
-   +
-  deb-src http://debian.usr-local.de/debian gutsy         non-free +
-  deb     http://debian.usr-local.de/debian gutsy   local non-free contrib +
-  deb-src http://debian.usr-local.de/debian oneiric local non-free contrib +
-  deb     http://debian.usr-local.de/debian oneiric local non-free contrib+
  
 +==== /etc/apt/apt.conf.d/myconf ====
 :!: This is outdated :!: :!: This is outdated :!:
-==== /etc/apt/apt.conf.d/pjw ==== 
  
   APT::Default-Release "squeeze";   APT::Default-Release "squeeze";
  
 +==== Apt Pinning by Repository (/etc/apt/preferences) ====
 +// Tested with Debian 10 Buster //
 +<code text /etc/apt/preferences.d/99ul-pin-priorities>
 +# /usr/local Pin Priorities
 +# Need to be in sync with /etc/apt/sources.list !
 +# Check with apt-cache policy
 +
 +Package: *
 +Pin: origin deb.debian.org
 +Pin-Priority: 500
 +
 +Package: *
 +Pin: origin security.debian.org
 +Pin-Priority: 500
 +
 +# Package: *
 +# Pin: origin repo.dovecot.org
 +# Pin-Priority: 1
 +
 +Package: *
 +Pin: origin *
 +Pin-Priority: 1
 +</code>
 +
 +See:
 +  * https://wiki.debian.org/AptConfiguration#apt_preferences_.28APT_pinning.29
 +
 +==== Manage Repositories GPG Keys ====
 +
 +[[https://askubuntu.com/a/1307181|You need to know why apt-key add is deprecated]]
 ===== Change timezone ===== ===== Change timezone =====
 To change the timezone of a running systems, issue To change the timezone of a running systems, issue
Line 47: Line 66:
   tzconfig   tzconfig
  
-or+or((for later versions of Debian))
  
   dpkg-reconfigure tzdata   dpkg-reconfigure tzdata
  
 depending on your version of Debian. depending on your version of Debian.
 +
 +For unattended installations, the following **may** work:
 +
 +  debconf-set-selections tzdata.debconf
 +
 +<code text tzdata.debconf>
 +tzdata tzdata/Areas select Europe
 +# tzdata tzdata/Areas seen false
 +tzdata tzdata/Zones/Europe select Berlin
 +# tzdata tzdata/Zones/Europe seen false
 +</code>
 +
 +===== NFS Workaround =====
 +
 +For some versions of Debian, you need to add ''sec=sys'' in ''/etc/exports'' if you want to use ''no_root_squash''
 +
 +//Reference: [[https://lists.debian.org/debian-user/2008/08/msg01966.html|Re: NFS and no_root_squash - cannot write as root - permission denied (SOLVED)]]//
  
 ===== Change locale ===== ===== Change locale =====
  
   update-locale LANG=C LC_CTYPE=de_DE LANGUAGE   update-locale LANG=C LC_CTYPE=de_DE LANGUAGE
 +{{tag>locale}} 
 +{{entry>locale}}
 ===== Building Packages ===== ===== Building Packages =====
-  + 
 +  sudo apt-get install devscripts
   apt-get source <package>   apt-get source <package>
 +  # If you start here: dpkg-source -x <package>.dsc
   cd <packagedir>   cd <packagedir>
   # generating new changelog entry with local version suffix for distribution lenny:   # generating new changelog entry with local version suffix for distribution lenny:
   export DEBEMAIL="${DEBEMAIL:-peter@foo.bar}"   export DEBEMAIL="${DEBEMAIL:-peter@foo.bar}"
   export DEBFULLNAME="${DEBFULLNAME:-Peter Foobar}"   export DEBFULLNAME="${DEBFULLNAME:-Peter Foobar}"
-  dch -l ~ul~lenny -D lenny +  dch -l .ul~ulyana -D ulyana 
-  dpkg-buildpackage -rfakeroot+  dpkg-buildpackage -rfakeroot --no-sign 
 + 
 +===== Make Monday the first day of week in US locales ===== 
 + 
 +This works e.g. for the [[https://docs.xfce.org/xfce/xfce4-panel/clock|Clock xfce4-panal applet]]. 
 + 
 +Do as //root//: 
 + 
 +  mkdir -vp /usr/local/share/i18n/locales/ 
 +  sed -e 's/^week.*$/&\nfirst_weekday\t2/g' /usr/share/i18n/locales/en_US  > /usr/local/share/i18n/locales/en_US 
 +  locale-gen 
 + 
 +<note> 
 +GOSH! :-o\\ 
 +Yeah - it's as easy as that. The tricky part is to what to do 8-) 
 +</note> 
 +__References:__ 
 + 
 +  * [[https://www.reddit.com/user/mozycan/|mozycan]]'s [[https://www.reddit.com/r/xfce/comments/baq8xg/comment/ekdiob5|answer to "Can I make panel's calendar week start on Monday instead of Sunday?"]] on Reddit 
 +  * ''less /usr/sbin/locale-gen'' 
 +Also quite interesting while not directly related to //my// solution: 
 +  * [[https://unix.stackexchange.com/users/5462/0xc0000022l|0xC0000022L]]'s [[https://unix.stackexchange.com/a/204329|answer to "Change a locale definition (as opposed to a locale setting)"]] on Stackexchange. 
 + 
 +{{tag>locale Xfce}} 
 +{{entry>locale}} 
 +{{entry>Xfce}} 
 +===== Disabling systemd-resolved ===== 
 +//This was actually tried with success on a //Linux Mint 20 Ulyana//, but I assume it works pretty much the same on //Debian// and all its derivatives// 
 + 
 +The most easy way would be to uninstall //systemd-resolved//, but as it is bundled with //systemd// which unfortunately is a crucial part of //Debian// meanwhile, this ist not possible. 
 + 
 +<code bash> 
 +apt install resolveconf 
 +systemctl disable systemd-resolved 
 +vi /etc/NetworkManager/conf.d/10-dns-resolved.conf 
 +</code> 
 +We need to override ''/usr/lib/NetworkManager/conf.d/10-dns-resolved.conf'', therefore the file name does not really match its purpose((Actually, you should adapt the name, if the respective file in ''/usr/lib/NetworkManager/conf.d/'' has a different name)): 
 + 
 +<code plain /etc/NetworkManager/conf.d/10-dns-resolved.conf> 
 +dns=default 
 +rc-manager=resolvconf 
 +systemd-resolved=false 
 +</code> 
 + 
 +Disabling //systemd-resolved// in //systemd// and in //NetworkManager// propably doesn't make much of a difference after your told //NetworkManager// not to route DNS queries to it but for saving system resources.
  
 +References:
 +  * ''man NetworkManager.conf''
 +  * [[https://unix.stackexchange.com/a/580109|Stackexchange]]
 +{{tag>systemd DNS}}
 +{{entry>systemd}}
 +{{entry>DNS}}
 +======  ======
 {{tag>Linux Debian}} {{tag>Linux Debian}}
 {{entry>Linux}} {{entry>Linux}}
 {{entry>Debian}} {{entry>Debian}}
docs/tips_n_tricks/debian/index.html.1411809644.txt.gz · Last modified: 27.09.2014 11:20 CEST by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki