2 月 062019
 

Tick Size
Requires the TickSize amendment.
When an Offer is placed into an order book, its exchange rate is truncated based on the TickSize values set by the issuers of the currencies involved in the Offer. When a trader offers to exchange XRP and an issued currency, the TickSize from the issuer of the currency applies. When a trader offers to exchange two issued currencies, the offer uses the smaller TickSize value (that is, the one with fewer significant digits). If neither currency has a TickSize set, the default behavior applies.
当一个报价单放入一个order book时,其汇率将按照货币发行人所设置的TickSize而截断位数(匹配精度)。当交易者在一个报价单中进行XRP和已发行货币见兑换时,适用由该货币发行人设置的TickSize设置。当交易者在一个报价单中进行两种已发行货币的兑换时,报价单使用较小TickSize的值(即具有更少位数的那个)。如果两种货币对应发行人的TickSize设置相同,则默认适用。
The TickSize value truncates the number of significant digits in the exchange rate of an offer when it gets placed in an order book. Issuers can set TickSize to an integer from 3 to 15 using an AccountSet transaction. The exchange rate is represented as significant digits and an exponent; the TickSize does not affect the exponent. This allows the XRP Ledger to represent exchange rates between assets that vary greatly in value (for example, a hyperinflated currency compared to a rare commodity). The lower the TickSize an issuer sets, the larger the increment traders must offer to be considered a higher exchange rate than the existing Offers.
在order book中的报价单,会受TickSize设置而截断交易汇率中的有效位数。发行人可以使用AccountSet交易类型设置3-15位整数长度的TickSize设置值(精度)。汇率表示为有效数字和指数,TickSize设置不影响指数。这允许XRP总账网络在两个差异化资产价值之间提供汇率(例如通涨货币和稀缺商品之间)。发行人设置的TickSize越小, 越多的交易商就会考虑比当前已存在报价单更高的汇率的报价单。

The TickSize does not affect the part of an Offer that can be executed immediately. (For that reason, OfferCreate transactions with tfImmediateOrCancel are unaffected by TickSize values.) If the Offer cannot be fully executed, the transaction processing engine calculates the exchange rate and truncates it based on TickSize. Then, the engine rounds the remaining amount of the Offer from the “less important” side to match the truncated exchange rate. For a default OfferCreate transaction (a “buy” Offer), the TakerPays amount (the amount being bought) gets rounded. If the tfSell flag is enabled (a “sell” Offer) the TakerGets amount (the amount being sold) gets rounded.
TickSize设置不会影响报价单中能够立即执行的部分。(OfferCreate交易中开启tfImmediateOrCancel标志的不受tickSize设置影响。)如果报价单不能被完整执行,交易处理引擎会计算汇率并基于TickSize设置截断位数。然后,引擎将来自“不太重要”一侧的剩余额度进行汇率截断。例如典型交易OfferCreate(买入报价),其中TakerPays额度将被舍入。如果tfSell标志启用(卖出报价),则TakerGets额度将被舍入。
When an issuer enables, disables, or changes the TickSize, Offers that were placed under the previous setting are unaffected.
发行人启用,关闭,修改TickSize设置,以按照先前设置提交的报价单不受此部分行为影响。

1 月 282019
 

https://developers.ripple.com/autobridging.html
Auto-Bridging

自动桥接

Any OfferCreate that would exchange two non-XRP currencies could potentially use XRP as an intermediary currency in a synthetic order book. This is because of auto-bridging, which serves to improve liquidity across all currency pairs by using XRP as a vehicle currency. This works because of XRP’s nature as a native cryptocurrency to the XRP Ledger. Offer execution can use a combination of direct and auto-bridged offers to achieve the best total exchange rate.

所有OfferCreate交易进行两种非XRP货币的转换潜在都可能以XRP做为中间货币,这就是自动桥接,其通过使用XRP作为承载实现了跨货币交易过程中货币的流通性。这也是XRP作为XRP总账网络内原生加密货币的本质。报价单可以以直接兑换和自动桥接组合的方式实现最佳交易费率。

Example: Anita places an offer to sell GBP and buy BRL. She might find that this uncommon currency market has few offers. There is one offer with a good rate, but it has insufficient quantity to satisfy Anita’s trade. However, both GBP and BRL have active, competitive markets to XRP. Auto-bridging software finds a way to complete Anita’s offer by purchasing XRP with GBP from one trader, then selling the XRP to another trader to buy BRL. Anita automatically gets the best rate possible by combining the small offer in the direct GBP:BRL market with the better composite rates created by pairing GBP:XRP and XRP:BRL offers.

示例:Anita要以英镑兑换巴西雷亚尔,但发现市场上BRL几乎没有报价单。然而英镑和XRP之间,以及巴西雷亚尔和XRP之间,都有大量的交易报价单。自动桥接通过将英镑兑换为XRP,再将XRP兑换为巴西雷亚尔的方式,实现了Anita的目的。且费用低廉。

Auto-bridging happens automatically on any OfferCreate transaction. Payment transactions do not autobridge by default, but path-finding can find paths that have the same effect.

