Konfigurasi
Debian
buka virtulbox debian10
Edit hostname
hostnamectl set-hostname ServerPesertaX
cek hostname dan Sistem Operasi
hostnamectl
ip address (menyesuaikan router) setting
Gateway dan IP DNS
nano /etc/network/interfaces
auto enp0s3
iface enp0s3 inet static
address
192.168.X.2
gateway
192.168.X.1
restart network
/etc/init.d/networking restart
cek ip
ip addr
coba ping 8.8.8.8 dan ping google.com,
pastikan TTL
pindah ke CMD PC dengan perintah :
masuk ke root
su
Edit nameserver dan tambahkan ip domain
nano /etc/resolv.conf
nameserver 192.168.X.1
nameserver 8.8.8.8
buat repository
nano /etc/apt/sources.list
deb http://kartolo.sby.datautama.net.id/debian/
buster main cotrib non-free
deb http://kartolo.sby.datautama.net.id/debian/
buster-updates main contrib non-free
deb http://kartolo.sby.datautama.net.id/debian-security/
buster/updates main contrib non-free
update repository
apt update
install bind9, dnsutils, mariadb-server,
apache2, php, php-mysql, links, unzip
apt install bind9 dnsutils -y
apt install mariadb-server
apt install apache2 php php-mysql links
unzip
masuk direktori bind
cd /etc/bind
masuk direktori named.conf.default-zones
dan copy file
nano named.conf.default-zones
masuk direktori named.conf.local paste
named.conf.default-zones
nano named.conf.local
zone "peserta117.sch.id" {
type master;
file
"/etc/bind/db.ukk";
}; zone "117.168.192.in-addr.arpa"
{
type master;
file
"/etc/bind/db.127";
};
Copy file yang sudah dibuat sebelumnya
cp db.local db.ukk
cp db.127 db.192
masuk ke file db.ukk dan edit db.ukk
nano db.ukk
CTRL+W CTRL+R ketik localhost enter pesertaX.sch.id enter A
$TTL
604800
@
IN SOA pesertaX.sch.id. root.pesertaX.sch.id.
(
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@
IN NS pesertaX.sch.id.
@
IN A 192.168.X.2
www
IN A 192.168.X.2
masuk ke file db.192
nano db.192
CTRL+W CTRL+R ketik localhost enter pesertaX.sch.id enter A
$TTL
604800
@
IN SOA pesertaX.sch.id. root.pesertaX.sch.id.
(
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS
pesertaX.sch.id.
2 IN
PTR pesertaX.sch.id.
Buka file named.conf.options
nano named.conf.options
hilangkan tanda (//)
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See
http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP
addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
forwarders {
8.8.8.8;
8.8.4.4;
};
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys.
See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation no;
allow-recursion { any; };
listen-on-v6 { any; };
};
Restart bind9 dengan perintah:
Systemctl restart bind9
cek status bind9 dan pastikan
active/berjalan
systemctl status bind9
buka file /etc/resolv.conf
nano /etc/resolv.conf
nameserver 192.168.X.2
nameserver 8.8.8.8
install mysql
mysql_secure_installation
masuk mysql
mysql -u root -p
membuat database
create database febri;
melihat database yang telah dibuat
show databases;
membuat user
create user terserah@localhost
identified by ‘123’;
grant all privileges on terserah.*
to terserah@localhost identified by ‘123’;
flush privileges;
keluar dari mysql
exit
masuk /var/www/html
cd /var/www/html
download wordpress
wget http://wordpress.org/latest.zip
buka file downloadan
unzip latest.zip
buka file
/etc/apache2/site-available/000-default.conf
nano
/etc/apache2/site-available/000-default.conf
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port
that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerName www.pesertaX.sch.id
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/wordpress
ServerAlias pesertaX.sch.id
Restart apache2
systemctl restart apache2
masuk root /var/www/html/wordpress
cd /var/www/html/wordpress
copy file wp-config-sample.php ke
wp-config.php
cp wp-config-sample.php wp-config.php
buka file wp-config.php
nano wp-config.php
* @package WordPress
*/
// ** Database settings - You can get this
info from your web host ** //
/** The name of the database for WordPress
*/
define( 'DB_NAME', febri’ );
/** Database username */
define( 'DB_USER', ‘febri’);
/** Database password */
define( 'DB_PASSWORD', '123' )
/** Database hostname */
define( 'DB_HOST', 'localhost' );
/** Database charset to use in creating
database tables. */
define( 'DB_CHARSET', 'utf8' );
/** The database collate type. Don't change
this if in doubt. */
define( 'DB_COLLATE', '' );
restart apache2
systemctl restart apache2
cek apakah sudah berhasil
nslookup pesertaX.sch.id
0 Response to "Konfigurasi Debian 10"
Posting Komentar