Sunday, 6 October 2013

How to Install Asterisk-GUI

After I try to install asterisk on my previous writings, it seems so hard to configure with CLI. However i’m just a newbie…remember that. So, I’m trying to find an easy way to configure using ‘Asterisk-gui’. actually there are many third-party applications developed for asterisk, such as pbxware, asterisk now, freepbx, briker, etc. asterisk-gui is a web interface, it’s just like you have installing a trixbox on your own.
Here is step by step installation:
1. Go to your installation directory (for example: /usr/src), download the latest version:
[root@gembul ~]# cd /usr/src/
[root@gembul src]# svn checkout http://svn.digium.com/svn/asterisk-gui/trunk asterisk-gui

this is will create directory named asterisk-gui

2. Enter asterisk-gui directory, compile and install:
[root@gembul asterisk-gui]# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for uname... /bin/uname
checking for gcc... gcc
##################################### skipped #####################################
configure: Package configured for:
configure: OS type : linux-gnu
configure: Host CPU : x86_64

[root@gembul asterisk-gui]# make && make install
##################################### skipped #####################################
+------- Asterisk-GUI Build Complete -------+
+ Asterisk-GUI has successfully been built, +
+ and can be installed by running: +
+ +
+ make install +
+-------------------------------------------+
+---- Asterisk GUI Installation Complete ---+
+ +
+ YOU MUST READ THE SECURITY DOCUMENT +
+ +
+ Asterisk-GUI has successfully been +
+ installed. +
+ +
+-------------------------------------------+
+ +
+ BEFORE THE GUI WILL WORK +
+ +
+ Before the GUI will run, you must perform +
+ some modifications to the Asterisk +
+ configuration files in accordance with +
+ the README file. When done, you can +
+ check your changes by doing: +
+ +
+ make checkconfig +
+ +
+-------------------------------------------+

3. Configure general parameters, I suggest to backup your default configuration first. and then modify manager.conf http.conf files:
[root@gembul asterisk]# cp -r /etc/asterisk /etc/asterisk.backup
[root@gembul asterisk]# vi /etc/asterisk/manager.conf

[general]
enabled = yes
webenabled = yes
port = 5038
bindaddr = 0.0.0.0

[gembuls]
secret = your_password
permit=0.0.0.0/0.0.0.0
read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
write = system,call,agent,user,config,command,reporting,originate
[root@gembul asterisk]# vi /etc/asterisk/http.conf
[general]
enabled = yes
bindaddr = 0.0.0.0
bindport = 8088
prefix = gui
enablestatic = yes

4. Reload/restart your asterisk
[root@gembul asterisk]# asterisk -r
Asterisk 1.6.2.21, Copyright (C) 1999 - 2010 Digium, Inc. and others.
Created by Mark Spencer
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 1.6.2.21 currently running on gembul (pid = 3108)
Verbosity is at least 3
gembul*CLI>

or restart the asterisk:
[root@gembul asterisk]# /etc/init.d/asterisk restart
Stopping safe_asterisk: [ OK ]
Shutting down asterisk: [ OK ]
Starting asterisk: [ OK ]
[root@gembul asterisk]#

5. Open asterisk-gui on your browser with address:
http://localhost:8088/gui/static/config/index.html
source:
asterisk.org
sourceforge.net


nyolong seko : http://gembuls.wordpress.com/2011/12/28/how-to-install-asterisk-gui/

Tuesday, 1 October 2013

RESET SAMSUNG ML-2240



Samsung ML-2240 setelah counter pagenya menunjukkan angka di atas 1800, maka printer ini akan blink yang disertai dengan berkedipnya lampu merah pada printer. Lampu merah tersebut menunjukkan bahwa toner telah habis. Walaupun toner sudah kita refill, namun lampu merah tersebut tidak bisa hilang.
reset samsung ml-2240
Hal ini mengakibatkan printer Samsung Ml-2240 ini tidak bisa ngeprint. Agar printer Samsung ML-2240 ini dapat berpungsi kembali, maka kita harus mereset ulang kembali counter page tersebut dengan cara manual menggunakan jumper atau dengan membeli alat chip. Untuk cara reset manual Samsung Ml-2240 menggunakan jumper akan kami jelaskan di sini.
Sebelum kita melakukan reset printer Samsung ML-2240, sebaiknya anda melakukan test printer untuk melihat OS Version dan hasil terakhir Toner Page Count dari printer Samsung ML-2240.


Cara test printer Samsung ML2240:
1. Hidupkan printer, dan tunggu sampai proses kalibrasi selesai
2. Pasang kertas 3 lembar, kemudian tekan tombol Resume selama 3 detik. Lepas tekanan pada tombol resume, dan printer melakukan test print.

3. Setelah selesai test print, perhatikan OS Version dari hasil test printer anda.
Ada beberapa tipe OS Version dari Samsung ML-2240 ini yang tidak dapat kita reset secara manual menggunakan jumper. Adapun tipe OS Version Samsung ML-2240 yang dapat di reset adalah :
1.01.00.68
1.01.00.70
1.01.00.72
1.01.00.76
1.01.00.77
1.01.00.78
semuanya bisa di reset pake jumper atau disolder.
Tapi kalo yang OS versi :
1.01.00.82
1.01.00.83
Masih belum bisa di reset pake jumper.
Langkah-langkah reset printer Samsung ML-2240
A. Peralatan yang dibutuhkan :
- Obeng plus (+), dan obeng minus (-)
- Kabel atau kawat kecil untuk jumper
B. Langkah-langkah reset printer Samsung ML-2240
- Lepas semua kabel printer (kabel power printer dan kabel data printer), dan pastikan switch printer dalam keadaan OFF
- Lepas dua buah baut yang ada pada bagian kiri dan kanan di belakang printer menggunakan obeng plus (+)

- Setelah kedua baut dilepas, dan soket pengunci dibuka, geser cover ke samping secara pelan-pelan.

- Lepas kipas pendingin yang menempel pada cover

- Akan terlihat dua buah mesin printer Samsung ML-2240, yaitu mesin power supply dan motherboard.
reset counter page
- Cari dan perhatikan IC EEPROM kaki 8 yang menempel pada mainboard printer Samsung ML-2240, yaitu ic U6 dengan nomor 93C66WP.

- Setelah IC U6 ditemukan, pasang dan hubungkan jumper atau kawat kecil pada ic kaki 1 dan 4
Kalau terbiasa menggunakan solder, solder aja kabel tersebut pada kaki 1 dan 4 agar anda tidak ribet memegangnya.
samsung ml-2240
- Setelah kaki 1 dan 4 pada ic dihubungkan, pasang kabel power, dan hidupkan printer.
- Tunggu beberapa saat hingga printer selesai kalibrasi dan lampu menunjukkan warna hijau
- Setelah lampu hijau, matikan printer, kemudian lepas kabel atau kawat yang menempel pada kaki 1 dan 4 IC EEPROM 93C66WP
- Tutup kembali cover belakang printer tersebut dan jangan lupa pasang dua buah baut skrup yang dilepas tadi.
Reset Samsung ML-2240 telah selesai dilakukan, dan printer beroperasi kembali.

Source : http://www.teknisiprinter.com/reset-samsung-ml2240.htm

Monday, 16 September 2013

Increasing Java Memory



Hi All


This problem is resolved by adding  OPENFIRE_OPTS="-Xmx1512m"


in /etc/sysconfig/openfire file I restarted the services after that


Thanks a lot all of you for  your support  Now arround 1200 users are accessing this server from 3 different location in India


and IT is working nice


Thank you all

Source : http://community.igniterealtime.org/thread/30011

Friday, 13 September 2013

Move MySQL Directory to Another Location

Lets say your MySQL data has fully utilized the disk space and you have another new hard disk specifically mounted for this purpose, you will need to migrate the data over to this new location. By default, MySQL will occupied following locations in the server:

    Data -/var/lib/mysql
    Config – /etc
    Log -/var/log


We will not migrate data in /etc or /log because it usually not required much space. I will use following variables:

    Server OS: CentOS 5.6 64bit
    Old MySQL data: /var/lib/mysql
    New MySQL data: /mnt/disk1/mysql


Warning: You MUST able to afford downtime on MySQL service to do this!

1. First of all, we need to make sure the service is stopped (if you are running cPanel, please disable MySQL monitoring under WHM > Service Manager > Untick ‘monitor’ for MySQL):

[root@centos ~]# service mysql stop

2. Make sure there is no MySQL services running on the server:

[root@centos ~]# ps aux | grep mysql | egrep -v 'grep'

3. Lets copy over the data directory. We are using rsync command so we can see the copy progress with estimate time remaining (this is really good for monitoring), and also preserve the permission and ownership of the MySQL directory:

[root@centos ~]# rsync -avpP /var/lib/mysql /mnt/disk1/mysql


4. Now we need to tell MySQL to look at new data directory. Open /etc/my.cnf via text editor and change following server options:

[mysqld]
......
datadir=/mnt/disk1/mysql
socket=/mnt/disk1/mysql/mysql.sock

......

5. Now lets start back the MySQL with this new settings:

[root@centos ~]# service mysql start


If everything are running back as expected, you can then delete the old /var/lib/mysql directory so you can save more free space.

Source : http://blog.secaserver.com/2011/07/move-mysql-directory-to-another-location/

====================XXXXXXXXXXXXXXXX========================

How to symlink /var/lib/mysql if /var mount becomes full


Most of you may already know how to do this, so forgive if this is too simple, but this may be helpful for some dedicated server owners whose /var mount (some hosts use separate partitions for /usr, /var, /home etc) has become full, which is usually do to large databases in /var/lib/mysql. There is usually plenty of room in /the /home partition. This will work on cPanel servers as well.

This simple tutorial lays out the steps involved to copy contents of /var/lib/mysql to /home and then symlink /var/lib/mysql to /home/mysql. Of course adjust accordingly if moving/symlinking to a different mount or directory.

1) Go to webpage that uses mysql to verify working pre-copy

2) Stop mysql service (I will usually also stop cpanel & http service just to be safe).

/etc/init.d/mysql stop
/etc/init.d/httpd stop
/etc/init.d/cpanel stop


3) Do the copy:

rsync -av /var/lib/mysql /home/


4) Verify copied folder same size as source with du:

du -sh /var/lib/mysql
du -sh /home/mysql


5) Move /var/lib/mysql to /home/mysql-bak (essentially removing /var/lib/mysql because the folder must not exist when symlink is created)

mkdir /home/mysql-bak
mv /var/lib/mysql /home/mysql-bak/


6) Create symlink:

ln -s /home/mysql /var/lib/mysql

7) Verify the symlink is correct when listing the contents of new symlinked /var/lib/mysql (you can refer to the rsync copy to make sure the paths are the same - they should be)

8) Restart mysql, httpd, cpanel

9) Verify mysql-reliant webpage is loading without issue

10) You should now have freed up space on /var. Verify with 'df -h'
 
Source : http://www.webhostingtalk.com/showthread.php?t=1086919

Friday, 6 September 2013

Setting PPoE Internet Speedy pada modem ADSL D-Link DSL-526B

Modem adsl 526B adalah modem adsl untuk akses internet mempunyai 1 port RJ-45,RJ,11
modem berpenampilan kecil tetapi berkemampuan luar biasa. Tapi sayang agak sedikit rewel untuk daerah yang listriknya ga stabil
langkah pertama
untuk menseting atau mengkonfigurasi modem saya akan memasang seperti di bawah ini:
topologinya yaitu
kabel telp(line internet)        —-> lubang konektor rJ-11 (pada modem)
PC                                            —-> lubang konektor RJ-45 (LAN) pada modem
langkah kedua
saya menggunakan pc/komputer jadi, sebaiknya local area network/ pada tcp ipnya harap dibuat dhcp, agar dapat mengenali ip modem(untuk di atas windows xp ipv sebaiknya di aktifkan dhcpnya)
kenapa alasan local area connectionnya di buat dhcp karena supaya ip saya akan menjadi satu group dengan ip modem sehingga dapat melanjutkan ke konfigurasi selanjutnya.
bisanya ip bawaan modem dari pabrik akan bernilai 192.168.0.1 atau 192.168.1.1
===========================================================
default ip modem 192.168.1.1
karena local area connection saya dhcp maka nilai ip saya akan bernila 192.168.1.(1-254)
langkah ketiga
Buka browser kemudian mengetikan di adress 192.168.1.11
Masukan  username dan password
default
username =admin
password  =admin
kemudian muncul gambar dibawah ini

kemudian pilih advanced setup kemudian klik lalu akan muncul tampilah dibawah ini

lalu ikuti gambar lalu klik next

kemudian masukan username yang di dapat dari telkom speedy kemudian diikuti dengan “@telkom.net”
Contoh : 1234567890@telkom.net
Lalu masukan password
Untuk PPoE service name, boleh diisi apa aja
(username dan password speedy diperoleh oleh setiap pelanggan internet speedy)

ikuti gambar kemudian klik next

ikuti gambar lalu klik next

kemudian save
dan konfigurasi selesai, tandanya sudah bisa internet bila anda terkoneksi bilamana pada gambar pertama ada IP speedy anda dan DNS speedy anda ditampilkan.
Jika belum tampil seperti gambar no. 1, cobalah login dulu di website http://www.telkomspeedy.com
Untuk berlangganan kalau internet speedy telp ke 147 , cara itu cara terakhir bilamana masih tidak bisa koneksi internet.

Wednesday, 4 September 2013

Change the default MySQL data directory with SELinux enabled

This is a short article that explains how you change the default MySQL data directory and adjust SELinux to account for the changes. The article assumes that you’re running either RHEL, CentOS, Scientific Linux or Fedora with SELinux enabled. This works with the most recent EL (6.2) version.
We’ll be doing this in the following order.
  • Stopping the MySQL server
  • Create a new data directory and move the content from the old data directory
  • Correct the MySQL configuration file
  • Adjust SELinux parameters to accept our new change
  • Starting the MySQL server

Stopping the MySQL server

# service mysqld stop

Create a new data diretory and move the content from the old one

Creating a new data directory

# mkdir /srv/mysql/
# chown mysql:mysql /srv/mysql

Moving the original data files

 # mv /var/lib/mysql/* /srv/mysql/

Correct the MySQL configuration file

Edit the my.cnf file for your distribution. In my example it’s located in the /etc/mysql/ directory. RHEL/CentOS/Scientific Linux put the my.cnf file directly in /etc by default.
# nano /etc/mysql/my.cnf
Change
datadir=/var/lib/mysql
to
datadir=/srv/mysql
and
socket=/var/lib/mysql/mysql.sock
to
socket=/srv/mysql/mysql.sock
and save the file.

Adjust SELinux parameters to accept our new change

Should the following command output “Permissive” or “Disabled” then you may skip the details for SELinux.
# getenforce
Run the semanage command to add a context mapping for /srv/mysql.
# semanage fcontext -a -t mysqld_db_t "/srv/mysql(/.*)?"
Now use the restorecon command to apply this context mapping to the running system.
# restorecon -Rv /srv/mysql

Starting the MySQL server

# service mysqld start

Verifying access and connectivity

$ mysql -u root -p
mysql> show databases;
If this is working, you’re up and running. Should you get a message that says

ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’
then add the following to your /etc/my.cnf
[client]
socket = /srv/mysql/mysql.sock
Optionally you can just use
$ mysql -u root -p --protocol tcp
to avoid connecting via the socket.

Source : http://crashmag.net/change-the-default-mysql-data-directory-with-selinux-enabled

Web server on centos 6.3

Here is a quick how to guide on setting up a web server on Centos 6.3Run this script…

sudo yum update -y
sudo yum install httpd -y
sudo yum install php-mysql php php-xml php-mcrypt php-mbstring php-cli php-gd mysql -y
sudo yum install mysql-server -y
sudo yum install openssh-clients -y
sudo yum install wget -y
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
 
 
# Once installed you should see some additional repo definitions under the /etc/yum.repos.d directory. #

ls -1 /etc/yum.repos.d/epel* /etc/yum.repos.d/remi.repo
 
 
# You should see:
/etc/yum.repos.d/epel.repo
/etc/yum.repos.d/epel-testing.repo
/etc/yum.repos.d/remi.repo
 
 
# Enable the remi repository #
The remi repository provides a variety of up-to-date packages that are useful or are a requirement for many popular web-based services. That means it generally is not a bad idea to enable the remi repositories by default.
First, open the /etc/yum.repos.d/remi.repo repository file using a text editor of your choice:

sudo vi /etc/yum.repos.d/remi.repo
 
 
# Edit the [remi] portion of the file so that the enabled option is set to 1. This will enable the remi repository.#

name=Les RPM de remi pour Enterprise Linux $releasever - $basearch
#baseurl=http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/
mirrorlist=http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
failovermethod=priority
 
 
# Install mcrypt #
sudo yum -y install php-mcrypt
 
 
# Add username and password for phpmyadmin #
sudo adduser phpmyadmin
sudo passwd phpmyadmin
 
 
# Allowing HTTP and HTTPS through the firewall #
Run following command:
sudo vi /etc/sysconfig/iptables
Then add these two lines after the entry allowing port 22:
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
Then run:
sudo service iptables restart
 
 
# adjusting apache config #
sudo vi /etc/httpd/conf/httpd.conf
 
 
# Scroll all the way down the the bottom of the Config file by pressing G (Shift + g) then press “a” so you can start manipulating the file.

# paste the following 4 lines and adjust the document root and the ip address
DocumentRoot /var/www/html
ServerName 1.2.3.4

# Sroll up until you find #
DirectoryIndex and replace with the following line:
DirectoryIndex index.html index.php index.sh default.jsp


# make sure DocumentRoot is set to
/var/etc/html


# Remove # infront of NameVirtualHost
the press “Esc” and then type ZZ (two capital Z’s)


# Finally, start the Apache server using the command:
sudo service httpd start


# Configuring MySQL #
#run:
sudo service mysqld start
/usr/bin/mysql_secure_installation

# Run through the wizard answering the questions to setup MySQL
# installing phpmyadmin
cd /var/www/html
sudo wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.3.9.1/phpMyAdmin-3.3.9.1-all-languages.tar.gz
tar -xzvf phpMyAdmin-3.3.9.1-all-languages.tar.gz -C /var/www/html
sudo mv phpMyAdmin-3.3.9.1-all-languages phpmyadmin
sudo rm -rf phpMyAdmin-3.3.9.1-all-languages.tar.gz
cd /var/www/html
sudo chown phpmyadmin.apache phpmyadmin/
cd /var/www/html/phpmyadmin/
sudo mkdir config
sudo chmod o+rw config
sudo cp config.sample.inc.php config/config.inc.php
sudo chmod o+w config/config.inc.php
sudo service httpd restart


# configuring PHPmyadmin #
# edit the phpmyadmin config file by running the following command:
sudo vi /var/www/html/phpmyadmin/config/config.inc.php


# Near the top of the file you will see this line:#
$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */


# All you need to do here is enter a random string of characters between the quotation marks. #
# Scroll down to the /* Server Parameters */ section, and change
$cfg['Servers'][$i]['extension'] = ‘mysql’;
to
$cfg['Servers'][$i]['extension'] = ‘mysqli’;


# Scroll down a bit further and you will find the /* User for advanced features */ section. Leave the control user and the control password commented out, as we will not need them, and uncomment all of the other lines starting with $cfg in this section and the one below it. Save your changes by pressing Esc and entering :wp. Change directory back to the phpmyadmin config folder. ###


# Then run the following commands #
cd /var/www/html/phpmyadmin/config
sudo cp config.inc.php ..
cd ..
sudo rm -rf config
 
 
# Then download create_tables.sql
After you have downloaded the file, log in to phpMyAdmin if you aren’t already logged in and go to the import tab. Select the create_tables.sql file from your Downloads directory and click Go. The script will be run and the tables will be created. If the error does not disappear, log out of phpMyAdmin and log back in and it should disappear.


# moving Mysql database to new server #
mysqldump -u username -password databasename > dump.txt

mysql -u username -password databasename < dump.txt


# Setting up NTP Sync#
Run:
sudo yum install ntp -y
sudo /sbin/chkconfig ntpd on
sudo /etc/init.d/ntpd start
If you want to be able to send email from your contact forms please make sure that you are allowed through your firewall and it helps if you are on a static IP address:
setsebool -P httpd_can_sendmail 1
Please leave a comment if this article has helped you! Thanks and enjoy!

Source : http://www.parktec.com/2013/02/web-server-on-centos-6-3/