自动桥接自动发生在所有OfferCreate交易中,Payment交易默认不使用自动桥接,但是路径发现功能可以发现具有相同效果的路径。

1 月 262019
 


https://developers.ripple.com/offers.html
https://developers.ripple.com/offercreate.html
https://developers.ripple.com/offercancel.html

Offers
报价单

In the XRP Ledger’s decentralized exchange, orders to trade currency are called “Offers”. Offers can trade XRP with issued currencies, or issued currencies with each other, including issued currencies with the same currency code but different issuers. (Currencies with the same code but different issuers can also sometimes be exchanged through rippling.)
在XRP总账网络的去中心化汇兑中,用以交易货币的订单称为Offers报价单。报价单交易可以是在XRP和已发行货币之间,也可以是在不同已发行货币之间,包括不同发行人发行的具有相同货币代码的已发行货币。(通常不同发行人发行的具有相同货币代码的已发行货币也可以通过rippling进行交易。)

To create an Offer, send an OfferCreate transaction.

要创建报价单,需要提交一个OfferCreate交易。
Offers that aren’t fully filled immediately become Offer objects in the ledger data. Later Offers and Payments can consume the Offer object from the ledger.

报价单

Cross-currency payments consume offers to provide liquidity.

跨货币支付

TakerGets The amount and type of currency being provided by the offer creator.
报价单创建者提供的货币类型和数额

TakerPays The amount and type of currency being requested by the offer creator.
报价单创建者需要的货币类型和数额

Lifecycle of an Offer
报价单生命周期

When an OfferCreate transaction is processed, it automatically consumes matching or crossing offers to the extent possible. (If existing offers provide a better rate than requested, the offer creator could pay less than the full TakerGets amount to receive the entire TakerPays amount.) If that does not completely fulfill the TakerPays amount, then the offer becomes an Offer object in the ledger. (You can use OfferCreate Flags to modify this behavior.)
当OfferCreate交易处理后,系统自动进行消费匹配或在可接受范围内交叉报价。(如果现有报价单比已请求报价具有更优费率,报价单创建者可以支付少于TakerGets的数额,而收到TakerPays的全额。)如果不满足TakerPays数额要求,则该订单将作为Offer对象存在于总账网络中。

An offer in the ledger can be fulfilled either by additional OfferCreate transactions that match up with the existing offers, or by Payment transactions that use the offer to connect the payment path. Offers can be partially fulfilled and partially funded. A single transaction can consume up to 850 Offers from the ledger. (Any more than that, and the metadata becomes too large, resulting in tecOVERSIZE.)
总账网络中的报价单可以与其他由OfferCreate交易创建的报价单进行匹配交易,也可以在付款交易中使用报价单来连接付款路径。报价单支持部分匹配和部分兑现,单笔交易在总账网络中最多消耗850个报价单。(超过该限制,将导致metadata数据过大,相关参数为tecOVERSIZE)

You can create an offer so long as you have at least some (any positive, nonzero amount) of the currency specified by the TakerGets parameter of the offer. The offer sells as much of the currency as you have, up to the TakerGets amount, until the TakerPays amount is satisfied. An offer cannot place anyone in debt.
只要你的账户中拥有TakerGets参数所指定的货币种类和余额就可以创建报价单。报价单所指定的TakerGets数额不能超过你所具有该货币的实际数额。报价单不会使交易双方产生债务。

It is possible for an offer to become temporarily or permanently unfunded:
报价单可能产生临时或永久额度不足的情况:

If the creator no longer has any of the TakerGets currency.
    The offer becomes funded again when the creator obtains more of that currency.

当创建者不再持有TakerGets所指定的货币时。当创建者再次取得该货币时报价单及资金才变为可用状态。

If the currency required to fund the offer is held in a frozen trust line.
    The offer becomes funded again when the trust line is no longer frozen.

如果交易货币资金处在冻结状态的信任线上,只有当信任线不再冻结以后报价单及资金才变为可用状态。

If the creator does not have enough XRP for the reserve amount of a new trust line required by the offer. (See Offers and Trust.)
    The offer becomes funded again when the creator obtains more XRP, or the reserve requirements decrease.

当创建者XRP余额不能满足储备金要求以建立满足该报价单的新信任线时。报价单在创建者获取更多XRP或储备金标准降低时报价单才变为可用状态。

If the Expiration time included in the offer is before the close time of the most recently-closed ledger. (See Offer Expiration.)

如果报价单的过期时间在最近关闭的总账版本时间之前。

An unfunded offer can stay on the ledger indefinitely, but it does not have any effect. The only ways an offer can be permanently removed from the ledger are:
没有资金交付的报价单可以一直留存在总账网络中,但是没有任何效应。从总账网络中永久移除报价单的方式如下:

It becomes fully claimed by a Payment or a matching OfferCreate transaction.

完全被支付消耗或匹配其他OfferCreate交易。

An OfferCancel or OfferCreate transaction explicitly cancels the offer.

由OfferCancel或OfferCreate交易明确取消。

