Centos6.5 Discourse安装部署教程

Centos6.5 Discourse安装部署教程

系统环境软件版本: OS:CentOS 6.5-x86_64 PostgreSQL:9.2.4 Redis:2.6.14 Ruby:2.0.0 注:本文中Nginx、PostgreSQL、Redis已事先通过源码编译安装完成。 设定主机名称 # vi /etc/hosts 192.168.1.100 domain.com //修改为自己的IP和域名 添加数据库和用户 ...

2015-01-25 | 6 ℃
MySQL修改root密码

MySQL修改root密码

一、SET PASSWORD # mysql -u root mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass'); 二、mysqladmin # mysqladmin -u root password "newpass" 如果root已经设置过密码,采用如下方法: # mysqladmin -u root password oldpass "newp...

2015-01-20 | 42 ℃
configure:error: Cannot find ldap libraries in /usr/lib

configure:error: Cannot find ldap libraries in /usr/lib

安装php configure出现以下错误: configure: error: Cannot find ldap libraries in /usr/lib 解决办法: # cp -frp /usr/lib64/libldap* /usr/lib/

2015-01-15 | 41 ℃
Apache,Nginx通过源文件修改版本信息

Apache,Nginx通过源文件修改版本信息

Apache源代码目录下: # vi include/ap_release.h 通过修改以下信息,修改或隐藏版本号与名字: #define AP_SERVER_BASEVENDOR "Apache Software Foundation" //开发组织名 #define AP_SERVER_BASEPROJECT "Apache HTTP Server" //服务器项目名称 #define AP_S...

2015-01-10 | 82 ℃
Nginx: error while loading shared libraries: libpcre.so.1

Nginx: error while loading shared libraries: libpcre.so.1

Nginx启动时出现以下错误: /usr/local/nginx/sbin/nginx: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory 解决办法: # find / -type f -name *libpcre.so.* //查找libpcre.so.0.0.1文件所在位...

2015-01-05 | 79 ℃
Error: Cannot find a valid baseurl for repo: addons

Error: Cannot find a valid baseurl for repo: addons

[root@localhost ~]# yum install gcc-c++ Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=addons error was [Errno 4] IOError: ...

2015-01-01 | 176 ℃
WordPress禁止调用google字体

WordPress禁止调用google字体

禁止调用google字体(google被墙导致速度很慢) 在主题目下的functions.php文件添加以下代码: function remove_open_sans() { wp_deregister_style( 'open-sans' ); wp_register_style( 'open-sans', false ); wp_enqueue_style('open-sans', ''); } add...

2014-12-30 | 82 ℃
Linux下查看cpu核数

Linux下查看cpu核数

1、几个cpu # more /proc/cpuinfo |grep "physical id"|uniq|wc -l 2、每个cpu是几核(假设cpu配置相同) # more /proc/cpuinfo |grep "physical id"|grep "0"|wc -l # cat /proc/cpuinfo | grep processor 3、查看物理CPU的个数 # cat /proc/cpuinfo |...

2014-12-25 | 100 ℃
WordPress缓存Gravatar头像

WordPress缓存Gravatar头像

1、建立缓存目录 在wp-content的同級目录建立一个文件夹,命名为avatar,设置该文件夹的权限为0755(如果0755不行,就试一下0777). 2、设置默认头像 准备一张大小适合的默认头像,命名为”default.jpg”,放在avatar文件夹里面. 3、添加缓存代码 将下面的代码复...

2014-12-20 | 90 ℃
error: mysql/psi/psi.h: No such file or directory

error: mysql/psi/psi.h: No such file or directory

/usr/local/webserver/mysql/include/mysql/my_sys.h:1027:27: error: mysql/psi/psi.h: No such file or directory In file included from /usr/local/src/php-5.6.3/ext/mysqli/php_mysqli_structs.h:83, from /usr/local/src/php-5.6.3/ext/mysq...

2014-12-15 | 106 ℃
make[2]: *** [do_abi_check] 错误 1

make[2]: *** [do_abi_check] 错误 1

mysql make时出现以下错误: make[2]: *** [do_abi_check] 错误 1 make[2]: 离开目录"/usr/local/src/mysql-5.5.3-m3" make[1]: *** [abi_check] 错误 2 make[1]: 离开目录"/usr/local/src/mysql-5.5.3-m3" make: *** [all-recursive] 错误 1 在configure完...

2014-12-10 | 121 ℃
php5.3.x无法解释<?只能解释以<?php开头的程序

php5.3.x无法解释<?只能解释以<?php开头的程序

php5.3.x无法解释<?只能解释以<?php开头的程序 编辑php.ini文件 将 short_open_tag = Off 修改为 short_open_tag = On

2014-12-05 | 116 ℃