Set up a PHP Forum In Debian

Source: Internet
Author: User
Set up a PHP Forum In Debian-Linux Enterprise Application-Linux server application information. The following is a detailed description. To set up a forum in Linux, You must select the prime combination Lamp (Linux/Apache/MySQL/PHP). Because it is a beginner, you have not chosen to compile and install it. You can directly use apt, it is much easier than windows.

# Apt-get install apache php4 php4-gd php4-mysql mysql-server mysql-client

After you press enter, the installation is complete. If you have to download the installation package from various official websites in windows, it is really troublesome.

Okay, the software package is installed, and the next step is debugging.

First configure apache, open/etc/apache/httpd. conf, and find DirectoryIndex:

DirectoryIndex index.html index.htm index.shtml index. cgi index. php default. php index. php3

It actually adds support for the default homepage.

Change the default character to adddefacharcharset gb2312. Save and restart apache.

#/Etc/init. d/apache restart

Next, configure mysql. Because the default root account does not have a password, add the password to the root account for security:

# Mysqladmin password

Edit/etc/init. d/mysql and find this line:

/Usr/bin/safe_mysqld>/dev/null 2> & 1 &
Change to/usr/bin/safe_mysqld> -- default-character-set = gb2312/dev/null 2> & 1 &

Restart mysql:
#/Etc/init. d/mysql restart

Similarly, modify/etc/php4/apache/php. ini and change default_charset to "gb2312.

Just like in windows, do a small test and create a phpinfo. enter the php file in/var/www, and then enter http: // ip/phpinfo in the browser. if php displays some information about php, it indicates that php and apache have been successfully configured.

Then we started to set up a forum, go to www.discuz.net to download the new discuz Chinese version, and decompress it. in the/var/www directory and run it, the installation Forum Wizard will appear. Here, you are required to specify a database name, so you must first create a database in mysql.

# Mysql-u root-p password
Mysql> create database bbs;

On the installation page, enter bbs in the database column.

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.