An OfferCreate transaction from the same account crosses the earlier offer. (In this case, the older offer is automatically canceled.)

由同一账户发起重叠的OfferCreate交易。(在这种情况下,旧报价单自动取消)

An offer is found to be unfunded during transaction processing, typically because it was at the tip of the orderbook.

报价单在处理交易时发现资金额度不可用。通常因为该报价单位于orderbook最末端。

    This includes cases where one side or the other of an offer is found to be closer to 0 than rippled's precision supports.

这包括一方或者另一个报价单挂出比rippled支持精度更接近0的报价。

Tracking Unfunded Offers
追踪无资金报价单

Tracking the funding status of all offers can be computationally taxing. In particular, addresses that are actively trading may have a large number of offers open. A single balance can affect the funding status of many offers to buy different currencies. Because of this, rippled does not proactively find and remove offers.
追踪报价单的资金状态以便进行税费计算。特别是活跃的账户地址通常保有大量进行中的报价单。单一的账户余额会影响到所有买入不同货币交易的资金状态。因此,rippled默认设计为不积极主动查找和移除报价单。

A client application can locally track the funding status of offers. To do this, first retreive an order book using the book_offers method and check the taker_gets_funded field of offers. Then, subscribe to the transactions stream and watch the transaction metadata to see which offers are modified.
客户端程序可以本地追踪报价单资金状态。首先使用book_offers方法检索order book并检查taker_gets_funded字段。然后参阅交易流及交易metadata元数据信息以确认哪些报价单发生了变化。

Offers and Trust
报价单与信任

The limit values of trust lines (See TrustSet) do not affect offers. In other words, you can use an offer to acquire more than the maximum amount you trust an issuer to redeem.
信任线的限额设置不影响报价单。也就是用户可以获取超过信任线限额或发行人偿付能力的货币。

However, holding non-XRP balances still requires a trust line to the address issuing those balances. When an offer is taken, it automatically creates any necessary trust lines, setting their limits to 0. Because trust lines increase the reserve an account must hold, any offers that would require a new trust line also require the address to have enough XRP to meet the reserve for that trust line.
但是,持有非XRP货币余额仍需与发行地址建立信任线。创建报价单时将自动创建必需的信任线,并设置限额为0。因为信任线与账户储备金相关,任何报价单创建时所需要的信任线关系都需要具有满足储备金要求的XRP。

A trust line indicates an issuer you trust enough to accept their issuances as payment, within limits. Offers are explicit instructions to acquire certain issuances, so they are allowed to go beyond those limits.
信任线限额是用户足够信任并接受能够使用发行进行付款的额度。报价单则是明确表明要获得的发行及额度,所以允许超出该限制。

Offer Preference
报价单偏好

Existing offers are grouped by exchange rate (sometimes called “offer quality”), which is measured as the ratio between TakerGets and TakerPays. Offers with a higher exchange rate are taken preferentially. (That is, the person accepting the offer receives as much as possible for the amount of currency they pay out.) Offers with the same exchange rate are taken on the basis of which offer was placed in the earliest ledger version.
现有报价单按汇率(也叫报价质量)进行分组,即TakerGets和TakerPays的比率。具有较高汇率的报价单将优先处理。(也就是说是尽量少的成本获取尽量多的回报)。具有相同汇率的报价单则根据其出现在总账版本的时间顺序优先处理。

When offers of the same exchange rate are placed in the same ledger version, the order in which they are taken is determined by the canonical order in which the transactions were applied to the ledger. This behavior is designed to be deterministic, efficient, and hard to game.
如果发生具有相同汇率的报价单出现在相同的总账版本中,订单将按照报价单交易提交至总账网络的权威顺序处理。这种行为被设计为确定的,高效的,难以捉弄的。

Offer Expiration
报价单过期

Since transactions can take time to propagate and confirm, the timestamp of a ledger is used to determine offer validity. An offer only expires when its Expiration time is before the most-recently validated ledger. In other words, an offer with an Expiration field is still considered “active” if its expiration time is later than the timestamp of the most-recently validated ledger, regardless of what your local clock says.
因为交易需要时间传递和确认,总账网络中的时间戳用以确认报价单有效性。报价单过期时间早于最近已验证总账时间则认为报价单过期。报价单过期时间晚于最新已验证总账时间,则认为是有效的报价单。

You can determine the final disposition of an offer with an Expiration as soon as you see a fully-validated ledger with a close time equal to or greater than the expiration time.
当用户看到报价单的过期时间等于或远远大于最新已验证总账的关闭时间时,即可以确认该报价单的最终意向。

Note:
Since only new transactions can modify the ledger, an expired offer can stay on the ledger after it becomes inactive. The offer is treated as unfunded and has no effect, but it can continue to appear in results (for example, from the ledger_entry command). Later on, the expired offer can get finally deleted as a result of another transaction (such as another OfferCreate) if the server finds it while processing.
只有新的交易可以修改总账,报价单可以留存在已生成和验证(过期)的总账中。不会有任何影响,但该报价单仍会出现在命令执行的结果中(如ledger_entry命令)。最终该报价单会在进行另外一笔OffercCreate交易时被删除。

要删除一项旧的报价并更换为新的报价,用户可以使用带有一个OfferSequence参数的OfferCreate 交易来代替使用OfferCancel并创建另一个OfferCreate交易。

If an OfferCreate transaction has an Expiration time that has already passed when the transaction first gets included in a ledger, the transaction does not execute the offer. The result code of such a transaction depends on whether the Checks amendment is enabled. With the Checks amendment enabled, the transaction has the tecEXPIRED result code. Otherwise, the transaction has the tesSUCCESS transaction code. In either case, the transaction has no effect except to destroy the XRP paid as a transaction cost.
如果OfferCreate交易的过期时间在提交至总账网络之前就已经过期,报价单将不会被使用。其交易返回代码将将根据是否启用Checks amendment支票修正设置而不同。该设置开启时,交易返回tecEXPIRED,未开启时返回tesSUCCESS。任何情况下,除取消该报价单时产生的XRP交易费用外,该报价单不会有任何效应。

1 月 112019
 

安装Remi及EPEL仓库

[root@localhost ~]# yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
[root@localhost ~]# yum makecache

安装Jitamin基本运行环境软件包

[root@localhost ~]# yum install unzip net-tools php56-php php56-php-pdo php56-php-mysql php56-php-mbstring php56-php-gd httpd mariadb mariadb-server git

开启防火墙端口

[root@localhost ~]# firewall-cmd --permanent --add-service=http
success
[root@localhost ~]# firewall-cmd --reload
success
[root@localhost ~]#

配置数据库

[root@localhost ~]# systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@localhost ~]# systemctl start mariadb
[root@localhost ~]#

[root@localhost ~]# mysql -uroot -p
MariaDB [(none)]> create database jitamin;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant all on jitamin.* to jitamin@localhost;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> set password for jitamin@localhost=password('jitamin');
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit
Bye

修改php.ini时区配置

[root@localhost ~]# vi /opt/remi/php56/root/etc/php.ini
date.timezone = Asia/Shanghai

[root@localhost ~]# php56 --version
PHP 5.6.40 (cli) (built: Jan 9 2019 12:21:54)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
[root@localhost ~]#

[root@localhost ~]# cd /usr/bin/
[root@localhost bin]# ln -s php56 php

安装Composer

[root@localhost ~]# php56 -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
[root@localhost ~]# php56 -r "if (hash_file('sha384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Installer verified
[root@localhost ~]# php56 composer-setup.php
All settings correct for using Composer
Downloading...

Composer (version 1.8.0) successfully installed to: /root/composer.phar
Use it: php composer.phar

[root@localhost ~]# php56 -r "unlink('composer-setup.php');"
[root@localhost ~]# mv composer.phar /usr/bin/composer
[root@localhost ~]#

使用普通用户权限下载并配置Jitamin

[root@localhost ~]# useradd harveymei
[root@localhost ~]# su - harveymei
[harveymei@localhost ~]$ git clone https://github.com/jitamin/jitamin.git
Cloning into 'jitamin'...
remote: Enumerating objects: 13, done.
remote: Counting objects: 100% (13/13), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 14323 (delta 1), reused 0 (delta 0), pack-reused 14310
Receiving objects: 100% (14323/14323), 4.92 MiB | 663.00 KiB/s, done.
Resolving deltas: 100% (10492/10492), done.
[harveymei@localhost ~]$

[harveymei@localhost ~]$ cd jitamin/
[harveymei@localhost jitamin]$ cp .env.example .env
[harveymei@localhost jitamin]$
[harveymei@localhost jitamin]$ vi .env
APP_NAME=Jitamin
APP_ENV=production
APP_DEBUG=true
APP_KEY=SomeRandomString
APP_TIMEZONE=Asia/Shanghai
APP_LOCALE=zh-CN
APP_THEME=black
APP_LOG=daily
APP_LOG_LEVEL=error
APP_URL=http://localhost

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=jitamin
DB_USERNAME=jitamin
DB_PASSWORD=jitamin

使用composer安装项目PHP依赖

[harveymei@localhost jitamin]$ composer install -o --no-dev
> php -r "file_exists('.env') || copy('.env.example', '.env');"
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 27 installs, 0 updates, 0 removals
- Installing christian-riesen/base32 (1.3.1): Downloading (100%)
- Installing christian-riesen/otp (1.4.3): Downloading (100%)
- Installing eluceo/ical (0.10.1): Downloading (100%)
- Installing erusev/parsedown (1.6.0): Downloading (100%)
- Installing gregwar/captcha (v1.1.1): Downloading (100%)
- Installing jitamin/json-rpc (v1.2.2): Downloading (100%)
- Installing jitamin/picodb (v1.0.15): Downloading (100%)
- Installing jitamin/picofeed (v0.1.25): Downloading (100%)
- Installing jitamin/simple-logger (v1.0.2): Downloading (100%)
- Installing jitamin/simple-queue (v1.0.1): Downloading (100%)
- Installing jitamin/simple-validator (v1.0.2): Downloading (100%)
- Installing symfony/polyfill-mbstring (v1.9.0): Downloading (100%)
- Installing symfony/translation (v3.2.14): Downloading (100%)
- Installing nesbot/carbon (1.33.0): Downloading (100%)
- Installing paragonie/random_compat (v2.0.11): Downloading (100%)
- Installing pimple/pimple (v3.0.2): Downloading (100%)
- Installing symfony/yaml (v2.8.7): Downloading (100%)
- Installing psr/log (1.0.2): Downloading (100%)
- Installing symfony/debug (v3.4.14): Downloading (100%)
- Installing symfony/console (v3.4.14): Downloading (100%)
- Installing symfony/polyfill-ctype (v1.9.0): Downloading (100%)
- Installing symfony/filesystem (v3.4.14): Downloading (100%)
- Installing symfony/config (v3.4.14): Downloading (100%)
- Installing robmorgan/phinx (v0.6.6): Downloading (100%)
- Installing swiftmailer/swiftmailer (v5.4.5): Downloading (100%)
- Installing symfony/event-dispatcher (v3.4.14): Downloading (100%)
- Installing vlucas/phpdotenv (v2.5.1): Downloading (100%)
Generating optimized autoload files
[harveymei@localhost jitamin]$

创建并初始化数据库

[harveymei@localhost jitamin]$ vendor/bin/phinx migrate
Phinx by Rob Morgan - https://phinx.org. 0.6.6

using config file ./phinx.php
using config parser php
using migration path database/migrations
using seed path database/seeds
warning no environment specified, defaulting to: mysql
using adapter mysql
using database jitamin

== 20161222061456 CreateUsersTable: migrating
== 20161222061456 CreateUsersTable: migrated 0.0055s

== 20161222065743 CreateRememberMeTable: migrating
== 20161222065743 CreateRememberMeTable: migrated 0.0027s

== 20161222071058 CreateGroupsTable: migrating
== 20161222071058 CreateGroupsTable: migrated 0.0031s

== 20161222071513 CreateSettingsTable: migrating
== 20161222071513 CreateSettingsTable: migrated 0.0017s

== 20161222072332 CreateProjectsTable: migrating
== 20161222072332 CreateProjectsTable: migrated 0.0021s

== 20161222073541 CreateActionsTable: migrating
== 20161222073541 CreateActionsTable: migrated 0.0018s

== 20161222073852 CreateColumnsTable: migrating
== 20161222073852 CreateColumnsTable: migrated 0.0026s

== 20161222074452 CreateTasksTable: migrating
== 20161222074452 CreateTasksTable: migrated 0.0032s

== 20161222081719 CreateCommentsTable: migrating
== 20161222081719 CreateCommentsTable: migrated 0.0025s

== 20161222082417 CreateSwimlanesTable: migrating
== 20161222082417 CreateSwimlanesTable: migrated 0.0023s

== 20161222083010 CreateTagsTable: migrating
== 20161222083010 CreateTagsTable: migrated 0.0018s

== 20161222083245 CreateSubtasksTable: migrating
== 20161222083245 CreateSubtasksTable: migrated 0.0020s

== 20161222083935 CreateLinksTable: migrating
== 20161222083935 CreateLinksTable: migrated 0.0046s

== 20161222084249 CreateTransitionsTable: migrating
== 20161222084249 CreateTransitionsTable: migrated 0.0034s

== 20161222084940 CreateCustomFiltersTable: migrating
== 20161222084940 CreateCustomFiltersTable: migrated 0.0023s

== 20161222085354 CreateLastLoginsTable: migrating
== 20161222085354 CreateLastLoginsTable: migrated 0.0020s

== 20161222085809 CreatePasswordResetTable: migrating
== 20161222085809 CreatePasswordResetTable: migrated 0.0019s

== 20161222091052 CreatePluginSchemaVersionsTable: migrating
== 20161222091052 CreatePluginSchemaVersionsTable: migrated 0.0018s

== 20161222091605 CreateProjectActivitiesTable: migrating
== 20161222091605 CreateProjectActivitiesTable: migrated 0.0028s

== 20161222092217 CreateProjectDailyColumnStatsTable: migrating
== 20161222092217 CreateProjectDailyColumnStatsTable: migrated 0.0025s

== 20161222092312 CreateProjectDailyStatsTable: migrating
== 20161222092312 CreateProjectDailyStatsTable: migrated 0.0019s

== 20161222093033 CreateSchemaVersionTable: migrating
== 20161222093033 CreateSchemaVersionTable: migrated 0.0014s

== 20161222093333 CreateActionHasParamsTable: migrating
== 20161222093333 CreateActionHasParamsTable: migrated 0.0019s

== 20161222094356 CreateProjectHasRolesTable: migrating
== 20161222094356 CreateProjectHasRolesTable: migrated 0.0016s

== 20161222094851 CreateColumnHasRestrictionsTable: migrating
== 20161222094851 CreateColumnHasRestrictionsTable: migrated 0.0023s

== 20161222094859 CreateColumnHasMoveRestrictionsTable: migrating
== 20161222094859 CreateColumnHasMoveRestrictionsTable: migrated 0.0024s

