Trước tiên bạn phải hiểu cơ cấu của 1 forum vbb. Nó gồm có 2 thành phần : mã nguồn VBB và Database. Mã nguồn VBB được thiết lập kết nối tới Database (còn được gọi là cơ sở dữ liệu). Trong 2 thành phần này thì cái Database quan trọng nhất, nó chứa mọi thông tin web site của bạn. Hiểu nôm na nó như cái HDD, cái mã nguồn VBB là các thành phần còn lại, HDD đem đi máy nào cũng được, thông tin còn nguyên xi, còn cái vỏ ko thích cái này thì thay cái khác
Bạn cần những gì :
1 hosting và tạo sẵn 1 Database trong đó
1 bản mã VBB
Chú ý: nếu ko có hosting thì bạn có thể cài đặt ngay trên localhost, nghĩa là cái ngay trên máy của mình với phần mềm giả lập hỗ trợ. Khuyến cáo cho các bạn chưa có kinh nghiệm là chạy trên localhost cho khoẻ.
Hướng dẫn giả lập Server để cài trên localhost
1. Giả lập Server
Có nhiều chương trình làm chức năng này, cách dùng gần như tương tự nhau VD như : EasyPHP, Xampp, Wamp5, AppServ. Ở đây tôi minh hoạ bài viết với AppServ, bạn có thể vào trang chủ tải phiên bản mới nhất : http://www.appservnetwork.com/
A. Cài đặt AppServ
Chạy tập tin cài đặt Appserv, màn hình cài đặt hiện ra như bên dưới:
Sau khi ấn Next
hi kết thúc Quá trình cài đặt bạn tạo được một Server ảo để chạy web PHP.
Lưu ý, với cài đặt mặc định:
- C:\AppServ\www là địa chỉ webroot, nơi copy các file php vào đây
B. Sử dụng và tạo database
Bạn sẽ có thư mục tương tự trên host public_html mặc định là C:\AppServ\www là địa chỉ webroot, nơi copy các file php vào đây
Mở trình duyệt web đánh đị chỉ http://localhost
Bạn vào dòng phpMyAdmin Database Manager Version 2.9.0.2 để vào quản lý, tạo database
Khi đó nó ra một thông báo bắt ta đăng nhập bạn đặng nhập với User Names , pass là Server name/pass khi bạn cài đặt ( của tôi User name : root , Pass : 123456 ) (Chú ý nếu quên thì bạn gở cài đặt Apache rồi cài đặt lại )
Cách tạo Database
Khi đăng nhập thành công mở ra PHPAdmin bạn tạo Data mới ở mục Create new database bạn điền tên Data cần tạo vào đây rồi nhấn nút Create để tạo (Các mục khác không thay đổi )
Ok bạn đã tạo thành công một data với các thông số sau : ( lấy VD của mỳnk )
CÀI ĐẶT VBB
Bạn cần biết là : C:\AppServ\www là địa chỉ webroot nghĩa là khi bạn gõ locahost trên trình duyệt thì nó truy cập tới thư mục này
Bạn cần 1 source VBB ( tải tại đây )
Tải về giải nén, bạn sẽ thấy thư mục có tên là upload. mở theo đường dẫn ../upload/including/ tìm file có tên là config.php.new , file này là file thiết lập cực kì quan trọng để liên kết giữa mã nguồn VBB và Database. Rename tên nó lại thành config.php, sau đó mở nó lên = Wordpad bạn sẽ thấy cấu trúc như sau:
[php]/*================================================= =====================*\
|| ################################################## ################## ||
|| # vBulletin 3.0.7 - Licence Number L3207967
|| # ---------------------------------------------------------------- # ||
|| # All PHP code in this file is ©2000-2005 Jelsoft Enterprises Ltd. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| ################################################## ################## ||
\*================================================ ======================*/
/*-------------------------------------------------------*\
| ****** NOTE REGARDING THE VARIABLES IN THIS FILE ****** |
+---------------------------------------------------------+
| If you get any errors while attempting to connect to |
| MySQL, you will need to email your webhost because we |
| cannot tell you the correct values for the variables |
| in this file. |
\*-------------------------------------------------------*/
// ****** DATABASE SERVER NAME ******
// This is the hostname or IP address of the database server.
// It is in the format HOSTORT. If no PORT is specified, 3306 is used.
// If you are unsure of what to put here, leave it at the default value.
$servername = 'localhost';
// ****** DATABASE USERNAME & PASSWORD ******
// This is the username and password you use to access MySQL.
// These must be obtained through your webhost.
$dbusername = 'root';
$dbpassword = '';
// ****** DATABASE NAME ******
// This is the name of the database where your vBulletin will be located.
// This must be created by your webhost.
$dbname = 'forum';
// ****** TECHNICAL EMAIL ADDRESS ******
// If any database errors occur, they will be emailed to the address specified here.
// Leave this blank to not send any emails when there is a database error.
$technicalemail = 'dbmaster@example.com';
// ****** PERSISTENT CONNECTIONS ******
// This option allows you to turn persistent connections to MySQL on or off.
// The difference in performance is negligible for all but the largest boards.
// If you are unsure what this should be, leave it off.
// 0 = Off; 1 = On
$usepconnect = 0;
// ****** PATH TO ADMIN & MODERATOR CONTROL PANELS ******
// This setting allows you to change the name of the folders that the admin and
// moderator control panels reside in. You may wish to do this for security purposes.
// Please note that if you change the name of the directory here, you will still need
// to manually change the name of the directory on the server.
$admincpdir = 'admincp';
$modcpdir = 'modcp';
// ****** USERS WITH ADMIN LOG VIEWING PERMISSIONS ******
// The users specified here will be allowed to view the admin log in the control panel.
// Users must be specified by *ID number* here. To obtain a user's ID number,
// view their profile via the control panel. If this is a new installation, leave
// the first user created will have a user ID of 1. Seperate each userid with a comma.
$canviewadminlog = '1';
// ****** USERS WITH ADMIN LOG PRUNING PERMISSIONS ******
// The users specified here will be allowed to remove ("prune") entries from the admin
// log. See the above entry for more information on the format.
$canpruneadminlog = '1';
// ****** USERS WITH QUERY RUNNING PERMISSIONS ******
// The users specified here will be allowed to run queries from the control panel.
// See the above entries for more information on the format.
// Please note that the ability to run queries is quite powerful. You may wish
// to remove all user IDs from this list for security reasons.
$canrunqueries = '';
// ****** UNDELETABLE / UNALTERABLE USERS ******
// The users specified here will not be deletable or alterable from the control panel by any users.
// To specify more than one user, separate userids with commas.
$undeletableusers = '';
// ****** SUPER ADMINISTRATORS ******
// The users specified below will have permission to access the administrator permissions
// page, which controls the permissions of other administrators
$superadministrators = '';
// Prefix that your vBulletin tables have in the database.
// For example: $tableprefix = 'vb3_';
$tableprefix = '';
// Prefix that all vBulletin cookies will have
// For example
$cookieprefix = 'bb';
/*================================================= =====================*\
|| ################################################## ##################
|| # Downloaded: 13:29, Sat Feb 19th 2005
|| # CVS: $RCSfile: config.php.new,v $ - $Revision: 1.19 $
|| ################################################## ##################
\*================================================ ======================*/
?>[/php]Bạn chỉ cần chú ý các mục quan trọng sau :
Rename thư mục upload thành forum, sau đó copy vào www ở trên.
Chú ý: tên này ko quan trọng, rename tùy ý. Nó là link tới trang web của bạn. Sau khi cài đặt thì liên kết tới trang vbb sẽ là http://localhost/tên_folder (trong trường hợp này là http://localhost/forum )
Tiến hành cài đặt
Trên trình duyệt gõ http://localhost/forum/install/install.php.
Giao diện cài đặt VBB hiện ra, bạn chỉ việc Next liên tục, chỉ cần chú ý bước tạo tài khoản Admin quản trị (bước 13 - 14). OK. Cuối cùng là xóa thư mục install trong thư mục forum nữa là xong.
Bây giờ bạn có thể truy cập tới trang Web với link : http://localhost/forum
Nguồn: www.vietvbb.vn
Xong Rùi, Mệt Wé, Chúc Céc Bạn Thành CÔng Hỳhỳ Có GỲ Thắc Mắc Gửi Zô Góp Ý Thắc Mắc Nhá, Nếu Mún Tìm Kiếm Thủ Thuật VBB Tkỳ Zô Ckỗ Thủ Thuật VBB Nhé. Chúc Các Bạn Thành CÔng.
Bạn cần những gì :
1 hosting và tạo sẵn 1 Database trong đó
1 bản mã VBB
Chú ý: nếu ko có hosting thì bạn có thể cài đặt ngay trên localhost, nghĩa là cái ngay trên máy của mình với phần mềm giả lập hỗ trợ. Khuyến cáo cho các bạn chưa có kinh nghiệm là chạy trên localhost cho khoẻ.
Hướng dẫn giả lập Server để cài trên localhost
1. Giả lập Server
Có nhiều chương trình làm chức năng này, cách dùng gần như tương tự nhau VD như : EasyPHP, Xampp, Wamp5, AppServ. Ở đây tôi minh hoạ bài viết với AppServ, bạn có thể vào trang chủ tải phiên bản mới nhất : http://www.appservnetwork.com/
A. Cài đặt AppServ
Chạy tập tin cài đặt Appserv, màn hình cài đặt hiện ra như bên dưới:
Sau khi ấn Next
hi kết thúc Quá trình cài đặt bạn tạo được một Server ảo để chạy web PHP.
Lưu ý, với cài đặt mặc định:
- C:\AppServ\www là địa chỉ webroot, nơi copy các file php vào đây
B. Sử dụng và tạo database
Bạn sẽ có thư mục tương tự trên host public_html mặc định là C:\AppServ\www là địa chỉ webroot, nơi copy các file php vào đây
Mở trình duyệt web đánh đị chỉ http://localhost
Bạn vào dòng phpMyAdmin Database Manager Version 2.9.0.2 để vào quản lý, tạo database
Khi đó nó ra một thông báo bắt ta đăng nhập bạn đặng nhập với User Names , pass là Server name/pass khi bạn cài đặt ( của tôi User name : root , Pass : 123456 ) (Chú ý nếu quên thì bạn gở cài đặt Apache rồi cài đặt lại )
Cách tạo Database
Khi đăng nhập thành công mở ra PHPAdmin bạn tạo Data mới ở mục Create new database bạn điền tên Data cần tạo vào đây rồi nhấn nút Create để tạo (Các mục khác không thay đổi )
Ok bạn đã tạo thành công một data với các thông số sau : ( lấy VD của mỳnk )
- Code:
Servername: localhost
Dataname : forums
Username : root
Passuser: 123456
CÀI ĐẶT VBB
Bạn cần biết là : C:\AppServ\www là địa chỉ webroot nghĩa là khi bạn gõ locahost trên trình duyệt thì nó truy cập tới thư mục này
Bạn cần 1 source VBB ( tải tại đây )
Tải về giải nén, bạn sẽ thấy thư mục có tên là upload. mở theo đường dẫn ../upload/including/ tìm file có tên là config.php.new , file này là file thiết lập cực kì quan trọng để liên kết giữa mã nguồn VBB và Database. Rename tên nó lại thành config.php, sau đó mở nó lên = Wordpad bạn sẽ thấy cấu trúc như sau:
[php]/*================================================= =====================*\
|| ################################################## ################## ||
|| # vBulletin 3.0.7 - Licence Number L3207967
|| # ---------------------------------------------------------------- # ||
|| # All PHP code in this file is ©2000-2005 Jelsoft Enterprises Ltd. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| ################################################## ################## ||
\*================================================ ======================*/
/*-------------------------------------------------------*\
| ****** NOTE REGARDING THE VARIABLES IN THIS FILE ****** |
+---------------------------------------------------------+
| If you get any errors while attempting to connect to |
| MySQL, you will need to email your webhost because we |
| cannot tell you the correct values for the variables |
| in this file. |
\*-------------------------------------------------------*/
// ****** DATABASE SERVER NAME ******
// This is the hostname or IP address of the database server.
// It is in the format HOSTORT. If no PORT is specified, 3306 is used.
// If you are unsure of what to put here, leave it at the default value.
$servername = 'localhost';
// ****** DATABASE USERNAME & PASSWORD ******
// This is the username and password you use to access MySQL.
// These must be obtained through your webhost.
$dbusername = 'root';
$dbpassword = '';
// ****** DATABASE NAME ******
// This is the name of the database where your vBulletin will be located.
// This must be created by your webhost.
$dbname = 'forum';
// ****** TECHNICAL EMAIL ADDRESS ******
// If any database errors occur, they will be emailed to the address specified here.
// Leave this blank to not send any emails when there is a database error.
$technicalemail = 'dbmaster@example.com';
// ****** PERSISTENT CONNECTIONS ******
// This option allows you to turn persistent connections to MySQL on or off.
// The difference in performance is negligible for all but the largest boards.
// If you are unsure what this should be, leave it off.
// 0 = Off; 1 = On
$usepconnect = 0;
// ****** PATH TO ADMIN & MODERATOR CONTROL PANELS ******
// This setting allows you to change the name of the folders that the admin and
// moderator control panels reside in. You may wish to do this for security purposes.
// Please note that if you change the name of the directory here, you will still need
// to manually change the name of the directory on the server.
$admincpdir = 'admincp';
$modcpdir = 'modcp';
// ****** USERS WITH ADMIN LOG VIEWING PERMISSIONS ******
// The users specified here will be allowed to view the admin log in the control panel.
// Users must be specified by *ID number* here. To obtain a user's ID number,
// view their profile via the control panel. If this is a new installation, leave
// the first user created will have a user ID of 1. Seperate each userid with a comma.
$canviewadminlog = '1';
// ****** USERS WITH ADMIN LOG PRUNING PERMISSIONS ******
// The users specified here will be allowed to remove ("prune") entries from the admin
// log. See the above entry for more information on the format.
$canpruneadminlog = '1';
// ****** USERS WITH QUERY RUNNING PERMISSIONS ******
// The users specified here will be allowed to run queries from the control panel.
// See the above entries for more information on the format.
// Please note that the ability to run queries is quite powerful. You may wish
// to remove all user IDs from this list for security reasons.
$canrunqueries = '';
// ****** UNDELETABLE / UNALTERABLE USERS ******
// The users specified here will not be deletable or alterable from the control panel by any users.
// To specify more than one user, separate userids with commas.
$undeletableusers = '';
// ****** SUPER ADMINISTRATORS ******
// The users specified below will have permission to access the administrator permissions
// page, which controls the permissions of other administrators
$superadministrators = '';
// Prefix that your vBulletin tables have in the database.
// For example: $tableprefix = 'vb3_';
$tableprefix = '';
// Prefix that all vBulletin cookies will have
// For example
$cookieprefix = 'bb';
/*================================================= =====================*\
|| ################################################## ##################
|| # Downloaded: 13:29, Sat Feb 19th 2005
|| # CVS: $RCSfile: config.php.new,v $ - $Revision: 1.19 $
|| ################################################## ##################
\*================================================ ======================*/
?>[/php]Bạn chỉ cần chú ý các mục quan trọng sau :
- Code:
$servername = 'localhost';
$dbname = ‘forum’;
$dbusername = 'root';
$dbpassword = ‘’;
- Code:
$servername = 'localhost';
$dbname = ‘forums’;
$dbusername = 'root';
$dbpassword = ‘123456’;
Rename thư mục upload thành forum, sau đó copy vào www ở trên.
Chú ý: tên này ko quan trọng, rename tùy ý. Nó là link tới trang web của bạn. Sau khi cài đặt thì liên kết tới trang vbb sẽ là http://localhost/tên_folder (trong trường hợp này là http://localhost/forum )
Tiến hành cài đặt
Trên trình duyệt gõ http://localhost/forum/install/install.php.
Giao diện cài đặt VBB hiện ra, bạn chỉ việc Next liên tục, chỉ cần chú ý bước tạo tài khoản Admin quản trị (bước 13 - 14). OK. Cuối cùng là xóa thư mục install trong thư mục forum nữa là xong.
Bây giờ bạn có thể truy cập tới trang Web với link : http://localhost/forum
Nguồn: www.vietvbb.vn
Xong Rùi, Mệt Wé, Chúc Céc Bạn Thành CÔng Hỳhỳ Có GỲ Thắc Mắc Gửi Zô Góp Ý Thắc Mắc Nhá, Nếu Mún Tìm Kiếm Thủ Thuật VBB Tkỳ Zô Ckỗ Thủ Thuật VBB Nhé. Chúc Các Bạn Thành CÔng.