linux iptables导致httpd网页打不开(转帖)

linux iptables导致httpd网页打不开 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。http://taotao1240.blog.51cto.com/731446/611758

问题:httpd 服务已启动,80端口已开,但是网页就是打不开,重启服务器还是不行

忽然想看看log,记录如下:

[Fri Jul 15 00:41:03 2011] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0

[Fri Jul 15 00:41:03 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)

[Fri Jul 15 00:41:03 2011] [notice] Digest: generating secret for digest authentication …

[Fri Jul 15 00:41:03 2011] [notice] Digest: […]

linux 如何显示一个文件的某几行(中间几行)

linux 如何显示一个文件的某几行(中间几行)

【一】从第3000行开始,显示1000行。即显示3000~3999行

cat filename | tail -n +3000 | head -n 1000

 

【二】显示1000行到3000行

cat filename| head -n 3000 | tail -n +1000

 

*注意两种方法的顺序

 

分解:

tail -n 1000:显示最后1000行

tail -n +1000:从1000行开始显示,显示1000行以后的

head -n 1000:显示前面1000行

 

【三】用sed命令

 

sed -n ‘5,10p’ filename 这样你就可以只查看文件的第5行到第10行。

关于PYTHON_EGG_CACHE无权限的问题

Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory. Traceback (most recent call last): File “/data/wap/www/spider/picture.py”, line 8, in ? import MySQLdb, datetime, time File “build/bdist.linux-x86_64/egg/MySQLdb/__init__.py”, line 19, in ? File “build/bdist.linux-x86_64/egg/_mysql.py”, line 7, […]

ubuntu下搭建vpn历程(转贴)

1、卸载pptpd和iptables,重新安装pptpd #卸载pptpd $ apt-get autoremove pptpd $ apt-get purge pptpd #卸载iptables $ apt-get autoremove iptables* $ apt-get purge iptables* #安装pptpd $ apt-get install pptpd 2、配置pptpd (1)首先,编辑pptpd.conf文件,设置localip和remoteip $ vim /etc/pptpd.conf

查找到localip和remoteip,打开注释进行设置。将localip设置为你的vps的服务器公网ip,不知道可以通过ifconfig查看。remoteip是设置给VPN用户分配的IP段,我这里设置为10.100.0.2-100。

localip VPS_IP remoteip 10.100.0.2-100 (2)修改dns设置,设置为google的DNS $ vim /etc/ppp/pptpd-options

查找到ms-dns,配置dns如下:

ms-dns 8.8.8.8 ms-dns 8.8.4.4 (3)设置VPN的账号密码

编辑chap-secrets文件

$ vim /etc/ppp/chap-secrets

在chap-secrets文件中添加一行配置

#client server secret IP address liuchungui […]

用DESeq进行差异分析的源代码

要保证当前文件夹下面有了742KO1.count等4个文件,就是用htseq对比对的bam文件进行处理后的输出文件

library(DESeq) #加载数据 K1=read.table(“742KO1.count”,row.names=1) K2=read.table(“743KO2.count”,row.names=1) W1=read.table(“740WT1.count”,row.names=1) W2=read.table(“741WT2.count”,row.names=1) #列名 data=cbind(K1,K2,W1,W2) #如果是htseq的结果,则删除data最后四行 n=nrow(data) data=data

[c language=”(-n+4:-n),”][/c]

#如果是bedtools的结果,取出统计个数列和行名 kk1=cbind(K1$V5) rownames(kk1)=rownames(K1) K1=kk1

#差异分析 colnames(data)=c(“K1″,”K2″,”W1″,”W2″) type=rep(c(“K”,”W”),c(2,2)) de=newCountDataSet(data,type) de=estimateSizeFactors(de) de=estimateDispersions(de) res=nbinomTest(de,”K”,”W”)

#res就是我们的表达量检验结果

到这里,理论上差异基因的分析已经结束啦!后面只是关于R的bioconductor包的一些简单结合使用而已

library(org.Mm.eg.db)

tmp=select(org.Mm.eg.db, keys=res$id, columns=c(“ENTREZID”,”SYMBOL”), keytype=”ENSEMBL”)

#合并res和tmp res=merge(tmp,res,by.x=”ENSEMBL”,by.y=”id”,all=TRUE)

#go tmp=select(org.Mm.eg.db, keys=res$ENSEMBL, columns=”GO”, keytype=”ENSEMBL”) ensembl_go=unlist(tapply(tmp[,2],as.factor(tmp[,1]),function(x) paste(x,collapse =”|”),simplify =F))

#为res加入go注释, res$go=ensembl_go[res$ENSEMBL]#为res加入一列go

#写入all——data all_res=res write.csv(res,file=”all_data.csv”,row.names =F)

uniq=na.omit(res)#删除无效基因 sort_uniq=uniq[order(uniq$padj),]#按照矫正p值排序

#写入排序后的all_data write.csv(res,file=”all_data.csv”,row.names =F)

#标记上下调基因 […]

Linux 基础 —— 文件共享服务 FTP,NFS 和 Samba

One, the establishment of samba sharing, shared directory for /data, requirements:

1)The share name is shared, the working group for the MYDATA, can be viewed; 2) adding group develop, add Gentoo, CentOS and Ubuntu, where Gentoo and CentOS with develop as the additive group, Ubuntu does not belong to the develop group; password are user […]

linux中的NFS服务器配置及/etc/exports

linux Centos (6.6)服务器之间文件共享挂载

目的:因为服务器设置了负载均衡,多服务器的文件上传必然要同步,这里的目的把服务器1设置为主文件服务器

服务器1:192.168.1.100

服务器2:192.168.1.20

风来了.呆狐狸

安装基础所需套件[每台] 1.nfs [html] view plain copy

print? yum install nfs-utils 2.设置服务自启动 [plain] view plain copy

print? chkconfig rpcbind on chkconfig nfs on 3.启动服务 [plain] view plain copy

print? service rpcbind start service nfs start

 

[root@localhost database]# yum install portmap 已加载插件:fastestmirror, langpacks Loading mirror speeds […]

linux 依赖关系冲突 解决办法

用aptitude 工具可以搞定 先:sudo apt-get install aptitude 然后: sudo aptitude install python-dev 下列“新”软件包将被安装。 python-dev python2.7-dev{ab} 0 个软件包被升级,新安装 2 个, 0 个将被删除, 同时 0 个将不升级。 需要获取 29.5 MB 的存档。 解包后将要使用 39.3 MB。 下列软件包存在未满足的依赖关系: python2.7-dev : 依赖: python2.7 (= 2.7.3-0ubuntu3) 但是 2.7.3-0ubuntu3.1 已安装。 依赖: libpython2.7 (= 2.7.3-0ubuntu3) 但是 2.7.3-0ubuntu3.1 已安装。 依赖: libexpat1-dev 但它将不会被安装。 依赖: libssl-dev 但它将不会被安装。 下列动作将解决这些依赖关系:

[…]

ubuntu 12.04 LTS 如何使用更快的更新源_百度经验

# 电子科大(教育网用户推荐)

deb http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse

deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse

deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse

deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse

deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse

deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse

deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse

deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main […]

经典的gnome界面将在ubuntu12.04回归

Ubuntu 12.04于2012年4月26日发布。面对采用了Unity的Ubuntu 12.04,也许有人不愿意升级甚至投向其它Linux发行版,然而无论升级还是投入其它桌面环境,都意味着转换成本太大:使用习惯要改变,熟悉的系统自带软件也会面临改动。

Gnome, KDE, Lxde, Xfce等桌面环境历来各成一体,自带的常用软件非常不一样,熟能生巧可能比转向一个更好的工具更重要,再说另一个桌面环境下的软件就一定好用?而如果用户重新安装自己熟悉的软件,也绝非易事,折腾的事情并不是许多人愿意做的。

Ubuntu 12.04当然有性能方面的提升,那么如何享受到Ubuntu 12.04的性能提升,而又不改变一如既往的使用习惯呢?简言之:远离Unity,保持原来的经典桌面?

别忘了,Linux的自由虽然昂贵,但毕竟自由,Ubuntu也不例外,我们完全可以“自由地”返回到经典的Gnome界面。

要想删除Unity恢复到经典Gnome桌面也很简单,几乎就是一条命令的事情——命令这种东西虽然不直观,但非常可靠和快捷,同时按住Ctrl+Alt+T三个键,调出系统终端,输入:

sudo apt-get install gnome-session-fallback

然后再输入系统密码,系统将安装经典界面,不喜欢命令行的话也可以在软件中心搜索‘gnome-panel’, 找到后点击安装。安装完成后登出系统重新登录。

重新登录时选择小扳手图标,然后再选择下图所示的经典桌面,以后系统开机登录时将自动选择此桌面登录。

在经典桌面下,如果要添加快捷方式到顶层面板,只需按住Alt键的同时,把要想添加的快捷方式拖放到面板上即可。如需删除或移除顶层面板上的快捷方式,同样需要按住Alt键并右击鼠标右键进行操作。

就这样很容易地退回到经典Gnome界面下的Ubuntu, 就像一切都没有发生过,拥有Ubuntu 12.04的核心却无Unity的界面。

本文图片来源:http://www.liberiangeek.net/

[…]