On the installation of lamp development environment under Linux and Discuz, Phpwind, phpBB3, wordpress various forum Blogs

Source: Internet
Author: User
Tags install wordpress wordpress blog wordpress forum

Lamp development can be said to be very popular, stable and secure Linux system and Apache server with lightweight PHP, MySQL can be said to be the perfect combination. In terms of efficiency and security in all aspects than the ASP. NET, JSP and other dynamic language to Excel. This is one of the reasons why PHP is so popular. When it comes to Linux, it has to be said to be the best operating system, because it is safe, efficient, and strives for perfection in any detail. Because it is the crystallization of the sweat of many geek. So today is the most basic lamp development is to build the lamp environment. It is very simple to build this environment under Linux, which can be said to be very simple and not much of a process of environment configuration. May be in the lamp environment to install some forums and blog system Some of the details of the place to pay attention. Because individuals feel that it is common and useful to have a personal blog and forum. So just write this simple blog, can solve some problems. Then let's start!

The Linux system I'm using is not a virtual machine, it's a dual system of Linux and Window7, and it's really no different. My Linux system is a Ubuntu14.04 version, so take this version for example. Everyone knows that the command to install software in Ubuntu is the Apt-get install package name, in fact the Linux system for different distributions, for the installation of software has different methods, in Redhat and CentOS using the Yum command to install the software, And the suffix of the installation package is usually. rpm; in Ubuntu and Debian, it is the. Deb installation package, and one of the most primitive ways to install the software is to download the source code and then compile and install it locally. This is also illustrated by the Apt-get Install command. (Note: When you use Apt-get install to download the installation package, sometimes you will find that the corresponding package is not found, there may be one reason is because the remote server package files are not updated, so you can use the Apt-get update first to update the package files on the remote server, and then install When installing the software, you don't need to be so blind, you can use the Apt-get Cache search installation package name to see if the package is installed in the remote server package.

Building a lamp development environment is simple, the most important of which is the command:sudo apt-get install apache2 mysql-server php5 php5-mysql

With this command under root, you can install the apache2 server, MySQL installation, php5 installation, and Php5-mysql installation once. Then follow the prompts to install and install successfully. Then the next one is to test whether the respective environment is installed successfully.

1. Test whether the Apache2 is installed successfully:

1, first, in the/var/www/html/directory to see if there will be a index.html.

2. Then, enter a http://localhost/index.html in the address bar of the browser

3, if the interface appears in Apache's default page page, the APACHE2 server was built successfully.

2. Test whether the MySQL database is installed successfully:

1, enter in the terminal: Mysql-u root-p and then enter the password set during the MySQL installation, if not set in the installation process is the default user name root and the default password root

2, if the following interface shows that the installation is successful:

3. Test whether the PHP5 is installed successfully:

1, use is vim in the/var/www/html/directory to create a new index.php file.


2, then enter in the browser's address bar: http://localhost/index.php, if the following interface shows that the installation of the PHP environment is successful, if there is no interface but appeared <?php phpinfo (); >

This code indicates that the PHP environment was not successfully installed because PHP did not parse the code to show that the environment was not installed.


This is where the lamp development environment is built. Next I will install Discuz, Phpwind, phpBB3, WordPress as an example:

First, the Lamp Environment installation Discuz Forum:

1, first, need to download a discuz Zip package. Here is a ZIP package first: Click to download Discuz

2, then, it is necessary to use the Unzip command to extract the compressed package, and then you will find that there are three folders, but it is important that the upload folder inside

Then simply rename the upload folder to Discuz and then use sudo cp-r discuz now in the directory/var/www/html/command to move the folder to the/var/www/html/directory. (The directory is actually an entry path to the Apache server, so you want to deploy your Web app on the server and be accessed by someone else, then you need to move the folder to the public portal directory)

3, then then is in the browser input: http://localhost/Discuz/can, and then will jump to an installation boot interface, and then you will find two columns, a column is required state is writable, and then the state is not writable, that means in the Discuz directory, Need to write permissions to the corresponding directory file, so need to correspond to the page first display directory which requires write permission, plus write permission. Of course, there is a more violent way on the Internet is: chmod 777/var/www/html/*-R means that all the files and directories in the HTML directory are given a readable writable executable permission, this is not advisable, Linux system is because of the concept of permission to make it more secure. So we need to change the permissions as required, the principle is this: only to the directory file U g o all add Write permissions, PHP file using the default permissions, that is, do not modify its permissions. General is: chmod go+w the corresponding path under the directory name, only to modify the required directory permissions are writable, that is, when you refresh the installation of the configuration requirements of the page found all the permissions to meet the requirements of the next step;

4, then the next step is to fill in the database name, database login name, database password, administrator user name and password configuration, this according to the actual needs of the individual can be modified

5, the final, the test input: http://localhost/Discuz/index.php If the normal forum page can appear, the installation is successful.

Second, the Lamp Environment installation Phpwind Forum:

1, first, need to download a phpwind Zip package. Here is a ZIP package first: Click to download Phpwind

2, then, it is necessary to use the Unzip command to extract the package, and then you will find that there are three folders, but it is important that the Phpwind folder inside and only need to use sudo cp-r phpwind now in the directory/var/www/html/ command to move the folder to the/var/www/html/directory (the directory is actually an entry path to the Apache server, so you want to deploy your Web app to the server and be accessed by someone else, then you need to move the folder to the public portal directory)


