项目地址:http://git.oschina.net/ha666/ha666_go

服务器配置:

CPU: 1核
内存: 1024 MB
操作系统: CentOS 7.0 64位
内网IP: 10.171.231.48
带宽计费方式: 按使用流量
当前使用带宽: 带宽:66Mbps(峰值)

1、修改语言

  阿里云的ECS默认语言是:en_US.UTF-8,需要改成zh_CN.UTF-8

  修改方法:vim /etc/locale.conf,然后重启。

  查看方法:echo $LANG

2、安装ab(ApacheBench)

[root@iZ23n2t9gynZ ~]# yum install httpd-tools
已加载插件:langpacks
base                                                                    | 3.6 kB  00:00:00
epel                                                                    | 4.3 kB  00:00:00
extras                                                                  | 3.4 kB  00:00:00
updates                                                                 | 3.4 kB  00:00:00
(1/7): base/7/x86_64/group_gz                                           | 154 kB  00:00:00
(2/7): epel/x86_64/group_gz                                             | 169 kB  00:00:00
(3/7): epel/x86_64/updateinfo                                           | 368 kB  00:00:00
(4/7): extras/7/x86_64/primary_db                                       |  87 kB  00:00:00
(5/7): epel/x86_64/primary_db                                           | 3.6 MB  00:00:00
(6/7): base/7/x86_64/primary_db                                         | 5.1 MB  00:00:01
(7/7): updates/7/x86_64/primary_db                                      | 4.0 MB  00:00:01
正在解决依赖关系
--> 正在检查事务
---> 软件包 httpd-tools.x86_64.0.2.4.6-31.el7.centos.1 将被 安装
--> 解决依赖关系完成

依赖关系解决

=============================================================================================================================================================
 Package                              架构                            版本                                            源                                大小
=============================================================================================================================================================
正在安装:
 httpd-tools                          x86_64                          2.4.6-31.el7.centos.1                           updates                           79 k

事务概要
=============================================================================================================================================================
安装  1 软件包

总下载量:79 k
安装大小:168 k
Is this ok [y/d/N]: y
Downloading packages:
httpd-tools-2.4.6-31.el7.centos.1.x86_64.rpm                                                                                          |  79 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : httpd-tools-2.4.6-31.el7.centos.1.x86_64                                                                                                 1/1
  验证中      : httpd-tools-2.4.6-31.el7.centos.1.x86_64                                                                                                 1/1 

已安装:
  httpd-tools.x86_64 0:2.4.6-31.el7.centos.1                                                                                                                 

完毕!

3、安装mysql

  先查看yum上提供的数据库可下载版本

