Greg
04-05-2004, 09:59 PM
These instructions are an example of setting up a linux box at home to host a copy of your bulletin board for testing. The test was done on Fedora Core 1 but the general instructions should work on most distros.
Package installation
For the installation of the packages Fedora uses yum. If you have another distro, use the package manager for it to fetch the needed packages. Some installations may have the necessary packages installed.
To check for installed packages use "rpm -qa | grep <package name>" to see what's already there. For our purposes we need httpd, php, and mysql packages. Do the command above once for each of these names. What ever don't show up on the list below needs to be installed on your system with your distro's package manager. We're installing everything for each package needed.
apache/httpd
httpd-devel
httpd
redhat-config-httpd (fedora/redhat only)(optionl GUI configurator)
httpd-manual
mysql
php-devel
php-odbc
php-snmp
asp2php-gtk
php-mysql
php-pgsql
php-domxml
php-imap
php-xmlrpc
asp2php
php
php-ldap
Once you have the packages installed you can start apache and mysql. For this discussion we will use default settings which should just work in most cases. If further configuration is necessary consult the proper manual. Issue two commands...
service httpd start
service mysqld start
Now lets setup mysql. We'll set the root password, create a user and a DB that user has access to on local host only.
Set the mysql root password
At the bash prompt type...(use your password)
mysqladmin -u root password 'YOUR_PASSWORD'
Connect to mysql
At the bash prompt type...
mysql -u root -p
(You will be prompted for the password you just set.)
Now you should see the mysql> prompt.
select the mysql DB
At the mysql prompt type...
use mysql
Create a user
At the mysql prompt type...(replace USERNAME and PASSWORD with what you want to use)
insert into user (host, user, password) values('localhost','USERNAME','password('PASSWORD' )');
Grant user access
At the mysql prompt type...
(replace DBNAME with a name for the DB we will create later and USERNAME the username you used in the above command)
insert into db (host,db,user,Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv,Index_priv, Alter_priv,References_priv) values ('localhost','DB_NAME','USERNAME','Y','Y','Y','Y', 'Y','Y','Y','Y','Y');
Now exit the mysql engine by typing "quit".
Create the DB
At the bash prompt type...
mysqladmin -u -p create DB_NAME
(Replace DB_NAME with the name yo used in the above command.
Now we're ready to put the files for your bulletin board in the proper place.
Install site files
Apache uses the folder "/var/www/html" as the default website on Fedora. We will too. Consult your distro or apache docs if it's different.
Before the actual upload some software needs a config file edited. Some create it. At this point you can follow the install instructions for the bulletin board software you are installing. You should be ready to seve and parse php files on your localhost webserver. Access your website at http://127.0.0.1/.
Good luck!
Package installation
For the installation of the packages Fedora uses yum. If you have another distro, use the package manager for it to fetch the needed packages. Some installations may have the necessary packages installed.
To check for installed packages use "rpm -qa | grep <package name>" to see what's already there. For our purposes we need httpd, php, and mysql packages. Do the command above once for each of these names. What ever don't show up on the list below needs to be installed on your system with your distro's package manager. We're installing everything for each package needed.
apache/httpd
httpd-devel
httpd
redhat-config-httpd (fedora/redhat only)(optionl GUI configurator)
httpd-manual
mysql
php-devel
php-odbc
php-snmp
asp2php-gtk
php-mysql
php-pgsql
php-domxml
php-imap
php-xmlrpc
asp2php
php
php-ldap
Once you have the packages installed you can start apache and mysql. For this discussion we will use default settings which should just work in most cases. If further configuration is necessary consult the proper manual. Issue two commands...
service httpd start
service mysqld start
Now lets setup mysql. We'll set the root password, create a user and a DB that user has access to on local host only.
Set the mysql root password
At the bash prompt type...(use your password)
mysqladmin -u root password 'YOUR_PASSWORD'
Connect to mysql
At the bash prompt type...
mysql -u root -p
(You will be prompted for the password you just set.)
Now you should see the mysql> prompt.
select the mysql DB
At the mysql prompt type...
use mysql
Create a user
At the mysql prompt type...(replace USERNAME and PASSWORD with what you want to use)
insert into user (host, user, password) values('localhost','USERNAME','password('PASSWORD' )');
Grant user access
At the mysql prompt type...
(replace DBNAME with a name for the DB we will create later and USERNAME the username you used in the above command)
insert into db (host,db,user,Select_priv, Insert_priv, Update_priv, Delete_priv, Create_priv, Drop_priv,Index_priv, Alter_priv,References_priv) values ('localhost','DB_NAME','USERNAME','Y','Y','Y','Y', 'Y','Y','Y','Y','Y');
Now exit the mysql engine by typing "quit".
Create the DB
At the bash prompt type...
mysqladmin -u -p create DB_NAME
(Replace DB_NAME with the name yo used in the above command.
Now we're ready to put the files for your bulletin board in the proper place.
Install site files
Apache uses the folder "/var/www/html" as the default website on Fedora. We will too. Consult your distro or apache docs if it's different.
Before the actual upload some software needs a config file edited. Some create it. At this point you can follow the install instructions for the bulletin board software you are installing. You should be ready to seve and parse php files on your localhost webserver. Access your website at http://127.0.0.1/.
Good luck!