Friday, November 14, 2014

Check File With High Disk Usage On Debian / Ubuntu

In server with limited disk space, high size file is very annoying if we can not find what file it is. So this command will show you what file that has high size
find / -type f -size +10000k -exec ls -lh {} \
"/" show that it will search in the root directory and 10000k means that the file must have > 10.000k (10MB) in size. You can change it based on your need.

Source:
http://www.cyberciti.biz/faq/find-large-files-linux/

Saturday, October 25, 2014

Change Hostname Permanently CentOS 6.5

To change hostname permanently, you need to do this
  • nano /etc/sysconfig/network
  • Change "HOSTNAME=yourNewDesiredHostname"
And the next step is
  • nano /etc/hosts
  • Change "127.0.0.1 yourDesiredHostname.com"
Finally reboot to take effect

Source: http://unix.stackexchange.com/questions/145019/how-to-change-hostname-on-centos-6-5

Tuesday, September 23, 2014

Resize Multiple Image Ubuntu

If you have many big size image and want to resize into smaller size, you can resize all image with just 1 command in terminal. This tutorial take example if you have many image with .JPG extension and you want to resize 25% of the original dimension

Sunday, September 21, 2014

Create Virtual Host Apache Ubuntu

Virtual host make a server can handle many domain on it. To make virtual host on apache, follow steps below. This tutorial needs prerequisite an apache installed.

Saturday, September 20, 2014

How To Check TUN/TAP or PPP is Enabled

To check if TUN/TAP is enabled on your server, type this
cat /dev/net/tun
If the result is
cat: /dev/net/tun: File descriptor in bad state
your module has been enabled on your server.

To check if PPP is enabled, do this
cat /dev/ppp
if you receive message
cat: /dev/ppp: No such device or address
the module has been enabled successfully.

Source:
http://forum.host1plus.com/vps-support/428-how-check-if-tun-tap-ppp-enabled-your-vps.html

Friday, September 19, 2014

Fix Owncloud High CPU Usage Ubuntu

Owncloud is the best free cloud storage software that can be installed on your server for now. But there are some bugs. The most annoying bug is owncloud client use about 50% of your cpu usage. To fix this, I just use a little tricky step, using little program named cpulimit. That program can limit cpu usage used by background program

Install squid33 in FreeBSD 9.2

  1. Add package squid33
  2. pkg_add -r squid33
  3. Masuk ke directory squid
  4. cd /usr/ports/www/squid33 
  5. Compile and choose some option that fit with your requirement
  6. make install clean
  7. You can edit your squid configuration in /usr/local/etc/squid/squid.conf
  8. Make squid cache
  9. squid -z
  10. Insert squid to system boot. Open /etc/rc.conf and add squid_enable="YES"
  11. Start your squid
  12. service squid start

Source:
http://wiki.squid-cache.org/KnowledgeBase/FreeBSD