Diberdayakan oleh Blogger.

LANGKAH – LANGKAH INSTALASI LINUX REDHAT

Persiapan Instalasi Beberapa hal yang patut anda catat sebelum memulai instalasi adalah : 1. siapkan PC yang memungkinkan untuk menginstal linux 2. siapkan CD instalasi Linux yang akan anda instal Memulai Instalasi 1. Setting BIOS pada komputer, agar booting pertama dari CD-Drive. 2. Masukkan Disk ke 1 dari 3 CD Red Hat ke dalam CD-Drive. Tunggu beberapa saat hingga tampil pilihan untuk memulai instalatasi Red Hat tersebut | tekan tombol Enter. Tampilan awal boot 3. Tunggu beberapa saat akan muncul pilihan bahasa selama proses instalasi seperti gambar berikut : Kotak dialog pilihan bahasa 4. Klik tombol Next. Kemudian akan tampil jendela pilihan untuk keyboard. Kotak dialog konfigurasi keyboard 5. Klik tombol Next. Kemudian akan tampil jendela pilihan untuk mouse, klik sesuai dengan mouse yang digunakan. Kotak dialog konfigurasi keyboard 6. Klik tombol Next. Kemudian akan tampil jendela pilihan untuk upgrade atau install Kotak dialog Upgrade 7. Pilih Perform a New Red Hat Linux Installation, Kemudian klik tombol Next. 8. Tentukan pilihan untuk instalasi yang diinginkan, klik Next Kotak dialog pilihan jenis instalasi 1 Personal Desktop Aplikasi offices dan Multimedia 1.8 GB 2 Workstation Komputer kerja untuk jaringan dan developer/ programmer. 2.1 GB 3 Server Komputer sebagai server dengan aplikasinya 1.5 GB – 4.85 GB 4 Custom Menentukan sendiri paket sesuai kebutuhan 500 MB – 4.85 GB 9. Pilih bentuk partisi yang diinginkan : Automatically Partition atau Manually Partition with Disk Druid Kotak dialog pilihan jenis partisi *) Membuat tiga partisi, masing-masing untuk windows, linux dan data. Sehingga jika anda ingin menghapus/ uninstal Linux atau Windows, data-data penting anda tidak turut hilang. Skema susunan partisi *) Didalam sebuah Harddisk terdapat konsep partisi yang terdiri dari Partisi Primary, Partisi Extended dan Partisi Logical. Didalam partisi primary terdapat Master Boot Record (MBR) untuk melakukan proses boot loader dari suatu sistem operasi. 10. Pilih Manually Partition with Disk Druid untuk membuat partisi Linux, dan secara default, Anda cukup untuk membuat partisi : 1 . /boot ———-> EXT3 / Linux Native ——-> 100 MB 2 . / ————–>EXT3 / Linux Native ——–>4000 MB 3 . swap ———–>Swap ————->2 x jumlah memori yang terpasang pada komputer Kotak dialog pembagian partisi Pilih tombol NEW pada kotak dialog Partitioning. Lalu isikan di kolom Mount Point “ / ”. Untuk file system, pilih Linux Native. Isikan kolom size sisa dari hardisk anda yang masih kosong. Lalu pilih OK kemudian pilih Next. Kotak dialog menentukan sistem file 11. Setelah selesai pembuatan partisi maka akan ditampilkan konfigurasi untuk boot loader Lalu pilih Next, sehingga muncul tampilan sebagai berikut : kotak dialog boot loader 12. Jika anda berencana menghubungkan komputer ke jaringan, isikan data yang diminta. Jika tidak biarkan kosong. Pilih Next. Kotak dialog konfigurasi jaringan 13. Kemudian muncul kotak konfigurasi firewall. Biarkan kosong jika anda tidak menghubungkan komputer dengan jaringan. Kotak dialog konfigurasi Firewall 14. Pilih Next , muncul tampilan berikut yang meminta anda mengisikan jenis bahasa yang akan digunakan oleh RedHat nantinya. Sell Links On Your Site Kotak dialog konfigurasi bahasa tambahan 15. Pilih Next untuk melanjutkan. Sehingga tampil setting waktu. Kotak dialog konfigurasi tanggal 16. Pilih Next untuk melanjutkan. Masukkan Password untuk root, yang merupakan super user. Klik tombol Next dan tombol Next kembali. 17. Tentukan paket-paket apa saja yang akan di Install. Ada beberapa group paket diantaranya seperti Desktop, Application, Server. Kemudian klik Next Kotak dialog Menentukan Jenis Paket 18. Tunggu beberapa saat hingga proses instalasi paket yang telah dipilih selesai semuanya. Kotak dialog proses instalasi 19. Kemudian akan tampil kotak dialog untuk membuat boot system untuk disket, masukkan disket pada drive A, kemudian klik tombol Next. Kotak dialog pembuatan disket boot 20. Setelah selesai pembuatan disket boot, kemudian akan tampil kotak dialog untuk menentukan jenis Berikutnya installer akan meminta anda memilih konfigurasi Video Card. Umumnya, installer mengenali jenis video card yang ada. Dan juga anda diminta memilih jumlah RAM video card tersebut. Seperti terlihat pada gambar berikut : Kotak dialog Konfigurasi card monitor 21. Klik Next untuk menentukan jenis monitor yang digunakan dan resolusi yang diinginkan. 22. Setelah anda memasukan dengan benar, maka selesai sudah instalasi Linux RedHat 9.0.

Perintah dasar di Linux

Berikut ini beberapa perintah dasar yang biasa digunakan untuk mengoperasikan dan mengadministrasi
sistem berbasis Linux pada mode command-line-interface atau biasa disebut mode
KONSOLE.
Pentunjuk pembacaan penulisan :
1. Setiap bagian perintah memiliki 3 bagian, yaitu arti atau kegunaan, syntax dan contoh. Contoh
dapat lebih dari satu sesuai dengan kebutuhan.
2. Kata yang tebal dan diikuti tanda baca ':' adalah nama/judul perintah.
3. Bagian yang berlatar-belakang gray adalah output dari komputer dan dapat
diaplikasikan/dipraktekkan menggunakan KONSOLE. Perlu diingat, saat mencoba
menggunakan dengan KONSOLE perhatikan parameter-parameter yang digunakan. Bisa saja
Anda menggunakan parameter yang berbeda dengan contoh. Akan lebih baik jika Anda
mencoba bersama rekan/teman.
4. Klo ingin diskusi just feel free to contact me at kapten.vu@gmail.com
alias : Untuk membuat alias dan menampilkan alias yang sudah diset
sebelumnya.
Contoh :
menampilkan alias yang sudah diset sebelumnya
[kave@client10~]$ alias
alias d='dir'
alias ls='/usr/bin/ls -l'
alias v='vdir'
alias vdir='/usr/bin/ls $LS_OPTIONS --format=long'
membuat alias baru yaitu dir yang fungsinya sama dengan ls
[kave@client10~]$ alias dir='/usr/bin/ls -l'
cp: Copy, untuk melakukan proses copy file
Syntax : cp [options] file_sumber file_tujuan
Contoh : copy file dari direktori /data/mhs1/otomatis.sh ke /data/mhs2/[kave@client10~]$ cp /data/mhs1/otomatis.sh /data/mhs2/
chmod: Untuk mengganti perijinan pada file atau direktori.
Syntax : chmod [options] file_atau_direktori
Contoh : Mengganti perijinan file /data/mhs1/otomatis.sh dari 664 menjadi
755
[kave@client10~]$ chmod 755 /data/mhs1/otomatis.sh
chown: Mengganti kepemilikan atas file atau direktori
Syntax : chown [options] username:groupname
Contoh : Mengganti kepemilikan file /data/otomatis.sh yang sebelumnya
dimiliki oleh user yang bernama labcrew menjadi labcrew2
[kave@client10~]$ chown labcrew2:labcrew2 /data/otomatis.sh
chgrp: Untuk mengganti grup pemilik suatu file atau direktori
Syntax : chgrp [options] groupname
Contoh :
[kave@client10~]$ chgrp labcrew /data/otomatis.sh
clear: Untuk membersihkan tampilan layar monitor
Syntax : clear
Note : untuk melakukan clear dengan cepat, Anda dapat menggunakan
kombinasi tombol CTRL + L
cat: Menampilkan isi dari suatu file
Syntax : cat nama_file
Contoh : menampilkan isi file /etc/issue.net
[kave@client10~]$ cat /etc/issue.net
Welcome to client10.dejavu.war.net.id. Unauthorized access is
prohibited !
cd: Change Directory, untuk berpindah/berganti direktori.
Syntax : cd nama_direktori
Contoh : berganti ke direktori praktikum
[kave@client10~]# cd praktikum
cal: Menampilkan kalender.
Syntax : cal
Contoh :
[kave@client10~]$ cal
November 2006
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30
date: Menampilkan informasi tanggal dan waktu saat ini.
Syntax : date
Contoh :
[kave@client10~]$ date
Thu Nov 16 23:15:35 UTC 2006
du: Menampilkan penggunaan kapasitas harddisk oleh suatu direktori.
Syntax : du [options]
Contoh : Menampilkan penggunaan kapasitas harddisk pada direktori
/home/kave dengan option -h (human readable) agar lebih mudah dalam
pembacaan karena hasil yang ditampilkan sudah dikonversi dalam bentuk
KiloByte, MegaByte bahkan GigaByte (jika diperlukan).
[kave@client10~]$ du -h
12K ./.config/xfce4/xffm
36K ./.config/xfce4/desktop
12K ./.config/xfce4/panel
4.0K ./.config/xfce4/xfwm4
68K ./.config/xfce4/mcs_settings
..
..
20K ./.nvu/plstbxas.default/extensions
4.0K ./.nvu/plstbxas.default/chrome
1.6M ./.nvu/plstbxas.default
1.7M ./.nvu
233M .
df: Menampilkan penggunaan partisi harddisk secara keseluruhan. df -h Contoh : df dengan option -h untuk menghasilkan tampilan yang sudah
dikonversi dalam bentuk KiloByte, MegaByte bahkan GigaByte (jika
diperlukan).
[kave@client10~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda6 3.7G 3.1G 434M 88% /
/dev/hda7 2.3G 281M 2.0G 13% /home
file : Untuk melihat tipe file.
Syntax : file nama_file
Contoh :
[kave@client10~]$ file index.html
index.html: HTML document text
[kave@client10~]$ file yakult_01.jpg
yakult_01.jpg: JPEG image data, JFIF standard 1.02
[kave@client10~]$ file sdat4866.exe
sdat4866.exe: MS-DOS executable (EXE), OS/2 or MS Windows
Dalam hal ini, perintah “file” akan menganalisa file yang diberikan,
bukan berdasarkan pada extension suatu file. Sebagai contoh jika suatu
file ber-ekstensi .doc tetapi sebenarnya adalah file gambar dalam
format JPEG maka perintah “file” akan menemukan file tersebut dalam
kondisi yang sebenarnya.
Contoh :
[kave@client10~]$ mv yakult_05.jpg yakult.doc
(perintah ini untuk merubah file yakult_05.jpg menjadi yakult.doc)
[kave@client10~]$ file yakult.doc
yakult.doc: JPEG image data, JFIF standard 1.01
(perintah “file” dapat membuktikan bahwa file yakult.doc sebenarnya
adalah file gambar dalam format JPEG.)grep: Untuk mencari suatu “string” atau “pattern” tertentu pada suatu
file.
Syntax : grep PATTERN nama_file
Contoh : mencari PATTERN “center” pada file index.html
[kave@client10~]$ grep center index.html
<center>
<td align=center><a href="http://www.ilmukomputer.com/home.php"><img
src="/images/ikc-old.jpg" border=0><br><br>VERSI KONVENSIONAL</a></td>
<td align=center><a href="http://www.ilmukomputer.org"><img src="/images/ikcblog.
jpg" border=0><br><br>VERSI BLOG</a></td></center>
Perhatikan bahwa setiap baris di atas mengandung kata “center” sesuai
dengan PATTERN yang diinginkan.
head: Secara default menampilkan 10 baris pertama pada suatu file. Jika
ingin menampilkan jumlah baris yang berbeda dapat menggunakan option -n
diikuti jumlah baris yang diinginkan.
Syntax : head [options] nama_file
Contoh : menampilkan 15 baris pertama pada file guitar.txt
[kave@client10~]$ head -n15 guitar.txt
To Her With Love Tab by Karas Flowers, www.Ultimate-Guitar.Com
To Her, With Love
Kara?s Flowers
The Fourth World
Tabbed by: Danielle Weitzman
Email: Jewelgirl04@aol.com
Tuning: Eb Ab Db Gb Bb eb
Intro
e|-------------------------------------------------------------|
history: Menampilkan perintah-perintah yang telah digunakan sebelumnya. Note:
Linux memiliki fasilitas untuk menyimpan perintah-perintah yang pernah
digunakan.




Linux server Vs Windows server

ebelum kita memilih Operasi Sistem ( OS ) untuk server kita ada baik nya kita melihat kebutuhan, biaya dan waktu untuk membuat server yang akan kita gunakan baik untuk keperluan perusahaan atau keperluan pribadi. Biasanya Server yang di bangun adalah server linux dan server windows, disini saya akan menjelaskan beberapa perbandingan antara ke dua server tersebut :
1. Stability
Sistem Linux sangat terkenal karena kemampuannya yang bisa berjalan selama bertahun-tahun tanpa kegagalan; pada kenyataannya, banyak pengguna Linux belum pernah melihat crash dalam sistemnya. Itu sangat bagus untuk pengguna , tapi hal ini penting terutama untuk usaha kecil dan menengah, untuk downtime yang dapat memiliki konsekuensi. Linux juga dapat menangani sejumlah besar proses yang dapat berjalan sekaligus, hal ini jauh lebih baik dari windows.
Kemudian kebutuhan untuk reboot. Pada Windows perubahan konfigurasi biasanya membutuhkan reboot menyebabkan downtime yang tak terelakkan, umumnya anda tidak perlu me-restart Linux. Hampir semua perubahan konfigurasi Linux dapat dilakukan pada saat sistem berjalan dan tidak perlu merestart server nya.
2.Security
Untuk keamanan nya Linux lebih secure atau aman daripada windows karena linux dibangun berbasis Unix, didesain dari awal untuk menjadi sistem operasi multiuser. Hanya administrator, atau root user, yang memiliki hak akses administratif, serta lebih sedikit pengguna dan aplikasi yang memiliki izin untuk mengakses kernel atau satu sama lain. Linux juga sama bisa di serang oleh virus atau malware, tapi hal ini sangat cepat di perbaiki oleh developer dan User karena linux sifatnya adalah open source jadi bisa di kembangkan oleh siapa saja. Kemudian pengguna sistem Windows kadang-kadang dapat menyembunyikan file dari administrator sistem. sedangkan pada Linux, sys admin memiliki kendali dan kontrol penuh terhadap semua file .
3.Hardware
Windows biasanya memerlukan perangkat keras yang harus sering di upgrade untuk mengakomodasi tuntutan sumber daya, sedangkan sumber daya linux adalah slim, fleksibel dan terukur, dan itu support di komputer apapun, terlepas dari prosesor atau mesin arsitektur.Linux juga bisa dapat dengan mudah di reconfigured sehingga service – service yang dipakai bisa di sesuaikan dengan kebutuhan bisnis anda, hal ini bisa mengurangi kinerja memori dan dapat meningkatkan kinerja server.
4.TCO / Biaya
Untuk biaya yang di gunakan untuk membuat server linux pasti lebih murah di bandingkan dengan membuat server windows, karena linux merupakan open source atau bisa di dapatkan dengan gratis, software-software nya pun gratis berbeda dengan windows dan software – software nya harus membeli lisensi sehingga biaya dapat membengkak, dipandang dari segi biaya linux lebih murah di bandingkan windows.
5. Freedom & Kepuasan
Linux bisa di kembangkan oleh siapa saja, bisa di custome dan bahkan bisa di rebuild disesuaikan dengan kebutuhan bisnis anda tidak ada pembatasan develop untuk linux, berbeda dengan windows yang memiliki vendor sendiri sehingga tidak bisa di develop sesuka hati.
Tapi hal ini dikembalikan ke kebutuhan perusahaan , jika memang membutuhkan server windows untuk aplikasi pendukung perusahaan nya ya bagaimana lagi ,berarti server windows harus di buat. :)

Linux Hosting Indonesia

Web hosting Linux cocok digunakan oleh pengembang web yang ahli dalam menggunakan Linux, seperti Program Perl, PHP, Database MySql. Web Hosting Linux adalah solusi hosting yang lebih mudah dan dipercaya, dan karena Linux adalah perangkat lunak yang dapat digunakan secara bebas, menjadikannya solusi Hosting yang lebih murah.

Apakah Web Hosting Linux itu ?

Web Hosting Linuxmemperbolehkan suatu perusahaan untuk membangun website mereka menggunakan sistem operasi dari Linux itu sendiri. Dengan menggunakan Linux di dalam pengembangan web maka akan memberikan fleksibilitas dalam menggunakan sistem operasi yang gratis seperti PHP, MySql, Python, XML. Web Hosting Linux adalah variasi open source dari Sistem Operasi Unix.

Web Hosting Linux menggunakan Web Server Apache dan merupakan web server yang paling populer sedunia. Kami menggunakan OS Red Hat untuk Linux Server kami.

 

Databases with Linux

The most efficient way of storing information for processing is a database. Fortunately, there are Open Source databases that fit the bill for any type of data storage and retrieval requirements. The most popular of these is MySQL, which is the database we will deal with in this course.

PostgreSQL is another excellent database package which I also use. It has some advantages over MySQL but it enjoys a smaller user base. There are also some things that are more difficult to do with PostgreSQL than with MySQL, so as a study tool, MySQL serves me somewhat better. I don't wish to downplay PostgreSQL's importance in any way. It is another top-rate database for Linux systems and I encourage you to install it and try it.

MySQL
MySQL, the most popular database software in the Linux/Open Source world, started off as a project based in Scandinavia under the direction of Michael "Monty" Widenius. MySQL is now maintained and developed by its own company, MySQL AB. MySQL is available under the General Public License (GPL). According to their website, MySQL is used by such notable companies and organizations as NASA, Motorola and Yahoo to name but three.
Installation and configuration

To offer database services, you need to install the MySQL server. To be able to do queries and such, the client software must be installed. Being so popular, all the major distributions offer you the possibility of installing these packages.

Once installed, you'll need to set the MySQL root user password. This 'root' should not be confused with the 'root' of the whole machine. It is similar in that you have privileges for everything, but that's where it ends. Once installed, you set the root password like so:

mysqladmin -u root password YOUR_PASSWORD

where YOUR_PASSWORD is the password you want. If you want to change this password in the future, this is also the way to go about it. When you change the password, you will be prompted for the old one.

Creating databases and tables
Now we're ready to create a database. Again, we will use the program mysqladmin.
mysqladmin -u root -p create DB_NAME

where DB_NAME is the name of your shiny, new database. Of course, a database is really just an empty box waiting to be things to be put into it. Actually, before we put things in our empty box, we should create some dividers to separate items. Database tables are like these dividers, so we should create a table. To do this, we'll need to open a MySQL client shell.
mysql -u root -p albums

You will be prompted for the root password and then you'll see something like this:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 25 to server version: 3.23.49-log

Type 'help;' or 'h' for help. Type 'c' to clear the buffer.

Now we're ready to create a table. Before we do, we should look at some of the basic field types that you'll be using. The most widely used is VARCHAR. VARCHAR can store alphanumerical data from 1 to 255 characters in length. You must specify this length when you create the table. The INTEGER or INT field type can accept values from -2147483648 to 2147483647. This is used when you want to enter data that you know will only be whole numbers. DOUBLE is a good field type when you want to deal with data with decimal points like money. There is also another type DECIMAL. The difference is that DOUBLE can deal with decimals where you may not be interested in rounding. If you want to store large descriptions, TEXT is for this purpose. A TEXT field can store up to 216 (65536) characters. Another field type that you might end up using often is ENUM. This is particularly useful when you know that the data can only be 2 or 3 things and never changes (like true/false, yes/no or yes/no/maybe). Finally, to get a handle on dates and times when your data is stored we might use field types like TIMESTAMP, which is in the form of YYYYMMDDHHmmSS (Year, Month, Day, Hour, Minute and Seconds) or DATE, if you're looking for something with less precision. Of course there are other types and you may want to use them. I invite you to look at the excellent documentation on MySQL's website to get more in-depth information on these field types and others. In the meanwhile, let's create a table:

Let's imagine that you collect LPs. You might want to create a database to keep track of things or share your information over the Internet. A MySQL database is ideal for this, because you can later use it with Perl or PHP scripts to present this on the WWW. Let's set up a table to deal with info about an album collection. There are a couple of ways to do this. We can create the table on the command line - all on one line:

CREATE TABLE collection (title VARCHAR(100), artist VARCHAR(100), genre VARCHAR(30), condition VARCHAR(10), worth DOUBLE(2,2), notes TEXT, released DATE, added DATE, opened ENUM('yes','no'), updated TIMESTAMP(14), ID int(11) NOT NULL auto_increment, PRIMARY KEY (ID))