[root@iZ23n2t9gynZ ~]# yum list | grep mysql
akonadi-mysql.x86_64                    1.9.2-4.el7                    base
apr-util-mysql.x86_64                   1.5.2-6.el7                    base
calligra-kexi-driver-mysql.x86_64       2.9.7-1.el7                    epel
collectd-mysql.x86_64                   5.5.0-2.el7                    epel
dmlite-plugins-mysql.x86_64             0.7.4-1.el7                    epel
dovecot-mysql.x86_64                    1:2.2.10-4.el7_0.1             base
dpm-copy-server-mysql.x86_64            1.8.10-1.el7                   epel
dpm-name-server-mysql.x86_64            1.8.10-1.el7                   epel
dpm-server-mysql.x86_64                 1.8.10-1.el7                   epel
dpm-srm-server-mysql.x86_64             1.8.10-1.el7                   epel
dspam-mysql.x86_64                      3.10.2-11.el7                  epel
exim-mysql.x86_64                       4.84-4.el7                     epel
freeradius-mysql.x86_64                 3.0.4-6.el7                    base
fts-mysql.x86_64                        3.3.1-3.el7                    epel
gnokii-smsd-mysql.x86_64                0.6.31-10.el7                  epel
holland-mysqldump.noarch                1.0.10-3.el7                   epel
holland-mysqllvm.noarch                 1.0.10-3.el7                   epel
lfc-server-mysql.x86_64                 1.8.10-1.el7                   epel
libdbi-dbd-mysql.x86_64                 0.8.3-16.el7                   base
libgda-mysql.x86_64                     1:5.1.2-2.el7.1                epel
libnss-mysql.x86_64                     1.5-19.el7                     epel
libodb-mysql.x86_64                     2.3.0-1.el7                    epel
libodb-mysql-devel.x86_64               2.3.0-1.el7                    epel
lighttpd-mod_mysql_vhost.x86_64         1.4.37-1.el7                   epel
mysql++.x86_64                          3.1.0-12.el7                   epel
mysql++-devel.x86_64                    3.1.0-12.el7                   epel
mysql++-manuals.x86_64                  3.1.0-12.el7                   epel
mysql-connector-java.noarch             1:5.1.25-3.el7                 base
mysql-connector-odbc.x86_64             5.2.5-6.el7                    base
mysql-connector-python.noarch           1.1.6-1.el7                    epel
mysql-proxy.x86_64                      0.8.5-2.el7                    epel
mysql-proxy-devel.x86_64                0.8.5-2.el7                    epel
mysql-utilities.noarch                  1.3.6-1.el7                    epel
mysqlreport.noarch                      3.5-11.el7                     epel
mysqltuner.noarch                       1.2.0-7.el7                    epel
nagios-plugins-mysql.x86_64             2.0.3-3.el7                    epel
nodejs-mysql.noarch                     2.3.2-1.el7                    epel
opendbx-mysql.x86_64                    1.4.6-6.el7                    epel
opensips-mysql.x86_64                   1.10.5-3.el7                   epel
owncloud-mysql.noarch                   8.0.8-1.el7                    epel
pdns-backend-mysql.x86_64               3.4.6-1.el7                    epel
perdition-mysql.x86_64                  2.1-2.el7                      epel
php-mysql.x86_64                        5.4.16-36.el7_1                updates
php-mysqlnd.x86_64                      5.4.16-36.el7_1                updates
php-pear-MDB2-Driver-mysql.noarch       1.5.0-0.8.b4.el7               epel
php-pear-MDB2-Driver-mysqli.noarch      1.5.0-0.8.b4.el7               epel
proftpd-mysql.x86_64                    1.3.5a-1.el7                   epel
qt-mysql.i686                           1:4.8.5-8.el7                  base
qt-mysql.x86_64                         1:4.8.5-8.el7                  base
qt5-qtbase-mysql.x86_64                 5.4.2-1.el7                    epel
redland-mysql.x86_64                    1.0.16-6.el7                   base
root-sql-mysql.x86_64                   5.34.32-3.el7                  epel
rsyslog-mysql.x86_64                    7.4.7-7.el7_0                  base
soci-mysql.x86_64                       3.2.3-1.el7                    epel
soci-mysql-devel.x86_64                 3.2.3-1.el7                    epel
voms-mysql-plugin.x86_64                3.1.6-5.el7                    epel
zabbix20-proxy-mysql.x86_64             2.0.15-1.el7                   epel
zabbix20-server-mysql.x86_64            2.0.15-1.el7                   epel
zabbix20-web-mysql.noarch               2.0.15-1.el7                   epel
zabbix22-dbfiles-mysql.noarch           2.2.10-1.el7                   epel
zabbix22-proxy-mysql.x86_64             2.2.10-1.el7                   epel
zabbix22-server-mysql.x86_64            2.2.10-1.el7                   epel
zabbix22-web-mysql.noarch               2.2.10-1.el7                   epel

  然后安装mariadb

[root@iZ23n2t9gynZ ~]# yum install mariadb mariadb-server
已加载插件:langpacks
软件包 1:mariadb-5.5.44-1.el7_1.x86_64 已安装并且是最新版本
正在解决依赖关系
--> 正在检查事务
---> 软件包 mariadb-server.x86_64.1.5.5.44-1.el7_1 将被 安装
--> 正在处理依赖关系 perl-DBI,它被软件包 1:mariadb-server-5.5.44-1.el7_1.x86_64 需要
--> 正在处理依赖关系 perl-DBD-MySQL,它被软件包 1:mariadb-server-5.5.44-1.el7_1.x86_64 需要
--> 正在处理依赖关系 perl(DBI),它被软件包 1:mariadb-server-5.5.44-1.el7_1.x86_64 需要
--> 正在检查事务
---> 软件包 perl-DBD-MySQL.x86_64.0.4.023-5.el7 将被 安装
---> 软件包 perl-DBI.x86_64.0.1.627-4.el7 将被 安装
--> 正在处理依赖关系 perl(RPC::PlServer) >= 0.2001,它被软件包 perl-DBI-1.627-4.el7.x86_64 需要
--> 正在处理依赖关系 perl(RPC::PlClient) >= 0.2000,它被软件包 perl-DBI-1.627-4.el7.x86_64 需要
--> 正在检查事务
---> 软件包 perl-PlRPC.noarch.0.0.2020-14.el7 将被 安装
--> 正在处理依赖关系 perl(Net::Daemon) >= 0.13,它被软件包 perl-PlRPC-0.2020-14.el7.noarch 需要
--> 正在处理依赖关系 perl(Net::Daemon::Test),它被软件包 perl-PlRPC-0.2020-14.el7.noarch 需要
--> 正在处理依赖关系 perl(Net::Daemon::Log),它被软件包 perl-PlRPC-0.2020-14.el7.noarch 需要
--> 正在处理依赖关系 perl(Compress::Zlib),它被软件包 perl-PlRPC-0.2020-14.el7.noarch 需要
--> 正在检查事务
---> 软件包 perl-IO-Compress.noarch.0.2.061-2.el7 将被 安装
--> 正在处理依赖关系 perl(Compress::Raw::Zlib) >= 2.061,它被软件包 perl-IO-Compress-2.061-2.el7.noarch 需要
--> 正在处理依赖关系 perl(Compress::Raw::Bzip2) >= 2.061,它被软件包 perl-IO-Compress-2.061-2.el7.noarch 需要
---> 软件包 perl-Net-Daemon.noarch.0.0.48-5.el7 将被 安装
--> 正在检查事务
---> 软件包 perl-Compress-Raw-Bzip2.x86_64.0.2.061-3.el7 将被 安装
---> 软件包 perl-Compress-Raw-Zlib.x86_64.1.2.061-4.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

=============================================================================================================================================================
 Package                                        架构                          版本                                      源                              大小
=============================================================================================================================================================
正在安装:
 mariadb-server                                 x86_64                        1:5.5.44-1.el7_1                          updates                         11 M
为依赖而安装:
 perl-Compress-Raw-Bzip2                        x86_64                        2.061-3.el7                               base                            32 k
 perl-Compress-Raw-Zlib                         x86_64                        1:2.061-4.el7                             base                            57 k
 perl-DBD-MySQL                                 x86_64                        4.023-5.el7                               base                           140 k
 perl-DBI                                       x86_64                        1.627-4.el7                               base                           802 k
 perl-IO-Compress                               noarch                        2.061-2.el7                               base                           260 k
 perl-Net-Daemon                                noarch                        0.48-5.el7                                base                            51 k
 perl-PlRPC                                     noarch                        0.2020-14.el7                             base                            36 k

事务概要
=============================================================================================================================================================
安装  1 软件包 (+7 依赖软件包)

总下载量:12 M
安装大小:59 M
Is this ok [y/d/N]: y
Downloading packages:
(1/8): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm                                                                                 |  32 kB  00:00:00
(2/8): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm                                                                                  |  57 kB  00:00:00
(3/8): perl-DBD-MySQL-4.023-5.el7.x86_64.rpm                                                                                          | 140 kB  00:00:00
(4/8): perl-DBI-1.627-4.el7.x86_64.rpm                                                                                                | 802 kB  00:00:00
(5/8): perl-Net-Daemon-0.48-5.el7.noarch.rpm                                                                                          |  51 kB  00:00:00
(6/8): perl-IO-Compress-2.061-2.el7.noarch.rpm                                                                                        | 260 kB  00:00:00
(7/8): perl-PlRPC-0.2020-14.el7.noarch.rpm                                                                                            |  36 kB  00:00:00
(8/8): mariadb-server-5.5.44-1.el7_1.x86_64.rpm                                                                                       |  11 MB  00:00:02
-------------------------------------------------------------------------------------------------------------------------------------------------------------
总计                                                                                                                         5.1 MB/s |  12 MB  00:00:02
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64                                                                                               1/8
  正在安装    : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64                                                                                              2/8
  正在安装    : perl-IO-Compress-2.061-2.el7.noarch                                                                                                      3/8
  正在安装    : perl-Net-Daemon-0.48-5.el7.noarch                                                                                                        4/8
  正在安装    : perl-PlRPC-0.2020-14.el7.noarch                                                                                                          5/8
  正在安装    : perl-DBI-1.627-4.el7.x86_64                                                                                                              6/8
  正在安装    : perl-DBD-MySQL-4.023-5.el7.x86_64                                                                                                        7/8
  正在安装    : 1:mariadb-server-5.5.44-1.el7_1.x86_64                                                                                                   8/8
  验证中      : perl-Net-Daemon-0.48-5.el7.noarch                                                                                                        1/8
  验证中      : 1:mariadb-server-5.5.44-1.el7_1.x86_64                                                                                                   2/8
  验证中      : perl-IO-Compress-2.061-2.el7.noarch                                                                                                      3/8
  验证中      : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64                                                                                              4/8
  验证中      : perl-PlRPC-0.2020-14.el7.noarch                                                                                                          5/8
  验证中      : perl-DBI-1.627-4.el7.x86_64                                                                                                              6/8
  验证中      : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64                                                                                               7/8
  验证中      : perl-DBD-MySQL-4.023-5.el7.x86_64                                                                                                        8/8 

已安装:
  mariadb-server.x86_64 1:5.5.44-1.el7_1                                                                                                                     

作为依赖被安装:
  perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 perl-DBD-MySQL.x86_64 0:4.023-5.el7 perl-DBI.x86_64 0:1.627-4.el7
  perl-IO-Compress.noarch 0:2.061-2.el7        perl-Net-Daemon.noarch 0:0.48-5.el7         perl-PlRPC.noarch 0:0.2020-14.el7  

完毕!

  启动mariadb

[root@iZ23n2t9gynZ ~]# systemctl start mariadb

  开机自动启动

[root@iZ23n2t9gynZ ~]# systemctl enable mariadb
ln -s '/usr/lib/systemd/system/mariadb.service' '/etc/systemd/system/multi-user.target.wants/mariadb.service'

  设置root密码

[root@iZ23n2t9gynZ ~]# mysql_secure_installation
/usr/bin/mysql_secure_installation:行379: find_mysql_client: 未找到命令

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!

By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

  登录测试

[root@iZ23n2t9gynZ ~]# mysql -uroot -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 13
Server version: 5.5.44-MariaDB MariaDB Server

Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> 

4、安装redis

yum install -y tcl

wget http://download.redis.io/redis-stable.tar.gz

tar xvzf redis-stable.tar.gz

cd redis-stable

make

 cd src

 make test

  配置redis

cd /root/redis-stable

cp redis.conf /usr/local/bin

cd src

cp redis-server /usr/local/bin

cp redis-cli /usr/local/bin

  配置redis.conf(vim /usr/local/bin/redis.conf)

daemonize yes

port 26125

bind 127.0.0.1

# save 900 1

# save 300 10

# save 60 10000

maxclients 60000

maxmemory 500mb

  启动与客户端连接

[root@iZ23n2t9gynZ ~]# redis-server /usr/local/bin/redis.conf
[root@iZ23n2t9gynZ ~]# redis-cli -p 26125
127.0.0.1:26125> info
# Server
redis_version:3.0.5
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:8960fb2f771de35e
redis_mode:standalone
os:Linux 3.10.0-123.9.3.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.8.2
process_id:32538
run_id:2b0eb3b85cfcb8c3d37157e12756d6b0bcdcc467
tcp_port:26125
uptime_in_seconds:68
uptime_in_days:0
hz:10
lru_clock:2251601
config_file:/usr/local/bin/redis.conf

# Clients
connected_clients:1
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:3416888
used_memory_human:3.26M
used_memory_rss:9699328
used_memory_peak:3416888
used_memory_peak_human:3.26M
used_memory_lua:36864
mem_fragmentation_ratio:2.84
mem_allocator:jemalloc-3.6.0

# Persistence
loading:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1445092109
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok

# Stats
total_connections_received:2
total_commands_processed:2
instantaneous_ops_per_sec:0
total_net_input_bytes:42
total_net_output_bytes:3849
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.00
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
migrate_cached_sockets:0

# Replication
role:master
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:0.02
used_cpu_user:0.06
used_cpu_sys_children:0.00
used_cpu_user_children:0.00

# Cluster
cluster_enabled:0

# Keyspace
127.0.0.1:26125>

环境配置完了。

ha666_go运行环境配置的更多相关文章

  1. JAVA EE 运行环境配置(包含JAVA SE)

    JAVA EE 运行环境配置(包含JAVA SE) 1.下载并安装jre-7u7-windows-i586.exe (最新的JAVA运行环境) 2.下载并安装java_ee_sdk-6u4-jdk7- ...

  2. maven(六),外置maven运行环境配置

    外置maven eclipse内置的maven插件是固定版本,如果要用其他版本的maven,可以使用外置maven 下载地址: http://maven.apache.org/download.cgi ...

  3. win2008 r2 服务器php+mysql+sqlserver2008运行环境配置(从安装、优化、安全等)

    这篇文章主要介绍了win2008 r2 服务器php+mysql+sqlserver2008运行环境配置(从安装.优化.安全等),需要的朋友可以参考下 win2008 r2 安装 http://www ...

  4. Sublime Text3 for Java 编译运行环境配置 入门详解 - 精简归纳

    Sublime Text3 for Java 编译运行环境配置 入门详解 - 精简归纳 JERRY_Z. ~ 2020 / 9 / 24 转载请注明出处!️ 目录 Sublime Text3 for ...

  5. Java 学习(1): windows java 运行& 环境配置

    Java 文件的运行 如下,创建了一个 名为"HelloWorld.java" 的 Java 文件: public class HelloWorld { public static ...

  6. wampserver - windows服务器下php运行环境配置

    之前一直在通过windows server IIS跑php程序,直到后来,发现了她 “wampserver", 一个法国的windows+apache+php+mysql部署包. 感觉挺好用 ...

  7. 根据不同运行环境配置和组织node.js应用

    安装node-config模块 npm install config --save || yarn add config mkidr config // 创建config文件夹 在config文件夹下 ...

  8. Ubuntu16.04 faster-rcnn+caffe+gpu运行环境配置以及解决各种bug

    https://blog.csdn.net/flygeda/article/details/78638824 本文主要是对近期参考的网上各位大神的博客的总结,其中,从安装系统到跑通程序过程中遇到的各种 ...

  9. Java(JDK/Tomcat/Maven)运行环境配置及工具(idea/eclipse)安装

    Java (计算机编程语言) Java是一门面向对象编程语言,不仅吸收了C++语言的各种优点,还摒弃了C++里难以理解的多继承.指针等概念,因此Java语言具有功能强大和简单易用两个特征. Java语 ...

随机推荐

  1. android软键盘的用法总结

    1.软键盘的显示原理 软键盘其实是一个Dialog.InputMethodService为我们的输入法创建了一个Dialog,并且对某些参数进行了设置,使之能够在底部 或者全屏显示.当我们点击输入框时 ...

  2. Execution Contexts (执行上下文)

    本章我们一起讨论一下ECMAScript的执行上下文及相关可执行代码的各种类型.so...什么是执行上下文?我们来看看定义: 每次当控制器转到ECMAScript可执行代码的时候, 即会进入到一个执行 ...

  3. 解决error:could not open ...jvm.cfg

    出现error:could not open '...jvm.cfg'大多是以前安装jdk或者jre的时候在注册表里注册过,现在安装的文件夹不在或者换了名字,有很多解决方法,最简单的一招是删除java ...

  4. Mac OS命令行运行Sublime Text

    Opening Sublime Text on command line as subl on Mac OS? Mac OS subl http://www.phodal.com/blog/mac-o ...

  5. ASP.NET图片验证码

    1. 新建一个Validate.aspx,然后在Validate.aspx.cs编写代码: using System; using System.Collections; using System.C ...

  6. $(this).next()与$(this).children()

    $(this).next() 当前元素同级的下个元素,而非子元素 $(this).children() 是当前元素的下一级元素的集合,就是子元素的集合,而不管子元素的后代元素 所以这两个没有什么可比性 ...

  7. CI 笔记5 (CI3.0 默认控制器,多目录)

    在ci3.x中,不支持多级子目录的默认控制器设置, 解决方法如下: 在index.php中,添加  $routing['directory'] = 'admin';然后在默认的router.php的默 ...

  8. 更新xcode后插件失效问题——不针对特定版本的通用解决方法

    一.Xcode更新后插件失效的原理 1.每次更新Xcode后插件都会失效,其实插件都还在这个目录好好的躺着呢: ~/Library/Application Support/Developer/Shar ...

  9. 基于jQuery查找dom的多种方式性能问题

    这个问题的产生由于我们前端组每个人的编码习惯的差异,最主要的还是因为代码的维护性问题.在此基础上,我对jQuery源码(1.11.3)查找dom节点相关的内容进行了仔细的查阅,虽然并不能理解的很深入 ...

  10. 借助Q.js学习javascript异步编程。

    金字塔式 //add1 function step1(n, callback) { setTimeout(function(){ callback.call(null, n + 1); }, 100) ...