TUTORIAL
ubuntu-20.04.5-live-server-amd64
https://www.youtube.com/watch?v=ig8IleBDXwY&list=LL&index=3&t=333s&ab_channel=VianJuli
- sudo apt-get install isc-dhcp-server -y
- sudo apt install net-tools
super user gakbisa pasti
buat super user
https://www.youtube.com/watch?v=JmLucEh8U_8&list=LL&index=2&ab_channel=NoNonsense
"How to become a superuser in Ubuntu"
- sudo passwd root
- pass su = faizal1234
kalo mau remote
- apt install openssh-server
- buka putty
login linux :faizal (root)
faizal1234
- apt get install wget -y kalo belom bisa
- wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb
kalo dpkg pake terminal aja masuk su
- dpkg -i zabbix-release_5.0-1+focal_all.deb
- sudo apt update && sudo apt upgrade
- sudo apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent mysql-server
- liat version
- sudi mysql -V
- sudo php --version
- sudo apache2 -V
- sudo mysql_secure_installation
faizal1234
https://www.youtube.com/watch?v=W24FknWfF4U&list=LL&index=1&ab_channel=HappyGhost
pasti gakbisa
masuk ke sudo mysql
alter user root@localhost identified with mysql_native_password by 'Admin@123';
flush privileges;
sudo mysql_secure_installation
- menghafus anonim user N
- Menghapsu database Y
- reload privilege tabel Y
- sudo mysql -u root -p
mysql>create database zabbix character set utf8 collate utf8_bin;
mysql>grant all privileges on zabbix.* to zabbix@localhost;
mysql>create database zabbix character set utf8 collate utf8_bin;
mysql>show GRANTS FOR'zabbix'@'localhost';
mysql>flush privileges;
mysql>quit;
- sudo zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbix -p zabbix
- sudo nano /etc/zabbix/apache.conf
setting yg gak kepager Asia/Jakarta
- sudo systemctl restart zabbix-server zabbix-agent apache2
- sudo systemctl enable zabbix-server zabbix-agent apache2
buka zabbix pake ip lu
masukin pass Admin@123
username zabbix
Admin
zabbix
ZABBIX UBUNTU 20.0tutor
https://www.youtube.com/watch?v=ig8IleBDXwY&list=LL&index=3&t=333s&ab_channel=VianJuli
- sudo apt-get install isc-dhcp-server -y
- sudo apt install net-tools
super user gakbisa pasti
buat super user
https://www.youtube.com/watch?v=JmLucEh8U_8&list=LL&index=2&ab_channel=NoNonsense
"How to become a superuser in Ubuntu"
- sudo passwd root
- pass su = faizal1234
kalo mau remote
- apt install openssh-server
- buka putty
login linux :faizal (root)
faizal1234
- apt get install wget -y kalo belom bisa
- wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb
kalo dpkg pake terminal aja masuk su
- dpkg -i zabbix-release_5.0-1+focal_all.deb
- sudo apt update && sudo apt upgrade
- sudo apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent mysql-server
- liat version
- sudi mysql -V
- sudo php --version
- sudo apache2 -V
- sudo mysql_secure_installation
faizal1234
https://www.youtube.com/watch?v=W24FknWfF4U&list=LL&index=1&ab_channel=HappyGhost
pasti gakbisa
masuk ke sudo mysql
alter user root@localhost identified with mysql_native_password by 'Admin@123';
flush privileges;
sudo mysql_secure_installation
- menghafus anonim user N
- Menghapsu database Y
- reload privilege tabel Y
- sudo mysql -u root -p
mysql>create database zabbix character set utf8 collate utf8_bin;
mysql>grant all privileges on zabbix.* to zabbix@localhost;
mysql>create database zabbix character set utf8 collate utf8_bin;
mysql>show GRANTS FOR'zabbix'@'localhost';
mysql>flush privileges;
mysql>quit;
- sudo zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbix -p zabbix
- sudo nano /etc/zabbix/apache.conf
setting yg gak kepager Asia/Jakarta
- sudo systemctl restart zabbix-server zabbix-agent apache2
- sudo systemctl enable zabbix-server zabbix-agent apache2
buka zabbix pake ip lu
masukin pass Admin@123
username zabbix
Admin
zabbix
-----------------------------------------------------------------------------------------------------------------------------
----------------- Install Zabbix 6.4 On Ubuntu Server/GUI 22.04.1 In Under 10 Minutes ---------------------
- sudo wget https://repo.zabbix.com/zabbix/6.3/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.3-3%2Bubuntu22.04_all.deb
- sudo dpkg -i zabbix-release_6.3-3+ubuntu22.04_all.deb
- sudo apt update
- sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
4. Install sql server
sudo apt-get install mysql-server
sudo systemctl start mysql
Create initial database
sudo mysql
create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user zabbix@localhost identified by 'password';
grant all privileges on zabbix.* to zabbix@localhost;
set global log_bin_trust_function_creators = 1;
quit;
--On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.
- sudo zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
ini minta password kayanya pake pass "password"
Disable log_bin_trust_function_creators option after importing database schema
- sudo mysql
- set global log_bin_trust_function_creators = 0;
- quit;
Configure the database for Zabbix server
Edit file /etc/zabbix/zabbix_server.conf and set the DB password with ->
- sudo vim /etc/zabbix/zabbix_server.conf
- sudo nano /etc/zabbix/zabbix_server.conf
Start Zabbix server and agent processes
- systemctl restart zabbix-server zabbix-agent apache2
- systemctl enable zabbix-server zabbix-agent apache2
pas masuk web zabbix
minta password menggunakan "password"
https://reasonableitservice.com/install-zabbix-6-4-on-ubuntu-server-22-04-1-in-under-10-minutes/
------sudah----
||||||||||||| instal grafana ||||||||||\|
How to Install Grafana on Ubuntu 20.04
A Ubuntu 20.04 VPS with root access enabled or a user with sudo privileges.
Log in via SSH and Update your System
First, you will need to log in to your Ubuntu 20.04 VPS via SSH as the root user
Next, run the following commands to upgrade all installed packages on your VPS:
apt-get update -y
apt-get upgrade -y
Add Grafana Repository
By default, the Grafana package is not included in the Ubuntu 20.04 default repository. So you will need to add the Grafana official repository to your system.
First, install all required dependencies using the following command:
apt-get install wget curl gnupg2 apt-transport-https software-properties-common -y
Next, download and add the Grafana GPG key with the following command:
wget -q -O - https://packages.grafana.com/gpg.key | apt-key add -
Next, add the Grafana repository to APT using the following command:
echo "deb https://packages.grafana.com/oss/deb stable main" | tee -a /etc/apt/sources.list.d/grafana.list
Once the repository is added to your system, you can update it with the following command:
apt-get update -y
Install Grafana
Now, you can install the Grafana by running the following command:
apt-get install grafana -y
Once the Grafana package is installed, verify the Grafana version with the following command:
grafana-server -v
Now, start the Grafana service and enable it to start at system reboot:
systemctl start grafana-server
systemctl enable grafana-server
You can now check the status of the Grafana with the following command:
systemctl status grafana-server
Open Port on Firewall (Optional)
Grafana default http port is 3000, you’ll need to allow access to this port on the firewall. Ubuntu comes with ufw firewall. You can install it using:
sudo apt -y install ufw
Then enable the firewall service:
sudo ufw enable
Open the port on the firewall:
sudo ufw allow ssh
sudo ufw allow 3000/tcp
At this point, Grafana is started and listens on port 3000. You can check it with the following command:
ss -antpl | grep 3000
Access Grafana Dashboard
Access Grafana Dashboard using the server IP address or hostname and port 3000.
Default logins are:
Username: admin
Password: admin
||||||||||||||||| cacti |||||||||||||||||||||
Persiapan Penginstallan Cacti di Linux
Update linux
Lakukan proses update dengan mengetikan perintah
sudo apt update && apt upgrade -y
Atur Jam/Timezone
Penting sekali untuk mengatur jam di kontainer agar sesuai dengan jam realtime.
Karena hal ini akan berpengaruh ke tanggal dan jam yang akan muncul di laporan MRTG.
sudo timedatectl set-timezone Asia/Jakarta
date
Install Paket pendukung Cacti
Untuk menginstall cacti server kita perlu paket/aplikasi pendukung/dependencies yang perlu kita install dulu.
sudo apt install snmp php-snmp rrdtool librrds-perl unzip curl git gnupg2 -y
Install LAMP Server
Untuk menjalankan cacti kita perlu webserver Apache, database MariaDB dan PHP
sudo apt install apache2 mariadb-server php php-mysql libapache2-mod-php php-xml php-ldap php-mbstring php-gd php-gmp php-intl -y
Edit config Apache
sudo nano /etc/php/8.1/apache2/php.ini
Ubah beberapa baris hingga seperti dibawah ini, gunakan ctrl W untuk mencari text otomatis.
memory_limit = 512M
max_execution_time = 60
date.timezone = UTC
Ctrl X Y enter untuk menyimpan.
Sekarang kita juga perlu edit config PHP
sudo nano /etc/php/8.1/cli/php.ini
Ubah beberapa baris hingga menjadi seperti dibawah ini, gunakan fitur pencarian dengan tombol ctrl W agar lebih cepat
memory_limit = 512M
max_execution_time = 60
date.timezone = UTC
Restart apache service setelah selesai ngedit.
sudo systemctl restart apache2
Pastikan status apachenya ijo alias runing ya …!!
systemctl status apache2
Membuat Database Untuk Cacti
Cacti menggunakan MariaDB sebagai database engine nya.
Maka kita perlu persiapkan dulu.
Pertama kita ubah parameter default menjadi seperti dibawah ini agar performa cacti JOSS!!
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf
Ubah jika sudah ada atau tambahkan parameter dibawah ini jika belum ada
collation-server = utf8mb4_unicode_ci
max_heap_table_size = 128M
tmp_table_size = 64M
join_buffer_size = 1M
innodb_file_format = Barracuda
innodb_large_prefix = 1
innodb_buffer_pool_size = 512M
innodb_flush_log_at_timeout = 3
innodb_read_io_threads = 32
innodb_write_io_threads = 16
innodb_io_capacity = 5000
innodb_io_capacity_max = 10000
innodb_doublewrite = OFF
sort_buffer_size = 1M
Simpan file nya dengan ctrl X y enter lalu restart database engine dengan perintah dibawah ini
sudo systemctl restart mariadb
Cek dan Pastikan database server statusnya running dengan perintah
systemctl status mariadb
Kalau databse sudah running, selanjutnya kita login ke database dengan perintah
mysql
Jika berhasil format tampilan console akan menjadi :
MariaDB [(none)]>
Setelah berhasil login ke database engine buat database untuk cacti
create database cactidb;
GRANT ALL ON cactidb.* TO cactiuser@localhost IDENTIFIED BY 'password';
cacti user dan password bisa anda ganti sesuka hati, tapi wajib diingat karena nanti akan dimasukan ke file config cacti
Selanjutnya kita flush privilage , lalu kluar dari database engine
flush privileges;
exit;
Selanjutnya import timezone data ke database dengan perintah ini
mysql mysql < /usr/share/mysql/mysql_test_data_timezone.sql
Beri akses cacti user untuk akses database timezone
mysql
MariaDB [(none)]> GRANT SELECT ON mysql.time_zone_name TO cactiuser@localhost;
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit;
Menginstall Cacti
Cacti versi terbaru wajib didownload dari official website https://www.cacti.net/info/downloads
Copy link download versi terbaru dari website tersebut, lalu download menggunakan wget
wget https://www.cacti.net/downloads/cacti-latest.tar.gz --no-check-certificate
cacti-latest.tar.gz disesuaikan dengan versi yang didapat dari website official , misal cacti-1.2.24.tar.gz
Maka link nya akan menjadi : wget https://files.cacti.net/cacti/linux/cacti-1.2.26.tar.gz
Setelah didownload, kita perlu extract dengan tar
tar -zxvf cacti-1.2.26.tar.gz
// cacti lates disesuaikan dengan file yang anda download ya....
Buat folder cacti di /var/www/html
sudo mkdir /var/www/html/cacti
Salin isi folder cacti yang barusan diextract ke folder /var/www/html/cacti
sudo cp -R cacti-latest/* /var/www/html/cacti
sudo cp -R cacti-1.2.26/* /var/www/html/cacti
Selanjutnya import database cacti dengan perintah dibawah ini
mysql cactidb < /var/www/html/cacti/cacti.sql
copy dan Edit config cacti,
sudo cp /var/www/html/cacti/include/config.php.dist /var/www/html/cacti/include/config.php
sudo nano /var/www/html/cacti/include/config.php
Sesuaikan dengan nama database, user dan password yang telah kita set saat membuat database dan user di mariaDB tadi.
$database_type = 'mysql';
$database_default = 'cactidb';
$database_hostname = 'localhost';
$database_username = 'cactiuser';
$database_password = 'password';
$database_port = '3306';
Simpan setelah melakukan pengditan dengan tombol ctrl x y enter.
Buat file log untuk cacti, jadi kalo ada eror tinggal kita baca file log nya untuk nyari pnyebabnya.
touch /var/www/html/cacti/log/cacti.log
Atur permision dan ownder folder cacti ke webserver user
chown -R www-data:www-data /var/www/html/cacti/
chmod -R 775 /var/www/html/cacti/
Buat cron scheduller untuk cacti poller
nano /etc/cron.d/cacti
Isikan dengan data dibawah ini
*/5 * * * * www-data php /var/www/html/cacti/poller.php > /dev/null 2>&1
Mengakses dan Setup Cacti
Kita bisa lanjut untuk mengakses server cacti menggunakan browser dengan cara mengetikan IP atau hostname dari server cacti kita.
Misal untuk server saya : http://cacti.tembolok.id/cacti atau http://172.16.103.13/cacti
User dan password default cacti adalah admin
Setelah pertama kali masuk, akan langsung disuruh untuk mengganti password , maka gantilah password dengna kombinasi yang direkomendasikan.
Komentar
Posting Komentar