3, then then is in the browser input: http://localhost/phpwind/can, and then will jump to an installation boot interface, and then you will find two columns, a column is required state is writable, and then the state is not writable, that means in the Phpwind directory, Need to write permissions to the corresponding directory file, so need to correspond to the page first display directory which requires write permission, plus write permission. Of course, there is a more violent way on the Internet is: chmod 777/var/www/html/*-R means that all the files and directories in the HTML directory are given a readable writable executable permission, this is not advisable, Linux system is because of the concept of permission to make it more secure. So we need to change the permissions as required, the principle is this: only to the directory file U g o all add Write permissions, PHP file using the default permissions, that is, do not modify its permissions. General is: chmod go+w the corresponding path under the directory name, only to modify the required directory permissions are writable, that is, when you refresh the installation of the configuration requirements of the page found that all permissions meet the requirements of the next step;



After you modify the permissions as required, you will continue to the next step:



Then the next step:

The final installation is complete, enter in the browser: http://localhost/phpwind/index.php, if the following page shows that the Phpwind forum has been installed successfully, but may appear the following circumstances, Is that the page is in the following state is located in the install.php, will not automatically jump to the index.php page.

This time need in the Phpwind directory, their own manual to remove the install.php, and then relocated to index.php, the following interface appears, the Phpwind has been installed.


Third, the lamp environment to install WordPress blog:

1, first, need to download a wordpress Zip package. Here is a ZIP package first: Click to download WordPress

2, then, it is necessary to use the Unzip command to extract the package, and then you will find that there are three folders, but it is important that the WordPress folder inside and then only need to use sudo cp-r WordPress is now in the directory/var/www/html/ command to move the folder to the/var/www/html/directory (the directory is actually an entry path to the Apache server, so you want to deploy your Web app to the server and be accessed by someone else, then you need to move the folder to the public portal directory)

3, then enter in the browser: http://localhost/wordpress/wp-admin/setup-config.php, and then jump to an installation boot interface:


Click on the beginning of the need to fill in the database name and database user name, password and other information, (note: Here with the previous two different, only need to specify the database name, automatically create the database and data table, and here the database must first establish the corresponding database, and then to fill in and create the database name consistent, Otherwise, you will not find the database error, thereby preventing the next installation) (used in MySQL: Create database WordPress;) First creating a good databases.


After submission, proceed to the next step: The following prompt will appear, Say no permission to write to the wp-config.php file, so there is no write permission to it, there are two ways to solve: one is to modify the wp-config.php default generated directory is the WordPress directory, to this directory writable permissions, and then wp-config.php file automatically generated write (Chmo D go+w./wordpress/); The second method is to create a new wp-config.php file (Vim wp-config.php) in the WordPress directory according to its prompts, and then copy and paste the contents into the VIM Wp-config.php can be in.


Click to install wait a while to set up administrator user name, password and other information


Final installation completed, enter in the browser: http://localhost/wordpress/, if the following page shows that the WordPress forum has been installed successfully



Four, the Lamp Environment installation PHPBB3 Forum:

1, first, need to download a phpBB3 Zip package. Here is a zip package first: click PhpBB3

2, then, you need to use the Unzip command to extract the package, and then you will find a folder, folder and then only need to use sudo cp-r phpBB3 now in the directory/var/www/html/command to move the folder to/var/www/html /directory, (the directory is actually an entry path to the Apache server, so you want to deploy your Web app on the server and be accessed by someone else, then you need to move the folder to the public portal directory)

3, because phpBB3 is pure English version, so can be configured in Chinese language pack, here first give a ZIP package: Click to Download the language pack

Then unzip the language pack and copy the folder to the language directory in the PhpBB3 directory to appear in Chinese


Click on the new installation, in the supported database that column found a lot of unavailable, and the last button is re-detection that is some things are not configured, the database This column is nothing to worry about, because as long as there is a database support can be, found that there is MySQL support available on the line.


In fact, the analysis of the discovery that really can not meet the requirements for the next installation through detection is the file and directory in the column of the Cache,files,store three directory permissions do not have write permission, you can not generate the colon file by default, that is, the permission to write colon files, So you can't pass the test. After modifying the permissions, it is found that the original re-detection button becomes the button to start the installation.




Then click Start Installation, the next step is to set the database name, and database user name and password and other information (note: The database is to create a database in MySQL, and then enter the appropriate database name)


Then click Continue Next:


Then click Continue Next: Then set the administrator's user name and password and other information



Then click Continue Next:


Then click Continue Next: Then the configuration file, click on the download, a config.php file, move it to the root directory of phpBB3, and then click Finish.



Click Continue next: Advanced settings, you can default directly click Next:


Click Next, there may be the following two kinds of situations one is an error, the other is a successful interface, the cause of the error is what?? is because the beginning may use the Apt-get install PHPBB3, the system default installation path, and automatically create a database, but if you do not delete the database, when you manually install and the original database, it will cause the second import of the data table and the original conflict will be error. The solution: is to use the MySQL command to remove the database, and apt-get autoremove phpbb3 command Uninstall the original installed, and then follow the previous steps step by step to start the reinstallation. Installation errors and Success pages are as follows:



Installation Success Effect:


Finalize the installation:


Final Test: Enter in the browser: http://localhost/phpBB3/if the following page appears the installation succeeds


All the installation here has been explained, if there is any problem at any time leave a message.


On the installation of lamp development environment under Linux and Discuz, Phpwind, phpBB3, wordpress various forum Blogs

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.