/
manual.txt
73 lines (73 loc) · 4.17 KB
/
manual.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
# =====================================================
# ================ www.firstplato.com =================
# ====== ip@ng.dwi ====== Bismillahirrohmanirrohiim ===
# =====================================================
# Masuk ke cli VPS sebagai root
sudo su
# Update system
# For Ubuntu / Debian
apt-get update
# For Centos / RHEL
yum update
# Download script vestacp
curl -O http://vestacp.com/pub/vst-install.sh
# Jalankan dengan opsi berikut
# Ini settingan saya, teman-teman bisa memakai setting sendiri
# Untuk domainKamu.com, email@kamu.com, password_kamu - ganti dengan domain, email dan password teman-teman
bash vst-install.sh --nginx yes --apache yes --phpfpm no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota yes --exim no --dovecot no --spamassassin no --clamav no --softaculous no --mysql yes --postgresql no --hostname domainKamu.com --email email@kamu.com --password password_kamu
# Setelah terinstall silahkan akses sesuai credential yang diberikan
# =================== Custom Mods ======================
# 1. Use file manager with cron
# edit file konfigurasi vestacp
nano /usr/local/vesta/conf/vesta.conf
# pada akhir file tambahkan baris berikut
FILEMANAGER_KEY=’ILOVEREO’
# ILOVERIO adalah trial key dari vestacp
# atau bisa juga dengan key berikut, pilih salah satu saja
FILEMANAGER_KEY=’VestacpFree.ga’
# setelah itu save, lalu lanjutkan dengan perintah
crontab -e
# Lalu masukkan kode berikut dan save
0 */1 * * * /usr/bin/sed -i "/FILEMANAGER_KEY=''/d" /usr/local/vesta/conf/vesta.conf >> /usr/local/vesta/conf/vesta.conf && sudo /usr/bin/grep -q -F "FILEMANAGER_KEY='ILOVERIO'" /usr/local/vesta/conf/vesta.conf || /usr/bin/echo "FILEMANAGER_KEY='ILOVERIO'" >> /usr/local/vesta/conf/vesta.conf
# atau bisa dengan key berikut
# pilih salah satu saja
0 */1 * * * /usr/bin/sed -i "/FILEMANAGER_KEY=''/d" /usr/local/vesta/conf/vesta.conf >> /usr/local/vesta/conf/vesta.conf && sudo /usr/bin/grep -q -F "FILEMANAGER_KEY='VestacpFree.ga'" /usr/local/vesta/conf/vesta.conf || /usr/bin/echo "FILEMANAGER_KEY='VestacpFree.ga'" >> /usr/local/vesta/conf/vesta.conf
# File manager akan bisa digunakan
# ------------------------------------------------------
# 2. Memasang SSL pada ip address VPS vestacp, jadi vestacp bisa diakses dari domain teman-teman langsung, contoh https://www.domainKamu.com:8083
# Pastikan domain atau hostname yang dipakai telah diberi sertifikat SSL dan aktif
# Backup terlebih dahulu sertifikat SSL bawaan vestacp
mv /usr/local/vesta/ssl/certificate.crt /usr/local/vesta/ssl/bak.crt
mv /usr/local/vesta/ssl/certificate.key /usr/local/vesta/ssl/bak.key
# Ganti dengan sertifikat SSL dari domain teman-teman
# Ganti host.domain.com dengan domain teman-teman
ln -s /home/admin/conf/web/ssl.host.domain.com.key /usr/local/vesta/ssl/certificate.key
ln -s /home/admin/conf/web/ssl.host.domain.com.crt /usr/local/vesta/ssl/certificate.crt
# Restart service vestacp
service vesta restart
# -------------------------------------------------------
# 3. Backup file web vestacp ke gdrive
# Download dulu gdrive cli
wget -O /usr/sbin/gdrive https://docs.google.com/uc?id=0B3X9GlR6EmbnQ0FtZmJJUXEyRTA && chmod +x /usr/sbin/gdrive
# Coba dengan menjalankan perintah berikut
gdrive list
# Teman-teman akan diminta untuk mengakses link yang diberikan untuk melakukan autentikasi degan oauth2
# Masuk dengan akun gmail / gdrive teman-teman
# Bila berhasil akan menampilkan seluruh list file yang ada di dalam gdrive teman-teman
# Selanjutnya buat file backup.sh untuk melakukan backup ke gdrive
vi backup.sh
# Lihat file backup.sh yang ada pada di dalam repo ini
# Kemudian chmod file backup.sh
chmod +x backup.sh
# Jalankan perintah berikut untuk melakukan backup file vestacp
# Ganti admin dengan user vestacp teman-teman
/usr/local/vesta/bin/v-backup-user admin
# Jalankan script backup.sh untuk mengupload file backup terakhir yang telah dibuat
./backup.sh
# ======================================================
# ============== FTP dengan Filezilla ==================
# Site manager - New Site - General
# Pilih Protocol : FTP
# Pilih Encryption : Use explicit FTP over TLS if available
# Logon type : Normal
# Transfer setting : Active - Tanpa limit number of simultaneous connections