Precision 7540: Difference between revisions
Jump to navigation
Jump to search
m 1 revision imported |
|||
| Line 99: | Line 99: | ||
See: https://wiki.debian.org/LaMp | See: https://wiki.debian.org/LaMp | ||
<blockquote>Later we removed this, we are going full docker style</blockquote> | <blockquote><h3>Later we removed this, we are going full docker style</h3></blockquote> | ||
== Services == | == Services == | ||
Revision as of 14:36, 5 January 2025
Base System
Install Debian Gnome on preconfigured luks/lvm disk:
- Use Expert Install from the netinst ISO.
- Select rescue-mode in "Load installer components from installation media" step.
- Before the "Partition disks" step, select "Execute a shell".
- Use cryptsetup open on your LVM partition. Use lvs to confirm that your logical volumes are visible.
- Exit the shell and select "Partition disks". Use manual partitioning and mount the right LVs at /, /home, and swap.
- Proceed with the remaining installation steps, but stop before "Finish the installation".
- Go to "Execute a shell" again and edit /target/etc/crypttab to unlock your LUKS partition on boot.
- Exit the shell and select "Finish the installation".
Ad 7: The UUID must be filled, I used this command:
cryptsetup luksDump /dev/sda3 | grep -F UUID >> /target/etc/crypttab
Then I edited the file:
nano /target/etc/crypttab cat /target/etc/crypttab sda3_crypt UUID=[UUID from luksDump] none luks,discard
I also had to do:
update-initramfs -u -k all
https://www.reddit.com/r/debian/comments/1599rkt/how_to_reinstall_debian_12_with_existing/
Add users
Add users miel and multimedia
Colored prompt and .bashrc
- Add following to /etc/profile:
if [ "$SHELL" = "/bin/bash" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
- Add following to /root/.bashrc and /home/rijk/.bashrc:
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
####################################################################
##### Colored man pages #########################################
####################################################################
export LESS_TERMCAP_mb=$'\e[1;32m'
export LESS_TERMCAP_md=$'\e[1;32m'
export LESS_TERMCAP_me=$'\e[0m'
export LESS_TERMCAP_se=$'\e[0m'
export LESS_TERMCAP_so=$'\e[01;33m'
export LESS_TERMCAP_ue=$'\e[0m'
export LESS_TERMCAP_us=$'\e[1;4;31m'
####################################################################
##### Eternal bash history #######################################
####################################################################
# Undocumented feature which sets the size to "unlimited".
# https://stackoverflow.com/questions/9457233/unlimited-bash-history
export HISTFILESIZE=
export HISTSIZE=
export HISTTIMEFORMAT="%d-%m-%Y %H:%M:%S "
# Change the file location because certain bash sessions truncate .bash_history file upon close.
# http://superuser.com/questions/575479/bash-history-truncated-to-500-lines-on-each-login
export HISTFILE=~/.bash_eternal_history
alias ls='ls --color=auto'
alias la='ls -la'
alias ll='ls -l'
alias bat='bat -P'
export EDITOR=vim
Prevent sleep
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
But also: https://geitenpad.rijkenmiel.nl/mediawiki/index.php/Lenovo_U410#Disable_sleep
LAMP
nala install mariadb-server mariadb-client nala install apache2 apache2-utils nala install ufw ufw allow http nala install php libapache2-mod-php php-cli php-fpm php-json php-pdo php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath
mysql_secure_installation Switch to unix_socket authentication [Y/n]. y Set root password? [Y/n]. n Remove anonymous users? [Y/n]. y Disallow root login remotely? [Y/n]. y Remove test database and access to it? [Y/n]. y Reload privilege tables now? [Y/n]. y
Add db user admin:
GRANT ALL PRIVILEGES ON *.* TO 'admin'@localhost IDENTIFIED BY 'password1';
See: https://wiki.debian.org/LaMp
Later we removed this, we are going full docker style
Services
root@Geitenpad:~# nala install docker docker-compose git root@Geitenpad:~# systemctl enable --now docker root@Geitenpad:~# usermod -aG docker rijk
rijk@Geitenpad:~$ mkdir -p Development/git rijk@Geitenpad:~$ cd Development/git/ rijk@Geitenpad:~/Development/git$ git clone git@gitlab.com:raginggoblin/docker-containers.git