CENTOS 7 - NGINX - PHPFPM - MARIADB - PHPMYADMIN(OpenSSL) --------------------------------------------------------- FIREWALL -------- # systemctl disable firewalld && systemctl stop firewalld && systemctl status firewalld NGINX ----- # rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm # yum install nginx -y # systemctl start nginx && systemctl enable nginx MARIDB ------ # yum install mariadb-server mariadb -y # systemctl start mariadb && systemctl enable mariadb.service # mysql_secure_installation password: 123456 PHP-FPM ------- # yum install php php-mysql php-fpm -y # vi /etc/php.ini cgi.fix_pathinfo=0 # vi /etc/php-fpm.d/www.conf listen = /var/run/php-fpm/php-fpm.sock # systemctl start php-fpm && systemctl enable php-fpm # cp /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default_yedek.conf # vi /etc/nginx/conf.d/default.conf server { listen 80; server_name ip adresiniz; root /usr/share/nginx/html; index index.php index.html index.htm; location / { try_files $uri $uri/ =404; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { root /usr/share/nginx/html; } location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } # systemctl restart nginx # vi /usr/share/nginx/html/info.php WEB TEST: http://192.168.0.220/info.php PHPMYADMIN ---------- # yum install epel-release -y # yum install phpmyadmin -y # vi /etc/httpd/conf.d/phpMyAdmin.conf # Apache 2.2 Order Deny,Allow Deny from All Allow from 127.0.0.1 192.168.0.0/24 --> EKLENİR: 192.168.0.0/24 Allow from ::1 # ln -s /usr/share/phpMyAdmin /usr/share/nginx/html # mv /usr/share/nginx/html/phpMyAdmin /usr/share/nginx/html/dbadmin # systemctl restart php-fpm WEB TEST: http://192.168.0.220/dbadmin PHPMYADMIN'E KIMLIK DOĞRULAMA EKLEME ------------------------------------ # openssl passwd Password: 12345678 Verifying - Password: 12345678 AJLb7aLD06HzA # vi /etc/nginx/pma_pass admin:AJLb7aLD06HzA # vi /etc/nginx/conf.d/default.conf --> AŞAĞIDAKİ SATIRLAR EKLENİR. location /dbadmin { auth_basic "Admin Login"; auth_basic_user_file /etc/nginx/pma_pass; } # systemctl restart nginx WEB TEST: http://192.168.0.220/dbadmin Kimlik Doğrulama: user: admin / Password: 12345678 MariaDb user: user: root / Sifre: 123456