源码安装

官网参考:这里

官网给出的 “basic installation command sequence” 如下:

预配置阶段

# Preconfiguration setup
shell> groupadd MysqL
shell> useradd -r -g MysqL -s /bin/false MysqL

问题:执行 -s /bin/false 命令的作用是?

源码安装阶段

# Beginning of source-build specific instructions
shell> tar zxvf MysqL-VERSION.tar.gz
shell> cd MysqL-VERSION
shell> cmake .
shell> make
shell> make install
# End of source-build specific instructions

问题:仅执行 cmake . 命令显然不够,如何定制化 cmake 参数?

安装后的处理

# Postinstallation setup
shell> cd /usr/local/MysqL
shell> chown -R MysqL .
shell> chgrp -R MysqL .
shell> bin/MysqL_install_db --user=MysqL    # Before MysqL 5.7.6
shell> bin/MysqLd --initialize --user=MysqL # MysqL 5.7.6 and up
shell> bin/MysqL_ssl_rsa_setup              # MysqL 5.7.6 and up
shell> chown -R root .
shell> chown -R MysqL data
shell> bin/MysqLd_safe --user=MysqL &
# Next command is optional
shell> cp support-files/MysqL.server /etc/init.d/MysqL.server

问题:执行 bin/MysqL_ssl_rsa_setup 命令的作用是?

小结

官网给出的安装命令过于粗糙:

  • 相关目录是在何时,通过何种方式被创建出来的没有说明;
  • 命令 chown 和 chgrp 明显可以进行简化组合;
  • bin/MysqLd_safe 在 5.7.xx 版本中已经被移除;
  • support-files/MysqL.server 用作 init.d 下的脚本用于维护 MysqL 服务的方式在已经支持 systemd 的系统中已经不合适了;

安装过程遇到的问题

可能用到的命令

# To list the configuration options
shell> cmake . -L   # overview
shell> cmake . -LH  # overview with help text
shell> cmake . -LAH # all params with help text
shell> ccmake .     # interactive display

# To prevent old object files or configuration information from being used,run these commands before re-running CMake
shell> make clean
shell> rm CMakeCache.txt

boost 版本低问题

在源码安装系统要求中提到:

The Boost C++ libraries are required to build MysqL (but not to use it). Boost 1.59.0 must be installed. To obtain Boost and its installation instructions,visit the official site. After Boost is installed,tell the build system where the Boost files are located by defining the WITH_BOOST option when you invoke CMake. For example:

shell> cmake . -DWITH_BOOST=/usr/local/boost_1_59_0

Adjust the path as necessary to match your installation.

这种方式采用了先安装后配置的方式;事实上,可以基于 cmake 直接进行下载安装;

root@vagrant-ubuntu-trusty:~/workspace/WGET/MysqL-5.7.16# cmake . -L
-- Running cmake version 3.0.2
-- Found Git: /usr/bin/git (found version "2.1.4")
-- Configuring with MAX_INDEXES = 64U
...
-- MysqL 5.7.16
-- Packaging as: MysqL-5.7.16-Linux-x86_64
-- Found /usr/include/boost/version.hpp
-- BOOST_VERSION_NUMBER is #define BOOST_VERSION 105500
CMake Warning at cmake/boost.cmake:266 (MESSAGE):
  Boost minor version found is 55 we need 59
Call Stack (most recent call first):
  CMakeLists.txt:455 (INCLUDE)

-- BOOST_INCLUDE_DIR /usr/include
-- LOCAL_BOOST_DIR
-- LOCAL_BOOST_ZIP
-- Could not find (the correct version of) boost.
-- MysqL currently requires boost_1_59_0

CMake Error at cmake/boost.cmake:81 (MESSAGE):
  You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<directory>

  This CMake script will look for boost in <directory>.  If it is not there,it will download and unpack it (in that directory) for you.

  If you are inside a firewall,you may need to use an http proxy:

  export http_proxy=http://example.com:80

