• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Jaranguda

Belajar Mengajar

  • Home
  • Sponsor/Jasa
  • Tentang

debian

Install vnStat 2.1 di Debian 9

Last Updated on 18 March 2019 By tommy Leave a Comment

Bila anda menggunakan vnstat dari repository Debian, vnstat yang digunakan versi jadul 1.15, kadang error yang muncul

$ vnstat
eth0: Not enough data available yet.

Solusi : Compile vnstat dari Source Code

Solusinya adalah mengcompile vnstat dari source code langsung

apt install wget make gcc libsqlite3-dev

Download source code vnstat

wget https://humdi.net/vnstat/vnstat-2.1.tar.gz

Ekstrak dan install

tar zxvf vnstat-2.1.tar.gz
cd vnstat-2.1
./configure --prefix=/usr --sysconfdir=/etc && make && make install

Edit file vnstat.conf

Bila nama interface anda bukan eth0, buka file /etc/vnstat.conf, ubah bagian

Interface "eth0"

menjadi

Interface "ens18"

untuk melihat nama interface yang benar bisa menggunakan perintah ifconfig

Ubah file permission

Ubah file permission di /var/lib/vnstat agar dapat dibaca/tulis oleh user vnstat

chown vnstat:vnstat /var/lib/vnstat -R

Systemd Daemon

Agar vnstat otomatis dijalankan dan merekam aktivitas bandwitdh anda aktifkan service systemd

cp -v examples/systemd/vnstat.service /etc/systemd/system/
systemctl enable vnstat
systemctl start vnstat

tunggu sekitar 1-5 menit untuk proses pengumpulan data pertama lalu cek penggunaan bandwitdh dengan vnstat atau untuk cek traffic live dengan vnstat -l, contoh output di server saya

$ vnstat -m
 
 eth0  /  monthly
 
       month        rx      |     tx      |    total    |   avg. rate
    ------------------------+-------------+-------------+---------------
      Jan '19     63.96 GiB |    2.41 TiB |    2.47 TiB |    7.92 Mbit/s
      Feb '19    157.83 GiB |    6.03 TiB |    6.19 TiB |   21.97 Mbit/s
      Mar '19    117.28 GiB |    4.62 TiB |    4.74 TiB |   26.76 Mbit/s
    ------------------------+-------------+-------------+---------------
    estimated    206.54 GiB |    8.14 TiB |    8.35 TiB |

live traffic
traffic live vnstat

Filed Under: Linux Tagged With: debian

Install Nextcloud 13 Debian 9

Last Updated on 20 March 2018 By tommy Leave a Comment

Disini kita akan membahas cara menginstall Nextcloud Apache PHP MariaDB di Debian 9. Pertama bila anda menginstall dari Net Install install terlebih dahulu

apt install unzip wget -y

Install Apache Web Server

apt install apache2 apache2-utils -y

Jalankan apache dan setting agar restart setiap reboot

systemctl enable apache2
systemctl start apache2

Install MariaDB Database Server

apt install mariadb-server mariadb-client -y
systemctl enable mariadb
systemctl start mariadb

Mengamankan MariaDB

mysql_secure_installation

bagian yang perlu anda ubah

Enter current password for root (enter for none): ENTER
Set root password? [Y/n] Y
New password: Masukkan PASSWORD
Re-enter new password: ULANGI PASSWORD
Remove anonymous users? [Y/n] Y
Disallow root login remotely? [Y/n] Y
Remove test database and access to it? [Y/n] Y
Reload privilege tables now? [Y/n] Y

Buat database baru untuk Nextcloud

# Login ke Database Server
mysql
# lalu eksekusi perintah
CREATE DATABASE nextcloud;
GRANT ALL PRIVILEGES ON nextcloud.* TO "nextcloud"@"localhost" IDENTIFIED BY "3UWXUzntnVTepjzyxp9h";
FLUSH PRIVILEGES;
# keluar dari database
quit

Install PHP

apt install php7.0 libapache2-mod-php7.0 php7.0-mysql php-common php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline php7.0-curl php7.0-intl php7.0-mcrypt php7.0-imagick php7.0-gd php7.0-mbstring php7.0-xml php7.0-zip -y

aktifkan modul PHP di Apache

a2enmod php7.0

restart Apache

systemctl restart apache2

Install Nextcloud

cd /var/www/html/
wget https://download.nextcloud.com/server/releases/nextcloud-13.0.1.zip
unzip nextcloud-13.0.1.zip

Buka Nextcloud di browser http://IP.DEBIAN9/nextcloud
Buka nextcloud di browser

Isi form input

Create admin account:
admin : ISI USERNAME UNTUK ADMIN
password : ISI PASSWORD ADMIN

## sesuaikan dengan database yang dibuat diatas
Database User : nextcloud
Database Password : 3UWXUzntnVTepjzyxp9h
Database Name : nextcloud

klik Finish

Instalasi Nextcloud 13 di Debian 7 telah selesai
install nextcloud 13 selesai

Filed Under: Linux Tagged With: debian, Nextcloud

Bash Linux netstat: command not found di Debian/Ubuntu

Last Updated on 12 March 2018 By tommy Leave a Comment

Bila anda mendapati netstat, ifconfig, ipmaddr, route, mii-tool atau arp, ini terjadi karena Debian/Ubuntu sudah menggunakan ip sebagai default untuk melihat info jaringan.

Solusinya adalah menginstall paket net-tools

apt install net-tools -y
# atau 
apt-get install net-tools -y

setelah selesai coba salah satu perintah diatas.

Filed Under: Linux Tagged With: debian

Solusi APT Debian The following packages cannot be authenticated

Last Updated on 6 June 2017 By tommy 3 Comments

Beberapa contoh error dengan solusi yang sama di Debian

$ apt-get install rsnapshot
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  liblchown-perl rsync
The following NEW packages will be installed:
  liblchown-perl rsnapshot rsync
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 524 kB of archives.
After this operation, 1,298 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
WARNING: The following packages cannot be authenticated!
  liblchown-perl rsync rsnapshot
Install these packages without verification? [y/N] ^C
$ apt-get install rsnapshot -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  liblchown-perl rsync
The following NEW packages will be installed:
  liblchown-perl rsnapshot rsync
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 524 kB of archives.
After this operation, 1,298 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  liblchown-perl rsync rsnapshot
E: There are problems and -y was used without --force-yes

Error diatas terjadi karena paket yang akan anda install tidak bisa diverifikasi oleh apt, makanya muncul error, coba update repository anda

apt-get update

Bila muncul error seperti ini

Ign http://kambing.ui.ac.id jessie InRelease
Hit http://security.debian.org jessie/updates InRelease
Get:1 http://security.debian.org jessie/updates/main Sources [172 kB]
Hit http://kambing.ui.ac.id jessie-updates InRelease                  
E: Release file for http://kambing.ui.ac.id/debian/dists/jessie-updates/InRelease is expired (invalid since 5d 13h 35min 24s). Updates for this repository will not be applied.

Ganti repository dengan default dari Debian, buka file /etc/apt/sources.list ganti isinya dengan

deb http://httpredir.debian.org/debian jessie main
deb-src http://httpredir.debian.org/debian jessie main
 
deb http://httpredir.debian.org/debian jessie-updates main
deb-src http://httpredir.debian.org/debian jessie-updates main
 
deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

Lalu update kembali

apt-get clean all
apt-get update

Install Debian Keyring

apt-get install debian-keyring debian-archive-keyring
apt-get clean all;
apt-get update

masalah teratasi.

Filed Under: Linux Tagged With: apt, debian

Solusi Error PHP nginx Permission denied while connecting to upstream

Last Updated on 5 December 2016 By tommy 1 Comment

Saat menggunakan nginx dan php-fpm error yang sering muncul adalah

2016/12/05 12:01:05 [crit] 20397#20397: *3 connect() to unix:/run/php/php7.0-fpm.pid failed (13: Permission denied) while connecting to upstream, client: 127.0.0.1, server: localhost, request: “GET /info.php HTTP/1.1”, upstream: “fastcgi://unix:/run/php/php7.0-fpm.pid:”, host: “localhost”

Bila anda menggunakan PHP 5 biasanya socketnya berada di /var/run/php5-fpm.sock.

Solusi

Error unix:/run/php/php7.0-fpm.pid failed (13: Permission denied) while connecting to upstream bisa disebabkan oleh salah user/group nginx, php-fpm atau root location di server block (virtualhost) nginx.
Sebagai solusinya kita akan menjalankan nginx sebagai www-data, bisa juga diganti dengan nginx, apache dan lain sebagainya.

1. User Group

Pastikan user/group www-data tersebut sudah ada

$ id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data)

ganti www-data dengan user yang ingin di cek.

2. User nginx