== 20161222095207 CreateGroupHasUsersTable: migrating
== 20161222095207 CreateGroupHasUsersTable: migrated 0.0030s

== 20161222095739 CreateProjectHasCategoriesTable: migrating
== 20161222095739 CreateProjectHasCategoriesTable: migrated 0.0017s

== 20161222100221 CreateProjectHasFilesTable: migrating
== 20161222100221 CreateProjectHasFilesTable: migrated 0.0016s

== 20161222104316 CreateProjectHasGroupsTable: migrating
== 20161222104316 CreateProjectHasGroupsTable: migrated 0.0017s

== 20161222104338 CreateProjectHasMetadataTable: migrating
== 20161222104338 CreateProjectHasMetadataTable: migrated 0.0019s

== 20161222104355 CreateProjectHasStarsTable: migrating
== 20161222104355 CreateProjectHasStarsTable: migrated 0.0020s

== 20161222104411 CreateProjectHasNotificationTypesTable: migrating
== 20161222104411 CreateProjectHasNotificationTypesTable: migrated 0.0016s

== 20161222104427 CreateProjectHasUsersTable: migrating
== 20161222104427 CreateProjectHasUsersTable: migrated 0.0022s

== 20161222112306 CreateProjectRoleHasRestrictionsTable: migrating
== 20161222112306 CreateProjectRoleHasRestrictionsTable: migrated 0.0022s

== 20161222112615 CreateSubtaskTimeTrackingTable: migrating
== 20161222112615 CreateSubtaskTimeTrackingTable: migrated 0.0019s

== 20161222113157 CreateTaskHasExternalLinksTable: migrating
== 20161222113157 CreateTaskHasExternalLinksTable: migrated 0.0016s

== 20161222113205 CreateTaskHasFilesTable: migrating
== 20161222113205 CreateTaskHasFilesTable: migrated 0.0017s

== 20161222113217 CreateTaskHasLinksTable: migrating
== 20161222113217 CreateTaskHasLinksTable: migrated 0.0032s

== 20161222113234 CreateTaskHasMetadataTable: migrating
== 20161222113234 CreateTaskHasMetadataTable: migrated 0.0018s

== 20161222113239 CreateTaskHasTagsTable: migrating
== 20161222113239 CreateTaskHasTagsTable: migrated 0.0017s

== 20161222114814 CreateUserHasMetadataTable: migrating
== 20161222114814 CreateUserHasMetadataTable: migrated 0.0020s

== 20161222114828 CreateUserHasNotificationTypesTable: migrating
== 20161222114828 CreateUserHasNotificationTypesTable: migrated 0.0016s

== 20161222114837 CreateUserHasNotificationsTable: migrating
== 20161222114837 CreateUserHasNotificationsTable: migrated 0.0024s

== 20161222114844 CreateUserHasUnreadNotificationsTable: migrating
== 20161222114844 CreateUserHasUnreadNotificationsTable: migrated 0.0016s

== 20161225123941 AlterTableUsersAddApiTokenColumn: migrating
== 20161225123941 AlterTableUsersAddApiTokenColumn: migrated 0.0042s

== 20161228031419 AlterTableUsersAddLayoutColumn: migrating
== 20161228031419 AlterTableUsersAddLayoutColumn: migrated 0.0031s

== 20161231134810 AlterTableUsersAddDashboardColumn: migrating
== 20161231134810 AlterTableUsersAddDashboardColumn: migrated 0.0124s

== 20170105040003 AlterTableProjectsAddDefaultViewColumn: migrating
== 20170105040003 AlterTableProjectsAddDefaultViewColumn: migrated 0.0028s

== 20171228053201 AlterTableActionsAddPositionColumn: migrating
== 20171228053201 AlterTableActionsAddPositionColumn: migrated 0.0150s

All Done. Took 0.1642s
[harveymei@localhost jitamin]$
[harveymei@localhost jitamin]$ vendor/bin/phinx seed:run
Phinx by Rob Morgan - https://phinx.org. 0.6.6

using config file ./phinx.php
using config parser php
using migration path database/migrations
using seed path database/seeds
warning no environment specified, defaulting to: mysql
using adapter mysql
using database jitamin

== LinkSeeder: seeding
== LinkSeeder: seeded 0.0079s

== SettingSeeder: seeding
== SettingSeeder: seeded 0.0043s

== UserSeeder: seeding
== UserSeeder: seeded 0.0911s

All Done. Took 0.1050s
[harveymei@localhost jitamin]$

修改目录权限

[harveymei@localhost jitamin]$ chmod -R 777 bootstrap/cache/
[harveymei@localhost jitamin]$ chmod -R 777 storage/
[harveymei@localhost jitamin]$

清除缓存

[harveymei@localhost jitamin]$ php artisan config:cache
Configuration cached successfully!
[harveymei@localhost jitamin]$ php artisan route:cache
Routes cached successfully!
[harveymei@localhost jitamin]$

修改项目路径及配置Apache服务

