I used to put BBS notes, more suitable for Linux newbie ZZ

xiaoxiao2021-04-03  243

Sender: Rainboyfdy (Water Water Division), Letter Area: BBSman_Dev Title: I used to load BBS notes, more suitable for Linux newbie station: Shuimu Community (Fri Nov 11 18:10:17 2005), transfer to summer vacation Learn Linux, I installed a redhat. I don't do things. I will use BBS to learn Linux. It's just some of my notes. The version is somewhat old. It may be the latest uncomfortable fit. "SMTHBBS installation Raiders >> This article Installation, generally installed successfully, now installing is more cool, don't think about the problem of the package, GCC didn't install some library when I just installed RH, if you load RH full version, It is estimated that there will be no problem. Don't jokes, don't jokes. . _________________________________________________________________________ 1. About mainpage.html update wget http://127.0.0.1/mainpage.php-O /usr/local/www/htdocs/mainpage.html best BBS is added to the user's crontab file su bbs - > crontab -e then edit the file _________________________________________________________________________ 2. Home garbled PHP: edit PHP files found Chinese characters garbled, garbled mainpage.PHP generated mainpage.html also used VI editor is garbled, with GEDIT editor did not say it was garbled Environment (Finding with Locate) file plus export g_broken_filenames = 1 After adding no problem, no problem is not resolved, then check the problem, put the mainpage.php test under the SMTH source code to / usr / local / www / htdocs Just get __________________________________________ ____________________ 3. Leaves Not Auto / Update: ThisPage.php-> MainPage.html update should be set in the user's crontab, suspicious reference SMTHBS / CONTRIB / CRONTAB.SMTH is available /etc/init.d/crond status See the state, if you don't start, run /etc/init.d/crond Sta RT start. Run crontab -l See if the crontab of the current user is correct, is not correct, run crontab [-u user] Fi le to re-specify 0 * * * / bin / ls> ls.out has ls.out proves running // When installed SMTHBBS, there is this statement: // chown -r bbs: bbs / usr / local / bbs Represents recursive call Chown writes / usr / local / bbs attribute to BBS: BBS therefore wants to update the mainpage.html, should be under root permission (because Apache is root permission) wget http://127.0.0.1/mainPage. PHP-o /us/local/www/htdocs/mainPage.html should be placed in the root's crontab is as follows: crontab -u root -e put the statements you want to do in CRONTAB trial, don't know why crontab or No truly run. . . Waiting to see the wrong information in / var / log / message.

Oh, mygod, find the reason: 24 * * * wget http://127.0.0.1/mainPage.php-o/usr/mainPage.html ~~~~ This order is going to have a full path and have to put it in BBS users. the crontab, because many orders are executed at _________________________________________________________________________ bbs 4. "Today the hot topic of discussion," the update (a hot topic in / usr / local / bbs / tmp / xpost / *) with / usr / local / bbs / bin / poststat / usr / local / bbs to update, after updating, apply wget http://127.0.0.1/mainpage.php-o/usr/local/www/htdocs/mainPage.html to update home guide, so these two tasks can be put garbage problem crontab could go under if the default _________________________________________________________________________ 5.BASH chose Chinese as the language, perform LANG = C is then prompted in English.

You can view local font with locale _________________________________________________________________________ 6. Clear shared memory ipcs -a view memory ipcrm delete memory _________________________________________________________________________ 7. Start with TELNET bbs users, the problem does not work must APACHE ROOT below to start, since 1024 the following ports to use root _________________________________________________________________________ 8. Home bbsleft.html can not find the problem of the frame is set to the left is bbsleft.php _________________________________________________________________________ 9.iptables seal his IP _________________________________________________________________________ 10. how to generate commend.xml? found information that can be generated by genhot commend.xml gen_commend_html () GENHOT is generated in Bash? Direct execution will generate errors: [root @ localhost bin] # ./genhot error! Shmget: readonly error! Key = e74 .: No Such file or directory Switch to BBS User Identity Direct Genhot (到 到 到 到 到 还:: ire! Shmget: readonly error! Key = e74 .: No Such file or directory Some people say that it is a problem with the memory, but I use IPCRM or not, and later discovered that needs Start the BBS Error! Nothing, but genhot seems to have not generated XML files I don't know why, I re-installed the genhot without problems _________________________________________________________________________________________________________________________________________________________________________________________________________________ ____________________________________ 11. Stop BBS run: killall -9 miscd _________________________________________________________________________ on Home Introduction 12. This is always a problem, turned out to be the reason rcmdbrd.xml should be as follows Recommend _________________________________________________________________________ 13. newly opened Forum Description: Chinese name must be correct format For: partition code [class name] 6 space

