Hunter的大杂烩 技术学习笔记

2017-11-06

erlang编译参数

Filed under: 技术话题 — hunter @ 2:06 pm

为了便于批量分发额外安装的软件,一般将非系统自带软件编译到 /usr/local/$prefix,因此安装erlang时遇到几个错误

1. 没有openssl

下载openssl:

./config –prefix=/usr/local/openssl

vi Makefile

修改CFLAG,原(CFLAG=  -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN …),修改后(CFLAG= -fPIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN …)

make;make install

2. 没有odbc

下载:http://www.unixodbc.org

./configure –prefix=/usr/local/unixODBC –eanble-gui=no

make;make install

3.  erlang编译

a. configure 时增加 –with-ssl=/usr/local/openssl  –with-odbc=/usr/local/unixODBC

b. CFLAGS=”-I/usr/local/unixODBC/include” LDFLAGS=”-L/usr/local/unixODBC/lib”

2016-08-18

openssl

Filed under: 技术话题 — hunter @ 7:45 pm

编译安装OpenSSL 1.0.1和Apache 2.2.22,总是报告checking for SSL_CTX_new… no错误

解决办法,编译前执行如下一句设置环境变量:

export LDFLAGS=-ldl

Suse下类yum的rpm安装利器

Filed under: 技术话题 — hunter @ 6:04 pm

from: http://blog.chinaunix.net/uid-20639775-id-3433023.html

在使用zypper工具之前,需要设置软件源的地址,设置软件源地址的方法如下:
zyppr ar URL alias 表示添加一个软件源的地址,下面是针对软件源的操作,可以自行进行设置,可以对软件源进行添加、删除、重命名、查看等一系列操作。
安装源操作:
repos, lr 列出所有定义的安装源。
addrepo, ar 添加一个新的安装源。
removerepo, rr 删除指定的安装源。
renamerepo, nr 重命名指定的安装源。
modifyrepo, mr 修改指定的安装源。
refresh, ref 刷新所有安装源。
clean 清除本地缓存。
(more…)

2016-07-20

mysql主从复制跳过错误

Filed under: 技术话题 — hunter @ 3:33 pm

from:http://blog.csdn.net/seteor/article/details/17264633

mysql主从复制,经常会遇到错误而导致slave端复制中断,这个时候一般就需要人工干预,跳过错误才能继续
跳过错误有两种方式:
1.跳过指定数量的事务:
mysql>slave stop;
mysql>SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1        #跳过一个事务
mysql>slave start

2.修改mysql的配置文件,通过slave_skip_errors参数来跳所有错误或指定类型的错误
vi /etc/my.cnf
[mysqld]
#slave-skip-errors=1062,1053,1146 #跳过指定error no类型的错误
#slave-skip-errors=all #跳过所有错误

2016-03-21

expect脚本范例

Filed under: 技术话题 — hunter @ 3:40 pm

#!/usr/bin/expect -f
spawn scp  user@ip:/target.tar /data/target.tar
set timeout -1
expect “*assword:”
exec sleep 1
send “mypassword”
expect eof

« Newer PostsOlder Posts »

Powered by WordPress