Instalasi news

Langkah pertama yang harus kita lakukan adal merubah kofigurasi Apache server kita dan mengaktifkan modul Rewrite URL. Caranya adalah sebagai berikut:

  1. cari file httpd.conf dengan fasilitas search windows. Di komputer penulis letaknya adalah di C:AppServApache2.2conf
  2. edit dengan text editor dan cari #LoadModule rewrite_module modules/mod_rewrite.so
  3. aktifkan dengan cara menghilangkan tanda # sehingga menjadi
    LoadModule rewrite_module modules/mod_rewrite.so
    mod rewrite url
  4. simpan
  5. restart Apache Server dengan cara klik Start | All Programs | AppServ | Control Server by Service | Apache Restart
  6. Tapi lebih baik apabila Anda restart komputer Anda. Caranyanya udah tahu khan???ūüėÄ

Langkah ke dua adalah mengextract file sNews15.zip hasil download ke direktori www di server Anda. Ada kemungkinan Anda harus meletakkan di direktori htdocs apabila anda menggunakan paket instalasi selain AppServ, misalnya XAMPS.
Pada kasus ini penulis menggunakan Appserv yang direktorinya berada di C:AppservwwwsNews15

isi file snews

Langkah ke tiga adalah membuat database untuk CMS kita. Caranya adalah sebagai berikut:

  1. Buka browser dan arahkan ke localhost/phpmyadmin
  2. isi username dan password (user dan password sesuai saat instalasi AppServ)
  3. buat database baru dengan mengisikan nama database dan klik create
    buat database snews
  4. Klik SQL untuk memasukkan kode sql kita.
    klik sql
  5. klik readme.html yang isinya petunjuk instalasi dan sql untuk database kita
  6. Kemudian copy kode sql ini: (lebih baik copy dari file readme.html saja)
    1. CREATE TABLE articles (
    2. id int(11) primary key auto_increment,
    3. title varchar(100) default NULL,
    4. seftitle varchar(100) default NULL,
    5. `text` longtext,
    6. `date` datetime default NULL,
    7. category¬†int(8)¬†NOT¬†NULL¬†default ‘0’,
    8. position int(6) default NULL,
    9. displaytitle¬†char(3)¬†NOT¬†NULL¬†default ‘YES’,
    10. displayinfo¬†char(3)¬†NOT¬†NULL¬†default ‘YES’,
    11. commentable varchar(5) NOT NULL default ,
    12. published¬†int(3)¬†NOT¬†NULL¬†default ‘1’,
    13. description_meta varchar(255) default NULL,
    14. keywords_meta varchar(255) default NULL
    15. );CREATE TABLE categories (
    16. id int(8) primary key auto_increment,
    17. name varchar(100) NOT NULL,
    18. seftitle varchar(100) NOT NULL,
    19. description varchar(255) NOT NULL,
    20. published¬†varchar(4)¬†NOT¬†NULL¬†default ‘YES’,
    21. catorder¬†smallint(6)¬†NOT¬†NULL¬†default ‘0’
    22. );CREATE TABLE comments (
    23. id int(11) primary key auto_increment,
    24. articleid¬†int(11)¬†default ‘0’,
    25. name varchar(50),
    26. url varchar(100) NOT NULL,
    27. comment text,
    28. time¬†datetime¬†NOT¬†NULL¬†default ‘0000-00-00¬†00:00:00’,
    29. approved¬†varchar(5)¬†NOT¬†NULL¬†default ‘True’
    30. );CREATE TABLE settings (
    31. id int(8) primary key auto_increment,
    32. name varchar(20) NOT NULL,
    33. `value` varchar(60) NOT NULL
    34. );¬†¬†INSERT¬†INTO¬†settings¬†VALUES¬†(1,¬†‘website_title’, ‘sNews¬†1.5’);
    35. INSERT¬†INTO¬†settings¬†VALUES¬†(2,¬†‘home_sef’, ‘home’);
    36. INSERT¬†INTO¬†settings¬†VALUES¬†(3,¬†‘website_description’, ‘sNews¬†CMS’);
    37. INSERT¬†INTO¬†settings¬†VALUES¬†(4,¬†‘website_keywords’, ‘new,¬†site,¬†snews’);
    38. INSERT¬†INTO¬†settings¬†VALUES¬†(5,¬†‘website_email’, ‘info@mydomain.com’);
    39. INSERT¬†INTO¬†settings¬†VALUES¬†(6,¬†‘contact_subject’, ‘Contact¬†Form’);
    40. INSERT¬†INTO¬†settings¬†VALUES¬†(7,¬†‘language’, ‘EN’);
    41. INSERT¬†INTO¬†settings¬†VALUES¬†(8,¬†‘charset’, ‘UTF-8’);
    42. INSERT¬†INTO¬†settings¬†VALUES¬†(9,¬†‘date_format’, ‘d.m.Y.¬†H:i’);
    43. INSERT¬†INTO¬†settings¬†VALUES¬†(10,¬†‘article_limit’, ‘3’);
    44. INSERT¬†INTO¬†settings¬†VALUES¬†(11,¬†‘rss_limit’, ‘5’);
    45. INSERT¬†INTO¬†settings¬†VALUES¬†(12,¬†‘display_page’, );
    46. INSERT¬†INTO¬†settings¬†VALUES¬†(13,¬†‘display_new_on_home’, );
    47. INSERT¬†INTO¬†settings¬†VALUES¬†(14,¬†‘display_pagination’, );
    48. INSERT¬†INTO¬†settings¬†VALUES¬†(15,¬†‘num_categories’, ‘on’);
    49. INSERT¬†INTO¬†settings¬†VALUES¬†(16,¬†‘approve_comments’, );
    50. INSERT¬†INTO¬†settings¬†VALUES¬†(17,¬†‘comments_order’, ‘ASC’);
    51. INSERT¬†INTO¬†settings¬†VALUES¬†(18,¬†‘comment_limit’, ’30’);
    52. INSERT¬†INTO¬†settings¬†VALUES¬†(19,¬†‘word_filter_enable’, );
    53. INSERT¬†INTO¬†settings¬†VALUES¬†(20,¬†‘word_filter_file’, );
    54. INSERT¬†INTO¬†settings¬†VALUES¬†(21,¬†‘word_filter_change’, );
    55. INSERT¬†INTO¬†settings¬†VALUES¬†(22,¬†‘username’, ‘098f6bcd4621d373cade4e832627b4f6’);
    56. INSERT¬†INTO¬†settings¬†VALUES¬†(23,¬†‘password’, ‘098f6bcd4621d373cade4e832627b4f6’);

    CREATE TABLE articles ( id int(11) primary key auto_increment, title varchar(100) default NULL, seftitle varchar(100) default NULL, `text` longtext, `date` datetime default NULL, category int(8) NOT NULL default ‘0’, position int(6) default NULL, displaytitle char(3) NOT NULL default ‘YES’, displayinfo char(3) NOT NULL default ‘YES’, commentable varchar(5) NOT NULL default ”, published int(3) NOT NULL default ‘1’, description_meta varchar(255) default NULL, keywords_meta varchar(255) default NULL );CREATE TABLE categories ( id int(8) primary key auto_increment, name varchar(100) NOT NULL, seftitle varchar(100) NOT NULL, description varchar(255) NOT NULL, published varchar(4) NOT NULL default ‘YES’, catorder smallint(6) NOT NULL default ‘0’ );CREATE TABLE comments ( id int(11) primary key auto_increment, articleid int(11) default ‘0’, name varchar(50), url varchar(100) NOT NULL, comment text, time datetime NOT NULL default ‘0000-00-00 00:00:00’, approved varchar(5) NOT NULL default ‘True’ );CREATE TABLE settings ( id int(8) primary key auto_increment, name varchar(20) NOT NULL, `value` varchar(60) NOT NULL ); INSERT INTO settings VALUES (1, ‘website_title’, ‘sNews 1.5’); INSERT INTO settings VALUES (2, ‘home_sef’, ‘home’); INSERT INTO settings VALUES (3, ‘website_description’, ‘sNews CMS’); INSERT INTO settings VALUES (4, ‘website_keywords’, ‘new, site, snews’); INSERT INTO settings VALUES (5, ‘website_email’, ‘info@mydomain.com’); INSERT INTO settings VALUES (6, ‘contact_subject’, ‘Contact Form’); INSERT INTO settings VALUES (7, ‘language’, ‘EN’); INSERT INTO settings VALUES (8, ‘charset’, ‘UTF-8’); INSERT INTO settings VALUES (9, ‘date_format’, ‘d.m.Y. H:i’); INSERT INTO settings VALUES (10, ‘article_limit’, ‘3’); INSERT INTO settings VALUES (11, ‘rss_limit’, ‘5’); INSERT INTO settings VALUES (12, ‘display_page’, ”); INSERT INTO settings VALUES (13, ‘display_new_on_home’, ”); INSERT INTO settings VALUES (14, ‘display_pagination’, ”); INSERT INTO settings VALUES (15, ‘num_categories’, ‘on’); INSERT INTO settings VALUES (16, ‘approve_comments’, ”); INSERT INTO settings VALUES (17, ‘comments_order’, ‘ASC’); INSERT INTO settings VALUES (18, ‘comment_limit’, ’30’); INSERT INTO settings VALUES (19, ‘word_filter_enable’, ”); INSERT INTO settings VALUES (20, ‘word_filter_file’, ”); INSERT INTO settings VALUES (21, ‘word_filter_change’, ”); INSERT INTO settings VALUES (22, ‘username’, ‘098f6bcd4621d373cade4e832627b4f6’); INSERT INTO settings VALUES (23, ‘password’, ‘098f6bcd4621d373cade4e832627b4f6’);

  7. Paste di phpMyAdmin.
    run query sql sNews
  8. Klik Go
  9. Setelah proses selesai maka database Anda sudah siap.

Langkah ke empat adalah mengubah konfigurasi CMS kita. Letaknya di file snews.php. Langkah-langkahnya adalah sebagai berikut:

  1. Buka file snews.php di text editor kita
  2. Cari kode berikut dan ubah sesuai konfigurasi server kita
    1. // DATABASE VARIABLES
    2. function db($variable) {
    3. $db = array();
    4. $db[‘website’]¬†= http://localhost/sNews15/’;
    5. $db[‘dbhost’]¬†= ‘localhost’; //MySQL¬†Host
    6. $db[‘dbname’]¬†= ‘snews’; //Database¬†Name
    7. $db[‘dbuname’]¬†= ‘username’; //Database¬†Username
    8. $db[‘dbpass’]¬†= ‘password’; //Database¬†password
    9. $db[‘prefix’]¬†= ; //Database¬†prefix
    10. $db[‘dberror’]¬†=¬†‘<strong>There¬†was¬†an¬†error while connecting¬†to¬†the¬†database.</strong>¬†<br¬†/>
    11. Check¬†your¬†database¬†settings.’;¬†//Database¬†error¬†message
    12. # session fingerprint password (hardcoded variant)
    13. $db[‘secretWord’]¬†= ‘my_secret_word’; //¬†Default¬†session¬†password¬†(make¬†it¬†hard¬†to¬†guess¬†and¬†change¬†it¬†often)
    14. return $db[$variable];
    15. }

    // DATABASE VARIABLES function db($variable) { $db = array(); $db[‘website’] = ‘http://localhost/sNews15/&#8217;; $db[‘dbhost’] = ‘localhost’; //MySQL Host $db[‘dbname’] = ‘snews’; //Database Name $db[‘dbuname’] = ‘username’; //Database Username $db[‘dbpass’] = ‘password’; //Database password $db[‘prefix’] = ”; //Database prefix $db[‘dberror’] = ‘<strong>There was an error while connecting to the database.</strong> <br /> Check your database settings.’; //Database error message # session fingerprint password (hardcoded variant) $db[‘secretWord’] = ‘my_secret_word’; // Default session password (make it hard to guess and change it often) return $db[$variable]; }

  3. Untuk kasus kita, kita ubah sebagai berikut:
    1. // DATABASE VARIABLES
    2. function db($variable) {
    3. $db = array();
    4. $db[‘website’]¬†= http://localhost/sNews15/&#8217;;
    5. $db[‘dbhost’]¬†= ‘localhost’; //MySQL¬†Host
    6. $db[‘dbname’]¬†= ‘snews15’; //Database¬†Name
    7. $db[‘dbuname’]¬†= ‘root’; //Database¬†Username
    8. $db[‘dbpass’]¬†= ‘passwordku’; //Database¬†password
    9. $db[‘prefix’]¬†= ; //Database¬†prefix
    10. $db[‘dberror’]¬†= ‘<strong>There¬†was¬†an¬†error¬†while¬†connecting¬†to¬†the¬†database.</strong>¬†<br¬†/>¬†Check¬†your¬†database¬†settings.’; //Database¬†error¬†message
    11. # session fingerprint password (hardcoded variant)
    12. $db[‘secretWord’]¬†= ‘terserah_aja’; //¬†Default¬†session¬†password¬†(make¬†it¬†hard¬†to¬†guess¬†and¬†change¬†it¬†often)
    13. return $db[$variable];
    14. }

    // DATABASE VARIABLES function db($variable) { $db = array(); $db[‘website’] = ‘http://localhost/sNews15/&#8217;; $db[‘dbhost’] = ‘localhost’; //MySQL Host $db[‘dbname’] = ‘snews15’; //Database Name $db[‘dbuname’] = ‘root’; //Database Username $db[‘dbpass’] = ‘passwordku’; //Database password $db[‘prefix’] = ”; //Database prefix $db[‘dberror’] = ‘<strong>There was an error while connecting to the database.</strong> <br /> Check your database settings.’; //Database error message # session fingerprint password (hardcoded variant) $db[‘secretWord’] = ‘terserah_aja’; // Default session password (make it hard to guess and change it often) return $db[$variable]; }

  4. jangan lupa kasih tanda “/” sesudah alamat website kita

    $db[‘website’] = ‘http://localhost/sNews15/&#8217;;

  5. Setelah diubah, simpan.
  6. CMS kita siap dicoba

Langkah ke lima; mencoba CMS kita

  1. Buka browser kita, misalnya Internet Explorer.
  2. Ketik alamat CMS kita: localhost/snews15
  3. Tekan enter dan upz….. ternyata begini tampilannya di Internet Explorer
    internet explorer error
  4. jangan panik dulu, mungkin IEnya yang error seperti punya penulis.
  5. Coba browser lain, misalnya Opera atau Mozilla Firefox
  6. Ternyata tidak ada masalah. Dan muncul tampilan sederhana Snews1.5
    snews 1.5 di Opera 9.10
  7. Apabila muncul peringatan seperti ini:
    There was an error while connecting to the database.
    Check your database settings.

    berarti konfigurasi Anda belum benar, dan edit lagi.
  8. Klik login kemudian isikan
    Username: test
    Password: test
    dan hasil penjumlahan 2 integer
  9. Masuk ke halaman Admin

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s