Discussion Chinese description _________________________________________________________________________ 14. The forum description after the Chinese could not see because of the article illustrates get an incorrect format _________________________________________________________________________ 15. Recommended layout: rcmdbrd.xml manually modify the file system is installed to _________________________________________________________________________ 16. To register sysop, two guest user, and open recommand (recommended for articles), for Announce (for announcements) recommended two sections 17. the article produced _________________________________________________________________________: there is an article in recommand Edition, G and press at the TELNET command. Take a marker article as a recommendation article.

But how to recommend other layouts of arts? ? ? ? Other sections: first; after 3 _________________________________________________________________________ 18. The registration form changes (removing the e-mail activation function) to site.php in adding define ( "SITE_ZIXIA", 1); while paying attention to the interface change it _________________________________________________________________________ 20.index.html pictures Specifications Width: 760 HEIGHT: 399 ____________________________________________________________ 21. How to really delete a post? Under each Board, there may be .deleted and .junk files, .deleted files record all posts deleted articles, these article names are D. *, .junk files record users themselves deleted in the version, these articles The name is J. * If you want to clear these articles yourself (such as save space), you can delete these files under each Board: rm -rf .deleted RM -RF D. * rm -rf .junk rm -rf j. * _________________________________________________________________________ 21. how to completely remove forum vote / boards / deleted following the appropriate directory and delete the corresponding Digest _________________________________________________________________________ after setting TELNET login 22. Some system files, enter a) system management Menu -> F ) editing system files _________________________________________________________________________ 23. questions about web users daze ./libBBS/default.h #define IDLE_TIMEOUT (60 * 20) another method #define MONITOR_TIMEOUT (60 * 20) is TELNET user login time, wEB persons Re-statistics _____________________________________________________________? How to set a top article? Bamboo press; button, switching: 0) Cancel 1) Cancel 2) Top mark 3) Top mark 3) Recommended _____________________________________________________________________ 精 区 区 区 修 修?

Modify $ (BBSMAIN) /0Announce/groups/.Names _________________________________________________________________________ New issued automatically add user #define NEW_COMERS 1 / * version after registration newcomers automatic posting * / _________________________________________________________________________ to modify the original code $ / Site / under the default.h DEVEL.H Note Default.h in DEFAULT.H and then defined the number of partitions #define secnum 4 // I opened 4 districts to replace DEFAULT.H "SMTH.org" "Shuishu Tsinghua" replacement DEFAULT.C File: const char second [secnum] [5] = {"a", "b", "c", "d"}; // Note that the macro definition of the last line is the partition code, some statistics need to be used . Const char * const groups [] = {"group_0", "group_1", "group_2", "group_3", null}; const char secname [secnum] [2] [20] = {{"Site system", " [System] "}, {" Leisure / Music] "}, {" Campus "," [Campus] "}, {" Computer Technology "," [Technology] "},}; Const Char * const explain [] = {"This site system", "Leisure", "Campus", "Computer Technology", NULL}; the total directory name, open version and modification layout of the corresponding partition Will use it. The last NULL can't miss! wforum.h in these arrays to be changed about it in the default.h on "Mizuki", "SMTH" replace _________________________________________________________________________ web to remove the cache: funcs.php in function cache_header ($ scope, $ modifytime = 0, $ expiretime = 300) {global $ cachemode; return false; // added by atppp session_cache_limiter ($ scope); $ cachemode = $ scope; problem if ($ scope == "no-cache") _________________________________________________________________________ backup should be noted: 1 There is no normal stop BBS service before the backup.

2. If the BBS is still running before reinstalling, a) stopped BBS service, especially Miscd b), cp .boards .paursWDS, etc. C) Clear Memory D) Two steps to start BBS services B and C seem to be exchanged ...__________________________________________________-------------------------------------- - Toss for a month, the water forum is finally installed, and I actually made me hit an unprecedented event during this period. Fortunately, I saved the Shuimu Essence in March, so I don't know what to install. Now let's write down the installation step and leave a reference for friends who want to install. I use the FC3 system, here as an example. Use the rpm -qa xxx command to check if the software package required by the system is installed before installation. Required packages include: Zlib, AutoConf, Automake, Libtool, Libxml2, Libiconv, Libjpeg, Libjpeg-devel, Libpng, Libpng-devel, FreeType2, GD, GD- DEVEL, OPENSSL, GMP-4.X, these system disks Yes, the installation is all. Install libesmtp below, first download to the source package, then execute the following command: tar xzvf libsmtp-1.0.tar.gz // Decompressed libesmtp cd libesmtp-1.0 // Enter the libesmtp source directory ./configure --disable-pthreads make make install This libesmtp is successful. There is no special request to install MySQL and install it by mysql document. Now make some agrees: $ (bbshome) represents the installation directory of the BBS, defaults to / home / bbs, specified as / usr / local / bbs $ (wwwhome) represents the installation directory of Apache, specified in this article USR / local / www $ (phphone) represents the PHP installation directory, in this article, by default / usr / local installation Apache and PHP: I downloaded HTTPD-2.0.52 and php4.3.10, take this as an example . It should be noted that the maximum number of large-line numbers after Apache directly compiles installation, modifying httpd.conf, I have found this method to change the source code. Modify the /include/httpd.h in the source code directory, plus the following condition definition statement: #ifdef hard_server_limit #define hard_server_limit 10000 #ENDIF This can increase the limit to 10,000 people.

You can compile it (direct use of command): CD httpd-2.0.52 // Enter the source code directory ./configure --prefix = / usr / local / www --enable-module = so --enable-module = SSL Make Make Install Cd ../php4.3.10 ./configure --with-apxs2 = / usr / local / www / bin / apxs --disable-debug / --enable-pic --disable-rpath --enable -inline-Optimization / --With-Dom --with-gd --with-freetype-dir = / usr / lib / --with-png-dir --with-iconv --with-jpeg-dir --with -zlib / --enable-track-vars make make install ok! Prepare before installation is finally done! ! ! You can now install SMTHBBS. You have to modify the site custom file before you use, which is FB2K-V2. In the S ITE directory, pay attention to verify whether the BBSUID and BBSGID in FB2K-V2.h are consistent with the UID GID of the BBS user of the local system. If it is inconsistent, please adjust Coincide. The rest is some parameters of your site, pay attention to modify. Below start compilation: ./configure --prefix = / usr / local / bbs --enable-site = fb2k-v2 --with- www = / usr / local / www --with-php = / usr / local / include / PHP - With-mysql --enable-ssl make make install make install-home chown -r bbs: bbs / usr / local / bbs If all goes well, to this smthbbs, apache and php are installed. Running configuration: web way: Apache configuration file is /usr/local/www/conf/httpd.conf, editing the file, add addtype application / x-httpd-php .php Modify Port parameter 80, put user and group The parameters are modified to BBS. Please set the KeepAlive parameter to OFF. Copy the file under the SMTHBBS source code BBS2www / xml to / usr / local / www / htdocs. PHP configuration files can be obtained from the PHP source code, copy php.ini-dist (Dist to /usr/local/lib/php.ini, then edit the php.ini file, modify the value of short_open_tag to OFF. Run SMTHBBS CD / USR / local / bbs / bin ./miscd daemon ./bbslogd ./bbsd -p 23 Then Telnet localhost, registration SYSOP and GUEST two accounts.

Guest's password is written casually. Run apache / usr / local / www / bin / apachectl start so far, the forum can be running, but there are still many jobs to do! : (Modify Classification Discussion Area: Here, I will borrow the senior document! :-) Change the classification discussion area to modify the site, generally saying two steps, one is to modify the site configuration file, the second is to change the code . The modification of the configuration file is related to the user interface, and the modification of the source code is related to the statistics and station management. 6.1 Modifying the Site Profile The file that needs to be changed is ~ BBS / etc / menu.ini and the site.php below the web home directory. Below is a brief form of the Menu.ini classification discussion area menu, the following explanations will be taken as an example: # ------------------------ ------------------------------------------% MENU M_EGROUP TITLE 0, 0, "Classification Discussion Forum" Screen 3, 0, S_EGroup @egroups 10, 22, 0, "0BBS", "(0) This site system [本 站]" @egroups 0, 0, 0, "1usa", "( 1) People in the United States [Campus] [Entrepreneurship] "@egroups 0, 0, 0," 2goabroad "," (2) Westward Journey [Study] [School] [Group] "@Boardsnew 0, 0, 0," New "," (N) reading a new article "! .. 0, 0, 0," exit "," (e) back to the main selection "% EGROUP0 =" a "eGroup1 =" b "eGroup2 =" c "# - -------------------------------------------------- --------------- The place you need to pay attention to here is: The first letter of the 5th parameters of the classification discussion area menu is the serial number, this serial number is defined by the following EGROUP? Partition code (generally a letter or number). For example, the first classification discussion area "This website" is 0, the sequence number is 0, and the partition code is A (defined by eGroup0). Note: The serial number is only used inside the menu.ini, there is no other use! The following modifications, and the new and modified discussion areas only need to know the partition code, in this example, the three partitions code are A b C, respectively. The serial number and partition code can be typically typically set. Have finished Menu.ini Refer to 4.3 Effectiveness.