[harveymei@localhost ~]$ exit
logout
[root@localhost ~]#
[root@localhost ~]# mv /home/harveymei/jitamin/ /usr/local/
[root@localhost ~]# cd /usr/local/
[root@localhost local]# chown -R apache.apache jitamin/
[root@localhost local]#

修改默认主机名

[root@localhost ~]# vi /etc/httpd/conf/httpd.conf
ServerName localhost

添加虚拟主机配置

[root@localhost ~]# vi /etc/httpd/conf.d/jitamin.conf
<VirtualHost *:80>
ServerName 192.168.108.67
DocumentRoot "/usr/local/jitamin/public/"

ErrorLog "logs/jitamin-error_log"
CustomLog "logs/jitamin-access_log" combined

<Directory "/usr/local/jitamin/public/">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>

检查配置文件并启动Apache服务

[root@localhost ~]# apachectl -t
Syntax OK
[root@localhost ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@localhost ~]# systemctl start httpd
[root@localhost ~]#

使用浏览器访问Jitamin服务

10 月 152018
 

47.52.163.213

VERSION=2.1.47 /bin/bash -c “$(curl -s https://cms-agent-cn-hongkong.oss-cn-hongkong-internal.aliyuncs.com/cms-go-agent/cms_go_agent_install.sh)”

[root@iZj6cd9flzbx5kd084fw97Z ~]# yum -y update

[root@iZj6cd9flzbx5kd084fw97Z ~]# hostnamectl set-hostname pms
[root@iZj6cd9flzbx5kd084fw97Z ~]# init 6

[root@pms ~]# yum -y install https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
[root@pms ~]# vi /etc/yum.repos.d/mysql-community.repo

[mysql56-community]
enabled=1

[mysql80-community]
enabled=0

[root@pms ~]# yum makecache

[root@pms ~]# yum install httpd php php-gd php-mbstring php-pdo php-mysql mysql-community-server mysql-community-client

[root@pms ~]# curl -O http://dl.cnezsoft.com/zentao/10.5/ZenTaoPMS.10.5.stable.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6718k 100 6718k 0 0 2854k 0 0:00:02 0:00:02 –:–:– 2855k
[root@pms ~]#

[root@pms ~]# yum -y install unzip

[root@pms ~]# unzip ZenTaoPMS.10.5.stable.zip
[root@pms ~]# mv zentaopms/ /usr/local/

[root@pms ~]# vi /etc/httpd/conf/httpd.conf
ServerName 127.0.0.1

[root@pms ~]# vi /etc/httpd/conf.d/zentaopms.conf
#<VirtualHost *:80>
# ServerName 149.28.192.83
# RewriteEngine On
# RewriteRule ^(.*)$ http://www.domain.com$1 [R,L]
#</VirtualHost>

<VirtualHost *:80>
ServerName 10.172.100.222
DocumentRoot “/usr/local/zentaopms/www”

ErrorLog “logs/zentaopms-error_log”
CustomLog “logs/zentaopms-access_log” combined

<Directory “/usr/local/zentaopms”>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>

# RewriteEngine On
# RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R,L]
</VirtualHost>

#<VirtualHost *:80>
# ServerName 149.28.192.83
# RewriteEngine On
# RewriteRule ^(.*)$ http://www.domain.com$1 [R,L]
#</VirtualHost>

#<VirtualHost *:80>
# ServerName cn.paycpro.io
# DocumentRoot “/usr/local/www.domain.com”
#
# ErrorLog “logs/www.domain.com-error_log”
# CustomLog “logs/www.domain.com-access_log” combined
#
# <Directory “/usr/local/www.domain.com”>
# Options Indexes FollowSymLinks
# AllowOverride All
# Require all granted
# </Directory>

# RewriteEngine On
# RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R,L]
#</VirtualHost>

[root@pms ~]# vi /etc/php.ini
date.timezone = Asia/Shanghai

[root@pms ~]# apachectl -t
Syntax OK
[root@pms ~]#

[root@pms ~]# systemctl status httpd
● httpd.service – The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: man:httpd(8)
man:apachectl(8)
[root@pms ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
[root@pms ~]# systemctl start httpd
[root@pms ~]#

[root@pms ~]# vi /etc/my.cnf
#
bind-address = 0.0.0.0
character-set-server = utf8mb4
log_bin = mysql-bin
binlog_format = mixed
expire_logs_days = 7

[root@pms ~]# systemctl status mysqld
● mysqld.service – MySQL Community Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: inactive (dead)
[root@pms ~]# systemctl start mysqld
[root@pms ~]#

[root@pms ~]# mysql -uroot -p

mysql> create database zentaopms;
Query OK, 1 row affected (0.00 sec)

mysql> grant all on zentaopms.* to zentaopms@localhost;
Query OK, 0 rows affected (0.00 sec)

mysql> set password for zentaopms@localhost=password(‘#sk3832EsoeqA’);
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye

[root@pms ~]# systemctl enable firewalld
Created symlink from /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service to /usr/lib/systemd/system/firewalld.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/firewalld.service to /usr/lib/systemd/system/firewalld.service.
[root@pms ~]# systemctl start firewalld
[root@pms ~]# firewall-cmd –list-all
public
target: default
icmp-block-inversion: no
interfaces:
sources:
services: ssh dhcpv6-client
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:

[root@pms ~]#

[root@pms ~]# firewall-cmd –permanent –add-service=http
success
[root@pms ~]# firewall-cmd –reload
success
[root@pms ~]# firewall-cmd –list-all
public
target: default
icmp-block-inversion: no
interfaces:
sources:
services: ssh dhcpv6-client http
ports:
protocols:
masquerade: no
forward-ports:
source-ports:
icmp-blocks:
rich rules:

[root@pms ~]#

http://47.52.163.213/install.php

[root@pms ~]# cd /usr/local/zentaopms/www/
[root@pms www]# rm -rf index.php
[root@pms www]#

8 月 132018
 

https://developers.ripple.com/start-a-new-genesis-ledger-in-stand-alone-mode.html
https://developers.ripple.com/advance-the-ledger-in-stand-alone-mode.html

Start a New Genesis Ledger in Stand-Alone Mode
以独立模式启用新的创世总账

In stand-alone mode, you can have rippled create a new genesis ledger. This provides a known state, with none of the ledger history from the production XRP Ledger. (This is very useful for unit tests, among other things.)
在独立模式下,用户可以使用rippled创建一个新的创世总账。这提供了一种有别于生产XRP总账网络的,没有任何历史总账的状态。(除了特定方面的影响,这对于单元测试极其有用。)

To start rippled in stand-alone mode with a new genesis ledger, use the -a and –start options:
要在独立模式下使用rippled创建一个新的创世总账,使用-a和–start参数:

rippled -a --start --conf=/path/to/rippled.cfg

In a genesis ledger, the genesis address holds all 100 billion XRP. The keys of the genesis address are hardcoded as follows:
在创世总账中,创世地址持有全部的1000亿XRP。已经硬编码在代码中的创世地址密钥信息如下:

Address: rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh

Secret: snoPBrXtMeMyMHUVTgbuqAfg1SUTb ("masterpassphrase")

Settings in New Genesis Ledgers
创世总账中的设置状态

In a new genesis ledger, the hard-coded default Reserve is 200 XRP minimum for funding a new address, with an increment of 50 XRP per object in the ledger. These values are higher than the current reserve requirements of the production network. (See also: Fee Voting)
在新生成的创世总账中,用于注资激活新地址的硬编码储备金默认为200XRP,增长幅度为每个对象50XRP。这些值高于当前生产网络的实际储备金要求。(参阅:费用投票)

By default, a new genesis ledger has no amendments enabled. If you start a new genesis ledger with –start, the genesis ledger contains an EnableAmendment pseudo-transaction to turn on all amendments natively supported by the rippled server, except for amendments that you explicitly disable in the configuration file. The effects of those amendments are available starting from the very next ledger version. (Reminder: in stand-alone mode, you must advance the ledger manually.)
默认情况下,新生成的创世总账未启用任何修正案。当用户使用–start启用一个新的创世总账时,创世总账包含的EnableAmendment伪交易用以启用rippled服务器所支持的所有修正案,除非明确在配置文件中禁用的修正案。这些修正案将在下一总账版本中生效。(提示:在独立模式下,用户必须手动推进总账生成。)

Advance the Ledger in Stand-Alone Mode
在独立模式下推进总账(生成)

In stand-alone mode, rippled does not communicate to other members of the peer-to-peer network or participate in a consensus process. Instead, you must manually advance the ledger index using the ledger_accept method:
在独立模式下,rippled不与对等网络中的任何成员通信或参与共识过程。相反,用户需要使用ledger_accept方法手动推进总账的生成。

rippled ledger_accept --conf=/path/to/rippled.cfg

In stand-alone mode, rippled makes no distinction between a “closed” ledger version and a “validated” ledger version. (For more information about the difference, see The XRP Ledger Consensus Process.)
在独立模式下,rippled不再区分closed关闭状态的总账和validated已验证状态的总账。

Whenever rippled closes a ledger, it reorders the transactions according to a deterministic but hard-to-game algorithm. (This is an important part of consensus, since transactions may arrive at different parts of the network in different order.) When using rippled in stand-alone mode, you should manually advance the ledger before submitting a transaction that depends on the result of a transaction from a different address. Otherwise, the two transactions might be executed in reverse order when the ledger is closed. Note: You can safely submit multiple transactions from a single address to a single ledger, because rippled sorts transactions from the same address in ascending order by Sequence number.
当rippled关闭一个总账的时候,它会按照确定但难以伪造的算法重新排序交易。(这是共识的重要部分,在交易从不同网络及不同顺序到达之前。)在独立模式下使用rippled时,用户需要在结果涉及不同地址的交易提交之前手动推进总账生成。否则,当总账关闭时相关的交易可能会以截然相反的顺序执行。注意:用户可以安全的使用单个地址提交多笔交易到单个总账中,因为rippled会按照Squence序号升序对来自同一地址的交易进行排序。