Call Stack (most recent call first):
  cmake/boost.cmake:269 (Could_NOT_FIND_BOOST)
  CMakeLists.txt:455 (INCLUDE)

-- Configuring incomplete,errors occurred!
See also "/root/workspace/WGET/MysqL-5.7.16/CMakeFiles/CMakeOutput.log".
See also "/root/workspace/WGET/MysqL-5.7.16/CMakeFiles/CMakeError.log".
-- Cache values
...
root@vagrant-ubuntu-trusty:~/workspace/WGET/MysqL-5.7.16#

可以看到,在 ubuntu 15.04 系统中已安装的 boost 版本不满足 “Boost minor version found is 55 we need 59” 要求,同时给出了修复办法 “You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST= ”;

基于 cmake 直接更新 boost 版本的方法如下:

root@vagrant-ubuntu-trusty:~/workspace/WGET/MysqL-5.7.16# cmake . -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/tmp

之后就 ok 了;

systemd 相关 cmake 配置问题

参考信息:这里

关键信息:

  • As of MysqL 5.7.6,if you install MysqL using an RPM distribution on the following Linux platforms,server startup and shutdown is managed by systemd
  • To obtain systemd support if you install from a source distribution,configure the distribution using the -DWITH_SYSTEMD=1 CMake option.
  • manual server management using the systemctl command or service command.
  • On platforms for which systemd support is installed,scripts such as MysqLd_safe and the System V initialization script are not installed because they are unnecessary. For example,MysqLd_safe can handle server restarts,but systemd provides the same capability,and does so in a manner consistent with management of other services rather than using an application-specific program.
  • As of MysqL 5.7.13,on platforms for which systemd support is installed,systemd has the capability of managing multiple MysqL instances.
  • Because MysqLd_safe is not installed when systemd is used,options prevIoUsly specified for that program (for example,in an [MysqLd_safe] option group) must be specified another way.

-DSYstemD_PID_DIR=dir_name

The name of the directory in which to create the PID file when MysqL is managed by systemd. The default is /var/run/MysqLd; this might be changed implicitly according to the INSTALL_LAYOUT value.

This option is ignored unless WITH_SYstemD is enabled. It was added in MysqL 5.7.6.

-DSYstemD_SERVICE_NAME=name

The name of the MysqL service to use when MysqL is managed by systemd. The default is MysqLd; this might be changed implicitly according to the INSTALL_LAYOUT value.

This option is ignored unless WITH_SYstemD is enabled. It was added in MysqL 5.7.6.

-DWITH_SYstemD=bool

Whether to enable installation of systemd support files. By default,this option is disabled. When enabled,systemd support files are installed,and scripts such as MysqLd_safe and the System V initialization script are not installed. On platforms where systemd is not available,enabling WITH_SYstemD results in an error from CMake.

For more information about using systemd,see Section 2.5.10,“Managing MysqL Server with systemd”. That section also includes information about specifying options prevIoUsly specified in [MysqLd_safe] option groups. Because MysqLd_safe is not installed when systemd is used,such options must be specified another way.

This option was added in MysqL 5.7.6.

“c++: internal compiler error: Killed (program cc1plus)” 问题

在执行 make 命令时,会出现如下错误

root@vagrant-ubuntu-trusty:~/workspace/WGET/MysqL-5.7.16# make
...
[ 38%] Building CXX object sql/CMakeFiles/sql.dir/item_func.cc.o
[ 39%] Building CXX object sql/CMakeFiles/sql.dir/item_geofunc.cc.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
sql/CMakeFiles/sql.dir/build.make:907: recipe for target 'sql/CMakeFiles/sql.dir/item_geofunc.cc.o' Failed
make[2]: *** [sql/CMakeFiles/sql.dir/item_geofunc.cc.o] Error 4
CMakeFiles/Makefile2:8443: recipe for target 'sql/CMakeFiles/sql.dir/all' Failed
make[1]: *** [sql/CMakeFiles/sql.dir/all] Error 2
Makefile:137: recipe for target 'all' Failed
make: *** [all] Error 2
root@vagrant-ubuntu-trusty:~/workspace/WGET/MysqL-5.7.16#

可以看到 cc1plus 是由于 “Out of memory” 的原因被杀了;

root@vagrant-ubuntu-trusty:~# dmesg |grep -i kill
[29269.576976] automount invoked oom-killer: gfp_mask=0x201da,order=0,oom_score_adj=0
[29269.577051]  [<ffffffff8117d04b>] oom_kill_process+0x22b/0x390
[29269.577294] Out of memory: Kill process 4094 (cc1plus) score 866 or sacrifice child
[29269.577339] Killed process 4094 (cc1plus) total-vm:965712kB,anon-RSS:453088kB,file-RSS:0kB
root@vagrant-ubuntu-trusty:~#

问题的根源在于,我的 ubuntu 15.04 虚拟机环境只分配了 500M 的内存,结果表明是不够用的;

在 stackoverflow 上找了个比较好的说明,摘录如下:

Most likely that is your problem. The problem above occurs when your system runs out of memory. In this case rather than the whole system falling over,the operating systems runs a process to score each process on the system. The one that scores the highest gets killed by the operating system to free up memory. If the process that is killed is cc1plus,gcc (perhaps incorrectly) interprets this as the process crashing and hence assumes that it must be a compiler bug. But it isn't really,the problem is the OS killed cc1plus,rather than it crashed.

If this is the case,you are running out of memory.

解决办法可以参考这里;摘录如下:

# 创建分区文件,大小 2G
dd if=/dev/zero of=/swapfile bs=1k count=2048000
# 生成 swap 文件系统
mkswap /swapfile
# 激活 swap 文件(立即激活而不是在启动时自动开启)
swapon /swapfile
# 在系统重启时自动挂载交换分区并启用,需要在 /etc/fstab 文件中增加如下内容
/swapfile  swap  swap    defaults 0 0

删除之前创建的 swap 分区:

  • swapoff /swapfile
  • 删除之前添加到 /etc/fstab 文件中的内容
  • rm -rf /swapfile

通过上面的办法确实能够避免由于 oom 而被杀的问题,与此同时,因为使用了 swap 所以编译速度也慢的可以~~

--explicit_defaults_for_timestamp 选项问题

在进行 MysqL 初始化时,会有如下告警信息;

root@vagrant-ubuntu-trusty:/usr/local/MysqL# bin/MysqLd --initialize --user=MysqL
2016-12-08T02:39:01.362885Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-12-08T02:39:01.739983Z 0 [Warning] InnoDB: New log files created,LSN=45790
2016-12-08T02:39:01.804289Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2016-12-08T02:39:01.875989Z 0 [Warning] No existing UUID has been found,so we assume that this is the first time that this server has been started. Generating a new UUID: 7a7039cf-bcef-11e6-a01e-0800274ac42f.
2016-12-08T02:39:01.878411Z 0 [Warning] Gtid table is not ready to be used. Table 'MysqL.gtid_executed' cannot be opened.
2016-12-08T02:39:01.880601Z 1 [Note] A temporary password is generated for root@localhost: 7rc!uu#i!%Az
root@vagrant-ubuntu-trusty:/usr/local/MysqL#

原则上该告警可以不解决;官网给出的参数说明如下:

explicit_defaults_for_timestamp

Introduced	5.6.6
Deprecated	5.6.6
Command-Line Format	--explicit_defaults_for_timestamp=#
System Variable	Name	explicit_defaults_for_timestamp
Variable Scope	Global,Session
Dynamic Variable	No
Permitted Values	Type	boolean
Default	FALSE
In MysqL,the TIMESTAMP data type differs in nonstandard ways from other data types:

TIMESTAMP columns not explicitly declared with the NULL attribute are assigned the NOT NULL attribute. (Columns of other data types,if not explicitly declared as NOT NULL,permit NULL values.) Setting such a column to NULL sets it to the current timestamp.

The first TIMESTAMP column in a table,if not declared with the NULL attribute or an explicit DEFAULT or ON UPDATE clause,is automatically assigned the DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP attributes.

TIMESTAMP columns following the first one,if not declared with the NULL attribute or an explicit DEFAULT clause,are automatically assigned DEFAULT '0000-00-00 00:00:00' (the “zero” timestamp). For inserted rows that specify no explicit value for such a column,the column is assigned '0000-00-00 00:00:00' and no warning occurs.

Those nonstandard behaviors remain the default for TIMESTAMP but as of MysqL 5.6.6 are deprecated and this warning appears at startup:

[Warning] TIMESTAMP with implicit DEFAULT value is deprecated.
Please use --explicit_defaults_for_timestamp server option (see
documentation for more details).
As indicated by the warning,to turn off the nonstandard behaviors,enable the explicit_defaults_for_timestamp system variable at server startup. With this variable enabled,the server handles TIMESTAMP as follows instead:

TIMESTAMP columns not explicitly declared as NOT NULL permit NULL values. Setting such a column to NULL sets it to NULL,not the current timestamp.

No TIMESTAMP column is assigned the DEFAULT CURRENT_TIMESTAMP or ON UPDATE CURRENT_TIMESTAMP attributes automatically. Those attributes must be explicitly specified.

TIMESTAMP columns declared as NOT NULL and without an explicit DEFAULT clause are treated as having no default value. For inserted rows that specify no explicit value for such a column,the result depends on the sql mode. If strict sql mode is enabled,an error occurs. If strict sql mode is not enabled,the column is assigned the implicit default of '0000-00-00 00:00:00' and a warning occurs. This is similar to how MysqL treats other temporal types such as DATETIME.

Note
explicit_defaults_for_timestamp is itself deprecated because its only purpose is to permit control over Now-deprecated TIMESTAMP behaviors that will be removed in a future MysqL release. When that removal occurs,explicit_defaults_for_timestamp will have no purpose and will be removed as well.

This variable was added in MysqL 5.6.6.

简单的处理方式如下

root@vagrant-ubuntu-trusty:/usr/local/MysqL# bin/MysqLd --initialize --user=MysqL --explicit_defaults_for_timestamp=true

关于 my.cnf 和 MysqLd.service 文件

my.cnf

root@vagrant-ubuntu-trusty:/usr/local/MysqL# cp support-files/my-default.cnf /etc/my.cnf

MysqLd.service

root@vagrant-ubuntu-trusty:/usr/local/MysqL# cp lib/systemd/system/MysqLd.service /usr/lib/systemd/system/

MysqLd 启动失败问题

启动 MysqL 服务,失败;

root@vagrant-ubuntu-trusty:/usr/local/MysqL# systemctl start MysqLd.service
Job for MysqLd.service Failed. See "systemctl status MysqLd.service" and "journalctl -xe" for details.
root@vagrant-ubuntu-trusty:/usr/local/MysqL#
root@vagrant-ubuntu-trusty:/usr/local/MysqL# systemctl status MysqLd.service
● MysqLd.service - MysqL Server
   Loaded: loaded (/usr/lib/systemd/system/MysqLd.service; disabled; vendor preset: enabled)
   Active: Failed (Result: start-limit) since Thu 2016-12-08 14:34:27 CST; 17s ago
  Process: 24527 ExecStart=/usr/local/MysqL/bin/MysqLd --daemonize --pid-file=/var/run/MysqLd/MysqLd.pid $MysqLD_OPTS (code=exited,status=1/FAILURE)
  Process: 24512 ExecStartPre=/usr/local/MysqL/bin/MysqLd_pre_systemd (code=exited,status=0/SUCCESS)

Dec 08 14:34:27 vagrant-ubuntu-trusty systemd[1]: MysqLd.service: control process exited,code=exited status=1
Dec 08 14:34:27 vagrant-ubuntu-trusty systemd[1]: Failed to start MysqL Server.
Dec 08 14:34:27 vagrant-ubuntu-trusty systemd[1]: Unit MysqLd.service entered Failed state.
Dec 08 14:34:27 vagrant-ubuntu-trusty systemd[1]: MysqLd.service Failed.
Dec 08 14:34:27 vagrant-ubuntu-trusty systemd[1]: MysqLd.service holdoff time over,scheduling restart.
Dec 08 14:34:27 vagrant-ubuntu-trusty systemd[1]: start request repeated too quickly for MysqLd.service
Dec 08 14:34:27 vagrant-ubuntu-trusty systemd[1]: Failed to start MysqL Server.
Dec 08 14:34:27 vagrant-ubuntu-trusty systemd[1]: Unit MysqLd.service entered Failed state.
Dec 08 14:34:27 vagrant-ubuntu-trusty systemd[1]: MysqLd.service Failed.
root@vagrant-ubuntu-trusty:/usr/local/MysqL#

查看 systemd 的日志,可以看到服务启动的详细信息;

root@vagrant-ubuntu-trusty:/usr/local/MysqL# journalctl -xe
...
Dec 08 14:34:27 vagrant-ubuntu-trusty MysqLd[24527]: 2016-12-08T06:34:27.628759Z 0 [ERROR] /usr/local/MysqL/bin/MysqLd: Can't create/write to file '/var/run/MysqLd/MysqLd.pid' (Errcode: 2 - No such file or directory)
Dec 08 14:34:27 vagrant-ubuntu-trusty MysqLd[24527]: 2016-12-08T06:34:27.629114Z 0 [ERROR] Can't start server: can't create PID file: No such file or directory
Dec 08 14:34:27 vagrant-ubuntu-trusty systemd[1]: MysqLd.service: control process exited,code=exited status=1
Dec 08 14:34:27 vagrant-ubuntu-trusty systemd[1]: Failed to start MysqL Server.
-- Subject: Unit MysqLd.service has Failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit MysqLd.service has Failed.
--
-- The result is Failed.
...

从上面可以看出,失败的原因是由于 “Can't create/write to file '/var/run/MysqLd/MysqLd.pid'” ;

可以通过如下命令解决

root@vagrant-ubuntu-trusty:/usr/local/MysqL# mkdir -p /var/run/MysqLd
root@vagrant-ubuntu-trusty:/usr/local/MysqL# chown MysqL:MysqL /var/run/MysqLd

再次重新启动,成功;

root@vagrant-ubuntu-trusty:/usr/local/MysqL# systemctl start MysqLd.service
root@vagrant-ubuntu-trusty:/usr/local/MysqL# systemctl status MysqLd.service
● MysqLd.service - MysqL Server
   Loaded: loaded (/usr/lib/systemd/system/MysqLd.service; disabled; vendor preset: enabled)
   Active: active (running) since Thu 2016-12-08 14:44:33 CST; 17s ago
  Process: 24760 ExecStart=/usr/local/MysqL/bin/MysqLd --daemonize --pid-file=/var/run/MysqLd/MysqLd.pid $MysqLD_OPTS (code=exited,status=0/SUCCESS)
  Process: 24745 ExecStartPre=/usr/local/MysqL/bin/MysqLd_pre_systemd (code=exited,status=0/SUCCESS)
 Main PID: 24764 (MysqLd)
   CGroup: /system.slice/MysqLd.service
           └─24764 /usr/local/MysqL/bin/MysqLd --daemonize --pid-file=/var/run/MysqLd/MysqLd.pid

Dec 08 14:44:33 vagrant-ubuntu-trusty MysqLd[24760]: 2016-12-08T06:44:33.384861Z 0 [Note] InnoDB: Loading buffer pool(s) from /usr/local/MysqL/data/ib_buffer_pool
Dec 08 14:44:33 vagrant-ubuntu-trusty MysqLd[24760]: 2016-12-08T06:44:33.386295Z 0 [Note] InnoDB: Buffer pool(s) load completed at 161208 14:44:33
Dec 08 14:44:33 vagrant-ubuntu-trusty MysqLd[24760]: 2016-12-08T06:44:33.386705Z 0 [Note] Server hostname (bind-address): '*'; port: 3306
Dec 08 14:44:33 vagrant-ubuntu-trusty MysqLd[24760]: 2016-12-08T06:44:33.386936Z 0 [Note] IPv6 is available.
Dec 08 14:44:33 vagrant-ubuntu-trusty MysqLd[24760]: 2016-12-08T06:44:33.387219Z 0 [Note]   - '::' resolves to '::';
Dec 08 14:44:33 vagrant-ubuntu-trusty MysqLd[24760]: 2016-12-08T06:44:33.387398Z 0 [Note] Server socket created on IP: '::'.
Dec 08 14:44:33 vagrant-ubuntu-trusty MysqLd[24760]: 2016-12-08T06:44:33.401092Z 0 [Note] Event Scheduler: Loaded 0 events
Dec 08 14:44:33 vagrant-ubuntu-trusty MysqLd[24760]: 2016-12-08T06:44:33.403270Z 0 [Note] /usr/local/MysqL/bin/MysqLd: ready for connections.
Dec 08 14:44:33 vagrant-ubuntu-trusty MysqLd[24760]: Version: '5.7.16'  socket: '/tmp/MysqL.sock'  port: 3306  Source distribution
Dec 08 14:44:33 vagrant-ubuntu-trusty systemd[1]: Started MysqL Server.
root@vagrant-ubuntu-trusty:/usr/local/MysqL#

关于 MysqL_secure_installation 命令

详细信息参考官网文章:这里

This program enables you to improve the security of your MysqL installation in the following ways:

  • You can set a password for root accounts.
  • You can remove root accounts that are accessible from outside the local host.
  • You can remove anonymous-user accounts.
  • You can remove the test database (which by default can be accessed by all users,even anonymous users),and privileges that permit anyone to access databases with names that start with test_.

需要注意的是,若要允许远端机器进行访问,则需要在执行该命令时进行相关设置;之后还需要为 MysqL 添加远程访问账号和密码;

MysqL> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;

最终用于生成 Makefile 文件的 cmake 指令

root@vagrant-ubuntu-trusty:~/workspace/WGET/MysqL-5.7.16# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/MysqL -DMysqL_DATADIR=/usr/local/MysqL/data -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DEXTRA_CHARSETS=all -DENABLED_LOCAL_INFILE=1 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/tmp -DWITH_SYstemD=1 -DENABLE_DOWNLOADS=1

详细 cmake 配置说明见这里;

其它有用的只言片语:

  • Systemd replaces SysV and upstart initialization systems and is the default init system in most modern Linux distributions.
  • 在 MysqL 支持 systemd 的较早版本中(5.7.6 之前的版本),存在如下限制和问题:
    • Use of ping tricks to check whether MysqLd is ready to serve client connections.
    • Though systemd had superior process control for automatic restarts,MysqLd_safe was still used to identify abnormal MysqLd termination and do automatic restarts.
    • There was no auto-detection of systemd configuration paths to generate service unit files for varIoUs distributions.
    • There was no integration with our CMake build system.

【原创】Ubuntu 15.04 上源码安装 mysql-5.7.16的更多相关文章

  1. HTML实现代码雨源码及效果示例

    这篇文章主要介绍了HTML实现代码雨源码及效果示例,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧

  2. 从iOS应用程序发送帖子到PHP脚本不工作…简单的解决方案就像

    我之前已经做了好几次了但是由于某些原因我无法通过这个帖子…我尝试了设置为_POST且没有的变量的PHP脚本……当它们未设置为发布时它工作精细.这是我的iOS代码:这里是PHP的一大块,POST变量不在正确的位置?我想这对于更有经验的开发人员来说是一个相当简单的答案,感谢您的帮助!解决方法$_POST是一个数组,而不是一个函数.您需要使用方括号来访问数组索引:

  3. 源码推荐:简化Swift编写的iOS动画,iOS Material Design库

    本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请发送邮件至dio@foxmail.com举报,一经查实,本站将立刻删除。

  4. swift皮筋弹动发射飞机ios源码

    这是一个款采用swift实现的皮筋弹动发射飞机游戏源码,游戏源码比较详细,大家可以研究学习一下吧。

  5. swift 写的app 源码,保存一下下

    http://www.topthink.com/topic/3345.htmlhttp://www.csdn.net/article/2015-01-09/2823502-swift-open-source-libs

  6. swift 源码网站 code4app

    http://code4app.com/ios/HTHorizontalSelectionList/54cb2c94933bf0883a8b4583http://123.th7.cn/code/DMPagerViewController_2522.html

  7. OpenStack Swift源码导读:业务整体架构和Proxy进程

    OpenStack的源码分析在网上已经非常多了,针对各个部分的解读亦是非常详尽。其中proxy是前端的业务接入进程。account、container和object目录分别是账户、容器和对象的业务处理逻辑进程。各个业务进程或模块之间的逻辑关系可以参考《OpenstackSwift简介》文中的架构图。在《OpenstackSwift简介》从理论上面介绍了具体的节点寻找过程。

  8. 源码推荐(7.21):顶部滑动菜单FDSlideBar,Swift版无限循环轮播图

    顶部滑动菜单FDSlideBarFDSlideBar是一个顶部滑动菜单,如常见的网易、腾讯新闻等样式。菜单间切换流畅,具有较好的体验性。测试环境:Xcode6.2,iOS6.0以上Swift版无限循环轮播图无限循环轮播图片点击代理可设置图片Url的数组Url和本地图片混合轮播测试环境:Xcode6.2,iOS7.0以上弹幕系统实现--QHDanumuDemo说明:QHDanmu文件夹下是主要的弹幕模块系统,QHDanmuSend文件夹下是简单的发射弹幕的界面。

  9. openstack swift和wsgi源码分析1 HTTP请求处理过程

    分析proxy-server代理服务的执行流程,其他的三个主要服务accountserver,containerserver,objectserver执行过程通proxyserver类似。入口函数调用run_wsgi,此函数完成以下工作:下面重点研究下process_request函数是如何把消息转化为HTTP的request对象这一过程。process_request函数,生成HttpProtocol对象,并执行init操作,注意,HttpProtocol对象自身没有init函数,所以会调用父类的父类的

  10. fir.im Weekly - 进击的 Swift

    最近Swift开源了,众开发者们欢呼雀跃。本期fir.imWeekly准备了一些关于Swift的“新鲜”干货分享,也包括一些优秀的GitHub源码、开发工具和技术文章等等。同时,苹果启用了新的官网:Swift.org,Swift的GitHub主页:https://github.com/apple/swiftSwift3API设计准则勤快的@星夜暮晨翻译了苹果Swift官方网站博客的一篇文章:Swift3APIDesignGuidelines,了解Swift3特性,希望对你有所帮助。如何在iOS中实现一个可

随机推荐

  1. crontab发送一个月份的电子邮件

    ubuntu14.04邮件服务器:Postfixroot收到来自crontab的十几封电子邮件.这些邮件包含PHP警告.>我已经解决了这些警告的原因.>我已修复每个cronjobs不发送电子邮件(输出发送到>/dev/null2>&1)>我删除了之前的所有电子邮件/var/mail/root/var/spool/mail/root但我仍然每小时收到十几封电子邮件.这些电子邮件来自cronjobs,

  2. 模拟两个ubuntu服务器计算机之间的慢速连接

    我想模拟以下场景:假设我有4台ubuntu服务器机器A,B,C和D.我想在机器A和机器C之间减少20%的网络带宽,在A和B之间减少10%.使用网络模拟/限制工具来做到这一点?

  3. ubuntu-12.04 – 如何在ubuntu 12.04中卸载从源安装的redis?

    我从源代码在Ubuntu12.04上安装了redis-server.但在某些时候它无法完全安装,最后一次makeinstallcmd失败.然后我刚刚通过apt包安装.现在我很困惑哪个安装正在运行哪个conf文件?实际上我想卸载/删除通过源安装的所有内容,只是想安装一个包.转到源代码树并尝试以下命令:如果这不起作用,您可以列出软件自行安装所需的步骤:

  4. ubuntu – “apt-get source”无法找到包但“apt-get install”和“apt-get cache”可以找到它

    我正在尝试下载软件包的源代码,但是当我运行时它无法找到.但是当我运行apt-cache搜索squid3时,它会找到它.它也适用于apt-getinstallsquid3.我使用的是Ubuntu11.04服务器,这是我的/etc/apt/sources.list我已经多次更新了.我尝试了很多不同的debs,并没有发现任何其他地方的错误.这里的问题是你的二进制包(deb)与你的源包(deb-src)不

  5. ubuntu – 有没有办法检测nginx何时完成正常关闭?

    &&touchrestarted),因为即使Nginx没有完成其关闭,touch命令也会立即执行.有没有好办法呢?这样的事情怎么样?因此,pgrep将查找任何Nginx进程,而while循环将让它坐在那里直到它们全部消失.你可以改变一些有用的东西,比如睡1;/etc/init.d/Nginx停止,以便它会休眠一秒钟,然后尝试使用init.d脚本停止Nginx.你也可以在某处放置一个计数器,这样你就可以在需要太长时间时发出轰击信号.

  6. ubuntu – 如何将所有外发电子邮件从postfix重定向到单个地址进行测试

    我正在为基于Web的应用程序设置测试服务器,该应用程序发送一些电子邮件通知.有时候测试是使用真实的客户数据进行的,因此我需要保证服务器在我们测试时无法向真实客户发送电子邮件.我想要的是配置postfix,以便它接收任何外发电子邮件并将其重定向到一个电子邮件地址,而不是传递到真正的目的地.我正在运行ubuntu服务器9.10.先感谢您设置本地用户以接收所有被困邮件:你需要在main.cf中添加:然后

  7. ubuntu – vagrant无法连接到虚拟框

    当我使用基本的Vagrantfile,只配置了两条线:我看到我的虚拟框打开,但是我的流氓日志多次显示此行直到超时:然后,超时后的一段时间,虚拟框框终于要求我登录,但是太久了!所以我用流氓/流氓记录.然后在我的物理机器上,如果我“流氓ssh”.没有事情发生,直到:怎么了?

  8. ubuntu – Nginx – 转发HTTP AUTH – 用户?

    我和Nginx和Jenkins有些麻烦.我尝试使用Nginx作为Jenkins实例的反向代理,使用HTTP基本身份验证.它到目前为止工作,但我不知道如何传递带有AUTH用户名的标头?}尝试将此指令添加到您的位置块

  9. Debian / Ubuntu – 删除后如何恢复/ var / cache / apt结构?

    我在ubuntu服务器上的空间不足,所以我做了这个命令以节省空间但是现在在尝试使用apt时,我会收到以下错误:等等显然我删除了一些目录结构.有没有办法做apt-getrebuild-var-tree或类似的?

  10. 检查ubuntu上安装的rubygems版本?

    如何查看我的ubuntu盒子上安装的rubygems版本?只是一个想法,列出已安装的软件包和grep为ruby或宝石或其他:)dpkg–get-selections

返回
顶部