centos7关闭防火墙安装不了软件的问题,请大神指教,谢谢

求助,centos7.2系统起不来,求大神指教_百度知道
求助,centos7.2系统起不来,求大神指教
答题抽奖
首次认真答题后
即可获得3次抽奖机会,100%中奖。
<span class="wgt-replyer-all-uname
" data-href="https://zhidao.baidu.com/usercenter?uid=876a05esharing
<span class="wgt-replyer-all-card-name3 wgt-replyer-all-card-names" data-href="https://zhidao.baidu.com/usercenter?uid=876a05esharing
采纳数:528
获赞数:92
擅长:暂未定制
贴个图看看什么故障
为你推荐:
其他类似问题
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。CentOS7下安装sphinx搭建&不足请大家指教& - 话题 - Yii Framework 中文网
CentOS7下安装sphinx搭建&不足请大家指教&
1451次浏览
更新依赖包以及安装编译环境
yum -y install m4 autoconf automake libtool
yum -y install gcc gcc-c++ wget
yum -y install mysql-devel
下载coreseek
wget http://www.coreseek.cn/uploads/csft/3.2/coreseek-3.2.14.tar.gz
mmseg3是一个中文分词插件
tar xzvf coreseek-3.2.14.tar.gz
cd coreseek-3.2.14
cd mmseg-3.2.14/
./bootstrap
./configure --prefix=/usr/local/mmseg3
make install
cd ../csft-3.2.14/
sh buildconf.sh
./configure --prefix=/usr/local/coreseek --without-python --without-unixodbc --with-mmseg --with-mmseg-includes=/usr/local/mmseg3/include/mmseg/ --with-mmseg-libs=/usr/local/mmseg3/lib/ --with-mysql --host=arm
vi src/sphinxexpr.cpp
然后将所有的T val = ExprEval ( this-&m_pArg, tMatch ).....修改为
T val = this-&ExprEval ( this-&m_pArg, tMatch )
make install
collect2: ld 返回 1
[indexer] 错误 1
make[2]: Leaving directory `/setup/coreseek-3.2.14/csft-3.2.14/src'
[all] 错误 2
make[1]: Leaving directory `/setup/coreseek-3.2.14/csft-3.2.14/src'
make: *** [all-recursive] 错误 1
一开始以为libiconv的问题,又重装了几次还是一样,最后终于找着办法了
./src/MakeFile文件
LIBS = -lm -lexpat -L/usr/local/lib
LIBS = -lm -lexpat -liconv -L/usr/local/lib
或解决办法:打开configure文件,找到“#define USE_LIBICONV 1”,将注释去掉,并将1改成0。
cd /usr/local/coreseek/etc
进入配置目录通过命令ls可以看到3个文件
example.sql
sphinx.conf.dist
sphinx-min.conf.dist
其中example.sql是示例sql脚本我们将其导入到数据库中的test数据库中作为测试数据(会创建两张表 documents和tags)
vi sphinx.conf
输入以下内容
source src1
= localhost
= /tmp/mysql.sock
sql_query_pre
= SET NAMES utf8
SELECT id, group_id, UNIX_TIMESTAMP(date_added) AS date_added, title, content \
FROM documents
sql_attr_uint
= group_id
sql_attr_timestamp
= date_added
sql_query_info
= SELECT * FROM documents WHERE id=$id
index test1
= /usr/local/coreseek/var/data/test1
charset_type
= zh_cn.utf-8
morphology
min_word_len
html_strip
charset_dictpath
= /usr/local/mmseg3/etc/
= /usr/local/coreseek/var/log/searchd.log
= /usr/local/coreseek/var/log/query.log
read_timeout
max_children
= /usr/local/coreseek/var/log/searchd.pid
max_matches
seamless_rotate
preopen_indexes
unlink_old
代码段source src1{} 代表数据源里面主要包含了数据库的配置信息,src1表示数据源名字,可以随便写。
代码段index test1{} 代表为哪个数据源创建索引,与source *** 是成对出现的,其中的source参数的值必须是某一个数据源的名字。
其他参数可以查看手册,这里不再赘述。
/usr/local/coreseek/bin/indexer -c /usr/local/coreseek/etc/sphinx.conf --all
/usr/local/coreseek/bin/searchd -c /usr/local/coreseek/etc/sphinx.conf
其中参数--all表示生成所有索引
当然也可以是索引的名字例如:。
执行后可以在/usr/local/coreseek/var/data目录中看到多出一些文件,是以索引名为文件名的不同的扩展名的文件
在不启动sphinx的情况下即可测试命令:
/usr/local/coreseek/bin/search -c /usr/local/coreseek/etc/sphinx.conf 广东
windows下创建sphinx
1、进入coreseek文件夹下
2、创建索引
.\bin\indexer.exe -c .\etc\配置文件名字 --all
3、开启索引
.\bin\searchd.exe -c .\etc\配置文件
4、如果用docs操作进行搜索
.\bin\search.exe -c .\etc\配置文件名字
搜索关键值
好像官网下载不了,好尴尬啊,我先是在Windows百度找一个下载好,上传到linux。用的是FZ
您需要登录后才可以回复。 |当前位置:
VMware部署Linux Centos72版本问题 求指教
VMware部署Linux Centos72版本问题 求指教
来源:网络整理&&&&&时间: 2:58:11&&&&&关键词:
关于网友提出的“ VMware部署Linux Centos72版本问题 求指教”问题疑问,本网通过在网上对“ VMware部署Linux Centos72版本问题 求指教”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:
问题: VMware部署Linux Centos72版本问题 求指教
描述:我是在阿里云下载的IOS文件,看着列表中还有其它各种未知文件,所以来发个帖求证下我的选择是否正确,类外其它都是些什么文件?具体如图:我选的是CentOS-7-x86_64-DVD-1511.iso这个 应该正确吧???解决方案1:对的,就是这个。Everything就是啥都有,Live*就是各个桌面的livecd,Minimal就是啥都没有,NetInstall就是没有网你[和谐]都没有。
以上介绍了“ VMware部署Linux Centos72版本问题 求指教”的问题解答,希望对有需要的网友有所帮助。
本文网址链接:http://www.codes51.com/itwd/4106532.html
上一篇: 下一篇:CentOS7安装mysql5.7 使用YUM方式丶一个站在Java后端设计之路的男青年个人博客网站此文转自http://www.cnblogs.com/Csir/p/6912527.html,不足之处,多多指教
=======================环境=========================
[root@zabbix ~]# hostname
[root@zabbix ~]# hostname -I
10.0.0.120 172.16.1.120
先说下环境,我这里是用ansible批量执行的。server端为外网为10.0.0.120。目标是让客户端四台机器做到时间同步,一秒不差
[root@zabbix ~]# cat /etc/ansible/hosts
172.16.1.51
172.16.1.52
172.16.1.53
172.16.1.250
防火墙关闭:
[root@zabbix ~]# systemctl status firewalld.service
firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld. vendor preset: enabled)
Active: inactive (dead)
selinux关闭:
[root@zabbix ~]# getenforce
[root@localhost ~]# systemctl status chrony
● chrony.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
========================服务端=========================
1.安装chrony(所有机器)
yum install chrony -y
2.启动chrony
[root@zabbix ~]# systemctl start chronyd.service
[root@zabbix ~]# systemctl status chronyd.service
???chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd. vendor preset: enabled)
Active: active (running) since Sat
11:47:43 CST; 4s ago
3.编辑配置文件(注意:现在是服务器端的修改)
22 allow 10.0.0.0/24
24 # Listen for commands only on localhost.
25 bindcmdaddress 127.0.0.1
26 bindcmdaddress ::1
28 # Serve time even if not synchronized to any NTP server.
29 local stratum 10
#第22行设置为本网段
#第29行的注释取消
4.查看配置文件如下
[root@zabbix ~]# egrep -v "#|^$" /etc/chrony.conf
server ntp1.aliyun.com
server time1.aliyun.com
stratumweight 0
driftfile /var/lib/chrony/drift
makestep 10 3
allow 10.0.0.0/24
bindcmdaddress 127.0.0.1
bindcmdaddress ::1
local stratum 10
keyfile /etc/chrony.keys
commandkey 1
generatecommandkey
noclientlog
logchange 0.5
logdir /var/log/chrony
5.重启时间同步服务
[root@zabbix ~]# systemctl restart chronyd.service
======================客户端=====================
客户端的配置文件是同一个文件(/etc/chrony.conf)
1.删掉哪些没用的server xxxxxxxxxx iburst
<span style="color: # # Use public servers from the pool.ntp.org project.
2 # Please consider joining the pool (http://www.pool.ntp.org/j
oin.html).
10.0.0.120
4 # Ignore stratum in source selection.
2.在server端把配置文件编辑好然后用ansible批量分发过去
[root@zabbix ~]# ansible client -m copy -a "src=/root/chrony.conf dest=/etc/"
172.16.1.250 | SUCCESS =& {
"changed": true,
"checksum": "52bda81d895de3c7ceec074df757e",
"dest": "/etc/chrony.conf",
"group": "root",
"md5sum": "aee9cc7faa70a0c189033cdb",
"mode": "0644",
"owner": "root",
"size": 1038,
"src": "/root/.ansible/tmp/ansible-tmp-.35-238/source",
"state": "file",
172.16.1.53 | SUCCESS =& {
"changed": true,
"checksum": "52bda81d895de3c7ceec074df757e",
"dest": "/etc/chrony.conf",
"group": "root",
"md5sum": "aee9cc7faa70a0c189033cdb",
"mode": "0644",
"owner": "root",
"size": 1038,
"src": "/root/.ansible/tmp/ansible-tmp-.34-838/source",
"state": "file",
172.16.1.51 | SUCCESS =& {
"changed": true,
"checksum": "52bda81d895de3c7ceec074df757e",
"dest": "/etc/chrony.conf",
"group": "root",
"md5sum": "aee9cc7faa70a0c189033cdb",
"mode": "0644",
"owner": "root",
"size": 1038,
"src": "/root/.ansible/tmp/ansible-tmp-.43-677/source",
"state": "file",
172.16.1.52 | SUCCESS =& {
"changed": true,
"checksum": "52bda81d895de3c7ceec074df757e",
"dest": "/etc/chrony.conf",
"group": "root",
"md5sum": "aee9cc7faa70a0c189033cdb",
"mode": "0644",
"owner": "root",
"size": 1038,
"src": "/root/.ansible/tmp/ansible-tmp-.43-99/source",
"state": "file",
3.启动同步服务,防火墙也需要关闭
[root@zabbix ~]# ansible client -m shell -a "systemctl start chronyd.service"
172.16.1.53 | SUCCESS | rc=0 &&
172.16.1.250 | SUCCESS | rc=0 &&
172.16.1.52 | SUCCESS | rc=0 &&
172.16.1.51 | SUCCESS | rc=0 &&
4.注意客户端时间同步定时任务关闭
[root@zabbix ~]# ansible client -m shell -a "crontab -l"
172.16.1.51 | SUCCESS | rc=0 &&
172.16.1.250 | SUCCESS | rc=0 &&
172.16.1.53 | SUCCESS | rc=0 &&
172.16.1.52 | SUCCESS | rc=0 &&
[root@zabbix ~]# ansible client -m shell -a "ntpdate 10.0.0.120"
172.16.1.53 | SUCCESS | rc=0 &&
27 May 13:05:57 ntpdate[26817]: adjust time server 10.0.0.120 offset -0.001686 sec
172.16.1.250 | SUCCESS | rc=0 &&
27 May 13:05:57 ntpdate[17419]: adjust time server 10.0.0.120 offset -0.004419 sec
172.16.1.52 | SUCCESS | rc=0 &&
27 May 13:05:57 ntpdate[50111]: adjust time server 10.0.0.120 offset -0.004410 sec
172.16.1.51 | SUCCESS | rc=0 &&
27 May 13:05:57 ntpdate[114089]: adjust time server 10.0.0.120 offset -0.000597 sec
6.查看时间,现在已经都同步了,一秒不差
[root@zabbix ~]# ansible client -m shell -a "date"
172.16.1.250 | SUCCESS | rc=0 &&
Sat May 27 13:06:04 CST 2017
172.16.1.51 | SUCCESS | rc=0 &&
Sat May 27 13:06:04 CST 2017
172.16.1.53 | SUCCESS | rc=0 &&
Sat May 27 13:06:04 CST 2017
172.16.1.52 | SUCCESS | rc=0 &&
Sat May 27 13:06:04 CST 2017
方法二:放入定时任务
[root@zabbix ~]# ansible client -m cron -a "name='time sync' minute=*/5 job='/usr/sbin/ntpdate 10.0.0.120 &&/dev/null'"
172.16.1.51 | SUCCESS =& {
"changed": true,
"envs": [],
"time sync"
172.16.1.52 | SUCCESS =& {
"changed": true,
"envs": [],
"time sync"
172.16.1.53 | SUCCESS =& {
"changed": true,
"envs": [],
"time sync"
172.16.1.250 | SUCCESS =& {
"changed": true,
"envs": [],
"time sync"
[root@zabbix ~]# ansible client -m shell -a "crontab -l"
172.16.1.51 | SUCCESS | rc=0 &&
#Ansible: time sync
*/5 * * * * /usr/sbin/ntpdate 10.0.0.120 &&/dev/null
172.16.1.52 | SUCCESS | rc=0 &&
#Ansible: time sync
*/5 * * * * /usr/sbin/ntpdate 10.0.0.120 &&/dev/null
172.16.1.53 | SUCCESS | rc=0 &&
#Ansible: time sync
*/5 * * * * /usr/sbin/ntpdate 10.0.0.120 &&/dev/null
172.16.1.250 | SUCCESS | rc=0 &&
#Ansible: time sync
*/5 * * * * /usr/sbin/ntpdate 10.0.0.120 &&/dev/null
阅读(...) 评论()

我要回帖

更多关于 centos7关闭防火墙 的文章

 

随机推荐