This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 传送门:http://www.myhack58.com/Article/48/66/2012/34999.htm | |
| vi /etc/sysconfig/iptables | |
| -A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT(允许80端口通过防火墙) | |
| -A INPUT -m state –state NEW -m tcp -p tcp –dport 3306 -j ACCEPT(允许3306端口通过防火墙) | |
| 特别提示:很多网友把这两条规则添加到防火墙配置的最后一行,导致防火墙启动失败,正确的应该是添加到默认的22端口这条规则的下面 | |
| 添加好之后防火墙规则如下所示: | |
| ###################################### | |
| # Firewall configuration written by system-config-firewall |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 参考http://ari.iteye.com/blog/833153 | |
| 1.安装nginx | |
| yum install nginx | |
| 2.启动nginx | |
| service nginx start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 参考 | |
| http://zhidao.baidu.com/link?url=e7qpCPHIhMHeYonvH_qmjGDlR69mmzpjr2e5w_x5cileM1inVvuB3a_cvALG3QCPaWk_I67HHMsaoAWcMI_gE_ | |
| tomcat_home=/Users/rosicky_tong/tomcat-7.0.41 | |
| cd $tomcat_home | |
| cd conf/Catalina/localhost | |
| vim cocos2dx.xml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1.重定向版本库 | |
| svn switch --relocate svn://oldurl svn://newurl | |
| or | |
| svn switch --relocate https://oldurl https://newurl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://blog.sina.com.cn/s/blog_62e7fe670101c4v5.html | |
| python -m SimpleHTTPServer 8000 | |
| 使用上面的命令可以把当前目录发布到8000端口。 | |
| 但是这条命令是当前运行的,不是后台运行的,也就是说如果Ctrl + C,则该端口就会关闭。 | |
| 在上述命令的最后加一个 & ,则该命令产生的进程在后台运行,不会影响当前终端的使用(我们在只有一个bash的环境下)。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #同步系统时间 | |
| /usr/sbin/ntpdate 0.rhel.pool.ntp.org | |
| #定时同步时间 | |
| #1 打开编辑器 | |
| crontab -e | |
| #2 插入 | |
| 00 07 * * * /usr/sbin/ntpdate 0.rhel.pool.ntp.org | |
| #3 保存 | |
| wq! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* ==================================================================== | |
| Licensed to the Apache Software Foundation (ASF) under one or more | |
| contributor license agreements. See the NOTICE file distributed with | |
| this work for additional information regarding copyright ownership. | |
| The ASF licenses this file to You under the Apache License, Version 2.0 | |
| (the "License"); you may not use this file except in compliance with | |
| the License. You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| adduser username | |
| passwd username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. | |
| vim /etc/resolv.conf | |
| #dns | |
| nameserver 8.8.8.8 | |
| nameserver 8.8.4.4 | |
| 2. | |
| cd /etc/sysconfig/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add user: | |
| mysql> use mysql; | |
| mysql> GRANT ALL ON *.* TO account@'%' IDENTIFIED BY 'password' WITH GRANT OPTION; | |
| mysql> flush privileges; | |
| delete user: | |
| mysql> drop user username | |
| mysql> drop user username@host |
NewerOlder