In Magento 1.0, the configuration file that contains database settings and other information is located here:
/app/etc/local.xml

In Magento 2.0, the configuration is in the same directory (/app/etc/) but has been renamed to env.php. The file path is:

magento 2 数据库配置文件位置/app/etc/env.php

In this file, a number of key things are set, including the database connection information:

‘host’ => ‘localhost’,
‘dbname’ => ‘magento2database’,
‘username’ => ‘some-sample-username’,
‘password’ => ‘Extremely-Complicated-Password-12345’,
‘model’ => ‘mysql4’,
‘engine’ => ‘innodb’,
‘initStatements’ => ‘SET NAMES utf8;’,
‘active’ => ‘1’,

View indexer status查看索引状态

This command enables you to view the status of all or selected indexers (for example, shows whether indexers need to be reindexed).

Command options:

到magento 2根目录,然后cd bin文件,然后执行以下代码,

php magento indexer:status [indexer]

where [indexer] is a space-separated list of indexers. Omit [indexer] to view status of all indexers.

To view the list of indexers, enter

magento indexer:info

A sample follows:

magento indexer:status

Sample result:

Category Products:                                 Reindex required
Product Categories:                                Reindex required
Product Price:                                     Reindex required
Product EAV:                                       Reindex required
Stock:                                             Reindex required
Catalog Rule Product:                              Reindex required
Catalog Product Rule:                              Reindex required
Catalog Search:                                    Reindex required

Reindexing is discussed in the next section.

Reindex 执行索引

This command enables you to reindex all or selected indexers one time only.

This command reindexes one time only. To keep indexers up-to-date, you must set up a cron job.

Command options:

magento indexer:reindex [indexer]

where [indexer] is a space-separated list of indexers. Omit [indexer] to reindex all indexers.

To view the list of indexers, enter

magento indexer:info

A sample follows:

magento indexer:reindex

Sample result:

Category Products index has been rebuilt successfully in <time>
Product Categories index has been rebuilt successfully in <time>
Product Price index has been rebuilt successfully in <time>
Product EAV index has been rebuilt successfully in <time>
Stock index has been rebuilt successfully in <time>
Catalog Rule Product index has been rebuilt successfully in <time>
Catalog Product Rule index has been rebuilt successfully in <time>
Catalog Search index has been rebuilt successfully in <time>

 

花了2天来研究这个问题,最终成功安装。参考了大量资料,软件比较新,可以查看的资料非常少。不停的google去查找资源。经过反复尝试,最终实验成功。

先后尝试过LNMP 最新1.3版 用php7,但是试过了很多次,都不成功。

Magneto is an open source e-commerce application owned by eBay. It operates using a LAMP stack on most Linux distributions. This guide will focus on how to setup Magento on Ubuntu 15.04 – but the steps here should work for other versions as well.

Please note that Magento is a very resource-heavy application. For a test server, PHP requires a minimum of 512MB of RAM, but you should use at least 1GB for a small store and 4GB for a medium to large store with hundreds of products.

This tutorial assumes that you are using a freshly created VPS with no installed packages.

Installing

LAMP Stack

First, ensure that the apt-get package library is up to date by running the command below. This will ensure that the latest version of the packages are installed.

$ apt-get update

After this has completed, it is time to install the LAMP components that powers Magento (Linux, Apache, MySQL, PHP). Run the following command with sudo to install all 3 packages in one go. Alternatively, you may install these packages separately using this tutorial.

$ sudo apt-get install lamp-server^

You will need to specify a password for the MySQL root user. Make sure this password is secure and note it down as it will be needed later.

Apache Setup

Before Magneto is installed, we need to configure Apache to properly redirect and rewrite the incoming traffic. Create a virtual host file for Apache using the following command. Here, we use the nano editor, however any text editor could be used.

$ sudo nano /etc/apache2/sites-available/magento.conf

Inside this file, copy and paste our setup options into the nano interface.

<VirtualHost *:80>
    DocumentRoot /var/www/public
    <Directory /var/www/public/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
    </Directory>
</VirtualHost>

It should look similar to the screenshot below.

Save and close the file using Control + O 然后回车一下 ,然后Control + X. Next, we have to tell Apache to use the new config file, and to ignore the default config file. Execute the following commands below (in order):

$ sudo a2ensite magento.conf

$ sudo a2dissite 000-default.conf

Then, reload Apache using the command.

$ sudo service apache2 reload

PHP Setup

PHP also needs to be configured to properly handle the Magento application. As it is an extremely resource heavy application, we need to increase the memory allocation given to PHP. In this case, I will allocate 512MB as this will only be running a test store, however most stores require 1-4GB of memory.

First, open the php.ini config file with a text editor.

$ sudo nano /etc/php5/apache2/php.ini

Find the line which declares the memory limit for PHP and change it to your desired number (in this case, 512MB).

memory_limit = 512M

Save and close the file using Control + O 记得每次都要回车一下and Control + X.

Magento also needs some additional PHP modules which can be installed using apt-get. Execute the following command.

$ sudo apt-get install php5-mcrypt php5-curl php5-gd libcurl3 php5-intl php5-xsl

Once the install finishes, run the following commands.

$ sudo a2enmod rewrite
$ sudo php5enmod mcrypt

Finally, restart Apache.

$ sudo service apache2 restart

MySQL Setup

Magento uses MySQL to store almost all the data associated with the site. We need to create a database for the application to use. Start the MySQL commandline using the command below, using the password from the LAMP setup earlier.

$ mysql -u root -p

Next, execute the command below to create the database.

CREATE DATABASE magento;

Leave the MySQL commandline using Control + C.

Installing Magento

Install composer with the following command:

$ curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

We need to generate a keypair to clone the Magento repo. Since this requires authentication, see the Magento developer documentation for the latest instructions.

Next, place these keys in the auth file for composer using the command below.

$ sudo nano /root/.composer/auth.json

Copy and paste the contents below into the file.下面要获得magento 官方的key,官方有教程。 然后更改下面的 对应的两个key。

{
"http-basic": {
      "repo.magento.com": {
         "username": "<your public key>",
         "password": "<your private key>"
      }
   }
}

CD to the web directory.

$ cd /var/www

Clone the Magento Github repo.

$ git clone -b 2.0 https://github.com/magento/magento2.git public

CD into the cloned folder.

$ cd public

Run composer install to update the dependencies.

 $ composer install

至此安装完成,在浏览器输入域名或者ip,加上 、setup执行在线安装,这个一步一步地操作就行了。

期间可能会遇到一些问题,拿着问题去google一下就可以搞定。

权限

根据你的系统,执行以下命令

Typical examples:

  • CentOS: chown -R :apache .
  • Ubuntu: chown -R :www-data .

记得后面有个点 要加上。

然后执行下面一段命令

find . -type d -exec chmod 770 {} \; && find . -type f -exec chmod 660 {} \; && chmod u+x bin/magento

安装magento 2 simple data

这个是有难度的,看了几个教程,尝试过很多次才搞定。

我们用的是composer安装

执行这个命令,自动下载数据。记得把括号内更换成你的目录

php <your Magento install dir>/bin/magento sampledata:deploy

上面的过程中会让你输入magento key的。记得别忘记了。

 

下载完成以后执行下面命令安装 ,记得把括号内更改成你的目录

php <your Magento install dir>/bin/magento setup:upgrade

上面执行完了以后,可能有一个小错误提示,Please re-run Magento compile command 这个是可以忽略的。

全部执行以后,返回看你的网站,发现网站打不开了,这个时候搜索过很多,都没找到原因。

后来发现,重新执行了下权限命令,网站可以访问了。

我的用系统

  • Ubuntu: chown -R :www-data .

 

后记:

不吃不喝研究了两天,痛苦的过程。先后使用了linode vultr等vps。


 

参考:https://www.vultr.com/docs/installing-magento-2-on-ubuntu

安装magento 2 测试数据参考 http://devdocs.magento.com/guides/v2.0/install-gde/install/sample-data-after-composer.html

 

创客读本

一本在线创客百科全书。本书主要服务于创客,内容涵盖Arduino、3D打印、无人机等创客知识。本书结合多媒体手段,图文并茂地讲述,知识来源于网络加上个人实践总结得来。欢迎批评指正。

电脑,手机均可阅读

网址:

  • www.makerbook.cn (创客读本的英文翻译)
  • www.chuangkeduben.com (创客读本拼音)

谁适合读这本书?

  1. 喜欢捣鼓的朋友,不论年龄大小;
  2. 学生,不管是大学生,中学生,还是小学生;
  3. 有新奇的点子,希望付诸实践的朋友

本书比印刷纸质书的优势

  • 本书完全免费
  • 在线图书可以提供丰富的多媒体资源,如:图片,视频,超链接,下载,讨论等
  • 本书不停地更新,不断完善,从读者的反馈中不断改进

读者QQ交流群:

  1. QQ群: 133851314

关键字

创客、Maker、Arduino、3D打印、开源硬件、智能小车、视频小车、循迹小车、蓝牙小车

谁写的创客读本

创客读本由创客VICTOR个人收集互联网上的相关资料,加上自我的实践学习,编辑而成。 email:[email protected]

研究了好久,搜索了很多东西都没找到结果。

后来无意中发现。命令

$ gitbook build ./How-to-Make-a-Computer-Operating-System-master --output=./testbook

先安装nodejs然后启动命令提示符,然后复制getbook对应书的文件下来到根目录,然后执行上面的命令,记得修改对应的文件名,就可以生成html文件了

MySQL has its own “query cache” that it uses in Magento to help generate dynamic pages and content while improving performance. These are some recommends settings for your my.cnf file.

query_cache_type = 1
query_cache_size = 32M
query_cache_limit=2M

 

这个问题拿到维修站去,说要换那个钩子,就是进纸感应器,结果根本不需要换任何东西,只需要清洗即可。

一、症状:

EPSON LQ-630K经常在感应纸的黑色钩子处,导致纸、快递面单等进不去,卡在机器里面。

二、问题技术分析:

LQ-630、LQ-635K等针式打印机的进纸分为,前进纸和后进纸。

