Home > Article > Backend Development > Use Linux-based PHP to build your own wiki website (1)_PHP tutorial
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.
Choice of CMS software
If you search for open source content management from the Web, 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 a 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 for Linux in Directly enter: http://hostname/mambo/installation/index.php in the address bar, and the pre-installation preparation interface will appear. Select the language option to be green and 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.
● 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 MySQL database name 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.
● Website name settings
Set the alias of mambo here, please set it yourself according to the situation.
● Other settings
Here you mainly set the administrator’s email and other information. See Figure 3.
The above content mainly includes five parts: For the convenience of readers, the author made it into a list, as shown in Table 1.
● Security Settings
After the test is successful, the system will remind you to delete the installation files for security reasons (to prevent others from using these files to modify system information), and to record the admin (system administrator) password , see Figure 4.
# rm -rf /var/www/html/mambo/iinstallation/
1