Linux基础备忘_03:图形界面,中文输入,xwiki,selinux中配置bugzilla

1)图形界面: 

#vim /etc/X11/xinit/Xclients看出当前为gnome

如遇无鼠标图标:gsetting get org.gnome.settings-daemon.plugins.cursor active

gsetting set org.gnome.settings-daemon.plugins.cursor active false

2)中文输入:

除terminal外的应用均无法中文输入,使用init 5后成功。

参考http://www.360doc.com/content/17/0312/15/4059533_636202845.shtml

3)apache相关:

配置#vim /etc/httpd/conf/httpd.conf

去掉/etc/httpd/conf.d/welcome.conf(指向/usr/share/httpd/noindex/index.html)后

DocumentRoot "/var/www/html"

4)安装xwiki:

使用WAR http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationWAR

4.1)container使用tomcat,安装apache-tomcat-9.0.0.M18.zip, TOMCAT_HOME=/usr/local/tomcat/

参考http://www.linuxidc.com/Linux/2016-08/134408.htm

4.2)db使用mysql,注意将MyISAM换成InnoDB,这里默认已经是InnoDB

安装mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz,参考https://dev.mysql.com/doc/refman/5.7/en/binary-installation.html

注意/var/log/mariadb/mariadb.log和/var/run/mariadb/mariadb.pid权限,参考http://blog.csdn.net/u011402032/article/details/53843999

注意/var/lib/mysql/server-key.pem权限

ERROR2002错误参考https://zhidao.baidu.com/question/202122963.html

注意是用root登陆而不是mysql, 修改密码set password for 'root'@'localhost' =password('123456');

关于字符集参考http://www.cnblogs.com/gzyx1988/p/6073053.html

4.2.1)如果是一铭server7已经安装好的mysql5.5.50,只需:

#mysql_install_db --user=mysql

#mysqld_safe --user=mysql &

#/usr/bin/mysqladmin -u root password 123456

4.3)xwiki

用户名xwikiadmin

wget http://repo1.maven.org/maven2/mysql/mysql-connector-java/6.0.5/mysql-connector-java-6.0.5.jar /usr/local/tomcat/webapps/xwiki/WEB-INF/lib/

解压配置即可。

注意xwiki的错误检查从下开始调试。

如果遇到MySQL JDBC Driver 5.1.33 - Time Zone Issue

参考http://stackoverflow.com/questions/26515700/mysql-jdbc-driver-5-1-33-time-zone-issue

4.3.1)xwiki的安装包:

因为自动激活DW,安装

最好先装Extension Manager(platform_xwiki-platform-extension-ui-9.2.xar): http://extensions.xwiki.org/xwiki/bin/view/Extension/Extension+Manager+Application

adminstration(org.xwiki.platform_xwiki-platform-administration-ui-9.2.xar): http://extensions.xwiki.org/xwiki/bin/view/Extension/Administration+Application

然后就可以在Extensions里安装XWiki Enterprise Flavor - Main Wiki 9.2

如果手动安装Flavor(enterprise_xwiki-enterprise-ui-mainwiki-9.2.xar): http://extensions.xwiki.org/xwiki/bin/view/Extension/XWiki%20Enterprise%20-%20UI%20-%20Main%20wiki

应该是这个sub wiki Flavor?: enterprise_xwiki-enterprise-ui-wiki-9.2.xar: http://extensions.xwiki.org/xwiki/bin/view/Extension/XWiki%20Enterprise%20-%20UI%20-%20Wiki

5)bugzilla的安装:

httpd.conf只需增加:

<Directory /var/www/html/bugzilla>
   AddHandler cgi-script .cgi
   Options +Indexes +ExecCGI
   DirectoryIndex index.cgi
   AllowOverride All 
</Directory>

运行/var/www/html/bugzilla/checksetup.pl

测试/var/www/html/bugzilla/testserver.pl http://localhost/bugzilla

配置/var/www/html/bugzilla/localconfig

但需要关闭selinux: setenforce 0

如果在selinux环境下,按照selinux管理手册P103配置安全上下文:

#chcon -R -t httpd_sys_script_exec_t /var/www/html/bugzilla/

#semanage boolean -m -1 httpd_can_network_connect_db 

更好的是用setsebool -P httpd_can_network_connect 1

此时仍然httpd访问mysql失败,audit.log: 

type=AVC msg=audit(1491464637.639:13328): avc:  denied  { connectto } for  pid=22553 comm="index.cgi" path="/var/lib/mysql/mysql.sock" scontext=system_u:system_r        :httpd_sys_script_t:s0 tcontext=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 tclass=unix_stream_socket

参考http://serverfault.com/questions/322117/selinux-letting-apache-talk-to-mysql-on-centos

semanage fcontext -a -t mysqld_db_t "/var/lib/mysql(/.*)?"

注意在restorecon -Rv /var/lib/mysql后

/var/lib/mysql/mysql.sock是unconfined_u:object_r:mysqld_var_run_t:s0

后续参看另一篇文档



已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页