# serveur LAMP sur ubuntu 22.04 LTS LXC

apt update && sudo apt upgrade -y
apt install apache2 -y
systemctl enable apache2
systemctl start apache2
a2enmod rewrite
# permettre le php sans balise
cd /etc/php/8.1/apache2 || exit
cat php.ini | grep -v short_open_tag  > php.tmp
echo "short_open_tag = On" >> php.tmp
cp php.tmp php.ini 
service apache2 restart


apt install mysql-server -y
systemctl enable mysql
systemctl start mysql
mysql_secure_installation <<EOF

y
azerty
azerty
y
y
y
y
EOF

apt install php libapache2-mod-php php-mysql php-curl php-xml php-mbstring -y
apt install  php-gd  -y
systemctl restart apache2
apt install curl unzip php-cli php-mbstring git -y
apt install vim net-tools   -y

# fuseau horaire
timedatectl set-timezone Europe/Paris