4937634041558689930

EPSON进纸感应器

前进纸,主要是手动平推,打印零散的单据比较适合(纸感应就是机器左边的黑色钩子)。

后进纸,主要是自动进纸,适合批量打印单据、发票等(纸感应就是机器右边的黑色钩子)。

快递单等其他单据,卡纸就是这里卡,需要进行清理。

快递单上面是带有不干胶的,长期打印的话就会遗留一些胶在上面,进纸感应时就会有粘性,就会导致卡纸。

三、解决具体步骤:

1、准备工具:20cm长的棉布条、镊子、酒精

2、清洗方法:

首先,打开机器观察盒的盖子,然后拆掉色带架。

然后用酒精对残留的不干胶进行清洗(没有酒精可以用白酒,没有白酒用水也行)。

前进纸,直接用酒精擦拭,机器左边的进纸钩子处,一般就可以的到解决;不行的话就借鉴后进纸的清洗方法。

后进纸,稍微麻烦,需要先用棉布条沾湿酒精,然后从机器右边钩子的下方穿过,再用镊子将其拉出来,让布条套在钩子的下方。

6608615738259505526

EPSON进纸卡纸的清洗

最后左右拉动布条,在钩子上摩擦,大约20-30次即可。

四、进纸技巧和清洗周期

前进纸的话,只需要保持感应处的清洁,然后还有一个机器左边的白色感应器,保持没有胶就没问题了。

后进纸时,可以将档位调整到7,然后等进纸之后调节到4或者5即可。

清洗周期根据打印快递单的多少决定,一般一个月一次即可。

补充:我也是打印机卡纸 按照楼主的方法试了不行 后来找了个淘宝卖家给了30块钱教了我方法 是楼主的升级版 其实楼主的也可以弄好的 太急功近利了 没有擦干净 有砂纸的话 把下面磨一下 然后再用楼主的方法擦 擦完再抹点油 家里吃的就可以 就好了 谢谢楼主的无私分享 我这个还花了30块钱T T

 

转载:http://blog.163.com/hugh_h_h/blog/static/47656340201452533936351/

目前,织梦dedecms是使用最广的php开源程序,很多站长有习惯使用织梦默认的ckeditor编辑器,但是这个编辑器并没有我们想象重的那么强大!最近dede168织梦资源网整合了开源富文本Ueditor1_4_3最新版编辑器,现在把教程分享给大家!

PS:网上也有很多教程,但是版本都比低,整合起来也比较麻烦,整合好后还有一些功能无法使用。

093022hg9i4gz2b3xxg9b3

织梦dedecms整合百度编辑器详细步骤:


步骤一:先把自己网站备份一下(非常重要)!

步骤二:去官网下载最新版,这个就不用我教了把,注意要对应自己的网站编码,错了概不负责!

步骤三:解压后放到include目录下,文件名为ueditor。

步骤四:打开include下的inc文件夹内的inc_func_funcAdmin.php找到184行,贴入以下代码。

  1. else if($GLOBALS[‘cfg_html_editor’]==’ueditor’)
  2. {
  3. $fvalue = $fvalue==” ? ‘<p></p>’ : $fvalue;
  4. $code = ‘<script type=”text/javascript” charset=”utf-8″ src=”‘.$GLOBALS[‘cfg_cmspath’].’/include/ueditor/ueditor.config.js”></script>
  5. <script type=”text/javascript” charset=”utf-8″ src=”‘.$GLOBALS[‘cfg_cmspath’].’/include/ueditor/ueditor.all.js”></script>
  6. <link rel=”stylesheet” type=”text/css” href=”‘.$GLOBALS[‘cfg_cmspath’].’/include/ueditor/themes/default/css/ueditor.css”/>
  7. <textarea name=”‘.$fname.'” id=”‘.$fname.'” style=”width:100%;”>’.$fvalue.'</textarea>
  8. <script type=”text/javascript”>var ue = new baidu.editor.ui.Editor();ue.render(“‘.$fname.'”);</script>’;
  9. if($gtype==”print”)
  10. {
  11. echo $code;
  12. }
  13. else
  14. {
  15. return $code;
  16. }
  17. }

步骤五:进入后台-系统-系统基本参数-核心设置-将 Html编辑器的值改为 ueditor 保存!

转载自:http://www.moke8.com/article-11763-1.html

10.2卸载操作(umount)

用于卸载一个已挂载的文件系统(分区),相当于windows系统的弹出

命令umount 挂载的设备源(/dev/sdb1) 或已挂载目的点(/mnt)

命令umount 文件系统/挂载点

umount /dev/sdb1 == umount /mnt

例如:umount /dev/sdb1 或 umount /mnt/

三个未满14周岁的学生把一个52岁的女老师打死,并抢劫财物,其中2个位留守儿童。让一部分人先富起来,先富的带动后富裕的。导致了经济发展不平衡,大量劳动力向沿海发达城市转移。外出打工为什么不带上儿女?大城市入户门槛高,外来人员享受义务教育待遇不均衡。不是不带,而是现有体制让很多人都带不了。这些问题是中国人的问题。