Browsing the archives for the server category.

Apt-get update error

linux, server

As Debian big fan, sometime I found that apt-get update command reveal this error:
“E: Some index files failed to download. They have been ignored, or old ones used instead.”

This command is very simple solution I found:

# rm /var/lib/apt/lists/partial/*

After that, apt-get update && apt-get upgrade command should be fine.

Source:
http://forums.debian.net/viewtopic.php?f=10&t=108618

Comments Off on Apt-get update error

Clean /boot Partition in CentOS 6

linux, server

/boot Partition in CentOS 6 can be cleaned by removing old kernels.

These are the steps:

1. Check /boot partition (98% used)

# df -h
Filesystem      Size  Used Avail Use% Mounted on
...
/dev/sda1        93M   86M  2.1M  98% /boot
...

2. Check installed kernel

# rpm -q kernel
kernel-2.6.32-431.el6.x86_64
kernel-2.6.32-431.29.2.el6.x86_64
kernel-2.6.32-504.1.3.el6.x86_64

3. Install package-cleanup

# yum install yum-utils
# package-cleanup --oldkernels --count=2
=======================================================================================================================================
 Package              Arch                 Version                        Repository                                              Size
=======================================================================================================================================
Removing:
 kernel               x86_64               2.6.32-431.el6                 @anaconda-CentOS-201311272149.x86_64/6.5               121 M

Transaction Summary
=======================================================================================================================================
Remove        1 Package(s)

Installed size: 121 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Erasing    : kernel-2.6.32-431.el6.x86_64                                                                                        1/1 
  Verifying  : kernel-2.6.32-431.el6.x86_64                                                                                        1/1 

Removed:
  kernel.x86_64 0:2.6.32-431.el6                                                                                                       

Complete!

4. Check /boot partition (67% used)

# df -h
Filesystem      Size  Used Avail Use% Mounted on
...
/dev/sda1        93M   59M   30M  67% /boot
...

5. Limit only 2 latest kernel for later updates

# vim /etc/yum.conf
   ...[edit yum.conf]...
   installonly_limit=2
   ...[edit yum.conf]...

Source:
http://www.if-not-true-then-false.com/2012/delete-remove-old-kernels-on-fedora-centos-red-hat-rhel/

Comments Off on Clean /boot Partition in CentOS 6

SSH Server Administration

linux, server

Having several Linux Servers, SSH access is mandatory communication between me and those servers. These are several tips for SSH Server administration that save the day:

Add these line on /etc/ssh/sshd_config:

  • Allow only specific user (never use root login for remote SSH access)
    AllowUsers username
    DenyUsers All
  • Disable DNS and GSSAPI (solving slow login respond, especially from private network)
    UseDNS no
    GSSAPIAuthentication no

Make sure to restart SSH service after changing sshd_config:

# service ssh restart

or

# /etc/init.d/ssh restart

Additional tip:

  • Add this options on /etc/resolv.conf (solving slow login respond on RHEL/CentOS)
options single-request-reopen

Source:

http://injustfiveminutes.com/2013/03/13/fixing-ssh-login-long-delay/

Comments Off on SSH Server Administration

SquidAnalyzer Installation

linux, server

Environment:
– Linux Debian 7.7 (amd64)
– Squid Cache 3.1.20

Preparation:
– Download SquidAnalyzer-6.1 from http://sourceforge.net/projects/squid-report/

Installation:

# tar -zxvf squidanalyzer-6.1.tar.gz
# cd squidanalyzer-6.1
# perl Makefile.PL
# make
# make install
# vim /etc/apache2/sites-enabled/000-default
    ...[add to 000-default file]...
        <Directory /var/www/squidanalyzer>
            Options -Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    ...[add to 000-default file]...
# service apache2 restart
# /usr/local/bin/squid-analyzer
# crontab -e
    ...[edit crontab]...
    0 2 * * * /usr/local/bin/squid-analyzer > /dev/null 2>&1
    ...[edit crontab]...

Note:
– use .htaccess to protect page

Source:
http://squidanalyzer.darold.net/install.html

Comments Off on SquidAnalyzer Installation

SARG (Squid Analysis Report Generator) Installation

linux, server

Environment:
– Linux Debian 7.7 (amd64)
– Squid Cache 3.1.20

Preparation:
– Get the latest update from repository #apt-get update

Installation:

# apt-get install sarg
# vim /etc/sarg/sarg.conf
    ...[edit sarg.conf]...
    access_log /var/log/squid3/access.log
    date_format e
    overwrite_report yes
    output_dir /var/www/sarg
    ...[edit sarg.conf]...
# /usr/bin/sarg -x
# crontab -e
    ...[edit crontab]...
    0 2 * * * /usr/bin/sarg -x
    ...[edit crontab]...

Note:
– Open http://Server-IP-Address/sarg to operate SARG

Source:
http://www.tecmint.com/sarg-squid-analysis-report-generator-and-internet-bandwidth-monitoring-tool/

Comments Off on SARG (Squid Analysis Report Generator) Installation

Bug in Zimbra 8.5.0 GA

server

Zimbra 8.5.0 GA has bug that can make WebApp Service won’t start.
Solution can be met with these steps:

$ zmprov -l ms `zmhostname` +zimbraServiceEnabled service
$ zmprov -l ms `zmhostname` +zimbraServiceEnabled zimbra
$ zmprov -l ms `zmhostname` +zimbraServiceEnabled zimbraAdmin
$ zmprov -l ms `zmhostname` +zimbraServiceEnabled zimlet
$ zmmailboxdctl restart

Source:
https://bugzilla.zimbra.com/show_bug.cgi?id=95265

Comments Off on Bug in Zimbra 8.5.0 GA

cPanel Log Location

server

Anda mengelola web server dengan cPanel/WHM sebagai control panelnya?

Jika ya, pasti ada kalanya Anda perlu melihat log dari web server Anda.

Berikut beberapa lokasi log penting:
/usr/local/cpanel/logs/
/usr/local/apache/logs/
/usr/local/apache/domlogs/
/var/log/messages

Atau Anda perlu poster loglocation dari cPanel, silakan unduh di http://www.cpanel.net/images/loglocationsposter.jpg

Sumber: http://forum.hostican.com/virtual-private-servers-VPS-f9/cpanel-and-whm-log-file-locations-t336/

loglocationsposter

loglocationsposter

No Comments

Zimbra create multiple account

server

Karena ada beberapa puluh email baru yang perlu dimasukkan ke server mail zimbra, saya memilih untuk melakukan proses pembuatan account menggunakan zmprov.

Berikut langkah-langkat pembuatan multiple account.

1. Buat file text bernama email.zmp dengan isi sebagai berikut (pastikan user zimbra punya hak untuk membaca file email.zmp)

createAccount user1@domain.org user1password displayName ‘user1 display name’ sn user1lastname
createAccount user2@domain.org user2password displayName ‘user2 display name’ sn user2lastname
createAccount user3@domain.org user3password displayName ‘user3 display name’ sn user3lastname

(Catatan: Bisa ditambahkan zimbraPasswordMustChange TRUE di belakang setiap baris jika diperlukan)

2. Import file text dengan perintah zmprov (dengan user zimbra)

$ zmprov < email.zmp

Sumber: http://wiki.zimbra.com/wiki/Bulk_Provisioning

No Comments

Fixing Zimbra Server

server

Saya baru saja membetulkan mail server zimbra  milik kantor. Ternyata sudah mati selama 1 minggu, wah ternyata kurang aware dengan down-time, bukan hal yang baik sebagai admin 🙁

Sumber masalah karena ClamAV tidak bisa hidup karena aturan baru yang dimulai semenjak 15 April 2010.

For those using ZCS 5.0.16 and prior, come 15 April 2010 anti-virus definitions will no longer update AND your ClamAV instance will stop working entirely.

EOL Source: http://www.clamav.net/2009/10/05/eol-clamav-094 “Starting from 15 April 2010 our CVD will contain a special signature which disables all clamd installations older than 0.95 – that is to say older than 1 year. We plan to start releasing signatures which exceed the 980 bytes limit on May 2010.”

Announcement ini mestinya sudah lama diposting, tapi saya yang kurang aware. Jadi harus ada down-time yang seharusnya tidak perlu terjadi.

Proses troubleshooting dilakukan dengan update ClamAV ke versi 0.95. Berikut langkah troubleshooting untuk Debian-4.

cd /opt/zimbra
wget -bc http://files2.zimbra.com/downloads/6.0.6_GA/zcs-6.0.6_GA_2324.DEBIAN4.0.20100406160442.tgz
tar xf clamav-0.95.1.tar
zmcontrol stop
rm clamav
ln -s clamav-0.95.1 clamav
ls -l clamav
zmcontrol start

Sumber :

http://wiki.zimbra.com/wiki/ClamAV_-_Updating_clamd_for_releases_earlier_than_ZCS_5.0.16

No Comments

Port firewall untuk Zimbra mail server

server

Minggu lalu, teman-teman admin membantu instalasi mail server menggunakan Zimbra. Setelah sukses, ternyata lupa di testing lebih lanjut.

Hasilnya……

Problem acquired : Bisa kirim email, tapi tidak bisa menerima email.

Cek dan ricek, akhirnya ditemukan masalahnya adalah di firewall. List port yang diijinkan forward ke mail server kurang lengkap. Googling sebentar dan akhirnya dapat list di bawah ini.

Firewall untuk mail server menggunakan Zimbra

  • SMTP
    • port 25/tcp
  • HTTP
    • port 80/tcp
  • POP3
    • port 110/tcp
  • IMAP
    • port 143/tcp
  • LDAP
    • port 389/tcp
  • HTTPS
    • port 443/tcp
  • SMTPS
    • port 465/tcp
  • IMAPS
    • port 993/tcp
  • POP3S
    • port 995/tcp
  • Tomcat LMTP
    • port 7025/tcp
  • Admin Interface
    • port 7071/tcp

Semuanya harus di allow di firewall. Sekarang mail server sudah berjalan normal kembali.

Mission complete.

References :
http://wiki.zimbra.com/index.php?title=Firewall_Configuration
http://megantara.wordpress.com/2007/10/02/dokumentasi-zimbra-455/

No Comments