企业内部知识系统wecenter社区系统安装及部署

centos 6.5环境安装

因为是公司内部使用在线人数不会太多,使用yum安装lamp环境即可

1.安装lamp基本环境

yum -y install mysql mysql-server php php-mysql httpd php-gd*



安装freetype

yum -y install freetype freetype-devel



安装ImageMagick性能更佳

yum install -y ImageMagick ImageMagick-devel

安装mcrypt支持

yum install -y libmcrypt libmcrypt-devel mcrypt mhash php-mcrypt

更改目录权限

chown -R apache.apache /var/www/html/

2.创建wecenter数据库

mysql> create database wecenter charset=utf8;

上传安装.zip文件到/var/www/html目录,解压,并将upload目录改名为wecenter

访问http://IP/wecenter/install/开始进行安装

后台管理报错:

报错:

Not Found

The requested URL /admin/ was not found on this server.

Apache/2.2.15 (CentOS) Server at 192.168.3.87 Port 80



解决办法:

分析:

从页面返回的值来看,是系统直接找了 192.168.3.87/admin这个页面,而我们的目录放在/var/www/html/下的wecenter目录中,修改httpd.conf文件将网站根路径指向/var/www/html/wecenter目录即可解决问题

vim /etc/httpd/conf/httpd.conf

修改以下两处:

<Directory "/var/www/html/wecenter">

DocumentRoot "/var/www/html/wecenter"





重启apache服务

service httpd restart

系统配置伪静态的方法:

anwsion系统rewrite设置步骤

1. 参考下文设置好Rewrite规则,以管理员身份登录,进入管理后台 => 全局 => 站点功能 => 开启 Rewrite 伪静态

2.设置服务器的 Rewrite 规则

(*) 部分服务器可能由于配置不同需要修改规则

Apache:





<IfModule mod_rewrite.c>

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>





(*) 在某些环境下需要加 RewriteBase /





Nginx:

location / {

if (!-e $request_filename)

{

rewrite (.*) /index.php;

}





}





IIS:

[ISAPI_Rewrite]

CacheClockRate 3600

RepeatLimit 32

RewriteRule /static/(.*) /static/$1 [L]

RewriteRule /uploads/(.*) /uploads/$1 [L]

RewriteRule /(.*) /index.php/$1 [L]

(*)IIS的rewrite插件较多,没有一个通用的答案,如果上述规则失效,需要大家做进一步的调整。

centos 7环境下的安装

因为是公司内部使用在线人数不会太多,使用yum安装lamp环境即可

1.安装lamp基本环境

安装ImageMagick性能更佳

安装mcrypt支持



yum -y install mariadb mariadb-server php php-mysql httpd php-gd* freetype freetype-devel ImageMagick ImageMagick-devel libmcrypt libmcrypt-devel mcrypt mhash php-mcrypt





更改目录权限

chown -R apache.apache /var/www/html/



2.创建wecenter数据库

配置mysql数据库。

设置开机自启动mysql,并启动mysql,使用如下命令:

systemctl enable mariadb

ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service'



systemctl start mariadb



初始化mysql数据库,并配置root用户密码。使用如下命令:

mysql_secure_installation

/usr/bin/mysql_secure_installation: line 379: find_mysql_client: command not found

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here. Enter current password for root (enter for none):
OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation. Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success! By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment. Remove anonymous users? [Y/n] y
... Success! Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y
... Success! By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment. Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success! Reloading the privilege tables will ensure that all changes made so far
will take effect immediately. Reload privilege tables now? [Y/n] y
... Success! Cleaning up... All done! If you've completed all of the above steps, your MariaDB
installation should now be secure. Thanks for using MariaDB!

创建数据库

MariaDB> create database wecenter charset=utf8;





#如果仅授权数据库的增删改查权限将无法安装

MariaDB> GRANT ALL PRIVILEGES ON wecenter.* TO 'admin'@'%' IDENTIFIED BY 'pass';





MariaDB> FLUSH PRIVILEGES;

3.apache相关配置

启动apache服务

systemctl start httpd





上传WeCenter_3-1-9-0612-Patches.zip到/var/www/html/目录

解压并将包移走

unzip WeCenter_3-1-9-0612-Patches.zip 

mv WeCenter_3-1-9-0612-Patches.zip /tmp/

将upload改名

mv UPLOAD wecenter



访问http://ip_addr/wecenter/install/进行安装

• 欢迎使用
欢迎使用 WeCenter 安装程序, WeCenter 是中国首个基于 PHP + MYSQL 开发的开源化社交问答社区
• 服务器环境检查
为了确保程序安装顺利, 您的服务器需要满足以下系统需求的运行环境
PHP 版本5.4.16√
数据库模块PDO_MYSQL√
Session 支持√
Cookie 支持√
CType 支持√
CURL 支持√
图象处理库GD√ (加装 ImageMagick 性能更佳)
FreeType 支持√
Zlib 支持√
Mcrypt 支持√
编码转换√
上传限制2M (此处建议值 > 8M)
目录权限/var/www/html/wecenter/system/√
目录权限/var/www/html/wecenter/system/config/√

更改目录权限

chown -R apache.apache /var/www/html/

后台管理报错:

Not Found

The requested URL /admin/ was not found on this server.

Apache/2.2.15 (CentOS) Server at 192.168.3.87 Port 80





解决办法:

分析:

从页面返回的值来看,是系统直接找了 192.168.3.87/admin这个页面,而我们的目录放在/var/www/html/下的wecenter目录中,修改httpd.conf文件将网站根路径指向/var/www/html/wecenter目录即可解决问题

vim /etc/httpd/conf/httpd.conf

修改以下两处:

#DocumentRoot "/var/www/html"

DocumentRoot "/var/www/html/wecenter"

