Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles

Reply
 
Thread Tools
Tutorial: How to run vBulletin onto your PC
TECK's Avatar
TECK
Join Date: Nov 2001
Posts: 4,182

 

Canada
Show Printable Version Email this Page Subscription
TECK TECK is offline 06-04-2002, 10:00 PM

This tutorial is [high]vBulletin.org and cPublisher.com copyrighted[/high]. All rights reserved.
Please ask permission in this thread to copy the tutorial. If granted, post a link that points to this page.


This tutorial will teach you how to install Apache, PHP and MySQL binaries in win2K and winXP, in order to install vBulletin directly onto your PC. It's useful because you can run your own board on your PC, to test code hacks, updates, etc before you put them to your live board.

[high]UPDATES:[/high] To receive an email when this tutorial is updated, click here.

[high]TOOLS NEEDED[/high]
- PHP windows .zip package - 4.4MB (for more info, visit www.php.net)
- Apache Server no_ssl .msi binary - 3.2MB (for more info, visit www.apache.org)
- MySQL windows installation files - 13.3MB (for more info, visit www.mysql.com)

[high]NOTE:[/high] The have been some problems with the php4ts.dll library. If you cannot restart your Apache server, download this file and replace your current one, or download latest PHP snap.

[high]PC PREPARATION[/high]
Create a folder called Network in your local disk C: with the following 2 sub-folders:
|--[C:
|----[Network
|------[MySQL
|------[Php


[high]PHP Binary INSTALLATION[/high]
01. Extract the contents of PHP .zip file to C:\Network\Php folder.

02. Copy the 'C:\Network\Php\php.ini-dist' file to your [high]%SYSTEMROOT%[/high] directory (C:\WINDOWS for winXP; C:\WINNT for win2K).
In %SYSTEMROOT% folder, rename php.ini-dist to 'php.ini' and open it.

03. In php.ini, you will need to set the 'doc_root' to point to your web server(apache) document_root, like below:
; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues. The alternate is to use the
; cgi.force_redirect configuration below
doc_root = "c:\network\apache2\htdocs"


04. Still in php.ini, change the 'extension_dir' setting to point to your php-install-dir, like below:
; Directory in which the loadable extensions (modules) reside.
extension_dir = "c:\network\php"


05. Still in php.ini, change the 'mail function' setting to point to your ISP, like below:
[mail function]
; For Win32 only.
SMTP = smtp.myisp.com
; For Win32 only.
sendmail_from = johndoe@myisp.com


06. Save and close the php.ini file.

07. In C:\Network\Php folder, find php4ts.dll file. Move it to the [high]%SYSTEMROOT%\system32[/high] folder.

NOTE: Make sure you MOVE that file, DO NOT copy it only.

[high]Apache Server INSTALLATION[/high]
01. Run the .msi file. Enter the value [high]localhost[/high] for 'Network Domain' and 'Server Name'.

IMPORTANT: Make sure you select a custom setup and install Apache to [high]C:\Network[/high], not to 'C:\Program Files\Apache Group'. It will create automatically the 'Apache2' folder for you. There is no need to install the documentation, it is available online.

02. Go to your Apache conf file (C:\Network\Apache2\conf\httpd.conf) and find:
#LoadModule ssl_module modules/mod_ssl.so

BELOW this, add:
LoadModule php4_module c:/network/php/sapi/php4apache2.dll

03. Still in httpd.conf, find:
AddType application/x-tar .tgz

BELOW this, add:
AddType application/x-httpd-php .php

04. Still in httpd.conf, set the files that Apache will serve if a directory is requested. Find:
DirectoryIndex index.html index.html.var

REPLACE it with:
DirectoryIndex index.php index.html index.php.var index.html.var

05. Save and close the httpd.conf file.

06. Restart Apache Server.

[high]MySQL Binary INSTALLATION[/high]
01. Extract the .zip binary to a temp folder. Run the Setup.exe file.

NOTE: Make sure you browse to [high]C:\Network\MySQL[/high] folder, when you select the install location.

02. Go to C:\Network\MySQL\bin and run the 'winmysqladmin.exe' file. The WinMySQLadmin 1.3 database manager will start.
First, it will ask you to enter a new username and password. Enter the following information:
Username: root
Password: password


Click on OK.

03. Go to Go to C:\Network\MySQL\bin\data folder and create a new folder called vbulletin. That is your database.

04. Open a CMD window and change it's location to your current MySQL /bin folder.

05. Set your Users:
\bin> mysql --user=root mysql
mysql> GRANT ALL PRIVILEGES ON *.* TO monty@localhost
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO monty@'%'
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> GRANT RELOAD,PROCESS ON *.* TO admin@localhost;
mysql> GRANT USAGE ON *.* TO dummy@localhost;


NOTE: There is no need to do all GRANT 3 statements, the first one is more then enough. The other two were presented to you so you learn mode about the GRANT/REVOKE commands.

These GRANT statements set up three new users:
monty
A full superuser who can connect to the server from anywhere, but who must use a password 'some_pass' to do so.
Note that we must issue GRANT statements for both monty@localhost and monty@'%'.
If we don't add the entry with localhost, the anonymous user entry for localhost that is created by mysql_install_db will take precedence when we connect from the local host, because it has a more specific Host field value and thus comes earlier in the user table sort order.

admin
A user who can connect from localhost without a password and who is granted the RELOAD and PROCESS administrative privileges. This allows the user to execute the mysqladmin reload, mysqladmin refresh, and mysqladmin flush-* commands, as well as mysqladmin processlist . No database-related privileges are granted.
(They can be granted later by issuing additional GRANT statements.)

dummy
A user who can connect without a password, but only from the local host.
The global privileges are all set to 'N'?the USAGE privilege type allows you to create a user with no privileges. It is assumed that you will grant database-specific privileges later.

[high]FINAL STEPS[/high]
01. Go to Start > Programs > Startup
Delete the 'Monitor Apache Servers' and 'MySQL Admin' tools. They waist your resources for nothing and are not needed. I personally moved the MySQL Admin tool to another folder, in case I want to create later another database.

02. The C:\Network\Apache2\htdocs folder is your web root. Create there a sub-folder called 'forum'.
You know the rest of VB installation drill... Once you are done, call your forum index.php at:
http://localhost/forum

NOTE: If you experience any cookie problems, add this line to your vBulletin config.php file:
define('USE_COOKIE_WORKAROUND', 1);

That's all. No more uploads needed to test the hacks.
Please post here if you were successful with the localhost installation. It works perfectly for me on winXP.
------------------------------------------------------

BACKUP-RESTORE ON localhost
(See also Velocd's tutorial)

[high]TOOLS NEEDED[/high]
- Open Command Window PowerToy - 0.5MB (for more info, visit Microsoft site)

NOTE: This PowerToy adds an "Open Command Window Here" context menu option on file system folders, giving you a quick way to open a command window (cmd.exe) pointing at the selected folder.

[high]BACKUP PROCEDURE[/high]
01. Create a new folder, called 'C:\sqlback'.

02. Right-click on the [high]C:\Network\MySQL\bin[/high] folder and select 'Open Command Window Here'. A CMD window will open.

NOTE: You can also manually browse to the folder. Click on Start > Run > Type [high]cmd[/high] in the 'Open:' area and hit Enter.
At the CMD prompt, type [high]C:[/high] and hit Enter.
Type [high]cd network[/high] and hit Enter.
Type [high]cd mysql[/high] and hit Enter.
Type [high]cd bin[/high] and hit Enter.

03. At the prompt, type:
mysqldump --opt -u[high]USERNAME[/high] -p[high]PASSWORD[/high] [high]DATABASENAME[/high] > c:/sqlback/bk060502.sql

NOTE: Change the highlighted values with your own. When done, you will see the command prompt.
060502: month date year (easier to remember the last date you backup your database). Change it with the corresponding date of your actual backup.

[high]RESTORE PROCEDURE[/high]
This is useful if you want to import onto your localhost the live forum database.

01. Right-click on the [high]C:\Network\MySQL\bin[/high] folder and select 'Open Command Window Here'.

02. At the prompt, type:
mysql -u[high]USERNAME[/high] -p[high]PASSWORD[/high] [high]DATABASENAME[/high] < c:/sqlback/bk060502.sql

NOTE: Change the highlighted values with your own. When done, you will see the command prompt.
------------------------------------------------------

[high]OTHER TUTORIALS[/high]
- How to make a reliable database backup
- Upgrade your hacked board in less then 30 minutes
Reply With Quote
  #412  
Old 11-24-2003, 08:04 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

someone should make a vB localhost installed (php dev style)
Reply With Quote
  #413  
Old 11-30-2003, 11:06 PM
kill_emma's Avatar
kill_emma kill_emma is offline
 
Join Date: Sep 2003
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you know you use your localhost too much when you:

#1 Reason - You see someone talking about the root account on a thread and believe that they are reffering to you.

:P
Reply With Quote
  #414  
Old 12-01-2003, 01:24 AM
TheAnt TheAnt is offline
 
Join Date: Sep 2003
Location: Iceland
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

or

#2 Reason - You continually try linking people to localhost to view stuff your workin on offline
Reply With Quote
  #415  
Old 12-02-2003, 10:21 PM
kill_emma's Avatar
kill_emma kill_emma is offline
 
Join Date: Sep 2003
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

w00t! i've done both :P ask Steve
Reply With Quote
  #416  
Old 12-09-2003, 02:04 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just installed following the tut with the latest software available for download (php, mysql, etc) and it works perfectly.
Reply With Quote
  #417  
Old 12-12-2003, 06:27 PM
gldtn gldtn is offline
 
Join Date: Apr 2003
Location: US
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Me too Teck , Had a few problems at first, but then I got it working after the 2nd install.

Also, if anyone wants to install phpMyAdmin along with this tutorial.. do the following:

1. Download the lastest [zip] stable version : http://www.phpmyadmin.net
2. Extract the zip file that you just downloaded to 'c:\Network\Apache2\htdocs
3. Rename the folder that you extracted to something easier to remember. I.E MyAdmin
4. Browse to MyAdmin, or whatever you name it on step #3, and locate 'config.inc.php'.
5. Right click it and open it with you favorite editor. *note some editors, such as notepad makes the file messy and hard to read and edit it.. # I use EditPlus, a great text editor.
6. Locate this line > $cfg['PmaAbsoluteUri'] = ''; and in the '', add the url location to where you installed phpMyAdmin. I.E $cfg['PmaAbsoluteUri'] = 'http://localhost/MyAdmin';
7. Still in config.inc.php, locate this line > $cfg['Servers'][$i]['user'] = 'root'; // MySQL user, and replace 'root' with the username you specified during MySQL installation.
8. Again in config.inc.php, edit the line below the one you just edit on step #7 with the password you set for root or whatever username you gave access to.
9. Launch you favorite browser and point it to http://loacalhost/MyAdmin (or whatever you named it to) and you should see phpMyAdmin saying "Welcome to phpMyAdmin".

your done!
Reply With Quote
  #418  
Old 12-18-2003, 10:07 AM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

done that php my admin bit and i just get this
Quote:
<?php
/* $Id: main.php,v 1.146 2003/09/17 13:16:46 nijel Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:

/**
* Don't display the page heading
*/
define('PMA_DISPLAY_HEADING', 0);

/**
* Gets some core libraries and displays a top message if required
*/
if (!defined('PMA_GRAB_GLOBALS_INCLUDED')) {
include('./libraries/grab_globals.lib.php');
}
if (!defined('PMA_COMMON_LIB_INCLUDED')) {
include('./libraries/common.lib.php');
}
// Puts the language to use in a cookie that will expire in 30 days
if (!isset($pma_uri_parts)) {
$pma_uri_parts = parse_url($cfg['PmaAbsoluteUri']);
$cookie_path = substr($pma_uri_parts['path'], 0, strrpos($pma_uri_parts['path'], '/'));
$is_https = (isset($pma_uri_parts['scheme']) && $pma_uri_parts['scheme'] == 'https') ? 1 : 0;
}
setcookie('lang', $lang, time() + 60*60*24*30, $cookie_path, '', $is_https);
// Defines the "item" image depending on text direction
$item_img = 'images/item_' . $text_dir . '.png';
// Handles some variables that may have been sent by the calling script
if (isset($db)) {
unset($db);
}
if (isset($table)) {
unset($table);
}
$show_query = '1';
require('./header.inc.php');
if (isset($message)) {
what did i do wrong?
Reply With Quote
  #419  
Old 12-20-2003, 05:51 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

any help about?
Reply With Quote
  #420  
Old 12-26-2003, 01:16 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i tried to restore my database and nothing happened, any ideas?
Reply With Quote
  #421  
Old 01-10-2004, 02:36 AM
Preech Preech is offline
 
Join Date: Aug 2002
Location: Fort Campbell
Posts: 325
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Step 2) Connect to the database

Attempting to attach to database


Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in C:\Network\Apache2\htdocs\forum\includes\db_mysql. php on line 140

The database has failed to connect because you do not have permission to connect to the server. Please confirm the values entered in the 'includes/config.php' file.
BUT EVERYTHING IS RIGHT

what could I have missed?

if i take out the password I get a totally different error some kind of 1044 error...but if i modify the username and keep a pass it doesnt matter whether or not the information i put in is correct or not i get the same error, i really dont understand what could be wrong...and i dont see anyone else with this error

im running the vb3 rc2

Quote:
// ****** DATABASE SERVER NAME ******
// This is the hostname or IP address of the database server.
// It is in the format HOST:PORT. 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@localhost';
$dbpassword = 'password';

// ****** DATABASE NAME ******
// This is the name of the database where your vBulletin will be located.
// This must be created by your webhost.
$dbname = 'vbulletin';
and there is what i have in config.php currently I have tried about every combination of username and password and i have changed localhost to the IP address of my machine and also the 127.0.0.1...it doesnt matter what i changed it to i can change it to any word and i still get the same error

oooooooooo please help
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:57 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05653 seconds
  • Memory Usage 2,340KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete