TKK_E32211859/kode program.txt

63 lines
1.6 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Kode program dalam layanan web server menggunakan dua virtual machine dengan ubuntu dan centos di proxmox virtual environment adalah sebagai berikut:
1. Ubuntu server
a. install apache web server
1) sudo apt update
2) sudo apt install apache2
b. install MySQL
1) sudo apt install mysql-server
2) sudo mysql
c.Membuat Database MySQL
1) sudo mysql
2) CREATE DATABASE nama database;
3) CREATE USER ' nama user'@'%' IDENTIFIED BY 'password';
4) GRANT ALL ON nama database.* TO 'nama user'@'%';
5) exit
6) mysql -u nama user p
7) SHOW DATABASES;
d.Install PHP di Ubuntu
1) sudo apt install php libapache2-mod-php php-mysql
2) php v
e.Install PhpMyAdmin di Ubuntu
1) sudo apt install phpmyadmin
2.CentOS Server
a. install apache web server
1) sudo dnf install httpd
2) sudo systemctl start httpd
3) sudo systemctl enable httpd.service
4) sudo firewall-cmd --permanent --add-service=http
5) sudo firewall-cmd --permanent --list-all
6) sudo firewall-cmd reload
b. install MariaDB
1) sudo dnf install mariadb-server
2) sudo systemctl start mariadb
3) sudo systemctl enable mariadb.service
4) sudo mysql
c.Membuat Database MariaDB
1) CREATE DATABASE nama database;
32
2) GRANT ALL ON nama database.* TO 'nama user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
3) FLUSH PRIVILEGES;
4) Exit
5) mysql -u nama user p
6) SHOW DATABASES;
d.Install PHP di CentOS
1) sudo dnf install php-fpm php-mysqlnd
2) sudo systemctl restart httpd
e.Install PhpMyAdmin di CentOS
1) sudo dnf install epel-release
2) sudo dnf install phpmyadmin
3) sudo nano /etc/httpd/conf.d/phpMyAdmin.conf
4) systemctl restart httpd