Categories
backup

Pasang bacula-web pada Ubuntu 16.04

  1. Muaturun bacula-web
    curl -O http://www.bacula-web.org/files/bacula-web.org/downloads/bacula-web-latest.tgz
    sudo mkdir -v /var/www/bacula-web

  2. Salin dan ekstrak ke /var/www
    cp /home/user1/bacula-web-latest.tgz .
    sudo cp /home/user1/bacula-web-latest.tgz .
    tar -xzf bacula-web-latest.tgz -C /var/www/bacula-web
    sudo tar -xzf bacula-web-latest.tgz -C /var/www/bacula-web
    chown -Rv www-data: /var/www/bacula-web
    sudo chown -Rv www-data: /var/www/bacula-web
    sudo chmod -Rv u=rx,g=rx,o=rx /var/www/bacula-web
    cd bacula-web/
    cd application/config/
    sudo cp config.php.sample config.php

  3. Edit setting nama dan path fail sqlite pada /var/www/bacula-web/application/config/config.php
    $config[0]['label'] = 'Main Backup Server';
    $config[0]['db_type'] = 'sqlite';
    $config[0]['db_name'] = '/var/lib/bacula/bacula.db';

  4. Edit /etc/php/7.0/apache2/php.ini dan set timezone
    date.timezone = Asia/Kuala_Lumpur

  5. Edit /etc/apache2/sites-available/000-default.conf dan tambah berikut sebelum “</VirtualHost>”
    <Directory /var/www/html/bacula-web>
     AllowOverride All
    </Directory>

  6. Ubah permission cache dan sqlite
    sudo chmod 755 application/view/cache/
    sudo chown www-data /var/lib/bacula/bacula.db
    sudo chown www-data /var/lib/bacula
    sudo service apache2 reload

  7. Siap. Anda sekarang boleh mengakses bacula-web pada IP/bacula-web/
Categories
perisian

Kemaskini owncloud pada Debian 8

  1. Setelah apt upgrade, tukar direktori ke /var/www/owncloud

    cd /var/www/owncloud/

  2. Kemaskini dilakukan sebagai pengguna service http www-data

    sudo -u www-data php occ status
    sudo -u www-data php occ upgrade

Siap.

Categories
backup linux

Pasang Acronis Management Server pada CentOS 7

  1. Pasangkan semua pakej yang diperlukan

    yum -y install gcc perl kernel kernel-headers kernel-devel

  2. Mulakan semula CentOS

    reboot

  3. Mula memasang Acronis. Jangan lupa memilih management server.

    bash AcronisBackupL64_11.7N_trial_en-US.x86_64

Sekarang anda telah boleh mengakses GUI Acronis Backup dari ikon pada Desktop CentOS 7.

Categories
email

Setting SSL (letsencrypt) nginx Citadel

  1. Tukar port HTTPS Citadel ke 2001 dengan arahan

    dpkg-reconfigure citadel-webcit

  2. Pasang SSL truecrypt dengan merujuk kepada artikel https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04
  3. Edit /etc/nginx/sites-enabled/citadel seperti berikut:

    [code lang=’plain’]
    server {

    server_name domain.com citadel.domain.com;
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    include snippets/ssl-domain.com.conf;
    include snippets/ssl-params.conf;

    error_log /var/log/nginx/citadel-error.log;
    access_log /var/log/nginx/citadel-access.log;

    root /usr/share/citadel-webcit;
    # optional:
    # listen 192.168.1.1:443
    # instead depending on your setup…
    # Main location
    location /webcit/ {
    proxy_pass https://127.0.0.1:2001/;
    proxy_redirect off;

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    client_max_body_size 10m;
    client_body_buffer_size 128k;

    proxy_connect_timeout 90;
    proxy_send_timeout 90;
    proxy_read_timeout 90;

    proxy_buffer_size 4k;
    proxy_buffers 4 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;
    }
    location /listsub/ {
    proxy_pass https://127.0.0.1:2001;
    proxy_redirect off;

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    client_max_body_size 10m;
    client_body_buffer_size 128k;

    proxy_connect_timeout 90;
    proxy_send_timeout 90;
    proxy_read_timeout 90;

    proxy_buffer_size 4k;
    proxy_buffers 4 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;
    }
    location /groupdav/ {
    proxy_pass https://127.0.0.1:2001/;
    proxy_redirect off;

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    client_max_body_size 10m;
    client_body_buffer_size 128k;

    proxy_connect_timeout 90;
    proxy_send_timeout 90;
    proxy_read_timeout 90;

    proxy_buffer_size 4k;
    proxy_buffers 4 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;
    }
    location /freebusy/ {
    proxy_pass https://127.0.0.1:2001/;
    proxy_redirect off;

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    client_max_body_size 10m;
    client_body_buffer_size 128k;

    proxy_connect_timeout 90;
    proxy_send_timeout 90;
    proxy_read_timeout 90;

    proxy_buffer_size 4k;
    proxy_buffers 4 32k;
    proxy_busy_buffers_size 64k;
    proxy_temp_file_write_size 64k;
    }
    }[/code]

Sumber:
http://www.citadel.org/doku.php/faq:installation:apacheproxy
https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04

Categories
vmware

Kemaskini ESXi 5.1 menggunakan PowerShell

> Connect-VIServer -Server 10.0.0.100 -User root -Password password

> Get-VMhost | Select name, ConnectionState, Version, Build

[code lang=’plain’]Name ConnectionState Version Build
—- ————— ——- —–
10.0.0.100 Connected 5.1.0 2323236[/code]

