Ubuntu Linux Nginx MySQL PHP

Ubuntu 16.04 LEMP kurulumu.  Linux Mysql  Nginx Php Kurulumu.

#### NGINX INSTALL
apt-get update && apt-get upgrade -y
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update -y
sudo apt-get install nginx

Nginx kurulumu sonrası site kontrulu.
http://ip_adres/

nginx service test ve kontrolu:
sudo nginx -t
sudo service nginx status
sudo service nginx reload

#### MYSQL INSTALL
sudo apt-get install mysql-server php-mysql -y
sudo mysql_secure_installation
n n y y y…

####PHP INSTALL
sudo apt-get install php-cli php-curl php-dev php-fpm php-gd php-mcrypt php-opcache php-mbstring php-xml php-xmlrpc

##Uncomment and change conf php.ini
vim /etc/php/7.0/fpm/php.ini
cgi.force_redirect = 0
allow_url_fopen = Off

#php service restart
sudo systemctl restart php7.0-fpm.service
or
/etc/init.d/php7.0-fpm restart

##Uncomments or add nginx conf
vim /etc/nginx/sites-available/default

location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}

#nginx service test and reload
nginx -t
/etc/init.d/nginx reload

##Php Control Web Site
vim /var/www/html/phptest.php

<?php
phpinfo();
?>

http://ip_adres/phptest.php

rm /var/www/html/phptest.php

About

Yeniliklere ve gelişime aç...

View all posts by

Bir cevap yazın