Home >Backend Development >PHP Tutorial >Use Linux-based PHP to build your own wiki website_PHP tutorial

Use Linux-based PHP to build your own wiki website_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:34:121044browse

在自己的计算机上架设一个Wiki,好处是没有储存空间的限制,缺点是整个过程稍微麻烦一点,还必须要有不错的上传带宽。本文教你如何快速构建Wiki网站。

In the Web 2.0 revolution, the origin of wikis is earlier than blogs. A blog must be written and maintained by yourself. Updating the blog every day will drain your mind. However, wiki technology and the web pages that support it allow everyone to work together to exchange common interests. The wiki is fully open to everyone, including those who browse the wiki pages. In other words, everyone can create, modify and delete page content on the website at will. Compared with blogs, wikis are more team spirit.

Usually we translate Wiki as "wiki". The word Wiki comes from the Hawaiian word "wee kee wee kee", which originally means "hurry up". Wiki is an online multi-person collaboration hypertext system writing tool. Wiki sites support community-oriented collaborative writing, where everyone can express their own opinions or expand on jointly maintained topics. Wiki also includes a set of auxiliary tools to support this kind of writing, which can create, change and publish the text of Wiki pages on the basis of the Web, which is much simpler and more convenient than making and updating web pages.

There are two ways to implement Wiki: one is to register on the website provided by the Wiki space. After registration, you can start. Another option is to set up a Wiki on your own computer. The advantage is that there is no storage space limit. The disadvantage is that the whole process is a little more troublesome, and you must have good upload bandwidth. However, when the number of visitors is not large, home ADSL is enough. Used. Although there are disadvantages in setting up a Wiki on your own computer, the degree of freedom is relatively large. Here, the author will teach you how to set up a Wiki on your computer in ten minutes.

The LAMP dynamic Wiki website to be built in this article is an implementation method based on Linux PHP technology. LAMP (Linux + Apache + MySQL + PHP) has developed rapidly in recent years and has become the de facto standard for Web servers. Although these components were not originally designed to be used together, these open source software are readily available and free to use. This results in these components being often used together. Over the past few years, the compatibility of these components has continued to improve, and their use together has become very common. PHP is a cross-platform server-side embedded scripting language. It draws heavily on the syntax of C, Java and Perl languages, and adds PHP's own features to enable Web developers to quickly write dynamic pages. PHP supports all major databases. It's completely free and you don't need to pay anything to use it.

In addition, if you want to use the zlib format on Unix, BSD, and Linux platforms, you need to install the dynamic link function library zlib. The official website of Zlib is: http://www.gzip.org/zlib/. When compiling, please use the following command line options: ./configure --with-zlib.

CMS software selection

If you search the Web for open source content management, you will find a large number of sites, systems, and projects. In particular, the Open Source Content Management OSCOM site is dedicated to this topic. So what is a content management system? This definition from X-infoModeL is one of the best I’ve seen: “The processes and workflows involved in organizing, classifying, and structuring information resources so that they can be stored, published, and reused in a variety of ways. Content Management The system (CMS) is used to collect, manage and publish content, store content in the form of components or complete documents, while maintaining links between components. It can also provide content correction control "Mambo, which means Mambo Music in Chinese (source). (Cuban black music), is one of the most powerful open source content management systems. At the Linux Users and Developers Conference held in London on April 20, 2004, Mambo stood out from many outstanding open source systems and won the 2004 Best Linux Open Source System Award. It competed with KDE and Firebird. SQL and eGroupware, etc. Mambo's slogan is Power in Simplicity (power comes from simplicity). Mambo is developed based on php+mysql technology and has the characteristics of easy installation, simple management, and high reliability. Mambo can build various types of websites around the world, from simple personal websites to complex corporate application websites, Mambo can easily handle them. Mambo is a content management system for publishing websites. Many modules have been added to provide functions including shopping carts, banner ads, custom maps, chat and forums.

Build a Wiki website

1. Mambo CMS software download

#cd var/www/html

#wegt http://mamboforge.net/frs/download.php/4211/mambo452-Global.zip

#unzip mambo452-Global.zip “Create a directory”

2. Mambo creates database

# 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 mambo database ; "To create a database"

Query OK, 1 row affected (0.01 sec)

Mysql>grant all mambo privileges on mambo.* to mambo@localhost identified by ‘76543981’;?“Grant the created Mambo privileges to the Mambo account and set a password”

mysql>exit

3. Test whether the newly created database and account can be used

# mysql -u -p

Enter password: xxxxxxxxx

Your Mysql connection id is 3 to server version: 4.11 ……

Mysql> connect mambo;

Connection id: 5

Current database:

mysql>show databases;

+-------------+

| Database |

+-------------+

| mysql |

| mambo |

+-------------+

2 rows in set (0.00 sec)

mysql> quit

4. Start installing Mambo

● Grant permissions

#cd /var/www/html/ #Enter the actual directory of the Apache server#

#chmod 777 /var/www/html/mambo

Network installation is very simple and usually requires the following steps: Open the Firefox browser on Linux and enter directly in the address bar: http://hostname/mambo /installation/index.php, and then the following will appear: In the pre-installation preparation interface, select the language option in green, select Agree, and then click the "Next" button, as shown in Figure 1. Then whether to accept the software license agreement, select Agree, and click the "Next" button.



Figure 1 Inspection before installation

● MySQL database settings

It should be noted that the MySQL server name is localhost. This is the MySQL server name, not the Linux server name. Usually the MySQL server name is: localhost. The name of the MySQL database is mambo, the MySQL account is mambo and the password is the value set above. The prefix of the database table is usually mom_s, see Figure 2

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/508487.htmlTechArticleSet up a Wiki on your own computer. The advantage is that there is no storage space limit. The disadvantage is that the whole process is a little more troublesome. , you must also have good upload bandwidth. This article teaches you how to quickly...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn