Binary package hint: apt
While running 'apt-cdrom add' in my notebook its always fails saying:
E: Failed to mount the cdrom.
APT looks into /etc/fstab to get the default cdrom mount point. My fstab looks like:
/dev/cdrom /cdrom udf,iso9660 user,noauto 0 0
APT tries to mount '/cdrom/' instead of just '/cdrom' (withou slash). If I change fstab and remove the slash from the mount point everything works well.
Suggestion:
a) APT needs to use the hal mounting point instead the /etc/fstab, so it would works with no mention in fstab
b) The default fstab mounting point should be '/cdrom/' instead of just '/cdrom'
c) The default mounting point where apt looks into should be '/cdrom'
Kamis, 12 November 2009
Selasa, 10 November 2009
Cleaning Trash pada ubuntu
adakalanya saat kita ingin membersihkan trash dari file-file yang sudah dibuang agar menhemat resource hdd komputer kita, di windows hal ini sangatlah gampang tinggal klik tombol empty recycle bin tapi bagaiman dengan ubuntu?
kadang ada file yang tidak bisa maen buang gitu ja karena terkait dengan hak aksese kepemilikan file so filenya ga mau digubris saat mau dibuang, setelah saya konsultasi ketemen saya ternyata hal ini ga bisa dilakukan dengan command GUI hanya bisa via terminal
caranya seperti ini
sudo rm -fr /home/username/.local/share/Trash/
kadang ada file yang tidak bisa maen buang gitu ja karena terkait dengan hak aksese kepemilikan file so filenya ga mau digubris saat mau dibuang, setelah saya konsultasi ketemen saya ternyata hal ini ga bisa dilakukan dengan command GUI hanya bisa via terminal
caranya seperti ini
sudo rm -fr /home/username/.local/share/Trash/
Senin, 09 November 2009
General information: Repositories in Ubuntu
Introduction
There are often a few packages that you want to install that don't exist in the Ubuntu repositories. If they have any dependencies on other packages, trying to using dpkg can drop you into "dpkg hell", and having apt resolve those dependencies for you would really help.
There are full blown methods of creating your own local repository, such as Debarchiver or Dak. These are overkill, when all you want is a means of resolving dependencies of the handful of packages you've downloaded from the web (not for an entire repository that you want to use without Internet connection; for this use AptGet/Offline/Repository). A simple solution is to use dpkg-scanpackages, which will build a repository you can add to your sources.list.
Creating a Personal Repository
There are 4 steps to setting up a simple repository for yourself
1.
Install dpkg-dev
2. Put the packages in a directory
3.
Create a script that will scan the packages and create a file apt-get update can read
4. Add a line to your sources.list pointing at your repository
Install dpkg-dev
Type in a terminal
sudo apt-get install dpkg-dev
The Directory
Create a directory where you will keep your packages. For this example, we'll use /usr/local/mydebs.
sudo mkdir -p /usr/local/mydebs
Now move your packages into the directory you've just created.
Previously downloaded Packages are generally stored on your system in the /var/cache/apt/archives directory. If you have installed apt-cacher you will have additional packages stored in its /packages directory.
The Script update-mydebs
It's a simple three liner:
#! /bin/bash
cd /usr/local/mydebs
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
Cut and paste the above into gedit, and save it as update-mydebs in ~/bin. (the tilde '~' means your home directory. If ~/bin does not exist, create it: Ubuntu will put that directory in your PATH. It's a good place to put personal scripts). Next, make the script executable:
chmod u+x ~/bin/update-mydebs
How the script works:
dpkg-scanpackages looks at all the packages in mydebs, and the output is compressed and written to a file (Packages.gz) that apt-get update can read (see below for a reference that explains this in excruciating detail). /dev/null is an empty file; it is a substitute for an override file which holds some additional information about the packages, which in this case is not really needed. See deb-override(5) if you want to know about it.
Sources.list
add the line
deb file:/usr/local/mydebs ./
to your /etc/apt/sources.list, and you're done.
CD Option
You can burn the directory containing the debs to a CD and use that as a repository as well (good for sharing between computers). To use the CD as a repository, simply run
sudo apt-cdrom add
Using the Repository
Whenever you put a new deb in the mydebs directory, run
sudo update-mydebs
sudo apt-get update
Now your local packages can be manipulated with Synaptic, aptitude and the apt commands: apt-get, apt-cache, etc. When you attempt to apt-get install, any dependencies will be resolved for you, as long as they can be met.
Badly made packages will probably fail, but you won't have endured dpkg hell.
Introduction
There are often a few packages that you want to install that don't exist in the Ubuntu repositories. If they have any dependencies on other packages, trying to using dpkg can drop you into "dpkg hell", and having apt resolve those dependencies for you would really help.
There are full blown methods of creating your own local repository, such as Debarchiver or Dak. These are overkill, when all you want is a means of resolving dependencies of the handful of packages you've downloaded from the web (not for an entire repository that you want to use without Internet connection; for this use AptGet/Offline/Repository). A simple solution is to use dpkg-scanpackages, which will build a repository you can add to your sources.list.
Creating a Personal Repository
There are 4 steps to setting up a simple repository for yourself
1.
Install dpkg-dev
2. Put the packages in a directory
3.
Create a script that will scan the packages and create a file apt-get update can read
4. Add a line to your sources.list pointing at your repository
Install dpkg-dev
Type in a terminal
sudo apt-get install dpkg-dev
The Directory
Create a directory where you will keep your packages. For this example, we'll use /usr/local/mydebs.
sudo mkdir -p /usr/local/mydebs
Now move your packages into the directory you've just created.
Previously downloaded Packages are generally stored on your system in the /var/cache/apt/archives directory. If you have installed apt-cacher you will have additional packages stored in its /packages directory.
The Script update-mydebs
It's a simple three liner:
#! /bin/bash
cd /usr/local/mydebs
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
Cut and paste the above into gedit, and save it as update-mydebs in ~/bin. (the tilde '~' means your home directory. If ~/bin does not exist, create it: Ubuntu will put that directory in your PATH. It's a good place to put personal scripts). Next, make the script executable:
chmod u+x ~/bin/update-mydebs
How the script works:
dpkg-scanpackages looks at all the packages in mydebs, and the output is compressed and written to a file (Packages.gz) that apt-get update can read (see below for a reference that explains this in excruciating detail). /dev/null is an empty file; it is a substitute for an override file which holds some additional information about the packages, which in this case is not really needed. See deb-override(5) if you want to know about it.
Sources.list
add the line
deb file:/usr/local/mydebs ./
to your /etc/apt/sources.list, and you're done.
CD Option
You can burn the directory containing the debs to a CD and use that as a repository as well (good for sharing between computers). To use the CD as a repository, simply run
sudo apt-cdrom add
Using the Repository
Whenever you put a new deb in the mydebs directory, run
sudo update-mydebs
sudo apt-get update
Now your local packages can be manipulated with Synaptic, aptitude and the apt commands: apt-get, apt-cache, etc. When you attempt to apt-get install, any dependencies will be resolved for you, as long as they can be met.
Badly made packages will probably fail, but you won't have endured dpkg hell.
1.Jalankan perintah "sudo apt-get install dpkg-dev"
hadinux@hadinux-laptop:~$ sudo apt-get install dpkg-dev
2.Buat folder/direktori tempat paket-paket yg akan kita jadikan repository yaitu
hadinux@hadinux-laptop:~$ mkdir /home/hadinux/apt
hadinux@hadinux-laptop:~$ mkdir /home/hadinux/apt/archives
hadinux@hadinux-laptop:~$ mkdir /home/hadinux/apt/archives/binary
3.Copy semua paket yang sudah terinstall ke folder tadi, dengan perintah
hadinux@hadinux-laptop:~$ cp -v /var/cache/apt/archives/*.deb /home/hadinux/apt/archives/binary/
4.Jadikan folder yang telah kita buat tadi menjadi repository, dengan cara :
> masuk ke dalam folder itu
hadinux@hadinux-laptop:~$ cd /home/hadinux/apt/archives
> lalu ketik perintah ini
"dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz"
nantinya repository kita terletak di "/home/hadinux/apt/", untuk menggunakannya ketik perintah berikut di terminal
hadinux@hadinux-laptop:~$ sudo gedit /etc/apt/sources.list
kemudian tambahkan pada bagian bagian bawah sources,list tersebut menjadi
"deb /home/hadinux/apt binary/" (tanpa tanda petik)
simpan dan close.
kemudian ketik: hadinux@hadinux-laptop:~$ sudo apt-get update
Selesai,sekarang Anda telah memiliki Repository local sendiri.
Selamat mencoba.
hadinux@hadinux-laptop:~$ sudo apt-get install dpkg-dev
2.Buat folder/direktori tempat paket-paket yg akan kita jadikan repository yaitu
hadinux@hadinux-laptop:~$ mkdir /home/hadinux/apt
hadinux@hadinux-laptop:~$ mkdir /home/hadinux/apt/archives
hadinux@hadinux-laptop:~$ mkdir /home/hadinux/apt/archives/binary
3.Copy semua paket yang sudah terinstall ke folder tadi, dengan perintah
hadinux@hadinux-laptop:~$ cp -v /var/cache/apt/archives/*.deb /home/hadinux/apt/archives/binary/
4.Jadikan folder yang telah kita buat tadi menjadi repository, dengan cara :
> masuk ke dalam folder itu
hadinux@hadinux-laptop:~$ cd /home/hadinux/apt/archives
> lalu ketik perintah ini
"dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz"
nantinya repository kita terletak di "/home/hadinux/apt/", untuk menggunakannya ketik perintah berikut di terminal
hadinux@hadinux-laptop:~$ sudo gedit /etc/apt/sources.list
kemudian tambahkan pada bagian bagian bawah sources,list tersebut menjadi
"deb /home/hadinux/apt binary/" (tanpa tanda petik)
simpan dan close.
kemudian ketik: hadinux@hadinux-laptop:~$ sudo apt-get update
Selesai,sekarang Anda telah memiliki Repository local sendiri.
Selamat mencoba.
#1 Backup paket – paket yang udah didownload. Tinggal copy aja semua file berekstensi .deb yang berada di direktori /var/cache/apt/archives ke sembarang folder. kalo bisa jangan dipartisi yang sama dengan sistem Anda terinstall. (Disarankan jika menginstall linux, partisi untuk sistem / (baca: root) dipisahkan dengan partisi /home, karena jika menginstall ulang sistem, folder /home tidak akan terpengaruh)
#2 Install ulang sistem. Setelah itu, pindahkan file – file .deb yang sudah dibackup sebelumnya, ke folder /home/username/sembarang_folder, misal /home/username/repo.
#3 Install paket dpkg-dev. Paket ini sudah tersedia di dalam CD Ubuntu. Bagi yang belum tahu caranya, berikut saya jelaskan (yang pake synaptic aja biar gampang). Masukkan CD instalasi Ubuntu. Buka System > Administration > Synaptic Packages Manager. Klik Settings > Repositories. Centang pada checkbox “Instalable from CD-ROM… CD-ROM with Ubuntu…“, lalu close. Setelah itu reload dengan menekan [Ctrl]+R. Jika proses pembacaan paket dari CD-ROM selesai, cari paket dengan nama dpkg-dev, klik kanan, pilih Mark for installation. Lalu Apply. Close synaptic
#4 Buat packages list. Buka terminal, ketik :
~$ sudo dpkg-scanpackages repo /dev/null | gzip -9c > repo/Packages.gz
#5 Update packages list, supaya paket – paket yang kita punya, yang udah dibuatkan packages list-nya bisa dikenali oleh apt (atau synaptic). Caranya :
~$ sudo gedit /etc/apt/sources.list
buat baris baru di akhir, lalu tambahkan :
deb file:/home/username repo/
Lalu simpan dan close. Masih di terminal, update apt dengan perintah :
~$ sudo apt-get update
Jika langkah – langkah di atas dilakukan dengan benar, seharusnya saat ini Anda sudah mempunyai repository lokal sendiri. Selanjutnya Anda bisa mengistall paket – paket yang diinginkan, bisa dari terminal maupun via Synaptic Packages Manager.
#2 Install ulang sistem. Setelah itu, pindahkan file – file .deb yang sudah dibackup sebelumnya, ke folder /home/username/sembarang_folder, misal /home/username/repo.
#3 Install paket dpkg-dev. Paket ini sudah tersedia di dalam CD Ubuntu. Bagi yang belum tahu caranya, berikut saya jelaskan (yang pake synaptic aja biar gampang). Masukkan CD instalasi Ubuntu. Buka System > Administration > Synaptic Packages Manager. Klik Settings > Repositories. Centang pada checkbox “Instalable from CD-ROM… CD-ROM with Ubuntu…“, lalu close. Setelah itu reload dengan menekan [Ctrl]+R. Jika proses pembacaan paket dari CD-ROM selesai, cari paket dengan nama dpkg-dev, klik kanan, pilih Mark for installation. Lalu Apply. Close synaptic
#4 Buat packages list. Buka terminal, ketik :
~$ sudo dpkg-scanpackages repo /dev/null | gzip -9c > repo/Packages.gz
#5 Update packages list, supaya paket – paket yang kita punya, yang udah dibuatkan packages list-nya bisa dikenali oleh apt (atau synaptic). Caranya :
~$ sudo gedit /etc/apt/sources.list
buat baris baru di akhir, lalu tambahkan :
deb file:/home/username repo/
Lalu simpan dan close. Masih di terminal, update apt dengan perintah :
~$ sudo apt-get update
Jika langkah – langkah di atas dilakukan dengan benar, seharusnya saat ini Anda sudah mempunyai repository lokal sendiri. Selanjutnya Anda bisa mengistall paket – paket yang diinginkan, bisa dari terminal maupun via Synaptic Packages Manager.
Jumat, 16 Oktober 2009
Tugas :
3. Dua buah vektor diberikan sebagai :
a = 4i - 3j + k dan b = -i + j+ 4k
Tentukan :
a. a + b
b. a – b
c. Vektor c agar a – b + c = 0
4. Jika a = 3i + 3j – 3k dan b = 2i + j + 3k
Tentukan sudut antara 2 vektor dengan menggunakan perkalian skalar a . b = ab cos θ.
5. Diberikan 3 buah vektor :
a = 3i + 3j – 2k
b = -i – 4j + 2k
c = 2i + 2j + k
Tentukan : a . (b x c) !
Jawaban :
3. a. a+b a = 4i - 3j + k b. a-b a = 4i - 3j + k
b = -i + j+ 4k + b = -i + j+ 4k -
= 3i – 2j + 5k = 5i – 4j -3k
c. Vektor c agar a – b + c = 0
a – b + c = 0
c = - ( a – b )
c = - (5i – 4j – 3k )
c = -5i +4j +3k
4 . Sudut antara 2 vektor a = 3i + 3j – 3k dan b = 2i + j + 3k adalah :
a.b = 3.2 + 3.1 + -3.3
= 6 + 3 – 9
= 0
5. dik : a = 3i + 3j – 2k
b = -i – 4j + 2k
c = 2i + 2j + k
dit : a.(bxc)?
bxc = (-i - 4j + 2k )x ( 2i + 2j + k )
= (-4.1-2.2)i + (2.2-1.-1)j + (-1.2-2.-4)k
= -8i + 5j + 6k
Jadi a.(bxc) = ( 3i + 3j – 2k ).(-8i + 5j + 6k )
= 3.-8 + 3.5 + -2.6
= -24 + 15 -12
= -21
3. Dua buah vektor diberikan sebagai :
a = 4i - 3j + k dan b = -i + j+ 4k
Tentukan :
a. a + b
b. a – b
c. Vektor c agar a – b + c = 0
4. Jika a = 3i + 3j – 3k dan b = 2i + j + 3k
Tentukan sudut antara 2 vektor dengan menggunakan perkalian skalar a . b = ab cos θ.
5. Diberikan 3 buah vektor :
a = 3i + 3j – 2k
b = -i – 4j + 2k
c = 2i + 2j + k
Tentukan : a . (b x c) !
Jawaban :
3. a. a+b a = 4i - 3j + k b. a-b a = 4i - 3j + k
b = -i + j+ 4k + b = -i + j+ 4k -
= 3i – 2j + 5k = 5i – 4j -3k
c. Vektor c agar a – b + c = 0
a – b + c = 0
c = - ( a – b )
c = - (5i – 4j – 3k )
c = -5i +4j +3k
4 . Sudut antara 2 vektor a = 3i + 3j – 3k dan b = 2i + j + 3k adalah :
a.b = 3.2 + 3.1 + -3.3
= 6 + 3 – 9
= 0
5. dik : a = 3i + 3j – 2k
b = -i – 4j + 2k
c = 2i + 2j + k
dit : a.(bxc)?
bxc = (-i - 4j + 2k )x ( 2i + 2j + k )
= (-4.1-2.2)i + (2.2-1.-1)j + (-1.2-2.-4)k
= -8i + 5j + 6k
Jadi a.(bxc) = ( 3i + 3j – 2k ).(-8i + 5j + 6k )
= 3.-8 + 3.5 + -2.6
= -24 + 15 -12
= -21
Selasa, 01 September 2009
tugas fisika
1. Apakah yang dimaksud dengan besaran, besaran pokok dan besaran turunan ?
Berilah masing – masing 3 contoh besaran pokok dan turunan yg anda temukan dalam kehidupan sehari - hari ?
Jawaban:
- Besaran adalah sesuatu yang mempunyai nilai
- Besaran pokok adalah besaran yang ditetapkan dengan suatu standar ukuran. Contoh panjang ,massa dan waktu.
- Besaran turunan adalah besaran yang dirumuskan atau diturunkan dari besaran- besaran pokok .Contoh kecepatan, percepatan dan gaya.
2. Lengkapilah tabel konversi berbagai satuan dibawah ini ?
a. 1,5 km = 1500 m
b. 1 Liter = 1000 cc
c. 2000 kg / m3 = 2 gram / cm3
d. 20 inchi = 50,8 cm
e. 36 km / jam = 10 m / s
f. 10 m2 = 100000 cm2
Berilah masing – masing 3 contoh besaran pokok dan turunan yg anda temukan dalam kehidupan sehari - hari ?
Jawaban:
- Besaran adalah sesuatu yang mempunyai nilai
- Besaran pokok adalah besaran yang ditetapkan dengan suatu standar ukuran. Contoh panjang ,massa dan waktu.
- Besaran turunan adalah besaran yang dirumuskan atau diturunkan dari besaran- besaran pokok .Contoh kecepatan, percepatan dan gaya.
2. Lengkapilah tabel konversi berbagai satuan dibawah ini ?
a. 1,5 km = 1500 m
b. 1 Liter = 1000 cc
c. 2000 kg / m3 = 2 gram / cm3
d. 20 inchi = 50,8 cm
e. 36 km / jam = 10 m / s
f. 10 m2 = 100000 cm2
Langganan:
Postingan (Atom)