desktop-ubuntu/php/_install-latest.sh

63 lines
938 B
Bash
Raw Normal View History

2024-01-20 18:10:59 +01:00
#!/bin/sh
2023-06-18 15:34:39 +02:00
sudo apt install -y \
software-properties-common \
aptitude
sudo aptitude update
sudo aptitude -y install \
apache2 \
2024-01-20 18:10:59 +01:00
php \
composer
2023-06-18 15:34:39 +02:00
php -v
sudo aptitude install -y \
2024-01-20 18:10:59 +01:00
libapache2-mod-php \
2023-06-18 15:34:39 +02:00
libapache2-mod-fcgid \
php-apcu \
php-bcmath \
php-cli \
php-common \
php-curl \
php-gd \
php-imap \
php-intl \
php-json \
php-ldap \
php-mbstring \
php-mysql \
php-mysqli \
php-opcache \
php-pgsql \
php-readline \
php-soap \
php-xml \
php-zip
php -m
sudo a2enmod php8.1
sudo a2enmod rewrite
sudo a2enmod ssl
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod headers
sudo systemctl restart apache2
sudo usermod -a -G www-data $USER
sudo chown -R $USER:www-data /var/www/
sudo chown -R www-data:www-data /var/lib/php/
2024-01-20 18:10:59 +01:00
## 7.x
# sudo ln -s \
# '/Cfg/php/php7.ini' \
# '/etc/php/7.4/apache2/php.ini' --force
## 8.x
# sudo ln -s \
# '/Cfg/php/php8.ini' \
# '/etc/php/8.1/apache2/php.ini' --force