Cara Automatic Hapus File Session PHP

Use “df -i” command to view inodes usage: Filesystem Inodes IUsed IFree IUse% Mounted on /dev/sda2 1310720 1310720 0 100% / That means you ran out of inodes! Most probably PHP sessions are the issue. A quick command to delete all sess_* files on /var/lib/php/sessions is this: find /var/lib/php/sessions -type f -cmin +24 -name "sess_*" -exec rm -f {} \; But I would recommend you to use a bash script, keep reading below: On your PHP.ini file ...

View More
  Dibaca 3690 kali

Clear systemd journal

On any server, the logs can start to add up and take considerable amount of disk space. Systemd conveniently stores these in /var/log/journal and has a systemctl command to help clear them. Take this example: $ du -hs /var/log/journal/ 4.1G /var/log/journal/ 4.1GB worth of journal files, with the oldest dating back over 2 months. $ ls -lath /var/log/journal/*/ | tail -n 2 -rw-r-x---+ 1 root systemd-journal 8.0M Dec 24 05:15 user-xxx.journal On this server, I really don't ne ...

View More
  Dibaca 1036 kali

MySQL Bin Files Memakan Banyak Space Hardisk Server

Disable MySQL binlogging If you are not replicating, you can disable binlogging by changing your my.ini or my.cnf file. Open your my.ini or /etc/my.cnf (/etc/mysql/my.cnf), enter:# vi /etc/my.cnfFind a line that reads “log_bin” and remove or comment it as follows: #log_bin = /var/log/mysql/mysql-bin.log You also need to remove or comment following lines: #expire_logs_days = 10 #max_binlog_size = 100M Close and save the fi ...

View More
  Dibaca 911 kali

Perintah Untuk Menampilkan Ukuran Size Folder diLinux Ubuntu

untuk menampilkan ukuran secara keseluruhan  du -hx --max-depth=1 /Untuk Menampilkan ukuran secara spesifik difolder tertentu du -hx --max-depth=1 /var du -hx --max-depth=1 /var/log   ...

View More
  Dibaca 773 kali

sudo add-apt-repository ppa:ondrej/php error not intall

So, open a terminal and use this command: sudo apt-get install software-properties-commonand then sudo apt-get update ...

View More
  Dibaca 711 kali

Cara Menghapus Seluruh File Dalam Folder di Ubuntu

Dalam Kasus ingin membersihkan file sampah di tmp,log dll perlu sekali perintah dibawah ini agar tidak hapus satu persatu   rm -rf /namafolder/*Jika Perintah diatas gagal karena filenya terlalu banyak dengan error seperti dibawah ini-bash: /bin/rm: Argument list too longMaka solusinya adalah gunakan perintah dibawah inisudo find . -name 'nama_file*'| xargs rm ...

View More
  Dibaca 694 kali

Ubuntu Cannot Ping Domain

Create a file called /etc/resolv.conf write fill in the contents: nameserver For example if your want to use googles dns-service: nameserver 8.8.8.8 nameserver 8.8.4.4 This is likely caused by DHCP configuration when you first installed Ubuntu. Try this 3-step process to handle this auto configuration issue. First Edit your interface configuration, which is located in: /etc/network/interfaces Add this line below iface lo inet loopback: dns-nameservers yourdns youraltdns As ...

View More
  Dibaca 930 kali

How To Backup Databse mysql In terminal Ubuntu Work 100%

1. Access the MySQL shell mysql -u root -pmysql > showdatabases;CTRL +C2. super user sudo sumysqldump -u root -p namedatabase > namedatabase.sql OR mysqldump -u root -p namedatabase > /mnt/namedatabase.sqlenter password and enter ...

View More
  Dibaca 847 kali