(Station in the main menu is pressed ~) Another configuration file that needs to be modified is Site.php, the above example needs to use the following code within Site.php: $ section_nums = array ("a", "b", "c "); $ section_names = array (Array", "[This site]"), Array ("People in the United States", "[Campus] [Entrepreneurship]"), array ("Westward Journey", " [School] [School] [Group] "))); 6.2 Modifying the Source Code Modifying the Site Division Requires Site.c and Site.h files. It is not recommended to modify DEFAULT.H and Default.c files directly. The SMTHBBS system has a ~ bbs / 0announce / groups / directory, this is the total directory of the layout essence, which stores the essence of all layouts. General site hopes that the partition structure and essence zone structure are identical. Take the above example, a total of three classified discussion areas, then there should be three directories in the total directory of the discussion area, we have named Group_0 Group_1 Group_2, respectively. Modifying a classification discussion area often requires the modification of the essence structure, so the station should enter the essence adjustment, such as establishing a directory, modify .names file, etc. The modification of the source code is first in site.h SECNUM constant, which should be defined as the number of categories discussion zones: #define Secnum 3 The remaining modifications are in site.c, make sure Site.h does not define USE_DEFAULT_SECODE. There are four constants and classified discussion areas in Site.c, please pay attention to the type definition of constants must not be changed. Const char second [secnum] [5] = {"a", "b", "c"}; this is a partition code, and some statistics need to be used. Const char * const explain [] = {"This site system", "people in the United States", "Westward Journey", null}; the area name of the classification discussion area, the site management under Web will be used. The last NULL can't miss! Const char * const groups [] = {"group_0", "group_1", "group_2", null}; the total directory name, open version, and modify the layout of the partition, and modify the layout. The last NULL can't miss! Const char secname [secnum] [2] [20] = {{"This site system", "[this site]"}, {"people in the United States", "[Campus] [Entrepreneurship]"}, {"Westward Journey "," [Study] [school] [group] "},}; classified discussion area, according to this format, it is based on this format. In fact, only secname [i] [0] is actually used in the program, the purpose is to use and modify the location of the layout. Another problem that needs attention is that each layout of the essence directory is completely stored, and there is no relationship with the above modification.

So, like the example above, if we decide to change the directory name of Group_0, then not only do the modifications similar to the above, and the essence is located in the version of the group_0 directory, you should enter the system management menu to reset the discussion area. , Select the mobile essence location, specify a new directory. After modifying the source code, you need to recompile to install the BBS program. You can see that the modification of the source code is only related to the management operation and the statistical program, so in the actual operation, if it is to reduce the number of partitions or modify the classification area, only Menu.ini and Site.php can be adjusted without modifying the source code. . Then generate the file that generates the home guide, continue to use the results of the Seniors: Home Guide Generate the necessary XML file 3.4.1 Home Guide Each element and XML file correspondence: All required XML files are saved in $ (BBSHOME ) / XML / directory, if your platform does not have this directory, use the BBS account to generate this directory in $ (bbshome). All programs that generate XML need to be executed, save in $ (bbshome) / bin, source files in $ (srcdir) / local _u TL, for easy description, no longer specifying the Directory of the program. Home REVIEW elements need xml file mainpage.php among the correlation function generating program to be executed recommend this xml article commend.xml gen_commend_html () genhot today a hot topic day.xml gen_hot_subjects_html () poststat classification wonderful forum day_sec * .xml gen_sections_html poststat gen_sec_hot_subjects_html () opened a new layout newboards.xml gen_new_boards_html () gennewboard recommended layout rcmdbrd.xml gen_recommend_boards_html () is not hand-written program popularity ranking board.xml gen_board_rank_html () usage today blessing bless.xml gen_blessing_list_html () poststat 3.4.2 crontab which related to Home Introduced Partial Reference $ (srcdir) Contrib / Cron.smth, calling each of the programs in crontab in the crontab of the BBS account is shown below. Add it to the crontab of your BBS account. Note that the crontab that is not a complete BBS account, just with the information about the relevant part, the complete crontab list, please refer to $ (srcdir) /Contrib/cron.smth. Time and the full path of the program, please adjust according to your own platform.

# 时时 Update Recommended article 0,10,20,30,40,50 * * * / home / bbs / bin / genhot # 59 points per hour to perform hot topic statistics; 1 point HTML 59 * * * * / home / BBS / BIN / PostStat / Home / BBS # Stiger: New Ten Statistics 59 23 * * RM -F / Home / BBS / TMP / XPOST / * # 4:33 Month 4:33 Statistics 0 33 4 * * * / home / bbs / bin / usage 0> / dev / null 2> & 1 36 4 * * * / home / bbs / bin / usage 1> / dev / null 2> & 1 to gennewboard, if your platform is often opened The new version, then add it to crontab; if it is not normally opened, after opening a new version on the BBS system, manually perform it in manual use of the BBS account. Recommended article needs to open a version on the station, Recommend version, then the moderator is pressed in front of the article recommended on the layout; Recommended article that appears in the web home page. 3.4.3 Handmade RCMDBRD.XML Edit, $ (BBSHOME) /XML/rcmdbrd.xml, thank Windinsn to provide < Englishname> 这里 版 版 英 的 英文 ... ... ... < / Board> to this, all the elements of all the homepage have been generated, open http://yours../mainPage.php at the browser, you should get the elements of the home page. It has been basically completed, but in order to simplify the registration process, I canceled the process of activating the mail, the web fills in the password and directly generates registration orders, thank you for the documentation, I am lazy! :> BBS2www / html / bbsreg.html Add two bbs2www / html / bbsreg.php first judgment $ _POST ["pass1"] and $ _POST ["pass2"] A different, different, directly html_error_quit, I remember the number of digits must be 5-39 bits (INCLUSIVE), this is best limited.

转载请注明原文地址:https://www.9cbs.com/read-131524.html

New Post(0)