几日工作记录

erlang添加openssl支持(erlang连接mysql使用):

1、配置openssl编译参数:./configure --prefix=/usr/local/service/openssl

2、修改makefile编译选项,在CFLAG参数中加上-fPIC -shared 执行make&&make install编译安装

3、配置erlang编译参数:./configure --with-ssl=/usr/local/service/openssl --prefix=/usr/local/service/erlang

4、make clean&&make&&make install

测试是否成功,crypto:start().

 

系统添加端口访问权限:

1、添加端口访问权限条目:iptables -I INPUT -p tcp --dport 8000 -j ACCEPT 

2、保存iptables:/etc/rc.d/init.d/iptables save

3、重启iptables:/etc/rc.d/init.d/iptables restart

查看访问权限:/etc/init.d/iptables status

 

php动态添加extension扩展,以mysql为例:

1、安装autoconf:yum install autoconf(RedHat或者CentOS)、apt-get install autoconf(Ubuntu Linux)

2、进入php源码扩展目录相应扩展的ext,执行phpize,生成编译配置文件

  ./configure --with-mysql=/usr/local/service/mysql --with-php-config=/usr/local/service/php5/bin/php-config

  执行make&&make install

3、找到生成目录/usr/local/service/php5/lib/php/extensions/no-debug-non-zts-DATE/

4、配置模块关联:php.ini中添加配置

extension_dir = "/usr/local/service/php5/lib/php/extensions/no-debug-non-zts-DATE/"

并添加扩展模块引用:extension = mysql.so

5、重启相应服务

 

 

nginx及fast-cgi关联配置

1、安装php时添加fast-cgi功能,在生成编译配置文件时添加参数

./configure  --prefix=/usr/local/service/php5 --enable-fastcgi --enable-fpm

2、配置fast-cgi服务,配置文件在/usr/local/service/php/etc/php-fpm.conf

找到监听端口:<value name="listen_address">127.0.0.1:9000</value>,修改成你想要的

3、启动fast-cgi服务,执行命令php-fpm

4、配置nginx中的php,修改配置文件/usr/local/service/nginx/conf/nginx.conf中与php关联项

location ~ \.php${     fastcgi_pass   127.0.0.1:9000; 

路径参数  fastcgi_param  SCRIPT_FILENAME  html$fastcgi_script_name;

 

 

mysql远程访问权限

1、修改配置文件/etc/mysql/my.conf 将 bind-address = 127.0.0.1注释掉

2、添加远程访问权限,执行grant all on *.* to root@"%" identified by "password";其中通配符%表示所有ip

3、有增就有删,删除访问权限,执行revoke all on *.* from root@localhost;

 

 

posted @ 2014-11-26 02:04  我不是黑马胖  阅读(131)  评论(0编辑  收藏  举报