#
# Relax access to content within /var/www.
#
<Directory "/var/www">
AllowOverride None
# Allow open access:
Require all granted
</Directory> # Further relax access to the default document root:
<Directory "/var/www/html/wecenter">

重启apache服务

service httpd restart





发现访问后台很慢,查看了数据库日志发现是每次访问都尝试解析主机名导致的:

vim /var/log/mariadb/mariadb.log

160826 15:02:06 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.50-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
160826 15:40:36 [Warning] IP address '1.1.1.1' could not be resolved: Name or service not known
160826 15:40:39 [Warning] IP address '1.1.1.1' could not be resolved: Name or service not known
160826 17:56:00 [Note] /usr/libexec/mysqld: Normal shutdown

解决办法:

vim /etc/my.cnf

添加如下内容:



skip-name-resolve





重启数据库systemctl restart mariadb

centos6.5/centos7安装部署企业内部知识管理社区系统wecenter的更多相关文章

  1. CentOS7安装tyk(内部部署)

    CentOS7安装tyk(内部部署) 参考 官方文档 github 环境准备 #确保端口3000处于打开状态:Dashboard使用该端口来提供GUI和Developer Portal #Tyk需要P ...

  2. 最新版CentOS6.5上安装部署ASP.NET MVC4和WebApi

    最新版CentOS6.5上安装部署ASP.NET MVC4和WebApi 使用Jexus5.8.1独立版 http://www.linuxdot.net/ ps:该“独立版”支持64位的CentOS ...

  3. CentOS7安装部署zabbix3.4操作记录

    CentOS7安装部署zabbix3.4操作记录 1.安装前准备 1.1 查看centos的系统版本 [root@zabbix ~]# cat /etc/redhat-release CentOS L ...

  4. centos6 和centos7 安装git 的区别

    centos6 和centos7 安装git 的区别 centos6安装git yum install curl-devel expat-devel gettext-devel openssl-dev ...

  5. centos7 安装部署运行 Redis5

    原文:centos7 安装部署运行 Redis5 Redis5 下载与解压(官网: https://redis.io/download ) 下载命令:wget http://download.redi ...

  6. 容器centos7安装部署ansible

    容器centos7安装部署ansible centos镜像版本及ansible版本 centos:centos7.5.1804 ansible:2.9.11 启动容器并进入容器 docker run ...

  7. Centos7安装部署搭建gitlab平台、汉化

    Centos7安装部署搭建gitlab平台.汉化 安装环境要求:内存不要小于4G,否则后期web界面可能会报错 一.准备工作 1.1 查看系统版本 首先查询系统版本,下载Gitlab的对应版本 [ro ...

  8. supervisor的安装部署及集群管理

    supervisor的安装部署及集群管理 supervisor官网:http://www.supervisord.org/ 参考链接: http://blog.csdn.net/xyang81/art ...

  9. 如何在centos6和centos7上部署nfs共享服务器和客户端

    nfs共享服务为中小型企业在存储上提供了有效的节省空间,许多大型的网站也在使用nfs,如百度和阿里等,下面结合自己所学的知识,阐述如何在centos6和centos7下配置nfs.注:除了必要的说明外 ...

随机推荐

  1. 关于:HTTP Header -> Content-Type: text/plain Cache-Control: no-cache IE浏览器弹出错误下载对话

    下午遇到一个很奇怪的现象,一个网址: http://192.168.1.3/login?action=a&fr=b.com 注意网址后面的参数形式,action参数在前,最后一个参数值的尾部含 ...

  2. cdn模式下vue的基本用法

    我们知道jq是简化了dom操作,而react和vue则是通过使用虚拟dom的方式,不需要频繁的更改ui界面,而是通过更改数据的方式来更新界面. 我们知道些jq插件时会在IFFE中传入jQuery,jQ ...

  3. mysql常见问题解决

    日常使用mysql数据库遇到的一些问题,做下记录,会持续更新. 一.MySql Host is blocked because of many connection errors; unblock w ...

  4. poj1185炮兵阵地 正确代码及错误代码分析

    Solution:状态压缩 因为设置炮兵的局限性(同行两炮兵相差要大于2),一行10个数最多有60种可能性(程序计算) 其中判断可能性的好方法是: if ((i & (i << 1 ...

  5. 斯坦福大学公开课机器学习:梯度下降运算的特征缩放(gradient descent in practice 1:feature scaling)

    以房屋价格为例,假设有两个特征向量:X1:房子大小(1-2000 feets), X2:卧室数量(1-5) 关于这两个特征向量的代价函数如下图所示: 从上图可以看出,代价函数是一个又瘦又高的椭圆形轮廓 ...

  6. CentOS 7下Samba服务部署

    Samba,是种用来让UNIX系列的操作系统与微软Windows操作系统的SMB/CIFS(Server Message Block/Common Internet File System)网络协议做 ...

  7. Linux系统下yum镜像源环境部署记录

    之前介绍了Linux环境下本地yum源配置方法,不过这个是最简单最基础的配置,在yum安装的时候可能有些软件包不够齐全,下面说下完整yun镜像源系统环境部署记录(yum源更新脚本下载地址:https: ...

  8. Hadoop基础-HDFS集群中大数据开发常用的命令总结

    Hadoop基础-HDFS集群中大数据开发常用的命令总结 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 本盘博客仅仅列出了我们在实际生成环境中常用的hdfs命令,如果想要了解更多, ...

  9. javascript 常用的正则表达式验证表单

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  10. Linux记录-AWK语法(转载)

    1.原理 awk,一个行文本处理工具,逐行处理文件中的数据 语法:awk 'pattern + {action}' 说明:(1)单引号''是为了和shell命令区分开:(2)大括号{}表示一个命令分组 ...