> Set-VMhost -State Maintenance

[code lang=’plain’]Name ConnectionState PowerState NumCpu CpuUsageMhz CpuTotalMhz MemoryUsageGB MemoryTotalGB Version
—- ————— ———- —— ———– ———– ————- ————- ——-
10.0.0.100 Maintenance PoweredOn 4 137 9040 1.527 43.991 5.1.0

> Get-Datastore

Name FreeSpaceGB CapacityGB
—- ———– ———-
maildatastore1 328.009 1,672.750
datastore1 265.133 274.000[/code]

> New-PSDrive -name "mounteddatastore" -Root \ -PSProvider VimDatastore -Datastore (Get-Datastore datastore1)

[code lang=’plain’]Name Used (GB) Free (GB) Provider Root CurrentLocation
—- ——— ——— ——– —- —————
mounted… VimDatastore \10.0.0.100@443\ha-datacenter\da…[/code]

> Copy-Datastoreitem C:\Users\umarz\Downloads\ESXi510-201605001.zip -Destination mounteddatastore:

SSH ke ESXi dan taip

# esxcli software vib install -d /vmfs/volumes/datastore1/ESXi510-201605001.zip
# esxcli system shutdown reboot --reason patch

Categories
linux perisian

Ralat Clamd CentOS 5 LibClamAV Error: mpool_malloc()

Apabila email tidak sampai ke mailbox dan log MailScanner (maillog) terdapat ralat berikut:

Oct 23 22:32:06 email MailScanner[21705]: Virus and Content Scanning: Starting
Oct 23 22:32:06 email MailScanner[21705]: Clamd::ERROR:: COULD NOT CONNECT TO CLAMD, RECOMMEND RESTARTING DAEMON :: .
Oct 23 22:32:07 email MailScanner[21705]: Virus Scanning: Clamd found 1 infections
Oct 23 22:32:07 email MailScanner[21705]: Virus Scanning: No virus scanners worked, so message batch was abandoned and re-tried!

Kemudian cuba restart clamd, ralat berikut pula muncul

LibClamAV Error: mpool_malloc(): Attempt to allocate 8388608 bytes. Please report to http://bugs.clamav.net

Kemaskini clamav untuk selesaikan masalah ini.

yum --disablerepo=\* --enablerepo=rpmforge update clam\*

Categories
linux pemasangan perisian

Pelayan SNMP CentOS 6

Andaian:

IP = 10.0.0.10
Email support = email@domain

Pasang snmpd net-snmp

yum install -y net-snmp-utils
chkconfig snmpd on

/etc/snmp/snmpd.conf

[code lang=’plain’]rocommunity public
syslocation Rack Server IT
syscontact Domain Support
dontLogTCPWrappersConnects yes
rocommunity public default[/code]

/etc/sysconfig/snmpd.options (untuk membenarkan akses dari pelayan lain)

[code lang=’plain’]# snmpd command line options
OPTIONS=”-Lsd -Lf /dev/null -p /var/run/snmpd.pid -a -x 127.0.0.1 10.0.0.10″[/code]

Mulakan semula snmpd

service snmpd restart

Uji dengan

snmpwalk -v2c -cpublic 127.0.0.1

Categories
android

Skrin hitam selepas gagal unlock K910

Skrip unlock yang digunakan dimuaturun dari http://www.teamsuperluminal.org/download/ts_k910_unlock-zip/

Mesej ralat:

The system cannot find the batch label specified – adb_wait_for_device
type = ROM_AND_GAPPS
Uploading ROM.. Please wait.. about 2-5 min
3984 KB/s (288650404 bytes in 70.739s)
Uploading GAPPS.. Please wait.. about 1-3 min
failed to copy ‘ROM/gapps.zip’ to ‘/tmp/gapps.zip’: No space left on device
Failed with error #1.
Carefully look point where error happened in script and continue script executing manually line by line!
In worst case, search for team superluminal unbricking guide.
http://www.teamsuperluminal.org
Good luck 😉
Press any key to continue . . .

  1. Tekan butang power serentak dengan butang kurangkan dan tambahkan bunyi sehingga logo Lenovo keluar
  2. Setelah masuk ke TWRP, guna adb dari fastboot_adb(1.0.36)_110716_r24.0
  3. Salin rom cm-12.1-20160821-UNOFFICIAL-kiton.zip ke dalam folder fastboot_adb(1.0.36)_110716_r24.0 dan namakan sebagai rom.zip
  4. C:\Users\umarz\Downloads\fastboot_adb(1.0.36)_110716_r24.0>adb.exe sideload rom.zip
    Total xfer: 1.00x

  5. Reboot dan salin gapps dari https://github.com/cgapps/vendor_google/blob/builds/README.md ke dalam VIBEZ
  6. Reboot semula ke TWRP dan pilih Install untuk memasang gapps
  7. Reboot setelah selesai memasang gapps
Categories
vmware

Cara untuk hantar syslog ESXi 5.5 ke server log SexiLog

IP Server log SexiLog = 10.0.0.20

SSH ke ESXi dan taip

esxcli system syslog config set --loghost=udp://10.0.0.20:514
esxcli network firewall ruleset set --ruleset-id syslog --enabled yes

Categories
windows

Win 2008 R2 jadi secondary AD Win 2k

dengan menggunakan DVD Win 2k8 R2 pada server Win 2k:

cd /d d:\support\adprep
adprep32.exe /forestprep
adprep32.exe /rodcprep
adprep32.exe /domainprep

Mulakan dcpromo pada server Win 2k8 R2