Skip to content

Instantly share code, notes, and snippets.

@ahmeti
Last active July 28, 2019 11:50
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 ahmeti/7261f5a0c13b1461388253ea0a3375a3 to your computer and use it in GitHub Desktop.
Save ahmeti/7261f5a0c13b1461388253ea0a3375a3 to your computer and use it in GitHub Desktop.
Amazon AWS üzerinde Ubuntu 18.04, Nginx, Php 7.2, Mysql 8 Kurulumu
sudo service apache2 stop
sudo apt-get purge apache2*
sudo apt-get autoremove
whereis apache2
sudo rm -rf /etc/apache2
sudo apt update
sudo apt install nginx
sudo apt install php7.2-fpm
sudo apt install composer
sudo apt install php7.2-bcmath
php-fpm7.2 -v
sudo apt install php7.2-common
sudo apt install php7.2-mysql
sudo apt install php7.2-xml
sudo apt install php7.2-xmlrpc
sudo apt install php7.2-curl
sudo apt install php7.2-gd
sudo apt install php7.2-imagick
sudo apt install php7.2-cli
sudo apt install php7.2-dev
sudo apt install php7.2-imap
sudo apt install php7.2-mbstring
sudo apt install php7.2-opcache
sudo apt install php7.2-soap
sudo apt install php7.2-zip
sudo apt install php7.2-intl -y
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb
sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 5072E1F5
sudo apt update
sudo apt-get install mysql-server
sudo mysql_secure_installation
Remove anonymous users? Y
Disallow root login remotely? Y
Remove test database and access to it? Y
Reload privilege tables now? Y
set global log_bin_trust_function_creators = 1;
CREATE DATABASE mydatabase CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'myuser'@'localhost' IDENTIFIED WITH mysql_native_password BY 'mypass';
GRANT ALL PRIVILEGES ON mydatabase.* TO 'myuser'@'localhost';
FLUSH PRIVILEGES;
nano /etc/php/7.2/fpm/php.ini
max_execution_time = 180
max_input_time = 180
max_input_vars = 1500
memory_limit = 256M
post_max_size = 20M
upload_max_filesize = 20M
nano /etc/nginx/nginx.conf
http {
##
# Basic Settings
##
client_max_body_size 20M; # Add this line in http block
##
# SSL Settings
##
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; # Update this line in http block
ssl_prefer_server_ciphers on;
ssl_session_timeout 5m; # Add this line in http block
ssl_ciphers "HIGH:!aNULL:!MD5 or HIGH:!aNULL:!MD5:!3DES"; # Add this line in http block
}
sudo chown -R www-data:www-data /path/to/your/website
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment