Skip to content

Instantly share code, notes, and snippets.

@seddik
Last active April 23, 2019 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seddik/22d4e83fbf52e5651f1ba776732bdaac to your computer and use it in GitHub Desktop.
Save seddik/22d4e83fbf52e5651f1ba776732bdaac to your computer and use it in GitHub Desktop.
sudo apt update
sudo apt install apache2 -y
sudo ufw app list
sudo ufw app info "Apache Full"
sudo ufw allow in "Apache Full"
sudo apt install mysql-server -y
sudo mysql_secure_installation
sudo apt install php libapache2-mod-php php-mysql php-cli -y
sudo systemctl restart apache2
sudo systemctl status apache2
sudo timedatectl list-timezones Africa/Algiers
apt-get install php7.2-mbstring -y
apt-get install php-xml -y
sudo apt-get install php7.2-zip -y
######################################
sudo chown -R www-data:www-data .
sudo find . -type f -exec chmod 644 {} \;
sudo find . -type d -exec chmod 755 {} \;
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
#######################################
CREATE USER 'developer'@'%' IDENTIFIED BY 'user_password';
GRANT ALL PRIVILEGES ON *.* TO 'developer'@'%';
flush privileges;
########################################
sudo apt-get install python-certbot-apache
sudo certbot --apache -d example.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment