-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdigos_20161127.txt
237 lines (178 loc) · 5.23 KB
/
digos_20161127.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
##### Partisi Linux #####
/ (root) ext4, xfs
swap (virtual memory): 0.5-2 X RAM
##### Vim #####
Mode edit: i
Mode command: Esc
:q! -> keluar tanpa menyimpan
:w [namafile] -> menyimpan dengan namafile
:wq -> menyimpan dan keluar
u -> undo
:redo -> redo
yy -> copy 1 baris
3yy -> copy 3 baris
dd -> cut 1 baris
3dd -> cut 3 baris
p -> paste
:%s/[kataawal]/[kataakhir]/g -> menggangti kataawal menjadi kataakhir
/[string/kata] -> mencari kata
n -> mencari kata berikutnya
##### Konfigurasi Networking Ubuntu #####
Verifikasi NIC
# ip link
Edit file konfigurasi network
# vim /etc/network/interfaces
auto enp0s3
iface enp0s3 inet dhcp
auto enp0s8
iface enp0s8 inet static
address 10.10.10.10
netmask 255.255.255.0
# ifdown enp0s3; ifup enp0s3
# ifdown enp0s8; ifup enp0s8
# ip addr
Ping dari Laptop ke VM Ubuntu
$ ping -c 3 10.10.10.10
SSH dari Laptop ke VM Ubuntu
$ ssh user@10.10.10.10
##### Konfigurasi Repositori #####
# cp /etc/apt/sources.list /etc/apt/sources.list.orig
# vim /etc/apt/sources.list
deb http://kambing.ui.ac.id/ubuntu xenial main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu xenial-security main restricted universe multiverse
deb http://kambing.ui.ac.id/ubuntu xenial-updates main restricted universe multiverse
# apt update
# apt upgrade
##### DNS Server BIND #####
1. Instal paket bind9 dnsutils
# apt install bind9 dnsutils
2. Edit file konfigurasi zona
# vim /etc/bind/named.conf.default-zones
zone "bogor.ok" {
type master;
file "/etc/bind/db.bogor.ok";
};
zone "10.10.10.in-addr.arpa" {
type master;
file "/etc/bind/db.10.10.10";
};
3. Buat file db forward DNS
# cp /etc/bind/db.local /etc/bind/db.bogor.ok
# vim /etc/bind/db.bogor.ok
;
; BIND data file for domain bogor.ok
;
$TTL 604800
@ IN SOA ubuntu.bogor.ok. root.bogor.ok. (
2016112701 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ubuntu.bogor.ok.
@ IN MX 10 ubuntu.bogor.ok.
@ IN A 10.10.10.10
ubuntu IN A 10.10.10.10
www IN CNAME ubuntu
mail IN CNAME ubuntu
4. Buat file db reverse DNS
# cp /etc/bind/db.bogor.ok /etc/bind/db.10.10.10
# vim /etc/bind/db.10.10.10
;
; BIND data file for domain bogor.ok
;
$TTL 604800
@ IN SOA ubuntu.bogor.ok. root.bogor.ok. (
2016112701 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ubuntu.bogor.ok.
10 IN PTR ubuntu.bogor.ok.
5. Restart service bind9
# systemctl enable bind9
# systemctl restart bind9
# systemctl status bind9
6. Verifikasi
# dig @10.10.10.10 bogor.ok
# dig @10.10.10.10 bogor.ok mx
# dig @10.10.10.10 ubuntu.bogor.ok
##### LAMP Server #####
1. Instal paket apache2
# apt install apache2
2. Cek service apache2
# systemctl enable apache2
# systemctl restart apache2
# systemctl status apache2
3. Test membuat file index.html
# mv /var/www/html/index.html /var/www/html/index.html.orig
# vim /var/www/html/index.html
Uji coba web server
4. Browsing dari laptop ke VM ubuntu (http://10.10.10.10)
5. Test membuat file phpinfo
# vim /var/www/html/phpinfo.php
<?php
phpinfo();
?>
6. Instal paket libapache2-mod-php
# apt install libapache2-mod-php
# systemctl restart apache2
# systemctl status apache2
7. Browsing dari laptop ke VM ubuntu (http://10.10.10.10/phpinfo.php)
8. Instal paket mysql-server dan phpmyadmin
# apt install mysql-server phpmyadmin
# systemctl restart mysql
# systemctl status mysql
9. Browsing dari laptop ke PHPMyAdmin VM ubuntu (http://10.10.10.10/phpmyadmin)
10. Unduh wordpress
# wget -c https://wordpress.org/latest.tar.gz
11. Ekstrak file wordpress dan pindah ke /var/www/html/
# tar -xf latest.tar.gz
# ls
# mv wordpress /var/www/html/
12. Browsing dari laptop ke wordpress VM ubuntu (http://10.10.10.10/wordpress)
13. Copy file index.html ke folder www
# mkdir /var/www/html/www
# cp /var/www/html/index.html /var/www/html/www/index.html
14. Membuat VirtualHost Apache. Edit file konfigurasi /etc/apache2/sites-enabled/000-default.conf
# vim /etc/apache2/sites-enabled/000-default.conf
<VirtualHost *:80>
ServerName www.bogor.ok
ServerAdmin webmaster@bogor.ok
DocumentRoot /var/www/html/www
ErrorLog ${APACHE_LOG_DIR}/www-error.log
CustomLog ${APACHE_LOG_DIR}/www-access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerName blog.bogor.ok
ServerAdmin webmaster@bogor.ok
DocumentRoot /var/www/html/wordpress
ErrorLog ${APACHE_LOG_DIR}/wordpress-error.log
CustomLog ${APACHE_LOG_DIR}/wordpress-access.log combined
</VirtualHost>
15. Restart service apache2
# systemctl restart apache2
# systemctl status apache2
16. Edit file /etc/hosts laptop
# vim /etc/hosts
10.10.10.10 blog.bogor.ok www.bogor.ok
17. Test browsing dari laptop http://blog.bogor.ok dan http://www.bogor.ok
##### iRedMail #####
1. Set hostname FQDN
# vim /etc/hosts
127.0.0.1 ubuntu.bogor.ok ubuntu localhost
# vim /etc/hostname
ubuntu.bogor.ok
# hostname -f
2. Instal paket bzip2
# apt install bzip2
3. Unduh paket iRedMail
# wget -c https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.9.5-1.tar.bz2
4. Ekstrak paket iRedMail
# tar -xf iRedMail-0.9.5-1.tar.bz2
5. Eksekusi installer iRedMail
# cd iRedMail-0.9.5-1
# bash iredMail.sh