vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Tutorial: How to run vBulletin onto your PC (https://vborg.vbsupport.ru/showthread.php?t=39482)

TECK 06-04-2002 10:00 PM

Tutorial: How to run vBulletin onto your PC
 
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

TECK 06-05-2002 03:28 PM

If you want to test your installation before you run vBulletin install, create a index.php file with the content:
Code:

<?php phpinfo(); ?>
and place it into your 'htdocs' folder. It will show you the server stats, etc.

Sinecure 06-05-2002 04:46 PM

First off, whos the person who rated this thread 1? It seems someone keeps doing this to Nakkids Threads.

I'd like to thank Nakkid for doing this, he helped me with this yesterday, and its a huge time saver, especially that little extra you gave me nakkid :)

Lesane 06-05-2002 04:52 PM

^- Display Thread Raters: Who rated how? ;)

Great tutorial Nakkid, i'm going into this tomorrow. Again, well done.

Sinecure 06-05-2002 05:07 PM

I'll ask Firefly if we can install it, its a very subtle but usefull hack :)

Darren Lewis 06-05-2002 06:50 PM

Quote:

Originally posted by Sinecure
First off, whos the person who rated this thread 1? It seems someone keeps doing this to Nakkids Threads....
I've noticed this too :rolleyes:

Thanks nakkid for writing this. I've been having some trouble getting Apache 2 and PHP 4.2.1 running correctly.

Darren.

PS I've rated this thread as 5 :)

Mystics 06-05-2002 07:59 PM

Thank you!

I only needed the "PHP Binary INSTALLATION" and it worked perfect http://www.plauder-smilies.de/happy/xyxthumbs.gif

Mystics

Chris M 06-05-2002 08:07 PM

Thank you very much nakkid...

I not only added this to my Favourites, and rated it a 5, but I saved the target too!

Satan

Darren Lewis 06-06-2002 07:19 PM

What is the difference between MySQL and MySQL Max?

TECK 06-06-2002 08:55 PM

mysql-max includes support for Berkeley DB (BDB), InnoDB tables and much more. however, is not needed for intranet on Windows env.
for more info, read here:
http://www.mysql.com/doc/m/y/mysqld-max.html

Brad 06-07-2002 04:16 PM

i got a problem, its not seeing php or perl, but it will disply html pages right when i call them via localhost.


what i get for perl


Quote:

Server error!
Error message:
couldn't create child process: 22503: C:/Network/Apache2/cgi-bin/ubb/cp.cgi
If you think this is a server error, please contact the webmaster
Error 500
localhost
05/15/02 10:40:47
Apache/2.0.36 (Win32)
and the vB install script says i do not have php installed, also phpinfo just comes up as text Oo. i fallowed the directions to the line


edit: forgot to add, that where i updated to XP corp from 2k pro my system folder is c:\winnt

TECK 06-07-2002 04:26 PM

lou, i dont know any configuration related to perl. you need to refer to the manual and add the right modules.
contact UBB for this matter.

regarding PHP, do you have 2 directories:
c:\windows and
c:\winnt ?

if you do, you need to do a clean install of your winXP. i had a similar problem with a customer a while ago. let me know. winNT and winXP dont mix at all. btw, this tutorial was tested so far in 12 pc's and it worked perfectly all the time.

Brad 06-07-2002 04:34 PM

no i just have c:\winnt, i only posted the perl because it was the only error i got, php would just go into html.

TECK 06-07-2002 04:44 PM

the perl modules are not installed by default. you need to configure your server to operate with cgi files also.

did you ran the Vb install? everything is ok? my concern is the VB installation only.

Brad 06-07-2002 04:54 PM

no the vB install will not work because its saying php is not installed, so the install steps cannot work, and the script tells me php is not installed.

TECK 06-07-2002 05:07 PM

i would double check one more time the steps. you missed one, by accident, i'm sure. it happened to me also few times. :)
i know is annoying, but try this. delete and uninstall everything and start from scratch.

another important step is to RESTART Apache, once you did all the install steps. let me know. i hate the fact that you are the only one who have problems. i will try my best to help you.
if you still have probs, please check my profile and contact me on msn. i am online now.

floren :)

Brad 06-07-2002 05:33 PM

i restarted it, i got it working, i just had to reinstall everything over, i think one of the scripts dident come over right, no matter, i got ubb,vb,phpbb,ikonboard,yabb,and postnuke all running now

TECK 06-07-2002 05:49 PM

you rock!! congrats.

Velocd 06-12-2002 06:14 PM

Great tutorial ;) This will defiantly save me time testing hacks, etc. Thnx a ton!

Velocd 06-13-2002 02:49 AM

ARGH!

I just tried to install this and it gave me the same error Anime-loo was experiencing above. I made sure to correct the mistakes he made, and reinstalled the whole thing again, but it still wont work!! 2 hours later and not a damn sign of improvement :(
It keeps telling me, when trying to run http://localhost/forums/admin/install.php, that PHP is not installed. I am running Windows XP Professional and have done everything correctly..to my understanding. Any help?

Brad 06-13-2002 03:09 AM

Quote:

Originally posted by Velocd
ARGH!

I just tried to install this and it gave me the same error Anime-loo was experiencing above. I made sure to correct the mistakes he made, and reinstalled the whole thing again, but it still wont work!! 2 hours later and not a damn sign of improvement :(
It keeps telling me, when trying to run http://localhost/forums/admin/install.php, that PHP is not installed. I am running Windows XP Professional and have done everything correctly..to my understanding. Any help?


make sure you hacked the apache scripts.

Admin 06-13-2002 06:00 AM

Quote:

Originally posted by Anime-loo
make sure you hacked the apache scripts.
lol, Hack Apache scripts. ;P

Brad 06-13-2002 06:22 AM

you know what i mean :p

zachb 06-13-2002 07:45 AM

great tut nakkid! i'm sorry people keep rating your threads badly, i think they are great. i'm gonna rate it a 5. :) thanks again!

eiSecure 06-14-2002 02:47 AM

nakkid, just a thought... phpTriad, a free download, automatically installs and configures (for the most part) Apache, MySQL, and PHP.

It's all in one, easy-to-setup package that will probably make it easier for users without as much technical knowledge.:)

Cheers,
Alex

TECK 06-14-2002 02:53 AM

can we have a url link alex? thanks :)

eiSecure 06-14-2002 02:55 AM

Sure.

Direct Download:
http://download.com.com/redir?pid=64...5-6474268.html

Download.com search results page:
http://download.com.com/3120-20-0.ht...search=+Go%21+


-Alex

TECK 06-14-2002 02:58 AM

also:
http://sourceforge.net/projects/phptriad/

thanks for the tip. :)
however, i think they dont support php421 and the new apache20. correct me if i'm wrong.

Brad 06-14-2002 03:43 AM

id rather do it by hand anyway.

TECK 06-14-2002 03:45 AM

ya. same here. at least i know what options i put in there and customize it the way i want. ;)

Velocd 06-14-2002 05:47 PM

Well after many attempts on trying to get this working with your tutorial Nakkid I just couldn't get it to work, I've been doing everything perfectly. So I uninstalled everything, and I decided to try PhpTriad. And I must say, not only did it work (with 2.2.6), but it was MUCH easier to install ;)

---------------------------------------------------------------------------------

Quick little tutorial on how to get this working with PhpTriad:
1. Install PhpTriad (http://sourceforge.net/projects/phptriad/)
2. Goto C:\apache\mysql\bin\ and run winmysqladmin
3. If it asks you for a username or password, enter (using Nakkid example) root for username and password for the password.
4. Still in winmysqladmin, goto the databases tab, and right click on your computer name, then select create database. Call it vbulletin.
5. Now in C:\apache\htdocs create a folder called forums, then upload all the vbulletin stuff in there.
6. Goto your start menu > PHPtriad > Apache Console > Stop Apache. (this step might now even be needed, but was for me)
7. Now go to start menu > PHPtriad > Apache Console > Start Apache
8. Apache will come up in a window, simply minimize it.
9. Goto http://localhost/forums/admin/install.php, and you're done!

This doesn't require any moving files or file modifications, and didn't give me any errors either ;)
Thanks to eiSecure for providing the info on PHPtriad!

eiSecure 06-14-2002 05:51 PM

Good thing I mentioned it, huh?;)

Velocd 06-14-2002 05:54 PM

you're a life saver ;)
I'm sure there was just something messed up with my system that Nakkid's way wouldn't work, but either way PhpTriad worked perfectly and was much easier to install.

TECK 06-14-2002 08:03 PM

glad to got it up and running. the important thing is that is working right? :)

eiSecure 06-14-2002 08:10 PM

hmm... is there supposed to be a delay when replying to threads by email?:confused:

Velocd 06-14-2002 08:32 PM

I would think that it would be slower than usual replying, although I haven't used that feature yet. How slow of a delay?

eiSecure 06-14-2002 09:24 PM

Let's just say that I replied by email before I posted the post above, and obviousely, it still hasn't shown up yet.:D

Velocd 06-14-2002 09:40 PM

I've got 2 questions to ask ;)

Question: How do you backup/restore a database using an SSH Client like Putty if the database is on your PC? I've tried entering in the hostname field of putty "localhost" and also my IP address but no go, it says cannot make connection. Would I be able to just use phpmyadmin for this, since its on my computer maybe it will be more reliable than using it on the web?

Question 2: I've noticed a small problem trying to register a new user (using phptriad installation method) and thats that you get a apache error. Registering members on a local vbulletin is sorta pointless anyway, but I just wanted to know if this is an error or normal.

Royal 06-15-2002 06:23 PM

after using phptraid i still cant get the thing working

when i go to http://localhost/forums/admin/install.php i get the msg :

Connection refused

--------------------------------------------------------------------------------
Description: Connection refused
--------------------------------------------------------------------------------

and when i open the install.php in IE i get :
You are not running PHP - Please contact your system administrator.


what could be wrong ?? :eek:

Velocd 06-15-2002 08:05 PM

Uninstall everything, make sure you just don't delete the folders, but go into your Windows Control Panel and uninstall PHPTriad (apache, php, mysql) from there.

Now try reinstalling it again only following the steps I have in post #31, no file modification are needed as stated in post #1.

Try this and let me know how it works. Also, what operating system are you using?


All times are GMT. The time now is 03:21 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01675 seconds
  • Memory Usage 1,871KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete