
服务器
coder
这个作者很懒,什么都没留下…
展开
-
一句话解决乱码问题
<br />“保持一致,统一”<br /> <br />MySQL+PHP产生乱码原因:<br /> ◆ MySQL数据库默认的编码是utf8,如果这种编码与你的PHP网页不一致,可能就会造成MySQL乱码;<br /> ◆ MySQL中创建表时会让你选择一种编码,如果这种编码与你的网页编码不一致,也可能造成MySQL乱码;<br /> ◆ MySQL创建表时添加字段是可以选择编码的,如果这种编码与你的网页编码不一致,也可能造成MySQL乱码;<br /> ◆ 用户提交页面的编码与显示数据的页面编码原创 2010-08-25 13:24:00 · 914 阅读 · 0 评论 -
linux 查看系统版本信息
cat /proc/versionuname -runame -alsb_release -acat /etc/issuecat /etc/redhat-releasegetconf LONG_BITfile /bin/ls原创 2015-06-11 11:36:53 · 534 阅读 · 0 评论 -
vsftp
安装sudo apt-get install vsftpd操作sudo /etc/init.d/vsftpd stopsudo /etc/init.d/vsftpd startsudo /etc/init.d/vsftpd restart创建用户sudo useradd -g ftp -d /home/ftpuser -s /sbin/nolog原创 2015-06-11 10:27:10 · 626 阅读 · 0 评论 -
centos yum php 5.5
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm yum install php55w-cli yum remove php-common yum install php55w-cli yum install php55w-pdo yum install php55w-pdo_mysql原创 2015-06-11 10:28:54 · 608 阅读 · 0 评论 -
init kill signal的数字总结
1.init 0:停机1:单用户形式,只root进行维护2:多用户,不能使用net file system3:完全多用户5:图形化4:安全模式6:重启其实,可以通过查看/etc/rc.d/中的rc*.d的文件来对比理解,不同的目录中包含的命令是不同的init 0,对应的系统会运行,/etc/rc.d/rc0.d里指定的程序S00killall、 S01halt这两个都表示为原创 2015-09-01 20:45:53 · 1579 阅读 · 0 评论 -
mysql root 忘记密码
1.修改 /etc/my.cnf 在[mysqld]下面加上一句:skip-grant-tables 2.重启mysqld /etc/init.d/mysqld restart 3.登录并修改MySQL的root密码 mysqlUSE mysql; UPDATE user SET Password = password ( 'newpassword' ) WHERE Use原创 2015-09-02 17:13:01 · 645 阅读 · 0 评论 -
install php memcached libmemcached
yum install gcc+ gcc-c++yum install php53 php53-develyum install cyrus-sasl-plain cyrus-sasl cyrus-sasl-devel cyrus-sasl-libcd ..wget http://launchpad.net/libmemcached/1.0/1.0.2/+download/libmem原创 2015-06-15 21:11:13 · 1688 阅读 · 0 评论 -
封ip
1.iptables#屏蔽单个IP的命令是iptables -I INPUT -s 123.45.6.7 -j DROP#封整个段即从123.0.0.1到123.255.255.254的命令iptables -I INPUT -s 123.0.0.0/8 -j DROP#封IP段即从123.45.0.1到123.45.255.254的命令iptables -I INPUT -s 12原创 2016-02-19 15:31:01 · 699 阅读 · 0 评论 -
linux释放内存
total used free shared buffers cachedMem: 994 153 840 43 3 22-/+ buffers/cache: 127 866Swap: 0原创 2016-02-25 13:46:29 · 741 阅读 · 1 评论 -
centos 7 firewalld
yum install firewalldsystemctl enable firewalldsystemctl disable firewalldsystemctl start firewalldsystemctl status firewalldFirewallD使用区域(zone)的概念来管理,每个网卡对应一个zone,这些zone的配置文件可在/usr/lib/firewa原创 2016-05-03 19:00:28 · 880 阅读 · 0 评论 -
linux locale
~/.bashrc/etc/profile/.bash_profile字符编码配置文件 /etc/sysconfig/i18n centos 7已经没有了/etc/locale.confLANG="de_DE.UTF-8"/usr/share/i18n/locales//usr/share/i18n/charmaps/安装所有与中文支持相关的包yum -y groupi原创 2016-05-20 18:57:42 · 7533 阅读 · 0 评论 -
pyenv 手册
yum install zlib-devel bzip2 bzip2-devel bzip2-libs readline readline-devel readline-static sqlite sqlite-devel openssl-devel openssl openssl-static -y安装pyenvcurl -L https://raw.githubusercontent.c原创 2016-11-16 17:49:11 · 1579 阅读 · 0 评论 -
linux 查看系统硬件信息
cat /proc/cpuinfo判断依据:1.具有相同core id的cpu是同一个core的超线程。2.具有相同physical id的cpu是同一颗cpu封装的线程或者cores。英文版:1.Physical id and core id are not necessarily consecutive but they are unique. Any cpu原创 2015-06-11 11:35:59 · 519 阅读 · 0 评论 -
wget 使用手册
wget 使用手册日志和输入输出-o logfile把日志输出到logfile中,默认是输出到stderr中-a logfile把日志附加到logfile中, 默认是overwrite-d打开debug, 需要编译的支持-q关闭 wget的输出-nvNo verbose-i file 从file中读取url;如果 – 被指定为file,则从标注输入中读取urls;原创 2015-06-26 10:31:01 · 1183 阅读 · 0 评论 -
Apache的httpd.conf配置说明
<br />Apache的基本设置主要交由httpd.conf来设定管理,我们要修改Apache的相关设定,主要还是通过修改httpd.cong来实现。下面让我们来看看httpd.conf的内容,它主要分成3大部分:<br />Section 1:Global Environment<br />Section 2:'Main' server configurationphpma.com<br />Section 3:Virtual Hosts<br />【第一部分】<br />·ServerType sta原创 2010-08-25 13:21:00 · 1492 阅读 · 0 评论 -
pear1.9下安装phpunit3.4
It had a strange problem running the above pecl command, with an error saying:Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 143 bytes) in /usr/share/php/PEAR/PackageFile/v2.php on line 1772Others have encountered this probl原创 2010-09-19 10:37:00 · 1358 阅读 · 0 评论 -
apache虚拟主机配置
ServerName 127.0.0.1 LockFile ${APACHE_LOCK_DIR}/accept.lockPidFile ${APACHE_PID_FILE}Timeout 300KeepAlive OnMaxKeepAliveRequests 100KeepAliveTimeout 15 StartServers 5 MinSpare原创 2011-11-16 16:48:57 · 1355 阅读 · 0 评论 -
ubuntu11.10安装tomcat7以及基本的目录结构和使用方法
1.安装JDK, 2.安装,apt-get install tomcat7 3.tomcat7的几个目录/usr/share/tomcat7/var/lib/tomcat7//etc/tomcat7root@coder-671T-M:/usr/share/tomcat7# tree.├── bin│ ├── bootstrap.jar原创 2011-11-28 18:24:24 · 11926 阅读 · 0 评论 -
安装phpmyadmin
本地的phpmyadmin没了,装一个吧。尽管bug很多。下载http://www.phpmyadmin.net/home_page/index.phphttp://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/3.5.0-rc1/phpMyAdmin-3.5.0-rc1-all-languages.zip/d原创 2012-03-14 21:45:08 · 846 阅读 · 0 评论 -
$_SERVER["REQUEST_URI"]是在Apache下是可用的,但在iis下是不可用的
<?php// Fix for IIS, which doesn't set REQUEST_URIif (empty ( $_SERVER ['REQUEST_URI'] )) { // IIS Mod-Rewrite if (isset ( $_SERVER ['HTTP_X_ORIGINAL_URL'] )) { $_SERVER ['REQUEST_URI'] = $_SERV转载 2012-04-25 10:35:18 · 2778 阅读 · 1 评论 -
如何在服务器开启PathInfo
1.让 Apache 支持 PathInfo配置的 Apache 版本 : 2.2.13在配置文件中加入AcceptPathInfo On这样 Apache 就可以支持针对 php 文件的 PathInfo 了.2.让 Nginx 支持 PathInfo在配置文件里添加location ~ \.php{fa转载 2012-04-25 10:41:43 · 21995 阅读 · 0 评论 -
apache禁止列目录:apache如何打开或者关闭列目录功能
开启mod_autoindex模块打开列目录功能: Options +Indexes 关闭列目录功能: Options -Indexesor.... Options Indexes FollowSymLinks AllowOverride A原创 2012-04-25 09:21:59 · 6780 阅读 · 0 评论 -
用jconsole远程监控Tomcat
先以windows做个例子。linux的改天在写,大体类似。详细的百度一把去。修改配置文件catalina.bat:在文件开头添加如下代码:set JAVA_OPTS=%JAVA_OPTS% -Djava.rmi.server.hostname="192.168.2.153" -Dcom.sun.management.jmxremote -Dcom.sun.managemen原创 2012-06-28 18:54:58 · 1263 阅读 · 0 评论 -
ant部署的几个例子
ant文件放到D:\java_workspace\ap\项目下运行1.完成项目的编译工作。并打包jar文件。到打包到项目的jar目录中名为ap.jar目录原创 2012-07-20 09:54:49 · 4744 阅读 · 0 评论 -
centos vagrant virtualbox
cd /etc/yum.repos.dwget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.reposudo yum install dkmsrpm -qa kernel |sort -V |tail -n 1uname -rcat /proc/cpuinfo |grep svmcat /proc/cpu原创 2015-08-07 16:50:29 · 1227 阅读 · 0 评论