首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

Centos6 上搭建wiki服务器

2014-06-09 
Centos6 下搭建wiki服务器搭建步骤如下:(root下执行)1. yum install httpd php pcre php-mysql php-pear p

Centos6 下搭建wiki服务器
搭建步骤如下:(root下执行)

1. yum install httpd php pcre php-mysql php-pear php-pecl-apc mysql-server ImageMagick sendmail php-intl wget system-config-firewall-tui2. service mysqld start3./usr/bin/mysql_secure_installation4.登陆mysql,建立用户和密码如下:insert into mysql.user(Host,User,Password) values("localhost","mediawiki",password("1234"));5. 建立数据库并赋权:create database wikidb;grant index, create, select, insert, update, delete, alter, lock tables on wikidb.* to 'mediawiki'@'localhost' identified by '1234';exit;远程访问赋权:grant all privileges on *.* to 'mediawiki'@'192.168.1.111' identified by '1234';FLUSH PRIVILEGES;6.cd /var/www/html7.wget http://download.wikimedia.org/mediawiki/1.18/mediawiki-1.18.2.tar.gz8.tar xzpf mediawiki-1.18.2.tar.gz9.mv mediawiki-1.18.2 wiki10.chown -R apache:apache wiki11.vi /etc/httpd/conf/httpd.conf 添加:<Directory "/var/www/html/wiki/images">Options -Indexes# Ignore .htaccess filesAllowOverride None# Serve HTML as plaintext, don't execute SHTMLAddType text/plain .html .htm .shtml .php# Don't run arbitrary PHP code.php_admin_flag engine off# If you've other scripting languages, disable them too.</Directory>11. /etc/httpd/conf/httpd.conf  设置serverName12.chmod 775 /var/www/html/wiki/images13. vi /etc/php.ini 设置上传文件大小post_max_size = 128Mupload_max_filesize = 128M14. 打开系统的 80和443 端口15.service httpd restart16. 登陆  http://IP:端口/wiki设置:database name:wikidb, database username: mediawiki 等(设置时有前面第4步创建的一致)并选择PHP object caching17.下载LocalSettings.php并放到/var/www/html/wiki 目录18.vi /var/www/html/wiki/LocalSettings.php$wgEnableUploads = true; # Set this to true# 添加如下:$wgFileExtensions = array('png','gif','jpg','jpeg','doc','xls','mpp','pdf','ppt','tiff','bmp','docx', 'xlsx', 'pptx','ps','odt','ods','odp','odg','exe');$wgFileBlacklist = array_diff( $wgFileBlacklist, array ('exe') );  19.chkconfig httpd on20.chkconfig mysqld on21.service sendmail restart22. chkconfig sendmail on23. 安装完毕, 开始你的wiki之旅。问题1:##linux 下apche无法监听端口解决办法[root@localhost html]# service httpd startStarting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.termwikidev for ServerName(13)Permission denied: make_sock: could not bind to address [::]:81(13)Permission denied: make_sock: could not bind to address 0.0.0.0:81no listening sockets available, shutting downUnable to open logs解决办法:semanage port -l|grep httpsemanage port -a -t http_port_t -p tcp 81问题2:### CentOS 打开端口 如打开3306端口,操作如下:/sbin/iptables -I INPUT -p tcp --dport 3036 -j ACCEPT保存我们的操作,命令如下:/etc/rc.d/init.d/iptables save查看端口的状态,命令如下:/etc/init.d/iptables status

热点排行