Debian

Langkah-langkah instalasi osTicket di Debian Wheezy

Posted on

osTicket is the world’s most popular and trusted open source customer support ticketing system. osTicket is designed to help you improve customer service by providing your staff with a customer support platform they need to deliver fast, effective and measurable support.

osTicket is a FREE, open source software released under GPL license. Our core features and usability not only rival, but also exceed those of most bloated commercial helpdesk solutions.

osTicket is powerful, yet simple to use. This ensures that your staff can quickly begin using the system without any headaches or hassles, and with very little or no training.

Itu adalah kutipan dari website resminya tentang apa itu osTicket dan apa gunanya osTicket, dan berikut ini adalah langkah-langkah instalasinya:

# apt-get install mysql-server mysql-client
# mysql_secure_installation
# apt-get install apache2 php5 libapache2-mod-php5 php5-mysql php5-curl php5-gd php5-idn php-pear 
  php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode 
  php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
# mysql -u root -p
Enter password:

mysql> CREATE USER 'osticket'@'localhost' IDENTIFIED BY 'p@ssw0rd';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT USAGE ON * . * TO 'osticket'@'localhost' IDENTIFIED BY 'p@ssw0rd' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
Query OK, 0 rows affected (0.00 sec)

mysql> CREATE DATABASE IF NOT EXISTS `osticket` ;
Query OK, 1 row affected (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON `osticket` . * TO 'osticket'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
# cd /var/www/ 
# wget http://osticket.com/dl/osTicket-v1.7.1.zip
# unzip osTicket-v1.7.1.zip
# ln -s upload osticket
# chown -R www-data:www-data upload
# cp include/ost-sampleconfig.php include/ost-config.php
# chmod 0666 include/ost-config.php

Akses ke http://ip_server/osticket
Ikuti langkah-langkah instalasinya hingga selesai, jika ada error maka akan tampil di halaman instalasi tersebut.

Untuk keamanan, setelah instalasinya selesai, lakukan hal dibawah ini:

# chmod 0664 /var/www/osticket/include/ost-config.php
# rm -rf /osticket/setup

osticket

Sekian dan semoga bermanfaat.

Apache OCF resource agent tidak mau start ketika modul SSL diaktifkan

Posted on Updated on

Lagi-lagi masih seputar pacemaker dan apache2, setelah kemarin ketemu masalah, sekarang ketemu lagi masalah Apache OCF resource agent tidak mau start saat server direstart, akhirnya ketemu… ternyata dikarenakan folder /var/run/apache2 nya hilang/dihapus ketika server direstart, sedangkan /var/run/apache2 digunakan oleh apache jika SSL module diaktifkan.

Error log di apache :

[error] (2) No such file or directory: Cannot create SSLMutex with file `/var/run/apache2/ssl_mutex'

Ternyata ini adalah bug resource-agents

Solusinya adalah di-patch atau tambahkan di script OCF apachenya agar membuat folder /var/run/apache2 sebelum apachenya start.

# vi /usr/lib/ocf/resource.d/heartbeat/apache
...
start_apache() {
  if
    silent_status
  then
    ocf_log info "$CMD already running (pid $ApachePID)"
    return $OCF_SUCCESS
  fi

  [ -d /var/run/apache2 ] || mkdir /var/run/apache2 # <--- tambahkan baris berikut

  ocf_run $HTTPD $HTTPDOPTS $OPTIONS -f $CONFIGFILE
  tries=0
  while :  # wait until the user set timeout
  do
    monitor_apache
        ec=$?
        if [ $ec -eq $OCF_NOT_RUNNING ]
        then
                tries=`expr $tries + 1`
                ocf_log info "waiting for apache $CONFIGFILE to come up"
                sleep 1
        else
                break
        fi
  done
        if [ $ec -ne 0 ] && silent_status; then
                stop_apache
        fi
        return $ec
}
...

Semoga bermanfaat…

Pacemaker Alert via email

Posted on

Lagi-lagi tentang pacemaker, Anda ingin menerima alert via email jika terjadi sesuatu dengan Cluster Anda? Anda cukup menjalankan langkah berikut di semua node cluster Anda.

# crm_mon --daemonize --mail-to user@example.com &

Pasang di /etc/rc.local agar ketika server direstart, perintah diatas akan dijalankan secara otomatis.

Hasilnya Anda akan menerima email alert seperti berikut:

Status OK

Cluster notification
====

Completed operation start for resource r0:0 on node1

Details:
operation status: (0) complete
script returned: (0) ok
expected return value: (0) ok

Salah satu resource failed

Cluster notification
====

Operation start for resource WebSite on node1 failed: Timed Out

Details:
operation status: (2) Timed Out

Apache tidak bisa start di node cluster Pacemaker

Posted on

Jika Anda pengguna cluster pacemaker, dan menemukan error seperti dibawah ini saat resource apache2 tidak mau start dan isi dari error log tidak menunjukkan clue yang berarti :

Failed actions:
    WebSite_start_0 (node=node1, call=24, rc=-2, status=Timed Out): unknown exec error

Anda bisa mencoba langkah berikut, langkah ini sudah saya coba dan menyelesaikan masalah saya.

# crm status
============
Last updated: Fri Sep 13 11:38:17 2013
Last change: Fri Sep 13 11:38:02 2013 via crm_attribute on node1
Stack: openais
Current DC: node2 - partition with quorum
Version: 1.1.7-ee0730e13d124c3d58f00016c3376a1de5323cff
2 Nodes configured, 2 expected votes
7 Resources configured.
============

Online: [ node2 node1 ]

 Resource Group: WebServer
     ClusterIP  (ocf::heartbeat:IPaddr2):       Started node1
     WebFS      (ocf::heartbeat:Filesystem):    Started node1
     Links      (heartbeat:drbdlinks):  Started node1
     DBase      (ocf::heartbeat:mysql): Started node1
     WebSite    (ocf::heartbeat:apache):        Stopped
 Master/Slave Set: ms_r0 [r0]
     Masters: [ node1 ]
     Slaves: [ node2 ]

Failed actions:
    WebSite_start_0 (node=node1, call=24, rc=-2, status=Timed Out): unknown exec error

Tambahkan baris berikut di apache2.conf (saya menggunakan Debian 7.1)

ExtendedStatus On

<Location /server-status>
     SetHandler server-status
     Order deny,allow
     Deny from all
     Allow from 127.0.0.1
</Location>

Kemudian restart resource apachenya.

# crm resource restart WebSite

Membuat virtual machine di Virtualbox menggunakan Command Line

Posted on

Dalam tulisan ini, Host OS menggunakan Debian wheezy, kemudian diinstall virtualbox versi 4.1.18 dan Extension_Pack-4.1.8.

Untuk Guest OS nya diberi nama “wheezy” yang akan di-install Debian Wheezy netinst menggunakan berkas iso “debian-7.1.0-i386-netinst.iso” yang sebelumnya sudah diunggah ke “/home/vbox” yang merupakan home folder dari user “vbox” selaku user virtualbox.

Install virtualbox

# apt-get update
# apt-get install virtualbox

Buat user vbox

# useradd -m vbox -G vboxusers,cdrom
# passwd vbox
# su - vbox

Mulai tahapan pembuatan virtual machine-nya.

$ VBoxManage createvm --name wheezy --ostype Debian --register
Virtual machine 'wheezy' is created and registered.
UUID: e0e4a4fe-5ae5-4602-bb16-459f22424a8b
Settings file: '/home/vbox/VirtualBox VMs/wheezy/wheezy.vbox'

Check interface yang kita gunakan, karena kita akan menggunakan interface tersebut nantinya.

$ /sbin/ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:0c:29:86:8e:e5
          inet addr:10.xxx.xxx.xxx  Bcast:10.xxx.xxx.xxx  Mask:255.255.255.0
$ VBoxManage modifyvm "wheezy" --memory 2048 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0

Periksa konfigurasi yang barusan kita lakukan

$ VBoxManage showvminfo wheezy | grep "Memory size"
Memory size:     2048MB
$ VBoxManage showvminfo wheezy | grep "NIC 1"
NIC 1:  MAC: 080027D85B5D, Attachment: Bridged Interface 'eth0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: deny

Proses pembuatan harddisk, dengan format VDI (bisa juga diset ke VMDK atau VHD)

$ VBoxManage createhd --filename ~/VirtualBox VMs/wheezy/wheezy.vdi --size 10000 --format VDI
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Disk image created. UUID: 252a25f2-0327-42e1-b117-ddad42da1b09

Pasang disk yang tadi kita buat

$ VBoxManage storagectl wheezy --name "SATA Controller" --add sata --controller IntelAhci
$ VBoxManage storageattach "wheezy" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium ~/VirtualBox VMs/wheezy/wheezy.vdi

Pasang berkas iso debian-7.1.0-i386-netinst.iso

$ VBoxManage storagectl wheezy --name "IDE Controller" --add ide --controller PIIX4
$ VBoxManage storageattach wheezy --storagectl "IDE Controller" --port 1 --device 0 --type dvddrive --medium ~/debian-7.1.0-i386-netinst.iso
$ VBoxManage showvminfo wheezy | grep "IDE Controller"
Storage Controller Name (1):            IDE Controller
IDE Controller (1, 0): /home/vbox/debian-7.1.0-i386-netinst.iso (UUID: c0d2679e-1fd5-4e57-8967-c68218c00c7e)

Meng-enable remote desktop, untuk kemudahan dalam proses instalasi Guest OS nantinya.

$ VBoxManage modifyvm wheezy --vrde on
$ VBoxManage modifyvm wheezy --vrdemulticon on --vrdeport 3389
$ VBoxManage showvminfo wheezy | grep "VRDE"
VRDE:            enabled (Address 0.0.0.0, Ports 3389, MultiConn: on, ReuseSingleConn: off, Authentication type: null)
VRDE Connection:    not active

Start vm yang sudah dibuat

$ VBoxHeadless --startvm wheezy
Oracle VM VirtualBox Headless Interface 4.1.18_Debian
(C) 2008-2013 Oracle Corporation
All rights reserved.

VRDE server is listening on port 3389.

Muncul keterangan bahwa VRDE sudah listen di port 3389, artinya saatnya kita lakukan remote desktop menggunakan remote dektop fasilitas dari Windows.

vrde_virtualbox

Sekian dan semoga bermanfaat.