Skip to main content

学习服务器配置之路~~

第一个常见的小问题:MySQL安装
os : fedora 20
mysql: mysql-server(5.5)

所有假设你的系统是没有经过特殊配置的。
1:
yum install mysql-server
2:
mysql
报错:socket连接不上
3:
service mysqld start   注意这步是 mysqld 不是mysql
这样就解决。网上的方法好像有点麻烦。


第二个小问题:解压一些文件(.tar.gz)时报错
http://itsfoss.com/how-solve-stdin-gzip-format/ 上面介绍的很清楚,总之要先确认你下载的文件类型。

第三个小问题。配置tomcat服务器
主要问题是比如我的域名是 cqupt.me 而你tomcat服务器的项目在/webapps/{your projectname}
这时你很蛋疼的要 cqupt.me:8080/{your projectname}/index.html。
如果要cqupt.me就可以完成。这样配置:
都是在tomcat下/conf/server.xml
第一步端口。简单 不废话
第二部。

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
</Host>
在标签中间插入:
<Context path="" docBase="xbwl" debug="0" reloadable="true"/>
docBase="xbwl" xbwl即为指定的项目。即({your projectname}_
完整如下:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="xbwl" debug="0" reloadable="true"/>
</Host>

原文:http://xxs673076773.iteye.com/blog/1134805


第四个问题:
如果解决关闭远程putty后,你的服务程序就断掉。
地址:http://www.ibm.com/developerworks/cn/linux/l-cn-screen/#ibm-pcon
 第五个小问题:
远程连接mysql:
  http://blog.csdn.net/lzpggg/article/details/4562439 原文链接

后续慢慢补充小常识


Comments

Popular posts from this blog

Master-Worker模式 Python(转载)

转载来自: http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000/001386832973658c780d8bfa4c6406f83b2b3097aed5df6000 分布式进程 810次阅读 在Thread和Process中,应当优选Process,因为Process更稳定,而且,Process可以分布到多台机器上,而Thread最多只能分布到同一台机器的多个CPU上。 Python的 multiprocessing 模块不但支持多进程,其中 managers 子模块还支持把多进程分布到多台机器上。一个服务进程可以作为调度者,将任务分布到其他多个进程中,依靠网络通信。由于 managers 模块封装很好,不必了解网络通信的细节,就可以很容易地编写分布式多进程程序。 举个例子:如果我们已经有一个通过 Queue 通信的多进程程序在同一台机器上运行,现在,由于处理任务的进程任务繁重,希望把发送任务的进程和处理任务的进程分布到两台机器上。怎么用分布式进程实现? 原有的 Queue 可以继续使用,但是,通过 managers 模块把 Queue 通过网络暴露出去,就可以让其他机器的进程访问 Queue 了。 我们先看服务进程,服务进程负责启动 Queue ,把 Queue 注册到网络上,然后往 Queue 里面写入任务: # taskmanager.py import random, time, Queue from multiprocessing.managers import BaseManager # 发送任务的队列: task_queue = Queue.Queue() # 接收结果的队列: result_queue = Queue.Queue() # 从BaseManager继承的QueueManager: class QueueManager(BaseManager): pass # 把两个Queue都注册到网络上, callable参数关联了Queue对象: QueueManager.register('get_task_queue', callable=lambda: tas

Elasticsearch error when the field exceed limit 32kb

When we post data that the field exceed the limit, elasticsearch will reject the data which error: {"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[cs19-2][10.200.20.39:9301][indices:data/write/index]"}],"type":"illegal_argument_exception","reason":"Document contains at least one immense term in field=\"field1\" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped.  Please correct the analyzer to not produce such terms.  The prefix of the first immense term is You can handle this: 1. you can udpate the mapping part at any time PUT INDEXNAME/_mapping/TYPENAME { "properties" : { "logInfo" : { "type" : "string" , "analyzer" : "keyword" , "ignore_above" : 32766 } } } ignore_above means that we will only keep 32766 bytes 2