搭建wiki 服务器

This page explains how to download and install PmWiki 2.1 and 2.2. Here's a list of related pages:

  • Requirements - Pre-requisites for running the PmWiki wiki engine
  • Upgrades - How to upgrade an existing PmWiki installation
  • Wiki Farms - Running multiple wikis from a single installation
  • Change Log - Log of changes made to PmWiki by Release

Improvements to these instructions are always appreciated. Just report any problems you encounter to the pmwiki-users mailing list or use the PmWiki Issue Tracking System.

Installing PmWiki

If you upgrade, please read the page Upgrades and Release notes.

1. Download

Download the latest stable version of PmWiki as a

Download the latest beta version from the PmWiki:Subversion page.

2. Unpack

Unpack the archive (tar zxvf pmwiki-latest.tgz or unzip pmwiki-latest.zip). This will create a pmwiki-x.y.z directory containing the PmWiki software. For example, the current "latest" should unpack to a directory named pmwiki-2.2.63. The files in this directory include:

  README.txt        An introductory document
  pmwiki.php        The main PmWiki script
  local/            Configuration scripts (local configuration files)
  cookbook/         Recipes (add-ons) from the Cookbook
  docs/             Brief documentation, sample configuration scripts
  pub/              Publicly accessible files
  pub/css/          Extra CSS stylesheet files [1]
  pub/guiedit/
  pub/skins/        Layout templates for custom look and feel
  scripts/          Scripts that are part of PmWiki
  wikilib.d/        Bundled default PmWiki pages

The pmwiki-x.y.z directory needs to be placed into a location accessible by your webserver (e.g., in a public_html directory of some sort). You can place files and directories using a number of methods -- FTP, or a Unix mv or cp command generally does the job.

Note: It is recommended to change the "pmwiki-x.y.z" directory name to be simply "pmwiki" or just "wiki".

3. Create directories

In most cases PmWiki will do this for you. Open a web browser to the pmwiki.php script on the server (i.e., not the one on your local computer or accessed using a file://... URL). PmWiki will then analyze your system configuration and provide instructions (if needed) for creating the wiki.d/ directory which will be used to hold the pages created for your site.

Otherwise, there are two ways to achieve this. (Use Filezilla or WinSCP to change FTP file/folder permissions.)

3a. You can create the  wiki.d/ directory manually, and then give it full write permissions (i.e., " chmod 777 wiki.d"). Use this method when "safe mode" is activated in the server's PHP installation.
3b. On some systems you can let PmWiki create  wiki.d/ by temporarily changing the permissions on the directory containing the  pmwiki.php file to 2777. In Unix this is commonly done by changing to the directory containing  pmwiki.php and executing the command
chmod 2777 .
(note the dot at the end). The  chmod command also works in many FTP programs. Creating  wiki.d/ in this manner will (1) make the directory writable so the web server can create the data directory it needs for the wiki files, (2) preserve group ownership of the directory so the installer account can manipulate the files created in this directory, and (3) make it more difficult for other accounts on the same server to access the files in  wiki.d/.

After establishing directory permissions, try opening a browser to the pmwiki.php script again. If all is well, the wiki.d directory will have been created and you'll see the default home page.

Important: If you used method 3b, you should reset permissions by executing "chmod 755 ." in the directory containing pmwiki.php.

See also FilePermissions.

4. Initialize

Check out Initial Setup Tasks for other tasks you may want to perform to begin customizing your PmWiki installation. You might also want to peruse the Release Notes for further information.

5. Set language

If you want to use PmWiki in a different language download the international language pack as zip archive (i18n-all.zip) from http://pmwiki.org/pub/pmwiki/i18n/. Then extract it and copy the files into the wikilib.d/ directory as described above. Besides the -all file you can also download your country localization file only.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在 CentOS 上搭建 Wiki 可以选择多种方案,比如使用 MediaWiki、DokuWiki 等开源软件。下面以安装并配置 MediaWiki 为例,介绍 CentOS 7 上搭建 Wiki 的步骤。 1. 安装 Apache 和 PHP 首先安装 Apache 和 PHP,使用 yum 命令即可: ``` sudo yum install httpd php php-mysql ``` 2. 安装 MySQL Wiki 需要一个数据库来存储数据,可以选择 MySQL 或者 MariaDB。这里以 MySQL 为例,安装命令如下: ``` sudo yum install mariadb-server mariadb ``` 启动 MySQL 并设置开机自启: ``` sudo systemctl start mariadb sudo systemctl enable mariadb ``` 设置 MySQL root 用户的密码: ``` sudo mysql_secure_installation ``` 3. 下载和安装 MediaWiki 从 MediaWiki 官网下载最新版本的 MediaWiki,并解压到 Apache 的默认网站目录 `/var/www/html/`: ``` cd /var/www/html sudo wget https://releases.wikimedia.org/mediawiki/1.35/mediawiki-1.35.0.tar.gz sudo tar -xzvf mediawiki-1.35.0.tar.gz sudo mv mediawiki-1.35.0 wiki ``` 设置文件权限: ``` sudo chown -R apache:apache wiki/ sudo chmod 755 wiki/ ``` 4. 配置 Apache 在 Apache 的配置文件 `/etc/httpd/conf/httpd.conf` 中添加以下内容: ``` Alias /wiki /var/www/html/wiki <Directory /var/www/html/wiki> Options +FollowSymLinks AllowOverride All </Directory> ``` 重启 Apache 使配置生效: ``` sudo systemctl restart httpd ``` 5. 安装 MediaWiki 访问 `http://服务器IP地址/wiki`,将会看到 MediaWiki 的安装页面。根据提示,依次填写数据库信息、管理员账号和密码等信息。 安装完成后,可以使用管理员账号登录到 Wiki 并开始使用了。 注意:在生产环境中,应该对数据库和 Web 服务器进行更严格的配置和安全加固,以保证数据的安全性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值