dreamhost 好用吗_在Dreamhost上安装pngcrush

dreamhost 好用吗

dreamhost 好用吗

pngcrush is an excellent optimizer for png images, simple and fast, highly recommended. Basically any time before you post a PNG on the web, you should run it through PNGCrush. It's a command line utility, there's a quick way to integrate pngcrush in windows explorer. (note to self: I actually wrote a wordpress plugin to do crush uploaded images, gotta find and post it)

pngcrush是用于png图像的出色优化器,简单,快速,强烈建议使用。 基本上,在将PNG发布到网络上之前的任何时间,都应该通过PNGCrush运行它。 这是一个命令行实用程序,有一种将pngcrush集成到Windows资源管理器中的快速方法。 (请注意:我实际上写了一个wordpress插件来粉碎上传的图像,必须查找并发布)

I'm working (together with Nicole) on an online image optimizer, using the free command line tools I talked about at PHP Quebec, Montreal, O'Reilly's Velocity and the Yahoo! Performance pages. The tool will be free, of course, and hosted on Dreamhost. OK, finally getting to the point, am I?

我正在(与Nicole一起)使用我在PHP Quebec,MontrealO'Reilly的VelocityYahoo!上讨论的免费命令行工具,开发一个在线图像优化器。 绩效页面。 该工具当然是免费的,并托管在Dreamhost上。 好,终于到了要点,是吗?

Here's what I did to install pngcrush on Dreamhost, hope it helps anyone out there who's sweating with the same task.

这是我在Dreamhost上安装pngcrush所做的工作,希望它可以帮助正在忙于同一任务的任何人。

  1. ssh to your dreamhost box, you need to give yourself ssh privileges from the dreamhost control panel

    ssh到您的dreamhost框中,您需要从dreamhost控制面板中给自己ssh特权

  2. mkdir tmp - make a temp directory

    mkdir tmp一个临时目录

  3. cd tmp - enter the temp directory

    cd tmp进入临时目录

  4. wget http://voxel.dl.sourceforge.net/sourceforge/pmt/pngcrush-1.6.10.tar.gz - download latest version of the pngcrush source code, this is the sourceforge mirror, closest to me, yours might be different and the pngcrush version might be newer at the time you install it, you can check here

    wget http://voxel.dl.sourceforge.net/sourceforge/pmt/pngcrush-1.6.10.tar.gz下载pngcrush源代码的最新版本,这是sourceforge镜像,离我最近,您的可能有所不同并且pngcrush版本在安装时可能是较新的,您可以在此处查看

  5. tar zxvf pngcrush-1.6.10.tar.gz - uncompress the code. This creates a new directory, enter it like so: cd pngcrush-1.6.10

    tar zxvf pngcrush-1.6.10.tar.gz解压缩代码。 这将创建一个新目录,如下所示输入: cd pngcrush-1.6.10

  6. now all you need to do is run make, but didn't work for me, so I edited the Makefile file first, like so vi Makefile. In the vi editor, press i to enter INSERT mode and once you're done with the changes, press ESC, then type :wq (meaining write, quit). Here I removed the version information from the gcc compiler, so the two lines I edited became

    现在您所需要做的就是运行make ,但是对我不起作用,所以我首先编辑了Makefile文件,就像vi Makefile 。 在vi编辑器中,按i进入INSERT模式,完成更改后,按ESC,然后键入:wq (表示写入,退出)。 在这里,我从gcc编译器中删除了版本信息,所以我编辑的两行变成了

    CC = gcc
    LD = gcc
    
  7. make - this compiles the pngcrush code and creates a binary called pngcrush

    make -这编译pngcrush代码,并创建了一个名为二进制pngcrush

  8. cp pngcrush /usr/bin/ - copy the new binary to where binaries usually live

    cp pngcrush /usr/bin/ -将新的二进制文件复制到二进制文件通常所在的位置

  9. All set, try if everything is ok pngcrush, this should display the pngcrush's help information

    全部设置,如果一切正常,请尝试pngcrush ,这应该显示pngcrush的帮助信息

Crush'em PNG!(Crush'em PNGs!)

Like so: pngcrush image.png -rem alla -reduce -brute result.png

像这样: pngcrush image.png -rem alla -reduce -brute result.png

需要托管吗? (Need hosting?)

[advertisement]Dreamhost is a really good host, use this code MAXDISCO for $50 off [/advertisement] 😉

[广告] Dreamhost是一个非常好的主机,请使用此代码MAXDISCO减$ 50 [/广告]😉

Tell your friends about this post on Facebook and Twitter

FacebookTwitter上告诉您的朋友有关此帖子的信息

翻译自: https://www.phpied.com/installing-pngcrush-at-dreamhost/

dreamhost 好用吗

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值