How to configure a Secure Linux Forum (on) with phpBB2)

Source: Internet
Author: User
Article Title: how to configure a Secure Linux Forum (on) with phpBB2 ). Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
PhpBB2 is an open source forum program based on Web scripts implemented in PHP, which is widely used. In addition to the Mysql database, it also supports PostgreSQL and other databases. It can also work on the Windows platform. The software program of PhpBB2 is very simple to install, and there are constantly upgraded versions. There are about 6 million sites using phpBB2 on the global network. The biggest advantage of PhpBB2 is that it can develop plug-in modules to build a personal webpage style. PhpBB2 has many powerful functions including system information. Therefore, you must understand that this software may cause some security vulnerabilities.
  
   1. Build a phpBB2 Forum
  
1. Required software and hardware for building the phpBB2 Forum:
  
In addition to building a LAMP-based network architecture, but also to run phpBB2 software required PHP-MYSQL module and php-odbc module, you can use the command to detect:
  
# Rpm? Qa | grep php-mysql; rpm? Qa | grep php-odbc
  
System Requirements:
  
Software: it requires a kernel (Kenerl) of at least 2.2. KDE 2.0, Desktop color at least 16 enhanced colors.
  
Hardware: CPU: Pentium II more than 450, memory: 128 MB, hard disk space: 600 mb.
  
2. Download phpbb2 software and Chinese package:
  
# Wegt http://www.phpbb.com/files/releases/phpBB-2.0.14.tar.bz2
# Wegt http://jaist.dl.sourceforge.net/sourceforge/phpbb/lang_chinese_simplified.tar.gz
# Wegt http://jaist.dl.sourceforge.net/sourceforge/phpbb/subSilver_chinese_simplified.tar.gz
  
3. install the software: copy the downloaded software to the/tmp directory and run:
  
# Tar? Zxvf phpBB-2.0.14.tar.gz "create a directory:/tmp/phpBB2"
# Cd phpBB2/language/
# Tar? Zxvf root/lang_chinese_simplified..tar.gz
# Cd/root/phpBB2/templates
# Tar? Zxvf/root/subSilver_chinese_simplified.tar.gz
  
The two Chinese translation packages must be copied to: phpBB2/language/AND/phpBB2/templates.
  
Directory and decompress the package. Do not put the wrong location. Otherwise, the program will be garbled.
  
4. Create a database for phpbb2:
  
# Mysql? U root? P
Enter password: xxxxxxxxx
Your Mysql connection id is 3 to server version: 4.11
Type 'help; 'or' \ H' for help. Type '\ C' to clear the buffer.
Mysql> create database phpbb2; "create a database for phpbb2"
Query OK, 1 row affected (0.01 sec)
Mysql> grant all privileges on phpbb2. * to phpbbuser @ localhost identified by '000000'; "grant the created phpbb2 permission to the phpbbuser account and set the password"
Mysql> quit
Bye
  
5. test whether the created database and account can be used:
  
# Mysql? U phpbbuser? P
Enter password: xxxxxxxxx
Your Mysql connection id is 3 to server version: 4.11
Type 'help; 'or' \ H' for help. Type '\ C' to clear the buffer.
Mysql> connect phpbb2;
Connection id: 5
Current database: phpbb2
Mysql> quit
Bye
  
6. Start to install phpbb2:
  
Before installation, you must note that the Mysql server name is localhost. This is the Mysql server name, not the Linux server name. Generally, the Mysql server name is localhost. The Mysql database name is phpbb2, the Mysql account is phpbbuser, And the password is set above.
  
# Cd/tmp/phpBB2
# Chmod 666 config. php "make the config. php script executable"
# Mv phpBB2/var/www/html/phpbb2 "Move the phpBB2 file directory to the apache provincial directory"
  
For network installation, how does phpBB2 work? Very simple. Open the Linux Browser and enter http: // host name/phpbb2 in the address bar. A dialog box appears asking you to enter some system information, as shown in figure-1.
    
Figure-1 fill in system information
  
The entered content is shown in table-1:
  
Table-1 phpBB2 system information
    
After entering the information, click "Start installation". If the system displays figure-2, the installation is successful. If there is a mistake, the system will automatically return to the dialog box in figure-1 for you to set it up again.
    
7. Security Settings
  
After the test is successful, the system reminds you to delete the installation files for security reasons (to prevent others from using these files to modify system information ),
  
# Chmod 644 config. php
# Rm? Rf install
# Rm? Rf contrib
  
8. log on to the system again because the config. php file, so you can only Log On As a system administrator. After logging on, the "forum administrator control panel" appears under the dialog box (Which of the following is this option for a common account? Click Here (see figure-3 ).
  
The forum administrator control panel of phpBB2 has six major tabs: system management, layout management, general management, team management, style management, and member management. The System Management page contains the statistics of your forum. at any time, you can click the control panel homepage in the upper-left corner of the Control Panel to return to this page. click the phpBB icon in the upper-left corner of the Control Panel to return to the homepage of your forum. other links on the left of the screen allow you to control all management options of the Forum. the use of various functions is detailed in each layout. In addition, the "FAQ" on the homepage of the Forum contains 200 FAQs. In this way, you can easily build a forum on your own.
  
9. acceleration for the phpBB2 Forum
  
If you have browsed the pages of the phpBB2 forum and found that PHP is slow, this is because the PHP program code calls too many function libraries, these libraries need to be read from the hard disk each time they are called. Is there any way to speed up PHP Execution. If we can read these function libraries in the hard disk into the Cache, the memory speed is much faster than that of the hard disk. In this way, it can certainly increase the speed. Here we introduce a software license on GPL can Cache PHP code and optimize the software, that is, the official site of MM Cache in: http://www.turcksoft.com /. The latest version of MM Cache is 2.4.6.
  
10. Software Download and Installation
  
Wegt http://jaist.dl.sourceforge.net/sourceforge/turck-mmcache/turck-mmcache-2.4.6.tar.gz
Cd/usr/local
Tar-xvf turck-mmcache-2.4.6.tar
Cd turck-mmcache-2.4.6
Export PHP_PREFIX = "/usr"
$ PHP_PREFIX/bin/phpize
./Configure -- enable-mmcache = shared -- with-php-config = $ PHP_PREFIX/bin/php-config
Make; make install
  
Modify the/usr/local/lib/php. ini file and add the following content:
  
Extension = "mmcache. so"
Mmcache. shm_size = "16"
Mmcache. cache_dir = "/tmp/mmcache"
Mmcache. enable = "1"
Mmcache. optimizer = "1"
Mmcache. check_mtime = "1"
Mmcache. debug = "0"
Mmcache. filter = ""
Mmcache. shm_max = "0"
Mmcache. shm_ttl = "0"
Mmcache. shm_prune_period = "0"
Mmcache. shm_only = "0"
Mmcache. compress = "1"
  
Then create a directory for fast data access:
# Mkdir/tmp/mmcache
# Chmod 0777/tmp/mmcache
  
Restart the Apache server:
  
#/Usr/local/httpd/bin/apachectl start
  
After installing the MM Cache, the web page speed is obviously accelerated, the specific data can be viewed: http://sourceforge.net/projects/turck-mmcache/ comparison report.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.