YTHT BBS in Cygwin Environmental Setup Manual
YTHT BBS System Maintenance Group
V0.1, 11 May 2004
Private build v0.2 oct 12 2004 by tnds
This document mainly describes how to install YTHT BBS software in the Cygwin environment on the MS Windows platform.
1 Overview
1.1 Some agreed 1.2 System Environment 1.3 YTHT BBS Code Overview 1.4 About Questions
2. Installation
2.1 Installation and Configuration CYGWIN 2.2 Get BBS Code 2.3 Modify BBS Code 2.4 Directory Software Installation 2.5 Changing BBS Configuration 2.6 Telnet Section 2.7 Telnet section Test Run and Configuration 2.9 Mounting 2.10 FTP section installation 2.10 FTP section installation 2.11 Attttpd section Installation 2.12 SSHBBSD section installation 2.13 CRON configuration 2.14 launch BBS service
3. Reinstall the code
3.1 Mode of modification of the code 3.2 YTHTLIB Directory Modify 3.3 Modifying 3.5 SRC Directory 3.5 Local_UTL Directory Modify 3.7 Innbbsd Directory Modify 3.9 Atthttpd Directory 3.9 Atthttpd Directory 3.10 Smth-sshbbsd Calibration modification
1 Overview
1.1 some agreed
For the convenience of the narrative, this manual is as follows:
$: Command prompt / home / bbs: bbs installation directory, default is / home / bbs, please change to your own directory when installing
1.2 system environment
Microsoft Windows 2000 OR XP Cygwin 1.5.7 or above UltraEdit (recommended to install text files for rewriting UNIX format)
1.3 YTHT BBS code overview
In the YTHT BBS code, the installation involved in the Cygwin environment has the following sections:
Software Catalog Code Overview
Mainly including ghthhash, fastcgi two libraries have no dependencies
YTHTLIB Catalog Code Overview
A static library for generating YTHT BBS /Home/bbs/bin/libytht.a has no dependencies
Libythtbbs directory code overview
A static library used to generate YTHT BBS /Home/bbs/bin/libythtbbs.a has no dependencies
SRC directory code overview
BBS Telnet login sections depends on Ythtlib and Libythtbbs
Local_utl Directory Code Overview
The local utility program of BBS depends on YTHTLIB and Libythtbbs
NJU09 directory code overview
BBS's web landing section depends on YTHTLIB and Libythtbbs
Innbbsd directory code overview
The transfer of BBS depends on Ythtlib and Libythtbbs.
YFTPD directory code overview
The FTP server part of the BBS depends on Ythtlib and Libythtbbs.
Atthttpd directory code overview
BBS's web accessory server part depends on YTHTLIB and Libythtbbs
SMTH_SSHBBSD directory code overview
The SSH landing section of BBS depends on Ythtlib, Libythtbbs and SRC directories.
1.4 About Question
When you have a problem that you can't resolve during the installation process, make sure you have read this manual in detail and install it according to the methods described. If the problem is still unable to solve, you can be in cnbbs.fbnt.dev or cn.bbs.admin The .installbbs newsletter. Please provide a detailed steps and error prompt information as possible when you ask questions to find an error reason, and attach the output information of CygCheck, for example:
$ cygcheck -svr> / tmp / check
Output Cygwin system information to the / tmp / check file. (Will overwrite this document) 2. First installation
2.1 Install and Configure Cygwin
Please install Cygwin 1.5.7 or later, using low version Cygwin may bring trouble.
First download the installer setup.exe at http://www.cygwin.com/, this installer will boot your completion of the CYGWIN installation process. In addition to the Cygwin default installed package, please install at least the following list:
Apache AutoConf Automake Bash Bison CTags CVS CygiPC GCC GCC-G GDB Indent Libgd-Devel Libgd2 Libiconv Libtool Make OpenSSH Patch Vim Wget Zlib
Log in to Windows with users who will start BBS services. The following assume that Cygwin is already installed and the CYGWIN console has been launched.
$ ln -s /usr/autotool/devel/share/automake-1.7 / usr / share / automake $ ln -s /usr/include/inter/wait.h /usr/include/wait.h
2.2 Get BBS code
/ * Modified by TNDS Current CVS stop service, the latest is also the last code to download http://bbs.zzu.edu.cn/ytht1.rar http://abn.net/ytht1.rar download from the following address / home / bbs / bbsrc directory modified end * /
2.3 Modify BBS code
Please contact the code below to modify the corresponding position. Because YTHT BBS code may change at any time, please understand the meaning of modification content before modifying.
Modification of the layout recovery mode bug
Because the file name in the Windows environment is not case sensitive, resulting in the file in the / home / bubs / board / board. Deleted .deleted .deleted conflict, modify the target is .deleted to change to .del, .deleted is changed to .ded
INDEX: BBS / Innbbsd / Innd / Bbspost.c ======================================== ============================ rs file: /Home/cvs/bbs/innbbsd/innd/bbspost.c ,vretrieving revision 1.30DIFF -u -r1.30 bbspost.c --- bbs / innbbsd / innd / bbspost.c 19 Mar 2004 02:22:55 -0000 1.30 bbs / innbbsd / innd / bbspost.c 10 Apr 2004 15:57 : 47 -0000 @@ -431, 7 431 ,7 @@ sprintf (LockFile, "% s / .dellock", homepath, brdname); Sprintf (INDEX, "% s / Boards /% s / .dir", Homepath, BrdName; Sprintf (TmpFile, "% s / .tmpfile", homepath, brdname; - Sprintf (Delfile, "% s / .deleted", homepath, brdname; sprintf (Delfile, "% s. DEL ", homepath, brdname; if ((fd = open (LockFile, O_RDWR | O_CREAT | O_APPEND, 0644)) == -1) Return; Index: bbs / libythtbbs / record.c ======== ============================================================================================================================================================================================================= ========= rcs file: /Home/cvs/bbs/libythtbbs/record.c ,vretrieving revision 1.11diff -u -r1.11 record.c --- bbs / libythtbbs / record.c 22 Feb 2004 12:54:58 -0000 1.11 bbs / libythtbbs / record.c 10 APR 2004 15:57:49 -00 00 @@ -40, 7 40 ,7 @@ char * ptr, * Delfname, * TmpFName; STRCPY (TMPFILE, FILENAME);
- Delfname = ".deleted"; Delfname = ".del"; TMPFNAME = ".tmpfile"; if ((ptr = strrchr (tmpfile, '/'))! = null) {STRCPY (PTR 1, Delfname) INDEX: BBS / LOCAL_UTL / AUTO_RM_FAKEDIR.C ======================================== =========================== rr300_ /Home/cvs/bbs/local_utl/Auto_RM_FAKEDIR.C ,VRETRIEVING REVSION 1.3DIFF -U - R1.3 Auto_RM_FAKEDIR.C --- BBS / LOCAL_UTL / AUTO_RM_FAKEDIR.C 29 Jun 2003 04:05:18 -0000 1.3 bbs / local_utl / auto_rm_fakedir.c 10 APR 2004 15:57:49 -0000 @@ - 13, 7 13, 7 @@ ". DIR", "JUNK", "DELETED", - ".digest", ".deleted", ".deleted", ".deletej", "." .. ", null}; " .digest "," .del "," .ded "," .dej ",". "," .. ", null}; intisfakedir (char * file) index: BBS / SRC / bbs.c ============================================== ====================== rs file: /Home/cvs/bbs/src/bbs.c, vRetrieVing Revision 1.535Diff -u -r1.535 BBS. C --- BBS / SRC / BBS.C 25 Mar 2004 09:07:02 -0000 1.535
BBS / SRC / BBS.C 10 APR 2004 15:58:22 -0000 @@ -2485, 7 2485 ,7 @@ sprintf (Fullpath, "Boards /% s / .tmpfile", Currboard); Unlink (Fullpath) - Sprintf (Fullpath, "Boards /% s / .deleted", Sprintf (Fullpath, "Boards /% s / .del", Currboard); Unlink (Fullpath); Sprintf (Fullpath, "Boards /% s. TMPFILD ", ============================================================================================================================================================================================================ .4 directory Software installation
// added by TNDS Due to the CVS stop service, it is necessary to obtain these two packages in advance. //www.smth.edu.cn/bbscon.php?bid=196&id=42867&ap=906 Download, please change the files to fcgi-2.2.2.tar.gz and libghthash-0.5.3.tar.gz In / Home / BBS / BBSSRC / Software Directory / / Added End $ CD / Home / BBS / BBSSRC / Software $ Make Installfcgidev $ Make InstallGhthash
2.5 Change BBS Configuration
$ cd / home / bbs / bbsrc / site $ cp bbsconfig.sample bbsconfig.mybbs $ cp SECLIST.TXT.SAMPLE SECLIST.MYBBS
Use UltraEdit to edit the /Home/bbs/bbsrc/site/bbsconfig.mybbs file and the /Home/bbs/bbsrc/site/seclist.mybbs file, the modification setting makes it in line with your provision.
Note that in the bbsconfig file, Last_BBS_UID, LAST_BBS_GID, and LAST_BBS_USER Please query the / etc / passwd file to obtain the user who is currently logging in to Windows, that is, the information you will use to start the BBS service.
// added by tnds
For convenience, you can use
CAT / etc / passwd | grep [User Name of WINDOWS]
Should be coming out as follows:
TNDS: unused_by_nt / 2000 / xp: 1005: 513: U-TonyBLACK / TNDS, S-1-5-21-2694818615-644202234-3471302810-1005: / home / tnds: / bin / bash
Among them, TNDS is the username, 1005: 513, 1005: 513, the former is the UID, the latter is GID
// added end
In the bbsconfig file, Last_MaxUsers, Last_Maxboard, Last_MaxActive, Last_MaxActiveerun belong to the resource sensitive data, please fill in according to the actual needs of your station, please refer to the information of YTHT.NET in the / home / bbs / bbsrc / bbsconfig file. // added by tnds
2.5extra About SECLIST
Format
[Partition code] [partition name]
In the middle with TAB spaced
The subband code is two, the first representative of the main partition, the second is the sub-partition code
E.g
0 station system
0Q District Management
The following sub-partition is the format format.
* [Partition code] [subband code 1, 2, ... n]
Where the partition code is separated from the sub-partition code to TAB
The DESCRIPITON TELNET login is displayed from the partition content displayed in the classification discussion area menu, and it should be a subregional instructions for no more than three.
// added end
2.6 installation of the Telnet section
$ cd / home / bbs / bbssrc $ ./makedist.sh $ ./configure --with-site = mybbs
(If you need to evaluate the function of the article, please use ./configure --with-site = mybbs --with-mysql, mysql needs additional installation)
$ Make $ make Install
If an error occurs during the compilation process of this step, correct the error and execute the following command to recompile and install:
$ CD / HOME / BBS / BBSSRC $ Make Clean $ make $ make install
2.7 Telnet part test operation and configuration
$ ipc-daemon2 & $ /@om / bbs / bin / shminit
(If you successfully prompt EVERYTHING IS JUST FINE)
$ / home / bbs / bin / bbsd
Then Telnet login this machine test, if the connection is successful, please first register the SYSOP (case sensitive) account, then register the guest account. (To ensure the Guest account is the second registration)
If everything goes well, please build a BBS run as follows:
IdscanRecord version of the credit Board version of the credit version of the credit version of the credit HELL version Hell (gives the perm_special 3 discussion area special permissions) Prison version of prison (give a permission to perm_special 3 discussion area) Millionaire version MoneyCenter Related / Home / BBS / etc / MoneyCenter directory MIOME / BBS / etc / MoneyCenter Related Robunion Club MoneyCenter Related DeleteRequest Club Articles Review ALLATICLE Edition All Articles / Home / BBS / 2nd Directory Flea Market
// add by tnds
Thanks for Dinger @ YTHT
An additional steps, if not allowed, when using F transfer station external letters, it may be wrong.
Create a file in the / lib directory called sendmail without extension writes a row of heads #! / Bin / SH Enter this file to UNIX format
Use the current file right button in the UEDIT to convert remember #! / Bin / sh to add it to the car, otherwise it is invalid.
// added end
2.8 Installation of the Web section
This section Installation Steps Example Have you use the following value for Last_cgipath and Last_htmpath in `` Change BBS Configuration '' section:
Last_cgipath = / home / httpd / cgi-bin last_htmpath = / home / httpd / html / 2001
If you change these two settings to another directory, change the following steps.
$ cd / home / bbs / bbssrc / nju09 $ evter Nobig5 = 1 $ make $ mkdir -p / home / httpd / cgi-bin $ mkdir -p / home / httpd / html / 2001 $ make install modification / etc / apache / For httpd.conf file, please refer to the following modification:
--- /etc/apache/httpd.conf.default 2004-01-21 09: 02: 50.0000000 0800 /etc/apache/httpd.conf 2004-04-29 11: 39: 30.0000000 0800 @@ -348, 7 348 ,7 @@ # documents. By Default, All Requests Are Taken from this Directory, But # symbolic links and aliases may be used to point to other locations. # - documentroot "/ var / www / htdocs" DocumentRoot "/ home / host / html / 2001" ## Each Directory to Which apache Has Access, Can Be configured with respect @@ -373, 7 373 ,7 @@ ## this kind be change to whatver you set documentroot TO. # -
## This May Also Be "None", "all", or any combination of "indexes", @@ -638, 13 638, 13 @@ # the Same rules it, "/" Apply to Scriptalias Directives as To Scriptalias Directives) Alias. # - scriptalias / cgi-bin / "/ var / www / cgi-bin /" scriptalias / cgi-bin / "##" / var / www / cgi-bin "SHOULD BE CHANGED TO wherever your scriptaliased # cgi Directory Exists, if You Have That Configured. # -
ALLOWOVERRIDE NONEOPTIONS NONEORDER ALLOW, DENY @@ -979, 6 979, 17 @@ # errordocument 403 http://phf.apache.org/phf_abusengine on retwriterule ^ / Ytht.net (. *) / BBSChat (. *) / cgi-bin / www / bbschat [pt] retwriterule ^ / Ytht.net (. *) $ / cgi-bin / www [pt] REWRITERULE ^ / $ / CGI-BIN / WWW [PT ]
SetHandler CGI-Script
SetHandler CGI-Script ### Section 3: Virtual Hosts ## VirtualHost: if you want to maintain multiple Domains / hostnames on your ===================== / / add by TNDS where the ReWrite section of YTHT.NET needs to be replaced with the smagic value // added End test web section you defined in bbsconfig.mybbs, make sure the Telnet section has started, and there is already a user login, see` `Telnet section Test Run and Configuration ''. Then start httpd:
$ / usr / sbin / httpd
If there is no abnormality, use the browser to access http: // localhost /, you can see the vegetables.
2.9 Installation of the transfer section
$ CD / HOME / BBS / BBSSRC / INNBBSD $ MAKE CYGWIN $ MAKE INSTALL
Please refer to http://cn-bbs.org/ of http://cn-bbs.org/.
2.10 FTP section installation
$ cd / home / bbs / bbssrc / yftpd $ make $ make install
Test the FTP section:
$ / home / bbs / ftphome / yFTPD
2.11 Atthttpd part installation
$ CD / Home / BBS / BBSSRC / Atthttpd $ Make $ CP * .EXE / HOME / BBS / BIN
Test the Atthttpd section:
$ / home / bbs / bin / atttpd
2.12 SSHBBSD section installation
First set the environment variable, select the autotools version used when installing SSHBBSD, if you want this setting to start the Cygwin console next time, you can write it to the /.bash_profile configuration file and restart the Cygwin console.
$ export want_autoconf_ver = 2.59 $ export want_automake_ver = 1.7.9
Install Cygwin's GMP 4.1.2 binary package and its source package, and follow the steps below to recompile GMP: First modify /usr/src/gmp-4.1.2-1.sh
--- GMP-4.1.2-1.SH.OLD 2004-06-08 23: 33: 52.000000000 0800 GMP-4.1.2-1.sh 2004-06-08 23: 35: 46.000000000 0800 @@ -64, 7 64 ,7 @@ target = i686-pc-cygwinprefix = / usrsysconfdir = / etc-my_cflags = "- O2 -G -FOMIT-FRAME-POINTER -MARCH = I486 -MCPU = i686" my_cflags = "- O2 -FOMIT-FRAME-POINTER -MARCH = I486 -MCPU = i686" MY_LDFLAGS = MKDIRS () {
Perform the following command to compile GMP:
$ CD / USR / SRC $ ./gmp-4.1.2-1.sh all
After completing, copy the file usr / bin / cyggmp-3.dll in the GMP-4.1.2-1.tar.bz2 compression package generated in the / usr / src directory and overwrite the original file. If the CYGWIN home directory of the currently used Windows user is different from the BBS installation directory, link the bin directory symbol in the BBS installation directory to the home directory. For example, the current Windows User Administrator Home Directory is / home / administrator, if BBS is installed in the / home / bbs directory, the following symbolic link is established:
$ ln -s / home / bbs / bin / home / administrator
The following starts the compilation and installation of SSHBBSD:
$ cd / home / bbs / bbssrc / smth-sshbbsd $ ./makedist.sh $ ../configure $ make $ make Update
Test SSHBBSD section:
$ / home / bbs / bin / sshbbsd
2.13 CRON configuration
$ cp /Home/bbs/bbsrc/site/crontab.sample / var / cron / tabs
Rewind the /var/cron/tabs/crontab.sample file in accordance with your specific situation, and then rename the file to a Windows user name used to run the BBS service.
test:
$ / usr / sbin / cron
2.14 Start BBS Services
If you follow the `` initial installation '' section, the BBS service has been launched. To start the BBS service in the future, follow these steps:
$ IPC-Daemon2 & $ / Home / BBS / BIN / SHMINIT $ / HOME / BBS / BIN / BBSD $ / HOME / BBS / BIN / BBSLOGD & $ / USR / SBIN / CRON $ / USR / SBIN / HTTPD $ / HOME / BBS / INND / INNBBSD $ / / HOME / BBS / FTPHOME / YFTPD
Use the following command to see the current process:
$ PS
3. Reinstall the code
3.1 Precautions for modifying the code
Be sure to back up the critical data before making any modifications.
After modifying a directory code, you need to recompile the installation in this directory. If you modify the YTHTLIB directory or libythtbbs directory, you need to recompile the installation in all directories; if you modify the code of the src directory, you will also need to recompile the installation in the SMTH-SSHBSD directory (if the SSHBBSD service is installed).
If you modify the data structure related to shared memory, you need to restart all BBS services.
Do not destroy existing data without at the / home / bbs / bbssrc directory.
3.2 Modification of YTHTLIB Directory
$ CD / HOME / BBS / BBSSRC / YTHTLIB $ MAKE CLEAN $ MAKE $ MAKE INSTALL
3.3 Modification of libythtbbs directory
$ CD / HOME / BBS / BBSSRC / LIBYTHTBBS $ MAKE CLEAN $ MAKE $ MAKE INSTALL
3.4 SRC directory modification
$ cd / home / bbs / bbssrc / src $ make Clean $ make $ instalall --backup = t * .exe / home / bbs / bin
3.5 Local_UTL Directory Modification
$ CD / HOME / BBS / BBSSRC / LOCAL_UTL $ MAKE CLEAN $ MAKE Depend $ make $ make install
3.6 NJU09 Directory Modification
$ CD / Home / BBS / BBSSRC / NJU09 $ EXPORT NOBIG5 = 1 $ Make Clean $ Make $ make install3.7 Innbbsd directory modification
$ cd / home / bbs / bbssrc / Innbbsd $ make Clean $ makecwin $ make install
3.8 Modification of YFTPD Directory
$ cd / home / bbs / bbssrc / yftpd $ make Clean $ make $ instalall --backup = t * .exe / home / bbs / ftphome
3.9 Modification of Atthtpd Directory
$ CD / Home / BBS / BBSSRC / Atthttpd $ make Clean $ make $ instalall --Backup = t * .exe / home / bbs / bin
3.10 SMTH-SSHBBSD directory modification
$ cd / home / bbs / bbsrc / smth-sshbbsd $ make Clean $ make $ make Update