First, we have VARCHAR fields for title, artist, genre, condition. Then we have a DOUBLE field suitable for currency for the LPs value, called 'worth'. Next, we have a TEXT field for making notes about the album, followed by DATE fields for when the LP was released and when we added it to our collection. I added a field ENUM 'opened' as an example. We could use this to say if the album had been opened or if it was still in the shrinkwrap. The last one is a complete TIMESTAMP field of 14 characters to mark when we update the record. TIMESTAMP fields can start at 2 characters (just the year) and grow by 2 characters (4,6,8,10,12,14) with more information. 14 characters is accurate to the second. The last one is a special field I usually use as it makes updates via a web script easier. What I've done is to create an ID field that is an integer. NOT NULL means that it must always have a value. The others could be theoretically left blank, but this one can't. Plus, it will automatically increment every time we add an LP to the database. This also serves as the PRIMARY KEY of the table because of this lack of empty data. A key, which is used for sorting, must always have some sort of information in it. Here, we'll do the default sorting by 1,2,3 etc.

If you've got this in your MySQL shell, just press enter to create the table. You'll see something like this if you're successful:
Query OK, 0 rows affected (0.01 sec)

If you've done something wrong, MySQL is pretty good about telling you where your mistake might be. Let's say I left out the comma between the 'worth DOUBLE' field and the 'notes TEXT' field. I would get a message like this:
ERROR 1064: You have an error in your SQL syntax near 'notes TEXT, released DATE, added DATE, opened ENUM('yes','no'), updated TIMESTAMP' at line 1

Now to make sure everything is in place, we can ask MySQL to describe the table for us:
describe collection;

+-----------+------------------+------+-----+---------+----------------+
| Field     | Type             | Null | Key | Default | Extra          |
+-----------+------------------+------+-----+---------+----------------+
| title     | varchar(100)     | YES  |     | NULL    |                |
| artist    | varchar(100)     | YES  |     | NULL    |                |
| genre     | varchar(30)      | YES  |     | NULL    |                |
| condition | varchar(10)      | YES  |     | NULL    |                |
| worth     | double(4,2)      | YES  |     | NULL    |                |
| notes     | text             | YES  |     | NULL    |                |
| released  | date             | YES  |     | NULL    |                |
| added     | date             | YES  |     | NULL    |                |
| opened    | enum('yes','no') | YES  |     | NULL    |                |
| updated   | timestamp(14)    | YES  |     | NULL    |                |
| ID        | int(11)          |      | PRI | NULL    | auto_increment |
+-----------+------------------+------+-----+---------+----------------+

11 rows in set (0.01 sec)

We don't have to create the table in the MySQL shell if we don't want to. You can create a text file with the same and then have MySQL read it
## table albums.collection

CREATE TABLE collection (
   title      VARCHAR(100),    
   artist     VARCHAR(100),    
   genre      VARCHAR(30),    
   condition  VARCHAR(10),    
   worth      DOUBLE(4,2),    
   notes      TEXT,            
   released   DATE,            
   added      DATE,            
   opened     ENUM('yes','no'),    
   ID int(11) NOT NULL auto_increment,
   PRIMARY KEY  (ID));

Save it as collection.sql. Now, to have MySQL read it, we would do the following from a normal terminal (not a MySQL shell).
mysql -u root -p albums < collection.sql

You will be prompted for the MySQL root password. If you haven't made any mistakes in syntax, your table will be created.

A database and a table is still and empty box with separators. Now it's time to fill the table up with data.


Inserting your data
Actually, the word database is a pretty broad term. If I open a text file and I write information about my album collection in a fairly organized way, then I have created a database of sorts. Though we call what we've just created a "database" and a table, it really is isn't yet because we haven't put information into it. MySQL really is a program to manipulate data more than anything because, as I mentioned, we could use a simple text file to store data. What makes MySQL and other database software attractive is it helps us put the data to use in all kinds of interesting ways.

To add data to our album collection, we can open up a MySQL shell and do the following:
INSERT INTO collection (title, artist, genre, condition, worth, notes, released, added, opened) VALUES ('Yesterday and Today', 'Beatles', 'Pop/Rock', 'good', '3000.00', 'The famous Butcher Cover', '1966-06-01', '1978-09-23', 'yes');

Again, this is one way of entering data. It is perhaps not the most comfortable way of doing it. To refer back to my reference about the text file, you can also use a text file to insert data into the table. You just have to make sure that the fields are clearly separated from one another and the each "record" (one entry in the table) is on a separate line. For example, we could create a text file like this:
'Armed Forces', 'Elvis Costello', 'Pop/Rock', 'exlnt',
'20.00', 'Probably his best', '1979-01-05', '1982-03-14', 'yes', '20030925201500'
'Zenyatta Mondatta', 'Police', 'Pop/Rock', 'fair',
'5.00', 'interesting tracks', '1980-10-03', '1981-12-25', 'yes', '20030925201500'

We could insert the data in our table this way:
LOAD DATA INFILE '/home/bob/record_collection' INTO TABLE collecton FIELDS TERMINATED BY ',' ENCLOSED BY ''' LINES TERMINATED BY 'n'

What we've done is tell MySQL to load data in this text file and how our data is organized within it. The organization is pretty self-explanatory. Just remember to escape single quotes ('\''). The line break or carriage return is marked by a '\n'.

To make this page look nice in a browser, I've had to force a line break at 'exlnt' and 'fair'. If you're going to cut and paste this example and try it out, please note that the only line break should be be at '20030925201500'

These are two main ways of inserting data on the command line. Further along we'll see how creating Perl or PHP scripts can speed this process up quite a bit and make it much more comfortable.

Viewing Data
Now that you've got your album collection nicely stored in a database, it would be shame not to do something with the data. The first thing we could do is look at it. For this, we'll use the SQL statementSELECT. Let's fire up the MySQL shell and enter this:

SELECT * FROM collection;

You're not going to see anything very pretty here. Actually, if you're working with an x-term, it's probably going to be pretty ugly. But if we select only certain fields, we can fine-tune our query.

SELECT title, artist, worth FROM collection;

This will give us a little nicer output:
+---------------------+-------------------+---------+
| title               | artist            | worth   |
+---------------------+-------------------+---------+
| Yesterday and Today | Beatles           | 3000.00 |
| Armed Forces        | Elvis Costello    |   20.00 |
| Zenyatta Mondatta   | Police            |    5.00 |
+---------------------+-------------------+---------+

We can use the WHERE statement to refine the query:
SELECT title, artist, worth FROM collection WHERE artist="Beatles";
+---------------------+---------+---------+
| title               | artist  | worth   |
+---------------------+---------+---------+
| Yesterday and Today | Beatles | 3000.00 |
+---------------------+---------+---------+
1 row in set (0.01 sec)

We can even do approximate queries. This will look for LPs by artists with the letter 'i' in the title:
SELECT title, artist, worth FROM collection WHERE artist LIKE "%i%";
+-------------------+----------------+-------+
| title             | artist         | worth |
+-------------------+----------------+-------+
| Armed Forces      | Elvis Costello | 20.00 |
| Zenyatta Mondatta | Police         |  5.00 |
+-------------------+----------------+-------+
2 rows in set (0.00 sec)

Since 'Beatles' doesn't have the letter 'i' in it, it doesn't show up. You can do something like LIKE "B%" and that only show artists that begin with 'B' or LIKE "%o" to show only those artist that end in 'o'. By removing or placing % and groups of letters or words, you can do a lot of refining. You can also have MySQL do your math for you. Let's say you wanted to get the total dollar amount of your entire collection. You could do something like this:
SELECT SUM(worth) AS total FROM collection;

And we get this output:
+---------+
| total   |
+---------+
| 3025.00 |
+---------+
1 row in set (0.00 sec)

It's the sum of the worth of our albums with the header 'total'. The header appeared by including 'AS total' to our query. This header could be anything. I just chose 'total' as it's meaningful to me. You could have said 'AS larry' if that's meaningful to you.

You can also use the >, < and != to refine your queries. Here's an example of finding albums whose value is below 100.00.
SELECT title, artist, worth FROM collection WHERE worth < '100.00';

or

SELECT title, artist, genre FROM collection WHERE genre != 'Pop/Rock';

which will show us those albums which weren't made by Pop/Rock artists.

You can also sort the output of the query to show you the albums in alphabetical order:
SELECT title, artist, genre FROM collection ORDER BY title;

the ORDER statement will put it in the order of the field you choose. Just substitute the field 'updated' to order them by when you last made changes to an entry. If you had a lot of entries, you could also limit the number of entries MySQL shows you:
SELECT title, artist, updated from collection ORDER BY updated LIMIT 0,10;

This will show us the first 10 entries. Then you may substitute LIMIT 11,20 to show you the next ten, and so on and so on.

Again, there are all sorts of ways of looking at your data. The MySQL documentation has a lot more examples and I'm sure that as you get proficient, you'll be needing more complex queries.

Deleting and altering data
Let's imagine that you leave your album Zenyatta Mondatta lying around. The new puppy you just bought for the kids decides to try out his teeth on that nice soft, black vinyl. The album is a total loss and you decide to get rid of it (and maybe the puppy too). Since the album is no longer in your collection, you would delete it from the table. Here is how to do it on the command line:

DELETE FROM collection WHERE title="Zenyatta Mondatta";

That might be a little drastic though. You might want to buy another copy of the album and replace it. If this is the case, you should probably leave the entry there and just update it when you get a new one. Here's how you would update an entry:

UPDATE collection SET condition = "good", added = "2003-10-05", worth = "8.50" WHERE title = "Zenyatta Mondatta";

That will update our entry for Zenyatta Mondatta.

Altering databases and tables
You should use some care with the things what we'll deal with in this section. We're going to be talking about altering and deleting live databases. If your information is important to you, then you should back it up regularly. MySQL makes this very easy. Here are a few ways to back up your data.

Generally, MySQL stores its tables in /var/lib/mysql (/var means variable - if you remember our first lessons - databases vary in size). You could make a tarball of this directory and back it up that way. This might be a good idea in the event of a system-wide disaster (a hard disk failure, for example). However, if you made a mistake altering data, the most comfortable way, in my opinion, is to make a 'dump' of a table and/or database and later restore it via MySQL itself. Here's how we can back up an entire database:

mysqldump --add-lock -u root -p --databases albums > albums_all.sql

That would make a nice file called albums_all.sql with the database and table creation information plus the data itself. We've added the option here --add-lock so that there is no data corruption when we make the copy. In a "mission critical" situation, people could be adding data to the table at the moment you do this. You need to lock them out before you make the copy. Now, in the event of something happening to that database, you would restore it by typing in a normal terminal:
mysql -u root -p < albums_all.sql

You can also do this with tables and certain entries within a table. For example, this will back up a table:

mysqldump --add-lock albums -u root -p collection > albums_collection.sql

The following will give us a dump of only those records that we've updated in October of 2003.
mysqldump --add-lock albums -u root -p collection -n -t "--where=updated like '200310%'" > oct_collection.sql

The two options at the end (-n -t) will make sure that the dump doesn't include either a database creation statement (-n) or a table creation statement (-t). We do this so we can just load the info back into the table if we need to.

Now we can work on our table structure or even delete a table and/or database without worry (as long as the medium you backed it up to is sound!).

So how does this deleting and altering tables and databases work? Well, at some time or another you will probably have to do this. Some countries even have laws that obligate you to destroy personal data when that is no longer being used. Let's say you ran a club and you had a list of the members names and addresses. The club disbands and you're the one who's in charge of that data. Well, you may need to safely erase all that data in order to be in accordance with the law. If you had a database called linuxclub, you would delete the whole database, tables and all with this statement in your MySQL shell:
DROP database linuxclub;

In MySQL speak, deleting a database or table is called dropping it. The table syntax is the same

DROP table lexington;

Use this with extreme care. This is not reversible. You will lose all of your data.

You may also need to update your table structure from time to time. For my album collection database, I should have included a field for the artist's record label. Others could have been included as well. There's no need to worry, even if you've been using the table for a while. You can add fields without any problem. Let's add the field 'label' to our collection table.

ALTER TABLE collection ADD COLUMN label VARCHAR(30);

If you quickly do a DESCRIBE collection; you'll see our new field down at the bottom ready to go. As I mentioned, adding fields is not a problem technically. The only thing you have to keep in mind is that you have to fill that empty field.

UPDATE collection SET label = "Capitol" WHERE artist = "Beatles";

The Beatles also released records on their own label Apple, but MySQL can only go so far to help you!

I have also discovered another problem with my table 'collection'. I didn't make the field 'condition' big enough to include the word 'unbelievable'. Now if MySQL is nice enough to give us 255 characters to use, why should I be skimping? I'll just add another 10 characters on to the field 'condition'.

ALTER TABLE collection MODIFY condition VARCHAR(20);

Of course, the adjective 'unbelievable' is rather vague, but I still have room to use 'unbelievably good' or 'unbelievably bad'.

There actually may be a good reason for skimping. If you've got an application for data entry and your users are only going to enter a short explanation in some field, it would be a waste to create a TEXT field for it if you can keep it to under 255 characters and used a VARCHAR. MySQL will give you better performance. Of course, if there's any chance that you will need more space, it is best to aim high.
User Management

Root isn't the only one who can use MySQL. You can also give other users certain privileges for databases and tables. To to this, open a MySQL shell and then go to the database named mysql and type: USE mysql. In this database, you'll find a table called 'user'. If you type DESCRIBE user you'll see the lists of fields in the table. Most of them are ENUM types and are the privileges you can give somebody to use MySQL. Let's say I wanted to give some other user the ability to do most anything with my album database, first, I'd have to enter this person into this table as a user.

INSERT INTO user VALUES('localhost','stan', PASSWORD('77JyC8'),'Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');

The 'Y's correspond to the privileges available to users. In this example, we've given the user 'stan' the ability to do anything. You may not want to give him that much freedom, so you may want to add an 'N' in there for DROP privileges (Y number 6), for example. It's your call if you've got root access to MySQL. Once you have given a user the rights you deem appropriate, you need invoke the following command to reset the privilege system:

FLUSH PRIVILEGES;

Now we can give him access on our album database
GRANT ALL ON album.* TO stan@localhost IDENTIFIED BY '77JyC8';

From now on the user 'stan' will be able to fire up a MySQL shell and do the what he's allowed to with any the album database's tables.

Pengertian Kernel pada Linux

Kernel adalah perangkat lunak yang menyediakan akses aman ke perangkat keras komputer sebagai respon terhadap permintaan progam-program di atasnya. Hal ini memungkinkan pengguna komputer cukup bekerja dengan perangkat lunak yang diperlukan, tidak harus melakukan akses langsung ke perangkat keras. Di atas kernel terdapat program yang disebut shell. Shell adalah sebuah program yang menyediakan antarmuka (interface) ke berbagai macam fungsi dan layanan yang disediakan sistem operasi. Shell juga merupakan lapisan paling luar dari antarmuka di antara pengguna dan sistem operasi. Di Linux tersedia beberapa macam shell, di antaranya yang populer: Born Again Shell (bash) Bourne Shell (sh) C Shell (csh) Korn Shell (ksh) Pada saat bekerja dengan Linux, pengguna mengetikkan perintah lewat shell. Fasilitas yang disediakan oleh shell, seperti redireksi, pipe, penanganan pekerjaan (job), pengelolaan variabel sistem, membantu pengguna dalam menjalankan program-program yang tersedia di Linux Cara instalasi Linux RedHat 9.0 Persiapan Instalasi Beberapa hal yang patut anda catat sebelum memulai instalasi adalah : 1. siapkan PC yang memungkinkan untuk menginstal linux 2. siapkan CD instalasi Linux yang akan anda instal Memulai Instalasi 1. Setting BIOS pada komputer, agar booting pertama dari CD-Drive. 2. Masukkan Disk ke 1 dari 3 CD Red Hat ke dalam CD-Drive. Tunggu beberapa saat hingga tampil pilihan untuk memulai instalatasi Red Hat tersebut | tekan tombol Enter. 3. Tunggu beberapa saat akan muncul pilihan bahasa selama proses instalasi 4. Klik tombol Next. Kemudian akan tampil jendela pilihan untuk keyboard. 5. Klik tombol Next. Kemudian akan tampil jendela pilihan untuk mouse, klik sesuai dengan mouse yang digunakan. 6. Klik tombol Next. Kemudian akan tampil jendela pilihan untuk upgrade atau install 7. Pilih Perform a New Red Hat Linux Installation, Kemudian klik tombol Next. 8. Tentukan pilihan untuk instalasi yang diinginkan, klik Next 1 Personal Desktop Aplikasi offices dan Multimedia 1.8 GB 2 Workstation Komputer kerja untuk jaringan dan developer/ programmer. 2.1 GB 3 Server Komputer sebagai server dengan aplikasinya 1.5 GB – 4.85 GB 4 Custom Menentukan sendiri paket sesuai kebutuhan 500 MB – 4.85 GB 9. Pilih bentuk partisi yang diinginkan : Automatically Partition atau Manually Partition with Disk Druid *) Membuat tiga partisi, masing-masing untuk windows, linux dan data. Sehingga jika anda ingin menghapus/ uninstal Linux atau Windows, data-data penting anda tidak turut hilang. *) Didalam sebuah Harddisk terdapat konsep partisi yang terdiri dari Partisi Primary, Partisi Extended dan Partisi Logical. Didalam partisi primary terdapat Master Boot Record (MBR) untuk melakukan proses boot loader dari suatu sistem operasi. 10. Pilih Manually Partition with Disk Druid untuk membuat partisi Linux, dan secara default, Anda cukup untuk membuat partisi : 1 . /boot ———-> EXT3 / Linux Native ——-> 100 MB 2 . / ————–>EXT3 / Linux Native ——–>4000 MB 3 . swap ———–>Swap ————->2 x jumlah memori yang terpasang pada komputer Pilih tombol NEW pada kotak dialog Partitioning. Lalu isikan di kolom Mount Point “ / ”. Untuk file system, pilih Linux Native. Isikan kolom size sisa dari hardisk anda yang masih kosong. Lalu pilih OK kemudian pilih Next. 11. Setelah selesai pembuatan partisi maka akan ditampilkan konfigurasi untuk boot loader Lalu pilih Next 12. Jika anda berencana menghubungkan komputer ke jaringan, isikan data yang diminta. Jika tidak biarkan kosong. Pilih Next. 13. Kemudian muncul kotak konfigurasi firewall. Biarkan kosong jika anda tidak menghubungkan komputer dengan jaringan. 14. Pilih Next ,kemudian akan muncul tampilan yang meminta anda mengisikan jenis bahasa yang akan digunakan oleh RedHat nantinya. 15. Pilih Next untuk melanjutkan. Sehingga tampil setting waktu. 16. Pilih Next untuk melanjutkan. Masukkan Password untuk root, yang merupakan super user. Klik tombol Next dan tombol Next kembali. 17. Tentukan paket-paket apa saja yang akan di Install. Ada beberapa group paket diantaranya seperti Desktop, Application, Server. Kemudian klik Next 18. Tunggu beberapa saat hingga proses instalasi paket yang telah dipilih selesai semuanya. 19. Kemudian akan tampil kotak dialog untuk membuat boot system untuk disket, masukkan disket pada drive A, kemudian klik tombol Next. 20. Setelah selesai pembuatan disket boot, kemudian akan tampil kotak dialog untuk menentukan jenis Berikutnya installer akan meminta anda memilih konfigurasi Video Card. Umumnya, installer mengenali jenis video card yang ada. Dan juga anda diminta memilih jumlah RAM video card tersebut. 21. Klik Next untuk menentukan jenis monitor yang digunakan dan resolusi yang diinginkan. 22. Setelah anda memasukan dengan benar, maka selesai sudah instalasi Linux RedHat 9.0.

MENGAPA BELAJAR LINUX? APA MANFAATNYA BAGI SAYA?


“Saya sudah memiliki windows 2000 dan xp yang berjalan dengan stabil namun itu ternyata cukup sulit lalu mengapa saya perlu mengetahui linux?”
            Ada beberapa alasan. Pertama, linux dapat melakukan banyak hal yang diperlukan oleh network anda dan sebagai tambahan, linux bisa melakukan beberapa hal tersebut lebih baik dibandingkan oleh semua system operasi Microsoft. Kedua, meskipun andaikata keduanya sama baiknya dalam fungsionalitas, anda bisa memperoleh sebanyak mungkin copy linux sesuai keinginan anda, dengan gratis pula.
            Dan jangan lupa ada kemungkinan bahwa suatu saat nanti bos anda akan dating dan bertanya kepada anda tentang linux beberapa koleganya mengatakan bahwa linux bekerja dengan baik, mengapa kita tidak menggunakan keajaiban software modern ini? Mengetahui tentang linux mungkin akan mempersiapkan anda untuk menjawab pertanyaan mengapa linux bukan jawaban bagi anda, atau memungkinkan anda untuk menjelaskan bahwa Ya, linux akan berguna, begini caranya, dan inilah yang akan anda perlukan dalam hal sumber daya untuk mewujudkannya. Dan jika bos anda menerima penjelasan anda, maka akan membantu jika anda mengetahui bagaimana membuat NT dan linux bekerja sama.
            Selain itu, linux merupakan sebuah alat yang murah untuk mempelajari banyak keahlian yang tidak bergantung pada system operasi.