Buka file /etc/nginx/nginx.conf, ubah bagian

user  nginx;

menjadi

user  www-data;

lalu restart nginx

service nginx restart

3. User php-fpm

PHP 7
buka file /etc/php/7.0/fpm/pool.d/www.conf, sesuaikan dengan nilai dibawah ini

user = www-data
group = www-data
listen = /run/php/php7.0-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660

PHP 5
buka file /etc/php5/fpm/pool.d/www.conf, sesuaikan dengan nilai dibawah ini

user = www-data
group = www-data
listen = /var/run/php5-fpm.sock
listen.owner = www-data
listen.group = www-data
listen.mode = 0660

lalu restart php-fpm

# php 7.0
service php7.0-fpm restart
# php5
service php5-fpm restart

4. Server Block alias Virtualhost

Sesuaikan alamat socket php-fpm, contoh di server block nginx
PHP 7

  location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  }

PHP 5

  location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  }

Filed Under: Linux, PHP Tagged With: debian, linux, nginx

Debian apt Resource temporarily unavailable

Last Updated on 29 September 2016 By tommy Leave a Comment

Berikut ini log waktu install/upgrade dengan apt-get

The following packages will be upgraded:
  automake base-files bind9-host dnsutils e2fslibs e2fsprogs gnupg gpgv
  libbind9-90 libc-bin libc-dev-bin libc6 libc6-dev libcomerr2
  libdns-export100 libdns100 libirs-export91 libisc-export95 libisc95
  libisccc90 libisccfg-export90 libisccfg90 liblwres90 libmysqlclient18
  libpam-systemd libpython2.7-minimal libpython2.7-stdlib libsqlite3-0 libss2
  libssl-dev libssl1.0.0 libsystemd0 libudev1 libxml2 locales
  multiarch-support mysql-common openssl python2.7 python2.7-minimal systemd
  systemd-sysv udev wget wpasupplicant
45 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
root@orangepipcplus:~# apt-get clean all
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the download directory</blockquote>

Solusi

Solusi adalah menghapus file dibawah ini

rm -f /var/lib/dpkg/lock
rm -fr /var/cache/apt/archives/lock

lalu update file cache apt-get

apt-get update; apt-get upgrade -y

Filed Under: Linux Tagged With: apt-get, debian, Ubuntu

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Interim pages omitted …
  • Go to page 7
  • Go to Next Page »

Primary Sidebar

Pencarian

Tanya Jawab tentang DevOps SRE CPE, gabung di https://t.me/devopsindonesia

Terbaru

  • Solusi helm Upgrade Failed
  • macOS package is untrusted
  • Cara Mengganti Port Screen Sharing macOS
  • Cara Menonaktifkan Pager di macOS
  • Cara Mengupdate Nama Apple silicon-as-a-Service Scaleway

Komentar

  • Beritalogi on Cara Redirect Domain di Cloudflare
  • Putu on Cara Setting TP-LINK EN020-F5 Sebagai Range Extender
  • Budi on Solusi Simple Queue Mikrotik Tidak Berjalan
  • mazda on Tutorial Lengkap Install Mail Server Postfix Dovecot MariaDB di CentOS 7
  • adi on Menggunakan Mikrotik Sebagai SSH Client

Tulisan Populer

  • Password Router Huawei HG8245H5 Indihome 1.2m views
  • Password Terbaru ZTE F609 Indihome 785k views
  • Password Superadmin Huawei HG8245A 322.8k views
  • Cara Setting Manual Modem GPON ZTE F609 Indihome 273.9k views
  • Cara Setting Wireless ZTE F609 Indihome 258.3k views
  • Mengaktifkan Port LAN di Huawei HG8245 Indihome 170.7k views
  • Akses UseeTV Indihome via Wireless ZTE F609 157.1k views
  • Kemana Menghilangnya Saldo BCA 50 ribu 156.2k views
  • Cara Reset Password ZTE F609 Indihome 147.9k views
  • Cara Setting DHCP Server Modem/Router ZTE F609 114.3k views

Kategori

  • Delphi
  • dll
  • Gambas
  • Internet
  • Java
  • Lazarus
  • Linux
  • PHP
  • Review
  • Teknologi

Sponsor

kadal.id
carakami.com
kuotabisa.com
Untuk jadi sponsor, hubungi kita lewat halaman sponsor
© 2021. Jaranguda
  • Linux
  • PHP
  • Internet
  • Teknologi
  • Delphi
  • Gambas
  • Java