摘要: /** * 模拟post进行url请求 * @param string $url * @param array $post_data * @return bool|mixed */function request_post($url = '', $post_data = array()){ if ( 阅读全文
posted @ 2016-09-02 12:24 rhythm0121 阅读(2354) 评论(0) 推荐(0) 编辑
摘要: /** * 获取接口返回结果(数组) * @param $api_url 接口地址 * @param string $ifTransfer 是否需要转换编码,若接口编码不是utf-8的设置为1 * @return array */function getXmlResult($api_url, $if 阅读全文
posted @ 2016-09-02 12:17 rhythm0121 阅读(1269) 评论(0) 推荐(0) 编辑
摘要: 一、 /** 阅读全文
posted @ 2016-09-02 12:16 rhythm0121 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 因为在公司业务需要,经常会有导数据的情况,有的时候需要查询统计的信息比较多,需要查询多个表去取值,有时候可能跨库到sqlserver中,sqlserver中不同的城市对应不同的库,加上数据量比较大,如果不采取合适的方案会对服务器负载影响很大,加上大家都是那个服务器上做操作,很容易使服务器崩溃。 所以 阅读全文
posted @ 2016-09-02 11:56 rhythm0121 阅读(431) 评论(0) 推荐(0) 编辑
摘要: 一、试验一 1、在test数据库中创建t2表,并向表中插入千万条数据,insert into t2 select * from t2; 2、新开一个终端,进入/usr/local/mysql/data/test 下执行:watch -n1 ls -lh 每一秒刷新一次 3、free -m 查看内存的 阅读全文
posted @ 2016-09-02 10:03 rhythm0121 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 一、mysql用户授权 1、登录mysql数据库 /usr/local/mysql/bin/mysql -u root -p 2、给从服务器设置授权用户 (一)给予所有权限 grant all on *.* to 'user1'@'192.168.10.%' identified by '12345 阅读全文
posted @ 2016-09-02 10:00 rhythm0121 阅读(1273) 评论(0) 推荐(0) 编辑
摘要: 一、配置透明代理 基本实现步骤: 1、修改squid.conf配置文件 http_port 192.168.10.1:3128 transparent 2、重新加载该配置 squid -k reconfig 3、添加iptables规则,把内部的http请求重定向到3128端口 iptables - 阅读全文
posted @ 2016-09-02 09:59 rhythm0121 阅读(195) 评论(0) 推荐(0) 编辑
摘要: windows: 192.168.10.2 squid-server: ifconfig eth0 192.168.10.1 ifconfig eth1 200.168.10.1 web-server: ifconfig eth0 200.168.10.2 1、安装squid软件包 yum -y i 阅读全文
posted @ 2016-09-02 09:57 rhythm0121 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 1、 yum -y install subversion 2、查看安装位置:rpm -ql subversion 3、创建svn版本库目录:mkdir -p /var/svn/svnrepos 4、创建版本库:svnadmin create /var/svn/svnrepos 执行了这个命令之后会在 阅读全文
posted @ 2016-09-02 09:54 rhythm0121 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 1、连接网络配置 (1)setup 配置网络 (2)启动网卡vi /etc/sysconfig/network-scripts/ifcfg-eth0 ONBOOT=‘no’改为ONBOOT=‘yes’ (3)重启网络服务 service network restart 2、卸载httpd、mysql 阅读全文
posted @ 2016-09-02 09:50 rhythm0121 阅读(137) 评论(0) 推荐(0) 编辑