Skip to content

Instantly share code, notes, and snippets.

@Padilo300
Last active February 20, 2023 18:00
Show Gist options
  • Save Padilo300/64fd0c1e983b2f0c8dd4ba929def12a2 to your computer and use it in GitHub Desktop.
Save Padilo300/64fd0c1e983b2f0c8dd4ba929def12a2 to your computer and use it in GitHub Desktop.
install apache2 php8.2
#!/bin/bash
# Update the package index and upgrade existing packages
apt-get update
apt-get upgrade -y
# Install Apache2
apt install curl wget nmap htop
apt-get install apache2 -y
# Add the PHP repository to the system
apt-get install lsb-release apt-transport-https ca-certificates -y
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
# Update the package index and install PHP 8.2
apt-get update
apt-get install php8.2 -y
# Install the Apache2 PHP module
apt-get install libapache2-mod-php8.2 -y
# Обновляем список пакетов
apt-get update
# Устанавливаем необходимые пакеты
apt-get install php-zip php-curl php-gd php-mbstring php-xml php-mysql php-ldap php-bcmath php-soap php-imagick php-dev php-pear php-mcrypt php-opcache php-redis php-memcached php-igbinary php-msgpack php-xmlrpc php-smbclient
# Устанавливаем Composer (опционально)
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Перезапускаем веб-сервер (если необходимо)
service apache2 restart
service nginx restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment