Tampilkan postingan dengan label Linux Operation. Tampilkan semua postingan
Tampilkan postingan dengan label Linux Operation. Tampilkan semua postingan

8
Setting PC Router pada Ubuntu

PC Router adalah memfungsikan sebuah PC agar dapat melakukan proses routing dari Local Area Network (LAN) ke Global Connection atau biasa juga disebut internet, dimana tentunya fungsi ini dapat memberikan sebuah gateway bagi kebutuhan Local Area Network (LAN).

Berikut adalah syarat untuk memfungsikan PC agar menjadi sebuah router gateway :
# PC Pentium IV + RAM 512
# LAN Card 2 buah
# Operating System Ubuntu Server
# Koneksi internet
# Ip Address, disini saya menggunakan ip address sebagai berikut :
# Ip Address dari
>> ISP (eth0) : 202.173.129.25/29 dengan DNS1 : 202.173.1.10 dan DNS2 : 202.173.1.20
# Ip Address untuk LAN (eth1) : 192.168.1.1/24

Langkah awal adalah setting ip address di ubuntu server, langkahnya sebagai berikut :
root@server:~# vim /etc/network/interfaces

# ISP Connection
auto eth0
iface eth0 inet static
address 202.173.129.26
netmask 255.255.255.248
network 202.173.129.24
broadcast 202.173.129.30
gateway 202.173.129.25


# LAN Connection
auto eth1
iface eth1 inet static
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255

Ssimpan dengan mengetikkan esc:wq dan enter

Selanjutnya harus diubah settingan dns, sebagai berikut :

root@server:~# vim /etc/resolv.conf

nameserver 202.173.1.10
nameserver 202.173.1.20

simpan dengan mengetikkan esc:wq dan enter

Jika ip address sudah kita setting pada interface eth0 dan eth1, selanjutnya kita coba test ping ke yahoo.com atau alamat lainnya :

root@server:~# ping yahoo.com


PING yahoo.com (209.131.36.159) 56(84) bytes of data.
64 bytes from b1.www.vip.sp1.yahoo.com (209.131.36.159): icmp_seq=1 ttl=47 time=228 ms
64 bytes from b1.www.vip.sp1.yahoo.com (209.131.36.159): icmp_seq=2 ttl=47 time=224 ms
64 bytes from b1.www.vip.sp1.yahoo.com (209.131.36.159): icmp_seq=3 ttl=47 time=225 ms
64 bytes from b1.www.vip.sp1.yahoo.com (209.131.36.159): icmp_seq=4 ttl=47 time=231 ms

Jika hasil ping sudah seperti di atas, maka koneksi internet untuk server sudah ok. Selanjutnya lakukan perintah update dan upgrade untuk ubuntu :

root@server:~# apt-get update && apt-get upgrade


Kemudian agar user LAN dapat berinternet, silahkan lakukan perintah sebagai berikut :

root@server:~# vim /etc/sysctl.conf


pada perintah ini silahkan cari tulisan #net.ipv4.conf.default.forwarding = 1 dan hilangkan tanda pagarnya sehingga menjadi net.ipv4.conf.default.forwarding = 1

simpan dengan mengetikkan esc:wq dan enter

Jangan lupa kita juga harus melakukan perintah sebagai berikut :

root@server:~# echo “1″ /proc/sys/net/ipv4/ip_forward


Dengan langkah diatas maka user LAN sudah dapat berkomunikasi antar user LAN, tetapi belum bisa melakukan komunikasi dengan global internet. Berikut adalah langkah yang harus dilakukan agar user LAN dapat berkomunikasi dengan global internet :

root@server:~# /sbin/iptables -t nat -A POSTROUTING -s 192.168.1.0/255.255.255.0 -d 0/0 -j MASQUERADE


Selanjutnya agar fungsi routing dapat otomatis berjalan saat kita restart pc server, maka kita harus save perintah routing tersebut di file /etc/rc.local, langkahnya sebagai berikut :

root@server:~# vim /etc/rc.local


echo “1″ /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -s 192.168.1.0/255.255.255.0 -d 0/0 -j MASQUERADE


OK selesai..., selamat mencoba dan semoga berhasil

5
Setting DNS di Ubuntu Linux

DNS atau Domain Name Server adalah penerjemah nama menjadi IP. www.rab.co.id adalah 203.130.231.120, itulah tugas DNS. Kita memerlukannya karena pada dasarnya data dikirim ke alamat IP, bukan nama domain. Saat Anda menggunakan layanan GPRS, program wvdial otomatis menentukan DNS sesuai arahan ISP, Internet Service Provider. Bila Anda punya warnet, Internet server dapat diset sebagai DNS. Ini memudahkan pengaturan DHCP server yang mengarahkan DNS bagi para pc client. Sehingga saat Anda beralih ke ISP lain, tidak perlu lagi mengubah setting DHCP.

Disini saya menggunakan Ubuntu 10.04 dan ini juga berlaku pada distro linux turunan Debian. Silakan ikuti cara berikut :

Buka Terminal Console, trus ketik:
$ sudo su
# apt-get install bind9


Lalu ubahlah /etc/bind/named.local.conf, hapus remark pada include-nya sehingga menjadi seperti ini:

// Consider adding the 1918 zones here, if they are not used in your
// organization
include "/etc/bind/zones.rfc1918";


Simpan, dan restart daemon-nya:

# /etc/init.d/bind9 restart


Untuk mencobanya ubahlah /etc/resolv.conf menjadi:

nameserver 127.0.0.1

Baris-baris nameserver lainnya di-remark saja. resolv.conf dikategorikan sebagai "client setting", mudah-mudahan Anda paham maksudnya. Kemudian ujilah dengan memanggil sebuah nama:

# telnet google.com 80


Trying 209.85.171.100...
Connected to google.com.
Escape character is '^]'.
^]

Log-nya bisa Anda lihat di /var/log/daemon.log. Sampai di sini DNS hanya dapat digunakan oleh server sendiri. Selanjutnya izinkan pc client menggunakannya dengan mengubah /etc/bind/named.conf.options. Tambahkanlah di atas options dengan:

acl semua {
0.0.0.0/0;
};


Lalu di-dalam options tambahkan:

allow-query { semua; };


Sehingga keseluruhan /etc/bind/named.conf.options menjadi seperti ini:

acl semua {
0.0.0.0/0;
};

options {
directory "/var/cache/bind";
auth-nxdomain no; # conform to RFC1035

allow-query { semua; };
}


Lanjutkan dengan restart daemon-nya:

# /etc/init.d/bind9
restart

Di PC client, ubahlah DNS ke 192.168.0.254 ( IP server ), lalu cobalah:

$ telnet google.com 80


Trying 209.85.171.100...
Connected to google.com.
Escape character is '^]'.
^]

IP Publik
Sekarang server ini memiliki IP publik, dimana ia dapat dihubungi dari luar (Internet). Cobalah pasang Apache:

# apt-get install apache2

Misalkan ISP memberikan IP publik 202.59.201.67 untuk server ini. Ujilah dari tempat lain, bukan dari server maupun dari LAN, misalnya menggunakan GPRS di laptop:

$ telnet 203.130.231.120 80

telnet 203.130.231.120 80
Trying 203.130.231.120...
Connected to 203.130.231.120.
Escape character is '^]'.

Baik, itu artinya IP publik sudah berfungsi dan Apache telah merespon dengan benar. Selanjutnya pesanlah sebuah domain ke register.net.id, katakanlah rab.co.id. Katakan pada mereka bahwa rab.co.id ada di 203.130.231.120 dengan hostname dns1.rab.co.id.

Setelah itu, lakukan setting di server. Buatlah /etc/bind/db.rab.co.id:

$TTL 1500
@ IN SOA dns1.rab.co.id. grananda.rab.co.id. (
2007062703 ;serial
28800 ;refresh
3600 ;retry
604800 ;expire
38400 ) ;minimum 25 minutes
@ IN NS dns1.rab.co.id.
@ IN A 202.59.201.67
dns1 IN A 202.59.201.67
www IN CNAME dns1


Tambahkan di /etc/bind/named.local.conf dengan ini:

zone "rab.co.id" {
type master;
file "/etc/bind/db.rab.co.id";
};


Kemudian restart daemon-nya:

# /etc/init.d/bind9 restart


Lalu cobalah dari server:

# telnet rab.co.id 80


Trying 203.130.231.120...
Connected to rab.co.id.
Escape character is '^]'.
^]

Coba juga dari ISP lain. Biasanya 3 hari setelah pendaftaran di register.net.id, domain Anda sudah dikenali oleh Internet.

Semoga Berhasil....

9
Install Ubuntu didalam Windows Melalui Wubi

Wubi adalah aplikasi didalam os ubuntu untuk menginstall Ubuntu didalam sistem operasi windows. Umumnya jika kita masukkan CD Installer Ubuntu kedalam Sistem operasi Windows yang aktif akan muncul secara otomatis/autorun.

Wubi juga mempermudah kita menginstal ke file di Windows tanpa melakukan booting untuk mempartisi linux. Pada saat instalasi ubuntu, Wubi dapat menggunakan file .iso dari Ubuntu Alternate CD, jadi tidak harus mengunduh dari internet. Jika Anda punya Alternate CD, Anda dapat mengubahnya menjadi file .iso, lalu menginstal ubuntu melalui Wubi dengan meletakkan file .iso itu di folder yang sama dengan file Wubi.exe. Jika tidak ada file .iso, maka Wubi akan mengunduh melalui internet.


Berikut langkah–langkah penginstallan Ubuntu menggunakan aplikasi Wubi langsung pada os windows:

Masukkan CD ubuntu Anda, secara otomatis akan diminta untuk memilih apakah anda ingin menginstall secara penuh atau menginstall di dalam Windows yang Anda gunakan saat ini pilih Option Install dalam Windows. Pilih "Install Inside Windows"


Kemudian Anda akan diminta untuk memilih partisi dimana anda akan menginstall Linux Ubuntu tersebut,memilih ukuran installasi, bahasa, nama pengguna dan password yang diinginkan. Setelah selesai mengisi klik pasang.


Installasi akan mengekstrak file dari CD ke folder partisi yang telah Anda pilih.Apabila installasi berjalan lancar Anda akan diminta untuk merestart komputer.Restart Komputer Anda dan pilih booting ke Ubuntu, setelah itu komputer akan melanjutkan installasinya seperti gambah di bawah ini.


Setelah Proses Instalasi diatas selesai, maka komputer akan diminta untuk restart kembali dan installasi ubuntu Anda telah selesai. Nah gampangkan..., tanpa susah payah anda sudah punya 2 os windows dan Ubuntu.

Semoga berhasil...!!!

1
Building a Linux home media center

Like a lot of people nowadays, I have a growing collection of digital media. My digital media is stored on a home Linux server. Most of the digital media players available today do not support protocols to connect to a Linux server, which make them unsuitable for my use. I realized the best way to connect my digital media library with my home theatre was to build my own Linux home media center (LHMC).



My LHMC would have to interface with my existing home configuration via a wireless network with WPA security enabled and output to my television's S-Video or composite inputs, and it would have to connect to my media server via NFS.

For my LHMC hardware I choose the MSI MEGA 180. One of its main attractions was that it is based on a Linux-supported Nvidia chipset and video card. The video card in this model has S-Video and composite outputs. The box has frontal USB and a built-in 6-in-1 media card reader. The MEGA 180 comes as a barebones product. I purchased one in an online auction with an AMD Athlon 2400+ processor, 60GB hard drive, and DVD player for about $350.

I choose to install Ubuntu Linux on the LHMC because, thanks to its Debian roots, Ubuntu is easy to update and manage, and has a wide range of software available. The low maintenance overhead it provides makes the LHMC behave as reliably as an embedded system. And the Ubuntu community offers many solutions and guides in its wiki and forums.

The Ubuntu installation detected all of the MEGA's hardware correctly. The only thing that was configured incorrectly after the installation was the default screen resolution. To configure the video, Ubuntu needed to be configured to get sources from the universe and multiverse repositories. This allowed for the installation of the binary Nvidia drivers. X.org needed to be set up to output through S-Video so it could display to my television. This process is well documented on Ubuntu's wiki. The Nvidia driver is also able to output in multiple HD standards.

Configuration of the wireless card was not as simple. The wireless card that comes with the MEGA 180 is an Ralink RT2460. Ralink makes some of the most open source-friendly wireless chipsets in existence, yet the rt2400 driver doesn't support WPA. I worked around this by using the ndiswrapper driver, which can support WPA though wpa_supplicant. I configured ndiswrapper with the Windows version of the Ralink drivers. To prevent the rt2400 driver from loading at startup and conflicting with the ndiswrapper kernel module, I created a file named wlan under /etc/modutils and entered the line alias rt2400 ndiswrapper.

The configuration of WPA is well laid out in an Ubuntu howto. Because I was using ndiswrapper, the interface name of the card was wlan0. wpa_supplicant must be configured to use the ndiswrapper driver, so the /etc/default/wpasupplicant file needed to have OPTIONS set like this:
OPTIONS="-i wlan0 -D ndiswrapper -c /etc/wpa_supplicant.conf"

With hardware setup nearly complete, one thing still bugged me. The MEGA's LED display shows the hardware clock's time, but Ubuntu defaults the hardware clock to UTC, so the MEGA's clock was always off by the difference between my local timezone and UTC. By grepping though the etc directory for the string "UTC," I discovered that the configuration option was in the file /etc/default/rcS. Changing the line UTC=yes to UTC=no resolved the issue.

All of my digital media is stored on an NFS share. To enable NFS mounting in Ubuntu, I installed the portmap package. I added the line mediaserver.example.com:/home/media /home/media noatime,rsize=32768,wsize=32768,bg 0 0 to /etc/fstab so that the media library would be mounted to /home/media at system startup.

Now that the LHMC had access to the media library, it was time to install the packages to enable playback of media: Rhythmbox for audio and Totem for video.

To configure Totem to play video, I installed the totem-xine package. The default backend, GStreamer, is automatically removed when you install the totem-xine package.

Audio playback was next. My Ogg music files played out of the box. The key to getting MP3 playback to work was installing libmad. I installed both libmad0 and gstreamer0.8-mad, and was able to play MP3 files. To fill any gaps that might come up, I also installed the gstreamer0.8-plugins-multiverse package, which includes all of the GStreamer plugins.

The LHMC has been rock solid since I set it up. It has handled all of the tasks that I planned to use it for and then some. The wow factor that I get when people visit is nice too.

Source: Linux.com

6
Install dan Gunakan Visio di Ubuntu

Pertama-tama pastikan paket Wine sudah terinstall.
$ sudo apt-get install wine cabextract

Install IE4Lnux, IE4Linux dibutuhkan oleh beberapa bagian instalasi Visio dan runtimenya.

$ wget ttp://www.tatanka.com.br/ies4linux/downloads/ies4linux-2.0.tar.gz -O – | tar xvzf -

setelah terdownload, jalankan :
$ cd ies4linux/
$ ./ies4linux

Ikuti instruksinya, program ini akan mendownload paket2 yang diperlukan dari microsoft.com dan kemudian akan terinstall IE di ubuntu anda.

Menjalankan wine di ubuntu 8.04 mungkin menghasilkan error sbg berikut:
preloader: Warning: failed to reserve range 00000000-60000000
err:dosmem:setup_dos_mem Cannot use first megabyte for DOS address space,
please report

trik berikut akan menghilangkan error tersebut, tetapi akan mengurangi sisi sekuriti
$sudo vim /etc/sysctl.conf
ubah baris berikut:
vm.mmap_min_addr = 65536

menjadi:
vm.mmap_min_addr = 0
Perubahan ini akan berpengaruh setelah dilakukan reboot

Selanjutnya adalah menginstall Visio.
dari direktori dimana ada source visio jalankan :
$ wine SETUP.EXE
ikuti wizardnya sebagaimana instalasi di windows

Nah Viso sudah terinstall
Jika ada error seperti “IOPL not enabled” jalankan winecfg
di Libraries tab, tambahkan library
gdiplus.dll (native)

Visio ini bisa mebuat file dan menyimpan file baru, tapi sayangnya crash beberapa detik setelah saya coba membuka file visio lama yang agak kompleks.

Source: Daliman Blogs

0
Install Windows di dalam Ubuntu

Ubuntu saat ini udah cukup ok untuk digunakan, tapi beberapa hal mungkin masih memerlukan windows. Untuk hal tersebut mungkin kita bisa menggunakan wine, selain wine maka ada 1 cara lagi yaitu dengan menginstall window didalam ubuntu. Jadi Windows tersebut akan running didalam Ubuntu. Cara menginstall yang aku dapat :

* Download paket virtual box dari virtualbox.org dan pilih paket yg sesuai dengan OS.
* Install paket installernya dan kita akan diminta password administrator.
* Lalu akan di download bberpa paket file tambahan dari internet, setelah muncul jendela konfigurasi klik Forward terus sampai Instalation Finished dan Restart komputer
* Virtual Box sudah siap dijalankan dan kini siap menginstal Windows XP didalam Ubuntu 8.10
* JalankanVirtual Box melalui Applications dan System Tools
* Pada pernyataan lisensi, baca sampai bawah hingga tommbol I Agree aktif
* Pada jendela registrasi pilih cancel, karena kalo diisi maka harus secara online. Bila tidak diisi, jendela ini akan selalu muncul setiap kita menjalankan VirtualBox
* Virtualbox sudah aktif, masukkan cd intaller XP dan klik new
* akan muncul sebuah wizard, beri nama virtual mesin sesuai keinginan. Di OS type pilih WindowsXP
* Lalu tentukan RAM yg akan dikonsumsi (384MB), lalu buat HD virtual yg akan dipakai oleh Windows n klik New
* HD virtual memiliki 2 opsi, dynamic n fixed pada dynamic kapasitas yang diberikan pada windows sedikit tapi berkembang sesuai dengan kebutuhan windows.
* Tentukan kapasaitas dasar besarnya kapasitas dynamic (3GB) klik Next lalu Finish
* Konfigurasa selesai dan siap digunakan.
* Kembali ke jendela utama VirtualBox lihat apakah CD/DVD sudah di-mount lalu klik Start
* Instalasi windows akan berjalan seperti umumnya.
* Saat akan menggunakan Windows yang ada di VirtualBox akan muncul peringatan, centang Do not Show this message again dan klik Capture.
* Pointer mouse akan aktif hanya di jendela VirtualBox, untuk kwmbali ke Ubuntu tekan Ctrl sebelah kanan.
* Windows di Ubuntu ready.

2
Install Chrome di Ubuntu

Install Chrome di Ubuntu

Simple aja, pertama add GPG keynya

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xfbef0d696de1c72ba5a835fe5a9bf3bb4e5e17b5

kemudaian sudo apt-get update

setelah update selesai install google chromenya

sudo apt-get install chromium-browser

untuk menjalankan aplikasnya

Applications --> Internet --> Chorium Web Browser

cara lain untuk install google chrome dengan mendownload file .deb

1. wget http://media.codeweavers.com/pub/crossover/chromium/cxchromium_0.9.0-1_i386.deb

2. sudo dpkg -i cxchromium_0.9.0-1_i386.deb

1
Choose 64bit or 32bit linux?

.
64bit or 32bit linux:

A common question that pops up from time to time is whether someone who has a 64-bit CPU (such as an AMD64 or an Intel EM64T) should download a 64-bit or 32-bit Linux distribution. Since these processors are capable of running either one at full native speeds, what are the advantages and disadvantages to both? Here I hope to address some common issues.

Speed – Without a scientific set of benchmarks this one is really hard to measure. Some people think one distribution “feels” faster than another while others disagree. Suffice to say that no one has yet to prove scientifically that the 64-bit versions of Linux available today are significantly faster in performance than their 32-bit counterparts. Most “64-bit” versions of software are actually just recompiled versions of the 32-bit code, with no optimization that would take advantage of the new features these chips offer and perhaps boost performance. If you’re looking to use 64-bit because you think it will be a major improvement in speed, I would reconsider.

Compatibility – Not all software runs on 64-bit Linux. Although there have been 64-bit native Linux distributions for several years (a year before Microsoft Windows XP64, but I digress), the software community has yet to fully embrace the technology. As of the time this post was written, there is no 64-bit version of the Macromedia Flash Plug-in for your web browser, for instance. WINE and the Java VM have been known to cause problems on some 64-bit installations as well. Not all hardware has 64-bit drivers yet. The two major display card manufacturers (ATI and Nvidia) do have X86_64 versions of their drivers, but they are sadly the exception rather than the norm.

RAM – If you plan on using a machine that has more than 4GB of RAM, you’ll need to use the 64-bit version of your distribution because 32-bit operating systems are only able to handle up to 4GB, maximum*. There’s just not enough memory addresses for more. This is usually not a problem for desktop users, but it might be a concern for servers or high-end workstations.

The “coolness” factor – As Apple Computer has proven in recent years, there’s an awful lot people will do just because something looks or feels “cool”. This is perhaps the one reason why some people choose to run 64-bit Linux: it’s a neat idea. To some people the idea of running a 64-bit native** operating system on their 64-bit CPU is just too cool to pass up. These people understand the drawbacks to running a bleeding-edge system and accept the extra work involved. If this describes you, more power to you.

So which should I choose? (29 July 2008) Over the last 2 years since I wrote this thread, a lot of progress has been made and I believe at this point that 64-bit Linux distributions are pretty much identical in performance and features as their 32-bit counterparts. I say “pretty much” because there’s still no native Flash player. There are ways around that. I’ve not had issues with Java in 64-bit in recent months, so progress was made there too.

That being said, the point I make in the beginning still stands: although 64-bit Linux distributions are now by and large on-par with their 32-bit brethren, they do not yet surpass them in performance. You’re not running at as much of a deficit with 64-bit two years later, but you still don’t quite have an advantage either. Now, I think, rather than strongly suggesting 32-bit I could say either will work, but neither has any significant advantage over the other. It’s more a matter of personal preference.

* NOTE: The 32-bit Linux kernel can be recompiled to handle up to 64GB of RAM if you’re particularly concerned about staying 32-bit.

** NOTE: Although 64-bit Linux distributions do include a natively-compiled Linux kernel and several natively-compiled key applications, not every package in a 64-bit Linux distribution is 64-bit. The 32-bit library files and many 32-bit applications still exist and are used on a regular basis, so the idea that a 64-bit distribution is “native” is really a misnomer.
Source: Go-Hacking


Bookmark and Share


 
Ujie Caprone | © 2011 Blogger Template by Ujiecaprone.com