« Ubuntu arm 20.04 » : différence entre les versions
De Banane Atomic
Aller à la navigationAller à la recherche
(→uWSGI) |
|||
Ligne 118 : | Ligne 118 : | ||
# better use --plugin option instead of the following workaround | # better use --plugin option instead of the following workaround | ||
sudo ln -s /usr/lib/libphp8.so /usr/lib/libphp7.so | sudo ln -s /usr/lib/libphp8.so /usr/lib/libphp7.so | ||
</kode> | |||
= [https://doc.ubuntu-fr.org/mariadb MySql / MariaDb] = | |||
{{warn | L'utilisateur {{boxx|root}} utilise par défaut l'authentification {{boxx|unix_socket}}.<br /> | |||
Il faut donc utiliser {{boxx|sudo}} pour se connecter avec root et non pas le mdp.}} | |||
<kode lang='bash'> | |||
sudo apt install mariadb-server | |||
# connexion avec root après l'installation | |||
sudo mysql | |||
# status | |||
systemctl status mysql | |||
</kode> | |||
== [https://mariadb.org/download/?t=repo-config&d=18.04+LTS+%22bionic%22 Upgrade version] == | |||
<kode lang='bash'> | |||
# install apt-transport-https and curl if not yet installed | |||
sudo apt-get install apt-transport-https curl | |||
# add mariadb release signing key | |||
sudo curl -o /etc/apt/trusted.gpg.d/mariadb_release_signing_key.asc 'https://mariadb.org/mariadb_release_signing_key.asc' | |||
</kode> | |||
Add the repo | |||
<filebox fn='/etc/apt/sources.list.d/mariadb.list' lang='bash'> | |||
# MariaDB 10.10 repository list | |||
deb https://mirrors.ircam.fr/pub/mariadb/repo/10.10/ubuntu bionic main | |||
# deb-src https://mirrors.ircam.fr/pub/mariadb/repo/10.10/ubuntu bionic main | |||
# deb https://mirrors.ircam.fr/pub/mariadb/repo/10.10/ubuntu bionic main/debug | |||
</filebox> | |||
<kode lang='bash'> | |||
# backup | |||
# stop mariadb | |||
sc-stop mariadb | |||
# upgrade | |||
ai mariadb-server | |||
# start mariadb | |||
sc-start mariadb | |||
</kode> | </kode> | ||
Version du 9 août 2023 à 17:27
Links
Useful commande lignes
# updates adg # sudo apt update && sudo apt upgrade sudo snap refresh sudo reboot sudo poweroff |
APT (Advanced Package Tool)
zsh - oh my zsh
# install zsh apt install zsh zsh-syntax-highlighting # zsh install zsh-common # install oh-my-zsh and set zsh as default shell for the current user sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
~/.zshrc |
plugins=( alias-finder colored-man-pages common-aliases copybuffer debian extract fd git ripgrep sudo systemd wd) # don't store in history commands prefixed with a space (test with: history | tail) setopt HIST_IGNORE_SPACE # add hostname to PROMPT only for ssh connection if [[ -n $SSH_CONNECTION ]]; then PROMPT="%m ${PROMPT}" fi # must be loaded last source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh |
- zsh-antigen: plugin manager
- zsh-autosuggestions: autosuggestions
- zsh-syntax-highlighting: syntax highlighting
- zsh-theme-powerlevel9k: theme (deprecated)
netplan
/etc/netplan/01-netcfg.yaml |
network: version: 2 renderer: networkd ethernets: eth0: dhcp4: yes # addresses: [192.168.0.x/24] # gateway4: 192.168.0.y nameservers: addresses: [192.168.0.x, 192.168.0.y] # set multiple DNS servers |
# test the configuration, the configuration is applied for 120 seconds then reverted sudo netplan try # apply changes sudo netplan apply # creates the file /run/systemd/network/10-netplan-eth0.network # check the DNS servers systemd-resolve --status | grep 'DNS Servers' -A2 # display current DHCP lease netplan ip leases [interface] # debugging the generation of the file /run/systemd/network/10-netplan-eth0.network sudo netplan --debug generate |
UFW configuration
sudo ufw allow OpenSSH # port 22 sudo ufw allow 'Nginx Full' # port 80 443 sudo ufw allow DNS # port 53 (dnsmasq) |
PHP 8+
sudo add-apt-repository ppa:ondrej/php sudo add-apt-repository ppa:ondrej/nginx-mainline # new features, updates, bugfixes sudo add-apt-repository ppa:ondrej/nginx # no new features, major bugfixes only, annual release sudo add-apt-repository ppa:ondrej/apache2 |
uWSGI
Doesn't seem to work with PHP 8.2 and Ubuntu 20.04 |
With Ubuntu 20.04, ondrej ppa and PHP 8.2 installed, the following dependencies are wrongly installed: php7.4-cli php7.4-common php7.4-json php7.4-opcache php7.4-phpdbg php7.4-readline |
!!! UNABLE to load uWSGI plugin: libphp7.so: cannot open shared object file: No such file or directory !!! |
# better use --plugin option instead of the following workaround sudo ln -s /usr/lib/libphp8.so /usr/lib/libphp7.so |
MySql / MariaDb
L'utilisateur root utilise par défaut l'authentification unix_socket. Il faut donc utiliser sudo pour se connecter avec root et non pas le mdp. |
sudo apt install mariadb-server # connexion avec root après l'installation sudo mysql # status systemctl status mysql |
Upgrade version
# install apt-transport-https and curl if not yet installed sudo apt-get install apt-transport-https curl # add mariadb release signing key sudo curl -o /etc/apt/trusted.gpg.d/mariadb_release_signing_key.asc 'https://mariadb.org/mariadb_release_signing_key.asc' |
Add the repo
/etc/apt/sources.list.d/mariadb.list |
# MariaDB 10.10 repository list deb https://mirrors.ircam.fr/pub/mariadb/repo/10.10/ubuntu bionic main # deb-src https://mirrors.ircam.fr/pub/mariadb/repo/10.10/ubuntu bionic main # deb https://mirrors.ircam.fr/pub/mariadb/repo/10.10/ubuntu bionic main/debug |
# backup # stop mariadb sc-stop mariadb # upgrade ai mariadb-server # start mariadb sc-start mariadb |
Applications
Name | Version | Comment |
---|---|---|
NGINX | 1.24 | use ondrej ppa (native 1.22) |
PHP | 8.2.8 | use ondrej ppa (native 7.4.3) |
uWSGI | 2.0.18 |