18 07/01/2017
tujuan:
instalasi os jaringan
- linux
- windows
layanan OS jaringan
- DHCP server
- DNS Server
- Mail Server
- Web
- Proxy
===Radio Streaming
===Video Streaming
===SMS Gateway
===Virtualisasi
Server diakses public
- DMZ
===================================================================================
=
Management user
default user linux: root
efek:
sangat bebahaya jika password root
jika diketahui pihak yg tdk berbahaya
saran:
minimalisir login ke sistem
menggunakan akun root
Setting ip
apt-get install ssh
etc/ssh/sshd_config-> PermittLogin yes-> service ssh restart
putty->
nama: user2
password: 1234
tugas:MINGGU DEPAN
- membuat perencanaan user dan grup
membuat skenario jaringan utk suatu object tertentu
misal: membangun LAN di kantor x
layanan
- penjadwalan proses
crontab
edit crontab:
command: crontab -e
skenario:
shutdown PC jam 09:11 setiap hari
15 09 * * * /sbin/init 0
menit jam tanggal bulan hari
=============================================================================
0 1 * * 5 /bin/execute/this/script.sh
Get it? The script is now being executed when the system clock hits:
minute: 0
of hour: 1
of day of month: * (every day of month)
of month: * (every month)
and weekday: 5 (=Friday)
=============================================================================
Crontab file
Crontab syntax :
A crontab file has five fields for specifying day , date and time followed by the
command to be run at that interval.
* * * * * command to be executed
- - - - -
| | | | |
| | | | +----- day of week (0 - 6) (Sunday=0)
| | | +------- month (1 - 12)
| | +--------- day of month (1 - 31)
| +----------- hour (0 - 23)
+------------- min (0 - 59)
nano /etc/motd
Membuat Script
sebaiknya skrip dikumpulkan dlm satu folder
contoh: /myscript
nb: supaya bisa dijalankan, set folder 755
command:
mkdir -m 755 myscripts ---> membuat direktori/foldr
rmdir myscripts----> menghapus direktori
contoh:
nano script : 1.sh--> langsung dieksekusi
supaya bisa dijalankan ubah mode permission ke 755
-> chmod 755 1.sh
detail:
1.sh
clear
read -p
echo "hello world"
/sbin/init 6
.\ 1.sh ->menjalankan
myscripts./1.sh ->menjalankandi luar direktori -->sulit
ech
echo $PATH // menampilkan path yg sudah ada
menambahkan path
contoh /myscripts
export PATH=$PATH:/myscripts ---> agar bisa dijalankan di semua tempat tanpa masuk
direktori myscript
ini sementara jika ingin permanen harus dimasukkan dlm bash
===================================================================================
===========================================
06.57 14/01/2017
1. review materi
management user
- sudo
manajemen proses
- crontab
2. materi lanjutan
- script shell -> dihubungkan dengan crontab
- linux struktur directory -> dihubungkan dengan script shell
- file permission -> diakses mode
- manajemen user lanjutan
-> mengatur home directory
-> mengganti user name
-> mengatur enable/ disable
-> mengganti password
-> menghapus user
* dns server
install deb8-manajemen
hostname: ns1
domain: putri.tkj
user: user1 password:123 root, password:123
1. konfigurasi ip:192.168.220.14/28
address: 192.168.220.14
netmask: 255.255.255.240
gateway: 192.168.220.1
virtual box
VHD-> MUDAH DIKLONING
dynamix
guided
sparate
home->userQouta QUota =2
sumber belajar :
linux command : http://ss64.com/bash/
linux directory system :
(kunci pencarian : linux direcroty structure)
http://www.tecmint.com/linux-directory-structure-and-important-files-paths-
explained/
http://www.thegeekstuff.com/2010/09/linux-file-system-structure/?
utm_source=tuicool
webalizer :
https://blog.100tb.com/analyze-your-website-statistics-with-webalizer-on-debian-
and-ubuntu
DNS server:
software: bind versi bind9
service adalah program yg bekerja dibalik layar
IIS: internet
service: bind9
service bind9 start|restart|stop
/etc/init.d/bind9 -> etc: configurasi file
instalasi
apt-get install bind9
file konfigurasi:
/etc/bind
- named.conf: memudahkan konfigurasi -> untuk konfigurasi kita , tdk dicampur di
sistem
biar tidak bubrah
localhost-> ip untuk ngeping dirinya sendiri nama lainnya localhost
127.0.0.
type: master - ok -> konfigurasi ada di laptop ini/komputer ini terletak di nama
ini
/etc/bind/db.local
slave - blm
forword -blm
lainnya masuk IANA
DNS Top level domain:strukturenya
Informasi DNS:
- host ke ip address
- ip address ke host
disimpan di
NS: Name Server
A: Address
CNAME:alias
praktik:
nslookup -> nslookup 192.168.220.14
named-checkconf
named-checkzone : named-checkzone putri.tkj db.putri
dig : dig 192.168.220.14
nslookup -debug -r
debian dns query
WEB SERVER
1. pastikan alias joomla
instal joomla
Tips
www-data->user web
ubah pemilik file ke www-data
->chown -R www-data.www-data /var/www/joomla
6. aktifkan virtualhost
cd /etc/apache2/sites-available
a2ensite <file konfigurasi>
a2ensite jooomla.conf
7.Restart apache
service apache2 restart
8. Akses Web menggunakn Browser
https://joomla.putri.tkj
Agenda
1. review konfigurasi Web Server
- virtual hosts
->alias dari suatu host real
->1. ip address memiliki beberapa nama
->jika diakses menggunakan alias tetap mengarah pd yg sama
Langkah kerja:
1. membuat alias
- menggunakan : /etc/hosts
- struktur :
<ip address> <hostname> [<alias>]
192.168.10.1 webguru
192.168.10.1 webguru myweb
2. membuat DocumentRoot
misal di debian
-> misal 192.168.220.14 (namanya: server name)
-> folder/direktori yg berisi resources web (php, html,dll)
>yg dakses oleh user menggunakan URL atau
>serverName tertentu (http://joomla.tkj)
>servername adalah yg akan dituliskan pd URL
DocumentRoot
debian: /var/www/html
kalo mau pindah tempat lain boleh? boleh
(pastikan konfigurasi benar ....,
minimal direktori bisa dibaca dan dieksekusi
oleh semua user(chmood shwon))
-mengaktifkan modul:
- a2enmod
<virtualhost>
</virtualhost>
joomla.conf
<directory nm_direktori>
</directory>
tambahkan
Deny from all
contoh:/etc/apache2/site-available/joomla.conf
<VirtualHost>
Deny from all
</VirtualHost>
hasil: keluar forbiden
<Directory "/var/www/joomla">
ngatur ip, ngatur hostname,,dns, apache, mysql,php,
hostnamectl set-hostname ns1
===================================================
07.11 11/02/2017