• TibiaME

    The first Massively Multiplayer Online Role-Playing Game

  • This is default featured slide 2 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by NewBloggerThemes.com.

  • This is default featured slide 3 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by NewBloggerThemes.com.

  • This is default featured slide 4 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by NewBloggerThemes.com.

  • This is default featured slide 5 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by NewBloggerThemes.com.

Showing posts with label technology. Show all posts
Showing posts with label technology. Show all posts

[Other] Kerusakan IC Laptop


Sebelum mengenal lebih jauh kerusakan laptop karena IC Power dan IC Charger, yang menyebabkan laptop mati. Sebaikya kita mengetahuai cara memanfaatkan laptop yang baik.

Laptop merupakan alat elektronik yang bisa membantu kita bekerja dirumah maupun di kantor, jangan sampai laptop ini mati total ataupun hang. Maka perlunya kita untuk berhati hati dalam penggunaan dan perawatan.

Penggunaan laptop di sesuaikan keperluan saja, misalnya laptop kita suport untuk mengerjakan aplikasi office jangan dipakai buat main game. Jika ingin main game bisa membeli laptop game seperti asus rog, dell alienware, dll.

Laptop game sudah di desain dengan pendinginan yang cukup untuk menjalankan aplikasi game, laptop untuk kerjaan office system pendinginan prosesor tidak sebagus laptop gamer. Netbook atau laptop prosesor intel Celeron sekarang ada yang tidak pakai kipas prosesor, hanya menggunakan plat almunium sebagai pendinginya.

Pengaruh panas yang berlebihan bisa mengakibatkan kerusakan di prosesor, apalagi sekarang prosesor generasi 4 ke atas sudah onboard. Jadi jika terjadi kerusakan prosesor susah untuk menggantinya atau mahal. Harga perbaikan atau penggantian prosesor hamper sama ganti motherboard baru.

Asal beli motherboardnya tidak di beli di service center laptop yang kamu punya. Harga motherboard di service center harganya bisa seperti beli laptop baru, katanya sih begitu.

Selain penggunaan yang disesuaikan dengan kebutuhan, jangan lupa untuk merawatnya. Perawatan untuk keyboard di bersihkan pakai kuas atau vacuum. Perawatan lcd laptop dengan di lap dengan tisu basah supaya kotoran debu yang menempel bisa hitang dan tampilan gambar jadi lebih jernih.

Bagaimana jika laptop kita mati, apa yang harus dilakukan? Jika kita tidak tahu masalah elektronik sebaiknya di bawa ke tukang service terdekat dan terpercaya.

Mari kita mengenal kerusakan laptop sebagai pengetahuan dasar tentang jenis kerusakan laptop.

Laptop terdiri dari komponen power suplay dan komponen digital. Komponen power suplay seperti IC charger, ic power, ic ram, ic prosesor adalah komponen yang memberikan sumber tegangan.

IC Charger Laptop

skema IC Charger laptop

Pada gambar ada keterangan Adaptor sebagai sumber daya listrik, Pack itu adalah baterai dan System laptop.

IC Charger adalah komponen IC yang merubah dan sebagai selector tegangan dari adaptor atau dari baterai menuju ke system. Pengisian baterai laptop juga melalui ic charger ini.

Fungsi IC Charger Laptop

  1. Sumber tegangan menuju ic power, jika ic charging rusak automatis laptop mati total.
  2. Untuk mengisi baterai laptop
  3. Mengatur penggunaan sumber tengangan dari baterai atau dari adaptor. Laptop bisa di hidupkan tanpa baterai, dan jika baterai ada isinya tanpa adaptor laptop bisa hidup.

Ciri-ciri kerusakan IC Charger

  1. Laptop mati total, jika arus listrik tidak bisa masuk ke sistem. Lampu indikator charging mati.
  2. Laptop bisa hidup jika di cas dan baterai harus terpasang.
  3. Laptop bisa hidup jika baterai dilepas (Kondisi baterai ada isinya).
  4. Tidak bisa mengisi baterai bagus. Ada keterangan Charging di indikator windows.
  5. Jika baterai ada daya listrik, di lepas adaptor mati. Ada juga baterai terbaca 100% isinya tapi tidak ada daya listrik jika di ukur dengan avo meter.

IC Power Laptop

skema IC Power laptop

Pada gambar VIN tegangan dari baterai atau adaptor, EN dan Entrip signal untuk mengaktifkan tegangan dari ic power.

IC power adalah komponen ic yang merubah tegangan 19 volt dari system menjadi tegangan lebih kecil untuk mengaktifkan ic ram, ic prosesor. Didalam ic power ada perintah digital juga sebelum menghasilkan tegangan 3 dan 5 volt.

Fungsi IC Power Laptop

  1. Mengubah tegangan dari 19 volt adaptor menjadi tegangan 3volt dan 5volt.
  2. Tegangan 3 volt untuk suplay komponen digital dan tegangan 5 volt untuk usb, hardisk.
  3. Tengangan yang di hasilkan ic power ini juga untuk mengaktifkan ic memory, ic prosesor.
  4. Jadi jika terjadi kerusakan ic power maka laptop pasti mati total.
  5. Menjadi sumber tegangan system kontrol laptop.
  6. Merupakan sumber tegangan untuk IC bios.
  7. Didalam ic power ini juga ada perintah digital, syarat tegangan 3 dan 5 volt itu aktif perlu syarat sinyal enable juga.

Ciri-ciri kerusakan IC Power

  1. Lampu indikator laptop tidak ada yang hidup.
  2. Tegangan di tombol swicth on / off tidak ada.
  3. Tegangan di sistem sudah ada 19 volt.
  4. Tegangan ke IC bios tidak ada.
  5. Tegangan ke IO kontrol tidak ada.

IC Memory Laptop

IC Memory adalah komponen ic yang merubah tegangan untuk ram dari sumber 5volt menjadi 1,5v DDR3 PC3, 1,35v DDR PC3L.

Jika IC memory rusak maka laptop jika bisa nyala on tapi tidak akan tampil gambar. Kerena tidak ada suplai daya listrik menuju ram atau memory laptop.

IC Processor Laptop

IC Prosesor adalah komponen ic yang merubah tegangan menjadi 1,05 atau 0,9volt untuk sebagai suplay daya ke prosesor.

Jika terjadi kerusakan di ic prosesor maka laptop tidak akan tampil gambar, karena prosesornya tidak beroperasi.

Komponen Digital Laptop

IO Control

skema IC Power laptop

Komponen digital yang memberikan sinyal ke ram, prosesor dan chipset untuk menjalankan operasi system. Sumber tegangan power on/off berasal dari komponen ini.

Setelah ic sumber tegangan seperti ic power, ic prosesor, ic ram sudah siap atau tidak ada masalah dengan menekan tombol on, maka laptop bisa hidup.

IO ini memberikan sinyal ke prosesor dan ke chipset, dan io ini juga menerima sinyal dari prosesor dan chipset. Perintahnya saling timbal balik dan setelah perintah bagus semua maka akan reset dan laptop baru hidup normal

Chipset Intel dan AMD

Chipset Intel masih terpisah dengan prosesor

Chipset ini ada di laptop dengan prosesor Pentium dari awal laptop di buat sampai prosesor generasi ke-3.

Sedangkan untuk laptop prosesor intel generasi 4 chip intel telah bergabung jadi satu dengan prosesor.

Chipset intel sudah digabung dengan prosesor intel broadwell

Begitu juga dengan laptop prosesor amd, chipnya sekarang sudah jadi satu dengan prosesor. Chipset intel dulunya sebagai output untuk tampilan gambar selain dari vga. Jika ada 2 vga maka satu dari chipset intel dan satunya dari ati redeon atau nvidia. Jadi jika laptop tidak tampil gambar sumber kerusakan bisa juga dari chipset intel dan chipset vga

Processor Intel dan AMD

Prosesor dalam system kerja laptop untuk mengolah perintah dari IO, sehingga proses tersebut bisa menjalankan program yang terdapat pada bios. Dan akhirnya laptop bisa hidup masuk ke menu bios.

Perlu diperhatikan bahwa :

  1. Prosesor intel generasi 4 dan seterusnya sudah tidak lagi menggunakan soket prosesor.
  2. Jadi prosesor intel maupun amd sudah terpasang langsung di motherboard laptop.
  3. Tidak bisa lagi upgrade prosesor dengan mudah. Perlu teknisi yang sudah ahli untuk melepas dan memasang prosesor ONBOARD.
  4. Biaya untuk penggatian prosesor yang rusak butuh biaya mahal.
  5. Banyak kasus laptop mati atau tidak tampil gambar karena rusak prosesor.

Penyebab Laptop Mati Total

Dari keterangan diatas bisa disimpulkan jika mati total tanpa ada lampu indikator yang menyala maka penyebab utama bisa dari Ic charging atau Ic power. Jika kedua sumber tegangan bagus maka bisa dari IO atau dari biosnya yang rusak, berikut contohnya.

Laptop Konslet

Posisi konslet ini bisa di tegangan 19 volt atau tegangan setelah ic power. Jika konslet di tegangan dari baterai atau adaptor maka lampu indicator laptop tdk ada yang menyala. Berbeda dengan konslet setelah ic power maka lampu indicator charging bisa nyala dan jika laptop di hidupkan Cuma kedip di lampu power.

Konslet ini juga bisa terjadi pada ic ram, yang mengakibatkan ram menjadi rusak. Untuk laptop dengan prosesor generasi 4 seperti acer z1402 ic ram konslet maka prosesornya juga ikut konslet

Kerusakan Chipset dan Processor

Laptop kamu bisa hidup dan sudah di coba ganti ram tidak mau tampil gambar, tersangka selanjutnya adalah chipset atau prosesor. Karena model prosesor generasi ke-4 keatas sudah onboard maka kasus kerusakan ini akan mengeluarkan biaya yang mahal.

Harga chip prosesor missal yang model Celeron saja bisa sampai Rp 400.000 kondisi belum di pasang. Kebanyakan teknisi memberikan harga untuk penggantian chipset prosesor bisa 2-3 x modal chipsetnya.

Chipset prosesor I3 kondisi baru harga lebih dari 1 juta, maka nanti harga biaya service paling tidak 2 x harga prosesor tersebut. Kenapa harga sampai mahal seperti itu? Karena kita beli chipset tidak ada garansi dari penjualm, jika gagal pasang maka kita menanggung kerugian yang cukup besar.

Sebagai kesimpulan jika sudah dipastikan rusak prosesornya, maka kita harus pertimbangkan antar di service ganti prosesor atau ganti motherboard baru. Harganya mungkin tidak jauh berbeda, yang menjadi masalah motherboard yang mau di beli ada stok atau belum.

Tempat service laptop dalam menentukan biaya kerusakan juga melihat kondisi laptopnya. Jika laptop yang harganya mahal pasti biaya service juga mahal. Jadi untuk kerusakan laptop mati total karena ic power atau ic charger harga bisa bermacam macam di setiap daerah. Untuk kisaran harga terendah Rp 300.000 dan harga tertinggi tergantung dari negosiasi sebelum pengerjaan service.

Misalnya di tanya kerusakan ic power atau ic charger kok harganya mahal, padahal modal IC tersebut mungkin harga di bawah seratus ribu rupiah. Kembali lagi ke pasal 1 lagi bahwa service laptop itu yang mahal jasa menganalisa kerusakan dan cara eksekusi sehingga laptop bisa hidup kembali.

Perlu diketahui bahwa service laptop adalah menjual jasa
bukan menjual komponen atau sparepart laptop.

Referensi: https://mainboardlaptopmurah.com/ic-power-charger/

Share:

[OpenWrt] Konfigurasi Asterisk

 
    Asterisk adalah software IP PBX gratis (open source) untuk sistem komunikasi telepon melalui internet VoIP (Voice Over Internet Protocol). Asterisk memungkinkan komunikasi antar pengguna telepon regular dengan telepon berbasis SIP. Tentu saja bisa diaplikasikan pada telepon seluler yang mendukung SIP seperti yang saya praktekkan pada Video di bawah.

    Pada project kali ini saya menginstall Asterisk pada Router 3G TP-Link Mr3220 yang telah terinstall Openwrt dan sudah exroot. Peralatan yg saya gunakan: Router 3G TP-Link Mr3220 HP/Tab Android HP Nokia Asha 311 (non android tapi support SIP) Windows XP yg terinstall X-Lite Router harus terhubung ke internet karena beberapa pkg pendukung (dependency) akan terinstall secara otomatis.

Melalui Putty :
opkg update
opkg install asterisk18

Setelah asterisk18 terinstall tanpa error, ganti /etc/asterisk/sip.conf menjadi:

[general]
srvlookup=no
bindport = 5060
bindaddr = 0.0.0.0
videosupport = yes
context = others

[111]
type=friend
context=my-phones
secret=111
host=dynamic

[222]
type=friend
context=my-phones
secret=222
host=dynamic

[333]
type=friend
context=my-phones
secret=333
host=dynamic

[444]
type=friend
context=my-phones
secret=444
host=dynamic
Keterangan :
Settingan di atas adalah untuk 4 nomor SIP; 111, 222, 333, dan 444. [111] adalah nomor telepon atau account name yg akan dimasukkan pada saat register di Handphone atau X-Lite maupun SIP client lainnya sedangkan pada isi pada "secret" adalah password. Dua item di atas bisa dirubah sesuai keinginan anda namun harus disesuaikan dengan settingan extensions.conf. Ganti /etc/asterisk/extensions.conf menjadi:

[others]
[my-phones]
exten => 111, 1, Dial(SIP/111)
exten => 222, 1, Dial(SIP/222)
exten => 333, 1, Dial(SIP/333)
exten => 444, 1, Dial(SIP/444)

Setelah semua konfigurasi diatas tersimpan, start dan enable Asterisk.

/etc/init.d/asterisk18 enable
/etc/init.d/asterisk18 start

Pada langkah ini, Asterisk sudah bisa ditest. Untuk Windows bisa menggunakan X-Lite. Untuk Android saya menggunakan Zoiper dan CSipSimple. Banyak aplikasi SIP client lainnya untuk android. Cari - cari aja di Play Store. Nokia Asha 311 tidak perlu software tambahan karena HP tsb sudah mendukung SIP. Tinggal masuk ke menu setting -> connectivity -> Internet Telephone -> bla bla bla. Untuk HP Nokia Asha 311 saya akan bahas di lain waktu. Tergantung request ... sepertinya ini HP yg gak laku di pasaran :)

Catatan : Jika Video Call tidak muncul gambar, masukkan beberapa perintah berikut. Edit file /etc/asterisk/sip.conf dan tambahkan :

allow=h263p
allow=h264
allow=vp8
videosupport=yes

Jika belum berhasil buat calling atau tersambung tapi tidak keluar suara, Coba setting port RTP Edit : rtp.conf Masukan :

[general]
rtpstart=10000
rtpend=20000

Masuk ke server setting firewall : 

iptables -A INPUT -p udp -m udp --dport 5060 -j ACCEPT iptables -A INPUT -p udp -m udp --dport 10000:20000 -j ACCEPT iptables -A INPUT -p udp -m udp --dport 2727 -j ACCEPT


Selesai !!!

Selamat menikmati Telepon Dan Video Call Gratis!!!
Share:

[OpenWrt] Install Mysql

lanjut di edisi TA ane wahaha
kali ini mau coba install mysql di openwrt. Step by Step sebenarnya udah ada di wiki. Ini cuma kopas dan hanya pelengkap blog :p
opkg update
opkg install libpthread libncurses libreadline mysql-server

sed -i 's,^datadir.*,datadir = /srv/mysql,g' /etc/my.cnf
sed -i 's,^tmpdir.*,tmpdir = /tmp,g' /etc/my.cnf
mkdir -p /srv/mysql
mysql_install_db --force
/etc/init.d/mysqld start
/etc/init.d/mysqld enable
mysqladmin -u root password 'new-password'
untuk menjalankan mysql dengan php
opkg update
opkg install php5-mod-mysql
ed -i 's,;extension=mysql.so,extension=mysql.so,g' /etc/php.ini

*note
ketika mencoba untuk melakukan koneksi antara php dan mysql, muncul error
Can’t connect to local MySQL server through socket ‘/tmp’ (146)
solusinya cuma ganti nama host dari locahost ke 127.0.0.1
Share:

[OpenWrt] Set Zona Waktu WITA

Terkadang php error karena masalah sepele yaitu salah zona waktu. Agar php tetap terbaca, gunakan perintah berikut :

opkg update
opkg install zoneinfo-core
opkg install zoneinfo-asia

uci set system.@system[0].zonename='Asia/Makassar'
uci set system.@system[0].timezone='CIT-8'
uci commit system

nano /etc/php.ini
date.timezone = "Asia/Makassar"
root@OpenWrt:~# /etc/init.d/uhttpd  restart
Share:

[OpenWrt] Konfigurasi Autorun index.php

Lighttpd adalah web server salah satu komponen utama yang sdh terdapat di fimware openwrt, berfungsi sebagai penggerak "LUCI" , yaitu web interface dari OpenWrt. Tetapi, uhttpd tidak hanya berguna bagi Luci sja, web interface lain juga bisa menggunakan uhttpd, diantaranya aria2, transmissions web, easyhotspot, dll. Berikut salah 1 contoh konfigurasi easyhotspot menggunkan lighttpd

File konfigurasi terdapat di /etc/config/uhttpd , edit menggunkan winscp supaya lebih mudah
---------
# Server configuration
config uhttpd main
    list listen_http    0.0.0.0:80
    option home        /www
    option cgi_prefix     /cgi-bin

config uhttpd secondary
    list listen_http    0.0.0.0:81
    option home        /www
    option cgi_prefix     /cgi-bin
    option index_page index.php

    # HTTPS listen addresses, multiple allowed
    list listen_https    0.0.0.0:443
#    list listen_https    [::]:443

    # Reject requests from RFC1918 IP addresses
    # directed to the servers public IP(s).
    # This is a DNS rebinding countermeasure.
    option rfc1918_filter 1

    # Certificate and private key for HTTPS.
    # If no listen_https addresses are given,
    # the key options are ignored.
    option cert        /etc/uhttpd.crt
    option key        /etc/uhttpd.key

    # CGI url prefix, will be searched in docroot.
    # Default is /cgi-bin
    option cgi_prefix    /cgi-bin

    # List of extension->interpreter mappings.
    # Files with an associated interpreter can
    # be called outside of the CGI prefix and do
    # not need to be executable.
    list interpreter    ".php=/usr/bin/php-cgi"
    list interpreter    ".cgi=/usr/bin/perl"

    # Lua url prefix and handler script.
    # Lua support is disabled if no prefix given.
#    option lua_prefix    /luci
#    option lua_handler    /usr/lib/lua/luci/sgi/uhttpd.lua

    # CGI/Lua timeout, if the called script does not
    # write data within the given amount of seconds,
    # the server will terminate the request with
    # 504 Gateway Timeout response.
    option script_timeout    60

    # Network timeout, if the current connection is
    # blocked for the specified amount of seconds,
    # the server will terminate the associated
    # request process.
    option network_timeout    30

    # TCP Keep-Alive, send periodic keep-alive probes
    # over established connections to detect dead peers.
    # The value is given in seconds to specify the
    # interval between subsequent probes.
    # Setting this to 0 will disable TCP keep-alive.
    option tcp_keepalive    1

    # Basic auth realm, defaults to local hostname
#    option realm    OpenWrt

    # Configuration file in busybox httpd format
#    option config    /etc/httpd.conf


# Certificate defaults for px5g key generator
config cert px5g

    # Validity time
    option days        730

    # RSA key size
    option bits        1024

    # Location
    option country        DE
    option state        Berlin
    option location        Berlin

    # Common name
    option commonname    OpenWrt

 ======================================================================= 
Jika index.php / port 81 belum terbuka untuk index.php, lakukan perintah berikut

/etc/init.d/uhttpd start
/etc/init.d/mysqld start
/etc/init.d/php5-fastcgi start
Share:

[PHP - CI] Menampilkan data MySQL dengan kunci dan Tanggal tertentu

Selamat berjumpa kembali di laman saya, kali saya akan share sedikit dari sekian banyak tips di Database MySql. Seperti kita ketahui bersama bahwa MySql adalah salah satu tools database terbesar yang digunakan di dunia ini. Selain terbesar memang juga dalam pengoperasian dan codingnya agak sedikit lebih mudah (hehehhee katenye). Selain hal tersebut karna penggunaan free atau bebas. Tanpa berpanjang lebar lagi mari kita mulai.

1. Query menampilkan data dengan key pencarian dengan format angka atau nilai tertentu

- Menampilkan nilai yang sama dengan nilai
SELECT * FROM nama_tabel WHERE nama_field='nilainya';
- Menampilkan nilai yang lebih kecil dari nilai
SELECT * FROM nama_tabel WHERE nama_field < 'nilainya';
- Menampilkan nilai yang lebih besar dari nilai
SELECT * FROM nama_tabel WHERE nama_field > 'nilainya';
- Menampilkan nilai hanya yang tidak sama dengan nilai
SELECT * FROM nama_tabel WHERE nama_field != 'nilainya';

2. Query menampilkan data dengan key pencarian karakter atau string

- Menampilkan hanya yang hampir sama atau mirip dengan string
SELECT * FROM nama_tabel WHERE nama_field LIKE  'stringya';
- Menampilkan hanya yang mengandung string pencarian
SELECT * FROM nama_tabel WHERE nama_field LIKE  '%stringya%';
- Menampilkan yang tidak ada kata kunci
SELECT * FROM nama_tabel WHERE nama_field NOT LIKE  '%stringya%';

3. Query menampilkan data dengan kata kunci pencarian tanggal (date)

- Menampilkan sesuaikan dengan tanggal kunci
SELECT * FROM nama_tabel WHERE field_tgl = '2014-10-10';
- Menampilkan hanya yang kurang dari tanggal kunci
SELECT * FROM nama_tabel WHERE field_tgl < '2014-10-10';
- Menampilkan tanggal yang lebih dari tanggal kunci
SELECT * FROM nama_tabel WHERE field_tgl > '2014-10-10';
- Menampilkan tanggal yang lebih atau sama dengan tanggal yang jadi kunci
SELECT * FROM nama_tabel WHERE field_tgl >= '2014-10-10';
- Menampilkan tanggal diantara tanggal yang jadi kunci
SELECT * FROM nama_tabel WHERE field_tgl BETWEEN '2014-01-01' AND '2014-04-01';
- Menampilkan tanggal dengan pencarian bulan saja
SELECT * FROM nama_tabel WHERE (MONTH(field_tgl)='1');
- Menampilkan tanggal dengan pencarian tahun saja
SELECT * FROM nama_tabel WHERE (YEAR(field_tgl)='2014');
- dan jika digabungkan menampilkan tanggal dengan pencarian bulan dan tahun
SELECT * FROM nama_tabel WHERE ((MONTH(field_tgl)='1') AND (YEAR(field_tgl)='2014'));

Demikian penjelasan tentang pencarian key dan tanggal, masih banyak query tentang pencarian ini, mungkin akan saya posting di lain kesempatan. Tetap ikuti artikel-artikel tentang mysql di laman saya. Semoga bermanfaat.
Salam :D

Share:

[OpenWRT] SFTP Server

SFTP server

Some clients, e.g. GNOME Files or Cyberduck on the Mac, cannot connect to the SCP server provided by OpenWrt's standard ssh server, dropbear, unless an additional binary is installed in /usr/libexec/sftp-server - this can be done with:
# Enable sftp, work around https://trac.cyberduck.io/ticket/4161
 
 opkg update 
 opkg install openssh-sftp-server
 
Now you can use sftp clients such as GNOME Files or Cyberduck to connect to the OpenWrt system. Note that no additional startup scripts are required since all of that is handled by dropbear which is most likely already present on your system.

Announce on the network

If you would like to announce the service on the network using Bonjour/Zeroconf so that Cyberduck finds it, you you can install the announce package, starting from Chaos Calmer:
opkg install announce 
 /etc/init.d/announce enable
 /etc/init.d/announce start
announce will notice that openssh-sftp-server is present and will announce the sftp service on the network.
Share:

[OpenWRT] Web Server

===== Instalasi PHP5 =====

root@WebServer: opkg update
root@WebServer: opkg install php5
root@WebServer: opkg install php-cgi

===== Konfigurasi uHTTPD =====

-- uncomment pada >> list interpreter        “.php=/usr/bin/php-cgi”

root@WebServer: /etc/config# nano uhttpd
———-potong
#List of extension->interpreter mappings.
#Files with an associated interpreter can
#be called outside of the CGI prefix and do
#not need to be executable.
list interpreter        “.php=/usr/bin/php-cgi”
#       list interpreter        “.cgi=/usr/bin/perl”
———–potong

-- save dan restart uhttpd

root@g-wrt:/etc/init.d# ./uhttpd stop
root@g-wrt:/etc/init.d# ./uhttpd start

===== Test PHP5 ===== 

buat file (misalnya) tes-php.php
isinya:
<?php
phpinfo();
?>

save dan simpan di /www
Buka browser, http://ipaddress-router/tes-php.php

===== Enable MySQL Pada PHP5 =====  

Install php-mod-mysql
opkg update
opkg install php-mod-mysql
Edit file /etc/php.ini pada bagian:
edit/tambahkan “short_open_tag = On” (tanpa tanda petik)
dan uncomment “extension=mysql.so” (tanpa tanda petik) pada bagian ; Dynamic Extensions
————potong
; Language Options
engine = On
;short_open_tag = Off
short_open_tag = On
precision    =  12
y2k_compliance = On
————–potong
;extension=json.so
;extension=ldap.so
;extension=mbstring.so
;extension=mcrypt.so
extension=mysql.so
————–potong
===== PHP Script to Test MySQL ===== 

<?php

$host = "localhost"; 
$user = "user12"; 
$pass = "34klq*"; 

$r = mysql_connect($host, $user, $pass);

if (!$r) {
    echo "Could not connect to server\n";
    trigger_error(mysql_error(), E_USER_ERROR);
} else {
    echo "Connection established\n"; 
}

echo mysql_get_server_info() . "\n"; 

mysql_close();

?>
Share:

[OpenWRT] Mysql Server

===== Install dan Konfigurasi =====

opkg update
opkg install mysql-server

sed -i 's,^datadir.*,datadir = "/srv/mysql",g' /etc/my.cnf
sed -i 's,^tmpdir.*,tmpdir = "/tmp",g' /etc/my.cnf

mkdir -p /srv/mysql
mysql_install_db --force
/etc/init.d/mysqld start
/etc/init.d/mysqld enable
mysqladmin -u root password 'password'

===== Test mysql-server =====

root@Arduino:~# mysql -uroot -p
Enter password:
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
+--------------------+
3 rows in set (0.00 sec)
mysql> exit
bye


===== Flush Prifileges =====

root@WebServer:~# ps|grep mysqld
13635  root  25848 S  /usr/bin/mysqld
13659  root   1492 S  grep mysqld

root@WebServer:~# kill 13635 (PID Number of mysql)
root@WebServer:~# /etc/init.d/mysqld start

lanjut di edisi TA ane wahaha
kali ini mau coba install mysql di openwrt. Step by Step sebenarnya udah ada di wiki. Ini cuma kopas dan hanya pelengkap blog :p
opkg update
opkg install libpthread libncurses libreadline mysql-server

sed -i 's,^datadir.*,datadir = /srv/mysql,g' /etc/my.cnf
sed -i 's,^tmpdir.*,tmpdir = /tmp,g' /etc/my.cnf
mkdir -p /srv/mysql
mysql_install_db --force
/etc/init.d/mysqld start
/etc/init.d/mysqld enable
mysqladmin -u root password 'new-password'
untuk menjalankan mysql dengan php
opkg update
opkg install php5-mod-mysql
ed -i 's,;extension=mysql.so,extension=mysql.so,g' /etc/php.ini

*note
ketika mencoba untuk melakukan koneksi antara php dan mysql, muncul error
Can’t connect to local MySQL server through socket ‘/tmp’ (146)
solusinya cuma ganti nama host dari locahost ke 127.0.0.1


================ TAMBAHAN ===============

OpenWrt Mysql-Server Install

opkg update
opkg install mysql-server
/usr/bin/mysqld –skip-grant-tables&
mysql -uroot
SET PASSWORD FOR root@’localhost’ = PASSWORD(‘password’);
UPDATE mysql.user SET Password=PASSWORD(‘newpwd’) WHERE User=’root’;
FLUSH PRIVILEGES;
exit
ps |grep mysqld
kill PIDNUMBEROFMYSQL
/etc/init.d/mysqld start
Share:

[OpenWRT] Print Server

Sepanjang liburan kemarin punya rencana ingin mencoba menggunakan router yang sudah saya flash dengan OpenWRT yang saya beri nama WhiteBox untuk membuat sebuah printer server, dimana dapat memudahkan saya untuk melakukan printing dari jarak jauh tanpa saya harus bawa - bawa laptop atau harus disalin ke removable media terlebih dahulu.

Sore hari tadi baru ada waktu untuk mencoba hal tersebut, walaupun sedikit malas namun karena "selo" tetep saya coba saja, entah apa hasilnya. Langkah umumnya dapat anda lihat disini p910nd Printer. Karena saya memang lagi malas, saya hanya melakukan langkah - langkah garis besarnya saja.

Install USB driver


opkg update
opkg install kmod-usb-printer
Lakukan pengecekan dengan mengetikan "dmesg" atau "logread" cek apakah usb sudah terdeteksi. "lsusb -v" untuk lebih lengkapnya.
Lakukan pemasangan p910nd
opkg update
opkg install luci-app-p910nd (file p910nd sudah include didalamnya)
 (* Kalau terlanjur install p910nd sebelum luci-app-p910nd, silahkan hapus dulu p910nd serta  luci-app-p910nd. lalu hapus folder p910nd-opkg dengan perintah rm -f /etc/config/p910nd-opkg).

Saya lebih suka konfigurasi lewat LuCI sih, lebih mudah saja konfigurasi lewat GUI. Jika anda menginginkanya juga, silahkan pasang "luci-app-p910nd" pada LuCI anda. Setelah terpasang, menu printer akan muncul pada tab Services. Jika belum keluar silahkan restart router.

Coba anda cek pada folder /dev apakah ada port lp0 terbuka? Jika tidak, cek apakah ada folder usb dan didalamnya terdapat lp0? Jika ya, maka pada menu LuCI silahkan targetkan interface ke /dev/usb/lp0. Bidirectional Mode pada Printer Canon iP2770 akan membuat printer macet, silahkan hilangkan centangnya.

Konfigurasi pada Server sudah selesai. Sekarang waktunya konfigurasi pada Client.

Perhatikan langkah berikut yang saya ambil dari situs resmi OpenWRT :


Windows 7
  1. Click on the Start button and select Devices and Printers.
  2. Click on "Add a printer."
  3. In the Add Printer dialog select "Add a local printer."
  4. Select "Create a new port:" and set the type of port to "Standard TCP/IP Port". Then click Next.
  5. In the "Hostname or IP address:" field enter the IP address of your router.
  6. The "Port name:" field may be set to something you like.
  7. De-select "Query the printer and automatically select the driver to use," then click next.
  8. The computer will then attempt to detect the TCP/IP port. This will take some time and will most likely fail. Failing this step is not a problem.
  9. On the "Additional port information required" page set the device type to Custom and click "Settings…"
  10. Verify the Printer Name or IP Address. The Protocol should be set to "Raw" and the Raw Settings Port Number should be 9100. Leave LPR Settings and SNMP Status Enabled empty or de-selected. Then click OK.
  11. Select the correct printer driver and click next. You may need to install drivers if they are not already available.
  12. Finish the remaining printer installation wizard steps as needed. The printer should now be installed and working!

Silahkan dicek dengan mencoba print halaman test page default printer. Kemudian ketik "logread" pada routernya untuk melihat responya. Gambar dibawah ini adalah hasil yang saya dapat ketika berhasil melakukan print. 


Jika anda sudah berhasil ngeprint, silahkan coba beberapa kali print terlebih dahulu untuk mengetahui apakah masih ada error atau bug - bug yang muncul. Finally, inilah curhatan dan hasil karya tadi sore :)
Share:

[Ubuntu] Cara install dan Konfigurasi Xampp di Ubuntu

Disini saya menggunakan Ubuntu 10.04... langkah pertama,upayakan komputer sobat terkoneksi dengan internet.. namun apalabila tidak terkoneksi lewati langkah pertama ... 1.ketik perintah berikut di terminal untuk update service ubuntu terbaru.... #sudo dpkg --configure -a #sudo apt-get install -f #sudo apt-get update && sudo apt-get upgrade dengan melakukan update maka, Ubuntu kita telah terupdate dan terbaharui program yang crash termasuk permasalahan dependensi 2. Menginstal LAMPP pada Linux dan Mempersiapkan Konfigurasi Ubuntu Sebagai Local Server Download XAMPP for Linux disini : http://www.apachefriends.org/en/xampp-linux.html kemudian, Ekstrak filenya lampp hasil downloads dan letakkan file hasil extrak pada direktori /opt contoh : File xampp-linux-1.8.1.tar.gz hasil download terletak pada direktori /home cara ektrak file tersebut ke dalam folder /opt adalah sebagai berikut, ketik : #sudo tar xvfz xampp-linux-1.8.1.tar.gz -C /opt setelah selesai... langkah selanjutnya adalah melakukan configuasi agar lampp dapat digunakan dengan mudah... caranya sikuti lanagkah 3 di bawah.. 3. Set permission file dan folder xampp/lampp, sbb : ketik perintah berikut di terminal : #sudo chmod -R 777 /opt/lampp ketrangan : mengatur chmod 777 pada lampp ini tidak disarankan, karena akan memberikan kebebasan penuh user group dan siapa pun untuk mengakses dan melakukan perubahan terhadap web yang kita buat termasuk mengkopi, dan men-delete. Karena pertimbangan kamputer kerja pribadi yang saya gunakan tidak ada orang lain yang memakai, serta kemudahan dan kepraktisan saja agar saya tidak harus mengeset permission lagi setiap melakukan perubahan pada file maka saya memutuskan untuk mengaturnya dengan chmod 777. 4. Set permission config phpmyadmin : ketik : #sudo chmod 644 /opt/lampp/phpmyadmin/config.inc.php 5.Ketik perintah dibawah untuk menjalankan lampp secara langsung dari root (sudo). buat Symbolic links, sbb : #sudo ln -s /opt/lampp/lampp /usr/sbin 5.Ketik perintah dibawah Agar MySQL dapat diakses langsung dari konsol buat Symbolic links untuk MySQL caranya ketik : #sudo ln -s /opt/lampp/bin/mysql Setelah Selesai,,Lakukan Pengujian dengan cara sbb: #sudo lampp start tunggu sampai muncul seperti berikut : Starting XAMPP 1.8.1... LAMPP: Starting Apache... LAMPP: Starting MySQL... LAMPP started. Apabila saat kita menjalankan lampp start muncul proses seperti di atas, berarti server lampp, Apache, MySQL berjalan dengan baik dan siap digunakan. 6.Sekarang buka browser anda dan jalankan lokal server, dengan cara ketik : http://localhost/ Memanggil PHPMyadmin : http://localhost/phpmyadmin 7.perintah untuk stop lampp #sudo lampp stop 8.Jika MySQL tdk bisa berjalan seperti ini : Starting XAMPP for Linux 1.8.1... XAMPP: Starting Apache with SSL (and PHP5)... XAMPP: Starting MySQL... Warning: World-writable config file '/opt/lampp/etc/my.cnf' is ignored XAMPP: Couldn't start MySQL! XAMPP: Starting ProFTPD... XAMPP for Linux started. Cara mengatasinya : Set permission pada /opt/lampp/etc/my.cnf dg 644, perintahnya : # sudo chmod 644 /opt/lampp/etc/my.cnf 9.Parameter lain Parameter lain yang dapat digunakan untuk mengoperasikan XAMPP selain start dan stop sebagai berikut : start : menjalankan XAMPP stop : menghentikan XAMPP restart : menghentikan dan jalankan kembali XAMPP startapache : start apache startssl : start ssl startmysql : start mysql startftp : start ftp stopapache : stop apache stopssl : stop ssl stopmysql : stop mysql stopftp : stop ftp security : cek program keamanan Lokasi file dan folder penting /opt/lampp/bin/ direktori perintah XAMPP /opt/lampp/htdocs/ direktori Apache DocumentRoot /opt/lampp/etc/httpd.conf file konfigurasi Apache /opt/lampp/etc/my.cnf file konfigurasi MySQL /opt/lampp/etc/php.ini file konfigurasi PHP /opt/lampp/etc/proftpd.conf file konfigurasi ProFTPD /opt/lampp/phpmyadmin/config.inc.php file konfigurasi PHPMyAdmin
Share:

[PHP - CI] Cara Install Plugin Codeigniter di Netbeans


Saya kembali lagi memposting tutorial komputer, kali ini dengan tema code igniter. Langsung ke topik utamanya, bagaimana Cara Install Plugin Codeigniter di Netbeans ?

X : Emang bisa ya coding web pake netbeans bukannya buat java ?
Y : Tentu saja bisa, netbeans bukan hanya IDE untuk Java
X : Terus kenapa menggunakan Netbeans?
Y : Waktu saya ada pelajaran framework Codeigniter, rasanya terlalu mainstream ngikut-ngikut temen. Ada yang menggunakan Codelobster, Sublime Text. Tapi saya ingin yang berbeda yaitu menggunakan netbeans dan kebetulan ada pluginnya untuk framework CI akan saya jelaskan langkah-langkah installasinya disini
X : Apa plugin netbeans itu bisa untuk semua versi CI ?
Y : Hanya bisa sampai versi 2.1.3, tapi bisa diakali untuk versi yang terakhir(2.1.4)
X : Dan, apa semua versi netbeans bisa diinstall plugin CI ?
Y : Tidak, hanya versi 7.2 sampai 7.3.1 untuk versi keatas dan kebawah dari itu tidak bisa. Untuk alasannya tanya saja ke pembuat pluginnya :p

1. Memasukkan Link Untuk Plugin CI
Setelah membuka Netbeans Masuk ke Tools -> Plugins lalu ke Tab Settings -> Add.
Name : nbphpci , sedangkan untuk url disesuaikan berdasarkan versi netbeans sobat. Karena saya menggunakan versi Netbeans 7.3.1 saya menggunakan sesuai versi 7.3.1 .

https://kenai.com/downloads/nbphpci/Latest_NetBeans72/updates.xml (untuk versi 7.2)
https://kenai.com/downloads/nbphpci/Latest_NetBeans721/updates.xml (untuk versi 7.2.1)
https://kenai.com/downloads/nbphpci/Latest_NetBeans73/updates.xml (untuk versi 7.3)
https://kenai.com/downloads/nbphpci/Latest_NetBeans731/updates.xml (untuk versi 7.3.1)




Klik OK


2. Melakukan Update
Setelah langkah pertama selesai selanjutnya yaitu melakukan update, tunggu hingga selesai

3. Install Plugin
Setelah itu menginstall plugin codeigniternya, masuk ke tab Available Plugins lakukan pencarian dengan keyword 'Codeigniter' lalu akan muncul 2 item. Checklist semuanya dan install hingga selesai.

CARA PENGGUNAAN .

Nanggung kalo cuma install pluginnya doang :p, saya juga akan tuliskan langkah-langkah penggunaannya .

1. New Project
Klik New Project (Yang Iconnya kotak emas dan ada tanda +) atau File -> New Project. Dan selanjutnya pilih PHP Application lalu Next >

2. Atur Nama dan Lokasi Project
Beri nama project web PHP nya dan ubah source folder ke tempat dimana sobat menyimpan website. Next>

3. Run Configuration
Selanjutnya atur konfigurasi url untuk menjalankan websitenya, biasanya disesuaikan dengan dimana sobat menyimpan projectnya,

4. Penggunaan Plugin Framework
Ini yang ditunggu-tunggu pasti :p , oke disini netbeans saya sudah sering digunakan plugin CI-nya. Jadi gak ada error pas langkah ini. Sobat yang baru pertama kali melakukan installasi pasti mengalami kendala. Akan saya tunjukan apa yang harus diubah, klik options !
ikuti seperti gambar-gambar diatas, dan klik OK lalu Finish . Lihat hasilnya :D
Share:

[Other] Cara Mengirim Pesan Melalui Command Prompt

Cara Mengirim Pesan Melalui LAN (Comand Prompt)

Mengirim pesan bisa dilakukan melelui banyak cara, bisa melalui applikasi messenger, email, sms, dll. Tetapi bagaimana jika anda ingin mengirim pesan kepada orang-orang di kantor yang sebagian pekerjanya adalah berada di depan komputer, apalagi jika orang tersebut memang sibuk dengan pekerjaannya di komputer sehingga pesan yang kita kirim tidak sempat dibaca, dan bagaimana jika kita mengirim pesan ke banyak orang yang berada di satu jaringan dengan waktu yang singkat


Jika menggunakan sms, pulsa akan habis terkuras. E-Mail, belum tentu pesan yang kita kirim di baca oleh penerima. YM, belum tentu orang tersebut sedang online. Lantas menggunakan apa? Gunakan saja Fitur Messenger dari Windows, tapi yang satu ini bukan Messenger seperti Live Messenger. Ini merupakan cara mengirim pesan ke komputer dengan tampilan Popup. Jadi pesan akan otomatis terpapar langsung di tengah layar monitor sang penerima seperti peringatan jika terjadi sesuatu di windows kita

Bagaimana caranya? Pertama kita harus mengaktifkan services dari messenger tersebut. Untuk pengaktifan services ini harus di lakukan antara komputer pengirim dan komputer penerima. Jika anda mengirim pesan tersebut ke komputer yang belum diaktifkan servicesnya maka pesan tersebut akan gagal dikirim. Satu hal lagi, tutorial ini hanya bisa digunakan pada sesama Windows XP

Cara mengaktifkannya sebagai berikut:
v     Buka menu run atau CTRL+R
v     ketikan services.msc lalu tekan enter
v     Setelah itu di bagian kanan cari service yang bernama Messenger.

v     Setelah ketemu, klik kanan dan klik Properties.
v     Pada Startup Type pilih Automatic.
v     Kemudian klik OK.
v     Klik kanan lagi services Messenger tersebut kemudian klik Start
v     Penyetingan telah selesai, sekarang anda buka notepad, copy-paste scrip di bawah

@echo off 
:A
Cls 
echo Kerim Pesan 
set /p n=IP Tujuan: 
set /p m=Pesan: 
net send %n% %m% 
Pause 
Goto A
v     Save notepad dengan format .bat, contoh: pesan.bat simpan dimana anda suka, bisa di desktop dll

Cara penggunaannya:
Pada IP tujuan ketikan IP komputer si penerima, contoh: 192.168.1.xxx (Jika ingin mengirimnya ke Workgroup anda, ketikan saja tanda kali (*) kemudian tekan enter. Setelah itu ketik pesan yang ingin anda kirim IP / Workgroup computer anda lalu tekan enter lagi untuk mengirimnya…


Mudah kan…!! Silahkan di coba…!!
Share:

[Ubuntu] Install MATLAB on Ubuntu Desktop 15.04

How to install MATLAB on Ubuntu 14.04

 Introduction


MATLAB® is a high-level language and interactive environment that enables you to perform computationally intensive tasks faster than with traditional programming languages such as C, C++, and Fortran.
You can use MATLAB in a wide range of applications, including signal and image processing, communications, control design, test and measurement, financial modeling and analysis, and computational biology. Add-on toolboxes (collections of special-purpose MATLAB functions, available separately) extend the MATLAB environment to solve particular classes of problems in these application areas.
MATLAB provides a number of features for documenting and sharing your work. You can integrate your MATLAB code with other languages and applications, and distribute your MATLAB algorithms and applications.

MATLAB R2014b on Ubuntu 14.04


From ISO


  • First, mount the .iso file of the image with right-click, Open with and select Disk image mounter (if required).
  • Open a terminal and change to the mounted image file. For example:
    • cd /media/username/MATHWORKS_R2014A

From Download


Install


  • Run the installer as a super user
    • sudo ./install
  • Follow the instructions of the installer and install in /usr/local/MATLAB/R2014a
  • To add an entry to the launcher and some other features, install the matlab-support package:
    • sudo apt-get install matlab-support
  • During the installation you have to confirm the installation path of matlab and could restrict the installation only to certain users (which I did not require). In addition you could rename the GCC libraries, but I had no problems so far so I didn't deactivate those.
  • After completion, you have to change the ownership of the .matlab folder in the home folder to your own user account if you do not want to run Matlab as a super user.
    • cd ~ sudo chown username -R ~/.matlab
Now Matlab should also be launchable through unity and should work as intended.

MATLAB R2012a


Important Note Regarding Ubuntu 12.04


MATLAB R2012a was released on March 1, 2012. Please note that this is prior to the release of Ubuntu 12.04. Consequently Ubuntu 12.04 is not a supported operating system for MATLAB R2012a as it can be seen in the MATLAB Roadmap.
MATLAB R2012a users are strongly encouraged to install R2012a on Ubuntu 10.04 LTS or Ubuntu 10.10 for best results. Help for the installation of MATLAB R2012a on Ubuntu 12.04 will however be given through this tutorial.

Important Note Regarding Student version (32-bit)


Unfortunately, 32-bit is the only version available to students.
If you have a 64-bit system, you will have some trouble but it is normally possible to go through each of them and the details are in the Troubleshooting section.
The following helps you be a length ahead of these problem. If you have a 64-bit system, you can still install 32-bit version of MATLAB. However, you will need to install the "ia32-libs" package before the installation. If you have Ubuntu 13.10 or later, check out this thread for more information.
Once it is installed, run the installer with the -glnx86 argument to force it to use 32-bit
sudo /media/MATHWORKS_R2012A/install -glnx86 -v

Though for R2012a it is not necessary anymore. If you don't run it with the -glnx86 argument, MATLAB will just say
Could not find JRE for glnxa64.  Trying glnx86.

at the start of the installation. And it will use 32-bit.
Then, just follow the instructions of the Installation Instructions section.
After the installation, you will need to run MATLAB with the -glnx86 argument to force it to use 32-bit
matlab -glnx86

See the Troubleshooting section for more details on this.

Installation Instructions


Basic


  • You will need superuser privileges. The assumption is that MATLAB install files are located at /media/MATHWORKS_R2012a in your filesystem.
See the Troubleshooting section if you get into trouble during the installation.
1. Run the MATLAB installer with the following Terminal command (The -v argument is for the install script to be verbose which means, it is more likely to warn you if something weird happens):
sudo /media/MATHWORKS_R2012A/install -v

If it complains about java, try installing install ''OpenJDK Java 6'' package because MATLAB is not compliant with Java 7.
2. When prompted to 'Choose installation type' you should select custom. This will allow you to create symbolic links to MATLAB in /usr/local/bin.

3. When prompted to 'Specify installation folder' it is recommended that you use the default folder /usr/local/MATLAB/R2012a (or the default /usr/local/MATLAB/R2012a_student if you have a student version).
If you have a student version, the default folder will be /usr/local/MATLAB/R2012a_Student.
4. When given the option to 'Create symbolick links to MATLAB scripts in:' it is recommended that you check the box and use the supplied path /usr/local/bin.

5. You can check that your installation work by executing the following command
matlab

See the Troubleshooting section if you get errors.

Create A MATLAB Launcher/shortcut


Automatic option: install package "matlab-support", sudo apt-get install matlab-support or via the Software Center on the dashboard.
Manual option as follows.
1. Get an icon:
sudo wget http://upload.wikimedia.org/wikipedia/commons/2/21/Matlab_Logo.png -O /usr/share/icons/matlab.png

2. Get the launcher file:
sudo wget 'https://help.ubuntu.com/community/MATLAB?action=AttachFile&do=get&target=matlab-r2012a.desktop' -O /usr/share/applications/matlab.desktop

If you have the student version of MATLAB (or simply the 32 bit version) on a 64 bit system, you will need to modify this file. Run
gksudo gedit /usr/share/applications/matlab.desktop

Then uncomment #Exec=matlab -arch=glnx86 -desktop and comment Exec=matlab -desktop (by adding or removing the # character).
If you get two MATLAB launcher icons in your Unity laucher, try uncommenting the following line in /usr/share/applications/matlab.desktop:
StartupWMClass=com-mathworks-util-PostVMInit

If your launcher does not work, see the Troubleshooting section.

MEX functions



Warning


The content of this section has been written for R2011a with Ubuntu 10.04 and 10.10. It may vary a lot if you are using the R2012a with Ubuntu 12.04.

If you try to compile MEX functions you may see a message like the following:
Warning: You are using gcc version "4.4.4-14ubuntu5)".  The version
         currently supported with MEX is "4.3.4".
         For a list of currently supported compilers see:
         http://www.mathworks.com/support/compilers/current_release/

Note this is a warning - the MEX function will still compile.
The following instructions will setup gcc 4.3 and make it the default compiler for MATLAB:
2. Make a MATLAB specific bin directory for gcc symlink.
mkdir ~/.matlab/bin

3. Symlink gcc to gcc-4.3 via user MATLAB specific bin directory.
ln -s /usr/bin/gcc-4.3 ~/.matlab/bin/gcc

4. Add MATLAB specific bin directory to the front of your system $PATH within your local startup.m file.
printf "setenv('PATH',sprintf('/home/%%s/.matlab/bin:%%s',getenv('USER'),getenv('PATH')));\n" >> ~/Documents/MATLAB/startup.m

Steps 3 and 4 above may not work for at least one instance of a user trying to compile using MEX in MATLAB R2011a running on Ubuntu 10.10. An alternative is to do the following:
  • 3a. At the MATLAB Command Window prompt, type:
mex -setup

and choose option 2 which says:
 2: /usr/local/MATLAB/R2011a/bin/mexopts.sh :
      Template Options file for building MEX-files via the system ANSI compiler

This will copy to your home directory a local copy of the file mexopts.sh.
  • 4a. Then edit this local file:
sudo gedit ~/.matlab/R2011a/mexopts.sh

and replace all instances of CC='gcc' to CC='gcc-4.3', CXX='g++' to CXX='g++-4.3', and FC='gfortran' to FC='gfortran-4.3'. Save and exit. The next time you run MEX in MATLAB to compile it will work properly.
For more ideas, try this thread or this one.

Troubleshooting


No MATLAB bin directory for glnxa64


If MATLAB tells you
    ---------------------------------------------------------------------------
    Warning: Cannot locate Java Runtime Environment (JRE) . . .

             1. Either a correct JRE was not available for redistribution when
                this release was shipped, in which case you should refer to the
                Release Notes for additional information about how to get it.

             2. Or you have tried to use the MATLAB_JAVA environment variable
                to specify an alternate JRE, but MATLAB cannot find it.  Please
                run 'matlab -n' to determine what value you are using for
                MATLAB_JAVA and fix accordingly.
    ---------------------------------------------------------------------------

    matlab: No MATLAB bin directory for this machine architecture.

           ARCH = glnxa64

when you launch it, you will need to force it to use glnx86.

Solution for the command line (CLI) launch


To do so, run
matlab -glnx86

If you like launching MATLAB from the command line, you will maybe find it inconvenient to write -glnx86 each time you need to launch it. You can then add it in your ~/.bashrc (at the end if you hesitate where to put it)
alias matlab='matlab -glnx86'


Solution for the graphical (GUI) launch


You will need to add the -glnx86 argument to matlab in the exec line of your file /usr/share/applications/matlab.desktop If you have followed the 'Create a MATLAB Launcher' section, you can just comment the line with the argument -glnx86 and uncomment the next line as explained in the file.

libc.so.6 not found


If you have Ubuntu 12.04 you like get the following error when running Matlab graphically:
/usr/local/bin/matlab: 1: /usr/local/MATLAB/R2012a/bin/util/oscheck.sh: /lib64/libc.so.6: not found

or
/usr/local/bin/matlab: 1: /usr/local/MATLAB/R2012a/bin/util/oscheck.sh: /lib/libc.so.6: not found

Matlab R2012a targeted Ubuntu 10.04 and so it's looking for libc.so.6 in a different location then where is found under Ubuntu 12.04 LTS. This can be fixed by making two small changes to matlab's oscheck.sh script.
sudo cp /usr/local/MATLAB/R2012a/bin/util/oscheck.sh{,.original}
sudo chmod 755 /usr/local/MATLAB/R2012a/bin/util/oscheck.sh
sudo nano /usr/local/MATLAB/R2012a/bin/util/oscheck.sh

Make these two edits:
Line #177
/lib/libc.so.6
becomes
/lib/i386-linux-gnu/libc.so.6

Line #184
/lib64/libc.so.6
becomes
/lib/x86_64-linux-gnu/libc.so.6

libXmu.so.6 not found


If you get
/usr/local/MATLAB/R2012a_Student/bin/glnx86/MATLAB: error while loading shared libraries: libXmu.so.6: cannot open shared object file: No such file or directory

Java problems


If you get
exec: 2433: /tmp/install.dir.880/Linux/resource/jre/bin/java: not found

or
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class java.awt.Component
        at java.lang.Class.forName0(Native Method)
        ...
Finished

during the installation or MATLAB fails at startup after the installation is complete, maybe you are trying to install a 32-bit version of MATLAB on a 64-bit system because you have the student version or for whatever reason (see Important Note Regarding Student version and How To Install 32-bit MATLAB on 64-bit system).
In order to do that, you need to install the "ia32-libs" package.

Source


Matlab executable not in path


If the matlab executable is not in your PATH, the matlab.desktop file needs to be edited. Replace
matlab -desktop

with the full executable path (default: /usr/local/MATLAB/R2012a/bin/matlab)
/usr/local/MATLAB/R2012a/bin/matlab -desktop

or you can add the Matlab bin folder in your path at login adding this line in your ~/.profile
PATH=$PATH:/usr/local/MATLAB/R2012a/bin

Failure loading desktop class


Fatal Error on startup: Internal Error: Failure occurs during desktop startup. Details: Failure loading desktop class.

That means Matlab has trooble loading the Java Virtual Machine. I solved it by asking him to use the jvm installed on Ubuntu and not the version shipped with MATLAB. So do
export MATLAB_JAVA=/usr/lib/jvm/java-7-openjdk-amd64/jre matlab

for 64 bit MATLAB (install install the "openjdk-7-jre" package first) and
export MATLAB_JAVA=/usr/lib/jvm/java-7-openjdk-i386/jre matlab -arch=glnx86

for the student version (install install the "openjdk-7-jre:i386" package first).
If it works, update the file /usr/share/applications/matlab.desktop accordingly, changing
Exec=matlab -arch=glnx86 -desktop

to
Exec=MATLAB_JAVA=/usr/lib/jvm/java-7-openjdk-i386/jre matlab -arch=glnx86 -desktop
for example (for the student version).


Share:

Visitor

Popular Posts

Labels

Recent Posts

sponsor

MitraTIK menangani perbaikan Komputer, Printer, Installasi Jaringan, Installasi CCTV dan Pembuatan Aplikasi Berbasis Web. Untuk jasa perbaikan dan installasi panggilan, kami melayani panggilan ke rumah, kantor, dan sekolah anda yang berada di area Banjarbaru, Martapura dan sekitarnya.

Popular Post