Categories
linux

Menu Firefox LXDE

cat /home/user/.local/share/applications/firefox.desktop

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Firefox
Name[en_US]=Firefox
Exec=/home/user/firefox/firefox
Comment[en_US]=Firefox web browser
StartupNotify=false
Icon=/home/user/firefox/browser/icons/mozicon128.png

Categories
linux pemasangan perisian

JRE 1.6 pada Debian 9 32-bit

Download JRE 1.6 dari https://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html

Pasang JRE 1.6


mkdir /usr/lib/jvm
cp /home/user/jre-6u45-linux-i586.bin .
./jre-6u45-linux-i586.bin
update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.6.0_45/bin/java" 1

Download firefox 45.9.0esr dari https://ftp.mozilla.org/pub/firefox/releases/45.9.0esr/linux-i686/ dan ekstrak ke home folder user

Link plugin jre ke folder plugin firefox
mkdir .mozilla/plugins
ln -s /usr/lib/jvm/jre1.6.0_45/lib/i386/libnpjp2.so /home/user/.mozilla/plugins/

Categories
linux

GPG error owncloud

Pernah dapat error ni?

All packages are up to date.
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://download.owncloud.org/download/repositories/production/Debian_9.0 Release: The following signatures were invalid: EXPKEYSIG 47AE7F72479BC94B ownCloud build service
W: Failed to fetch http://download.owncloud.org/download/repositories/production/Debian_9.0/Release.gpg The following signatures were invalid: EXPKEYSIG 47AE7F72479BC94B ownCloud build service
W: Some index files failed to download. They have been ignored, or old ones used instead.

Senang je

wget -nv https://download.owncloud.org/download/repositories/production/Debian_9.0/Release.key -O Release.key
2019-03-20 00:40:43 URL:https://download.owncloud.org/download/repositories/production/Debian_9.0/Release.key [4485/4485] -> "Release.key" [1]

apt-key add - < Release.key OK

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
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
linux

Contoh setting munin dengan nginx + spawn-fcgi

Hasilnya, munin boleh diakses pada www.domain.com (contoh)

/etc/init.d/munin-fcgi

[code lang=’plain’]PATH=/usr/local/bin/:/usr/local/sbin:$PATH
DAEMON=$(which spawn-fcgi)
FCGI_GRAPH_SOCK=/var/run/munin/fastcgi-munin-graph.sock
FCGI_HTML_SOCK=/var/run/munin/fastcgi-munin-html.sock
WWW_USER=www-data
FCGI_USER=www-data
FCGI_GROUP=www-data
FCGI_SPAWN_GRAPH=/usr/lib/munin/cgi/munin-cgi-graph
FCGI_SPAWN_HTML=/usr/lib/munin/cgi/munin-cgi-html
PIDFILE_GRAPH=/var/run/munin/fastcgi-munin-graph.pid
PIDFILE_HTML=/var/run/munin/fastcgi-munin-html.pid
DESC=”Munin FCGI for Graph and HTML”
test -x $DAEMON || exit 0
test -x $FCGI_SPAWN_GRAPH || exit 0
test -x $FCGI_SPAWN_HTML || exit 0
start() {
$DAEMON -s $FCGI_GRAPH_SOCK -U $WWW_USER -u $FCGI_USER -g $FCGI_GROUP -P $PIDFILE_GRAPH $FCGI_SPAWN_GRAPH 2> /dev/null || echo “Graph Already running”
$DAEMON -s $FCGI_HTML_SOCK -U $WWW_USER -u $FCGI_USER -g $FCGI_GROUP -P $PIDFILE_HTML $FCGI_SPAWN_HTML 2> /dev/null || echo “HTML Already running”
}
stop() {
kill -QUIT `cat $PIDFILE_GRAPH` || echo “Graph not running”
kill -QUIT `cat $PIDFILE_HTML` || echo “HTML Not running”
}
restart() {
kill -HUP `cat $PIDFILE_GRAPH` || echo “Can’t reload Graph”
kill -HUP `cat $PIDFILE_HTML` || echo “Can’t reload HTML”
}
case “$1” in
start)
echo “Starting $DESC: ”
start
;;
stop)
echo “Stopping $DESC: ”
stop
;;
restart|reload)
echo “Restarting $DESC: ”
stop
sleep 1
start
;;
*)
echo “Usage: $SCRIPTNAME {start|stop|restart|reload}” >&2
exit 3
;;
esac
exit $?[/code]

/etc/munin/munin.conf

[code lang=’plain’]dbdir /var/lib/munin
htmldir /var/cache/munin/www
logdir /var/log/munin
rundir /var/run/munin
tmpldir /etc/munin/templates
staticdir /etc/munin/static
includedir /etc/munin/munin-conf.d
[www.domain.com]
address 127.0.0.1
use_node_name yes[/code]

/etc/nginx/sites-enabled/munin

[code lang=’plain’]server {
listen 80;
root /var/cache/munin/www;
index index.html index.htm;
server_name www.domin.com;
auth_basic “Administrator Login”;
auth_basic_user_file /var/www/.htpasswd;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
location ^~ /munin-cgi/munin-cgi-graph/ {
fastcgi_split_path_info ^(/munin-cgi/munin-cgi-graph)(.*);
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass unix:/var/run/munin/fastcgi-munin-graph.sock;
include fastcgi_params;
}
location ^~ /munin-cgi/munin-cgi-html/ {
fastcgi_split_path_info ^(/munin-cgi/munin-cgi-html)(.*);
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_pass unix:/var/run/munin/fastcgi-munin-html.sock;
include fastcgi_params;
}
}[/code]

Rujukan:

Nginx configuration for Munin


http://serverfault.com/questions/670535/munin-nginx-no-dynazoom-into-graphs
https://www.howtoforge.com/tutorial/server-monitoring-with-munin-and-monit-on-ubuntu-14-04/

Categories
linux

Observium apache – Data fetch failure

Tambah RewriteRule ^(server-info|server-status) - [L] sebelum mana-mana Rewrite di dalam .htaccess

Output ujian yang berjaya seperti berikut

/usr/lib/observium_agent/local/apache
<<>>
791
52263936
1.88869
1123
.704363
46539.6
66073.2
U
U
14
0
0
1
0
0
0
0
0
0
485

Categories
linux pemasangan

Pakejkan tsung dari git pada Ubuntu 14.04

sudo apt-get install git erlang build-helper autoconf debhelper python-sphinx

git clone https://github.com/processone/tsung.git

cd tsung
./configure
make deb

Pasang tsung

sudo dpkg -i ../tsung_1.6.0-1_all.deb

Categories
linux vmware

Pasang vSphere CLI pada Ubuntu 14.04

Muaturun dan pasang vSphere CLI terbaharu

tar -xvf Downloads/VMware-vSphere-CLI-6.0.0-2503617.x86_64.tar.gz
cd vmware-vsphere-cli-distrib/
sudo ./vmware-install.pl

Jika berlaku ralat module SOAP Lite, muaturun dan pasang secara manual

tar -xvf Downloads/SOAP-Lite-1.19.tar.gz
SOAP-Lite-1.19/
perl Makefile.PL
make
make test
sudo make install

Jika ada masalah memasang modul perl, guna arahan berikut berdasarkan modul yang diperlukan

sudo cpan Nama::Modul