Cara menggunakan install mysqli ubuntu

Ketik alamat yang Anda terima di browser web Anda dan itu akan membawa Anda ke halaman arahan default Nginx:

http://server_domain_or_IP
Cara menggunakan install mysqli ubuntu

Jika Anda melihat halaman di atas, itu berarti Anda telah berhasil menginstal Nginx dan mengaktifkan lalu lintas HTTP untuk server web Anda.

STEP KEDUA - MENGINSTALL MYSQL

Anda dapat menggunakan apt untuk menginstall software ini:

$ sudo apt install mysql-server

konfirmasi penginstalan dengan mengetik Y, lalu ENTER.

Saat selesai, Anda disarankan untuk menjalankan script keamanan yang diinstal di MySQL. Script ini akan menghapus pengaturan default yang not secure dan me lock akses ke sistem database Anda. Mulai skrip interaktif dengan menjalankan:

$ sudo mysql_secure_installation

Ini akan menanyakan apakah Anda ingin mengkonfigurasi VALIDATE PASSWORD PLUGIN.

Tekan Y untuk ya, atau apa pun untuk melanjutkan tanpa mengaktifkan.

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No:

Jika Anda menjawab

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No:
0, Anda akan diminta memilih level sandi.

There are three levels of password validation policy:

LOW    Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary              file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1

Jika Anda sudah memilih level sandi, Silahkan buat sandi Anda sesuai Kemauan.

Jika sudah bisa tulis

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No:
0 untuk ya:

Estimated strength of the password: 100 
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y

Untuk pertanyaan lainnya, tekan Y dan ENTER di setiap pertanyaan.

Jika sudah, Anda uji apakah bisa masuk ke console MYSQL:

$ sudo mysql
OutputWelcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 8.0.19-0ubuntu5 (Ubuntu)

Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

Ini akan terhubung ke server MYSQL sebagai root admin.

Untuk keluar dari konsol MySQL, ketik:

mysql> exit

STEP KETIGA - MENGINSTALL PHP

Anda perlu menginstal php-fpm, yang merupakan singkatan dari "PHP fastCGI process manager", dan memberi tahu Nginx untuk meneruskan permintaan PHP ke software ini untuk diproses. Selain itu, Anda memerlukan php-mysql, modul PHP yang memungkinkan PHP berkomunikasi dengan database berbasis MySQL. Paket inti PHP akan secara otomatis diinstal sebagai dependensi.

Untuk menginstal paket php-fpm dan php-mysql, jalankan:

$ sudo apt install php-fpm php-mysql

Ketik

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No:
0 untuk konfirmasi penginstallan.

STEP KEEMPAT - Konfigurasi Nginx untuk Menggunakan PHP Processor

Buat direktori web root untuk domain_Anda sebagai berikut:

$ sudo mkdir /var/www/domain_Anda

Kemudian, buka file konfigurasi baru di direktori situs-tersedia Nginx menggunakan editor baris perintah pilihan Anda. Di sini, kami akan menggunakan vim:

$  sudo vim /etc/nginx/sites-available/domain_Anda

Salin dan tempel script berikut dan ganti dengan doamin yang Anda inginkan:

server {
    listen 80;
    server_name domain_anda www.domain_anda;
    root /var/www/domain_anda;

    index index.html index.htm index.php;

    location / {
        try_files $uri $uri/ =404;
    }

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

    location ~ /\.ht {
        deny all;
    }

}

Setelah selesai, simpan dan tutup file. Jika Anda menggunakan

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No:
4, Anda dapat melakukannya dengan mengetik
VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No:
5 lalu
VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No:
6 dan
VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No:
7 untuk mengonfirmasi.

Aktivasi konfigurasi Anda dengan file konfigurasi dari direktori

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No:
8  Nginx:

$ sudo ln -s /etc/nginx/sites-available/domain_Anda /etc/nginx/sites-enabled/

Kemudian, unlink konfigurasi default dari direktori

VALIDATE PASSWORD PLUGIN can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD plugin?

Press y|Y for Yes, any other key for No:
8 :

$ sudo unlink /etc/nginx/sites-enabled/default

Anda dapat menguji konfiguirasi Anda benar atau error:

$ sudo nginx -t

Kemudian reload Nginx untuk menerapkan konfigurasi nya:

$ sudo systemctl reload nginx

Buat file

There are three levels of password validation policy:

LOW    Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary              file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1
0 di direktori
There are three levels of password validation policy:

LOW    Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary              file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1
1 :

$ vim /var/www/domain_Anda/index.html

Salin dan tempel script berikut ini:


  
    domain_anda website
  
  
    

Hello World!

This is the landing page of domain_anda.

Sekarang buka browser dan akses ke server domain/IP public Anda.

http://server_domain_or_IP

Anda akan melihat page seperti ini:

Cara menggunakan install mysqli ubuntu

STEP KELIMA - TEST PHP DENGAN NGINX

Anda dapat melakukannya dengan membuat file PHP di root dokumen Anda. Buka file baru bernama info.php di dalam root dokumen Anda di editor teks Anda:

$ vim /var/www/domain_Anda/info.php

Salin dan Tempel Script berikut ini:

Simpan dan tutup file dengan mengetik CTRL + X lalu y dan ENTER untuk konfirmasi.

Anda dapat membuka browser dan memasukan alamat domain atau IP public Anda:

http://server_domain_or_IP/info.php

Anda akan melihat halaman web yang berisi informasi tentang server Anda:

Cara menggunakan install mysqli ubuntu

Setelah memeriksa informasi tentang server PHP Anda melalui halaman itu, sebaiknya hapus file yang Anda buat karena berisi informasi sensitif tentang PHP dan server Ubuntu Anda. Anda dapat menggunakan

There are three levels of password validation policy:

LOW    Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary              file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 1
2 untuk menghapus file itu: