1 / 3
Caption Text
2 / 3
Caption Two
3 / 3
Caption Three margin testing

Sunday, January 24, 2010

10 scripts to create your own Linux distribution

10 scripts to create your own Linux distribution | News | TechRadar UK
The best tools to create yourself a custom Linux distro
By Mayank Sharma
5 hours ago
suse-studio
SUSE Studio is a browser-based yet very powerful application that enables you to create a SUSE distro of your own

Those familiar with Linux will be able to tweak settings, add and remove apps and customise the menu, toolbars and other desktop elements.

Incredibly, those are about all the skills you need to create your very own Linux distro.

We're going to take a look at some scripts that'll help you customise different distros.

1. Remastersys

This tool has a newbie-proof GUI and works on both Ubuntu and Debian distros and any of their derivatives.

Remastersys works by transferring the distro you're running into an ISO image. You can choose to include your settings and personal data too, which makes it ideal for backups.

2. UCK

The Ubuntu Customisation Kit – which is tastefully shortened to UCK – works with the ISO of any of the four Ubuntu flavours (the GNOME based original Ubuntu, KDE-based Kubuntu, Xfce-based Xubuntu and education-targeted Edubuntu) and lets you add or remove any apps to the stock.

This tool is ideal for advanced users because during the customisation process it places you in a chrooted environment of the Live CD, enabling you to tweak any aspect of the distro.

3. Reconstructor

As the name suggests, this tool is a comprehensive suite for creating your own custom Ubuntu and Debian distros from an existing ISO image. It lets you tweak the wallpaper, themes, icons, applications, and more.

The browser-based tool requires no installation, but you'll need to pay a small fee before you can use all of its features.

4. Revisor

Unlike the three tools above, this app is for the RPM-based distro Fedora. Revisor has both a GUI and a command-line interface, and it can create USB Live media as well as install-only CDs and DVDs.

Instead of using ISO images, Revisor downloads packages from the internet, so it may take some time to compile depending on your connection speed and customised package selection.

5. SUSE Studio

Novell's SUSE Studio is taking the world by storm. It lets you select packages, set various configurations (including network detection, firewall settings and so on) and select a logo, background and more.

SUSE studio

The most impressive part is that all this functionality is accessed from within a browser. You can even test-drive your new distro – again from within the browser – before downloading the ISO image to share with the world.

6. Pungi

This is the tool that the Fedora developers use to spin the official releases. It's a command-line tool written in Python.

Like Revisor, the tool gathers packages directly from the internet and then automatically splits them and creates CD-sized installable ISO images.

7. Builder

Builder is a series of bash scripts that are used by the gNewSense developers to create their distro. Along with the tool they've also written a handy nine-step guide to creating a customised distro from Ubuntu Hardy. The guide is available on their site.

8. Linux-Live

If you want a truly distro-agnostic way of customising your favourite Linux distribution, you need the Linux-Live set of scripts. The scripts work on any installed Linux distro and can create a Live system that you can boot from optical media or USB drives.

The popular Slackware -based Slax Live distro is built using these scripts, which work best on Slackware but can work on other distributions as well.

9. MySlax Creator

Here's a Slackware customisation script with a unique twist. The tool creates customised versions of the Slackware-based Slax distro we mentioned above, but unlike the other tools we talk about here, MySlax Creator installs and work from within Windows!

It works with Slax ISO images and lets you add data to your own custom spins.

10. Linux From Scratch

If you're a Linux purist then you'll probably find the idea of using scripts and automated systems to create a distro quite abhorrent. Well, fear not. If you're keen to get your hands dirty, you'll need the definitive tome Linux From Scratch, a book that explains how to make your own Linux distro the very hardest way.

Visit here for a copy of the text – and cancel all appointments with your friends for the foreseeable future.

-------------------------------------------------------------------------------------------------------

First published in PC Plus Issue 290

Liked this? Then check out Revealed: the best Linux distro for your netbook

Wednesday, January 20, 2010

SSL Certificate Problem in Google Chrome

Stop the "page contains secure and nonsecure items" warning
(Problem: Google Chrome browser displays a yellow triangle warning icon in the right of the address bar and, when clicked, shows that the identity is verified but that parts of the page are not encrypted. Hit CTRL+Shift+J and you'll see what insecure contents it contains. HL)

Are your SSL web pages plagued by the browser warning "This page contains both secure and nonsecure items. Do you want to display the nonsecure items?"

Do you want to display nonsecure items?

This is a common error that occurs when some element on a secure web page (one that is loaded with https:// in the address bar) is not being loaded from a secure source. This usually occurs with images, frames, iframes, Flash, and JavaScripts. There are a few ways to fix it:

1. Change all URLs to https

Just open up the offending web page and search for http://. Change the references on all images, iframes, Flash, and Javascripts to https://. For example.

<img src="https://www.domain.com/image.gif" alt="" />

This may not work if you are loading an image from another site that does not have SSL set up. Also, with this method you'll be loading SSL images even when the client is loading from a non-secure page. This will add extra processing load on the server and client. This is definitely not recommended for a high volume site.

2. Change all links to // or make them relative

Rather than changing all the links to https://, change them to just //

<img src="//www.domain.com/image.gif" alt="" />

Alternatively, if the images or scripts are located on the same domain, you can access them relatively, rather than absolutely:

<img src="image.gif" alt="" />

Using this method, the browser will know that it must load the image securely if the web page is being loaded securely but it will also load the image normally if the page is not being accessed securely. The image will still need to be available on the other server securely. This is likely the best method of getting rid of the pesky "Do you want to display the nonsecure items?" warnings.

3. Change the browser settings

It is best to change the code of the page that is giving the error, but if you don't have access to change the code, you can always tell your personal web browser not to display that message. To do so follow these steps for Internet Explorer:

  1. Go to Tools, Internet Options.
  2. Select the "Security" Tab and then click on the "Custom Level" button.
  3. Scroll down until you see the option: "Display mixed content". Select "Enable".
  4. Click Ok. Then you will get a "Security Warning" pop-up. Click Yes.

One common reason that this warning shows up is using normal Google Analytics code on a secure page. It is a simple fix to enable Google Analytics on a page using SSL.

A Smail and Fast IDE

Geany : About

Geany is a small and lightweight Integrated Development Environment. It was developed to provide a small and fast IDE, which has only a few dependencies from other packages. Another goal was to be as independent as possible from a special Desktop Environment like KDE or GNOME - Geany only requires the GTK2 runtime libraries.

Some basic features of Geany:

  • Syntax highlighting
  • Code folding
  • Symbol name auto-completion
  • Construct completion/snippets
  • Auto-closing of XML and HTML tags
  • Call tips
  • Many supported filetypes including C, Java, PHP, HTML, Python, Perl, Pascal (full list)
  • Symbol lists
  • Code navigation
  • Build system to compile and execute your code
  • Simple project management
  • Plugin interface (see Plugins)

Geany is known to run under Linux, FreeBSD, NetBSD, OpenBSD, MacOS X, AIX v5.3, Solaris Express and Windows. More generally, it should run on every platform, which is supported by the GTK libraries. Only the Windows port of Geany is missing some features.

Running Ubuntu on an Active Directory network

Running Ubuntu on an Active Directory network - Computerworld Blogs
Steven J. Vaughan-Nichols
Cyber Cynic
More posts | Read bio

It's always been possible to get Linux desktops to work on Windows-based networks. I do it all the time. But, it's not a job for an average Linux user or a Windows network administrator's whose MCSE (Microsoft Certified Systems Engineer) certification still has wet-ink. Now, though, Canonical, Ubuntu parent company, is partnering with Likewise Software to make it easier.

Likewise is the creator of Likewise Open. This is an open-source program that lets Linux and Mac users authenticate against and join Active Directory domains and forests. It also enforces AD (Active Directory) password policies across Linux systems.

You don't have to take their word for it. I've been using Likewise for years, and it works quite well. Now, Ubuntu is going to be including the latest version of Likewise Open 5.4, in the next edition of Ubuntu, Lucid Lynx.

I like this plan a lot. While I've not always been happy with LikeWise. I'm still not crazy about their competiting with Samba with their own CIFS (Common Internet File System) server; they do a really nice job with AD integration for Linux.

So, if you've been pondering including Ubuntu Linux desktops in your Windows network, start playing with Lucid Lynx and LikeWise Open. If you like what you see, and I think you will, you might start planning on deploying them sometime in 2010.

Need help getting it to work? Likewise offers support options for Likewise Open. If you like what you see, LikeWise also offers, as a commercial product, Likewise Enterprise.

Likewise Enterprise essentially makes your Linux and Mac boxes into full-fledged members of your AD domain. That is to say you can use group policies to manage them, enable SSO (Single Sign-on) for applications and import directories. In addition, you can manage and audit AD from your Linux box with Likewise Enterprise.

All-in-all, I've found it over the years to be an impressively network management package, and I'm really look forward to seeing how it all comes together in April when the full Lucid Lynx distribution goes into production.

Monday, January 18, 2010

如何迁移ZenCart到另一台服务器

如何迁移ZenCart到另一台服务器 : 新手上路

1. 在新主机上,创建新的MySQL数据库。记下用户名、密码、数据库名以及主机名(通常是localhost)。

2. 在新主机上,全新安装相同版本的Zen Cart,这保证configure.php文件中的设置正确。
在安装的时候,要安装演示数据,这样可以测试安装是否正确。
a. 安装
b. 测试
c. 备份新主机的 /includes/configure.php 和 /admin/includes/configure.php 文件到本地。


3. 完全备份已有数据库和商店程序。
a. 可以使用 "数据库备份模块" 或者 phpMyAdmin 来备份数据库 ... 要选择 "添加 DROP TABLE" 选项;同时,在数据选项下,选择 "完整插入" 以及 "扩展插入",保存SQL文件到本地计算机。
b. 通过FTP下载旧的网站上的所有文件 (如果可以的话,在服务器上压缩后再下载)

4. 上传旧的文件到新的服务器上,覆盖新服务器上的文件。两个文件例外:
不要覆盖新服务器上的 /includes/configure.php 和 /admin/includes/configure.php 文件。

5. 进入新服务器上的 phpMyAdmin 。
a. 选择新数据库 (安装了新的Zen Cart的数据库)
b. 删除所有数据表。
c. 导入上面 3a 中保存的SQL文件。

6. 下载缓存设置同步工具(见下载区),重置缓存设置。只要上传该文件到Zen Cart根目录并运行(fix_cache_key.php)即可。运行后一定要删除该文件。

7. 完成。

*********************************
迁移zencart网站的简易方法

1. 停止运行旧的网站
2. 复制旧网站所有zencart文件、目录到新的主机
3. 导出旧网站的数据库
4. 在新的主机上建立zencart数据库,导入旧的数据
5. 设置好数据库用户和权限
6. 修改新网站的两个文件
\includes\configure.php 和 \admin\includes\configure.php
主要是域名、物理路径、数据库名称、数据库用户名、密码这些内容
7. 登录新网站的后台,修改
商店设置-日志选项-日志保存到的路径
商店设置-Sessions-Sessions目录的路径
8. 完成

如何使用代理服务器上网

如何使用代理服务器-月光博客

  虽然我们的网络在公开场合下自称是"开放"的互联网,但实际情况却不是这样的,例如前几天,已经有两个同事咨询过我,如何使用代理服务访问Facebook,我发现其过程还是挺多的,与其我一步步讲给他们听,不如写一个教程,这样他们也更能理解和操作。下面我就介绍一下我是怎么使用代理服务器的,算是一篇科普教程吧。

  前面一段是科普教程,如果你只关心如何使用代理,可以直接跳到"如何使用SOCKS代理服务器"这一段。

  什么是代理服务器

  代理服务器(Proxy Server)是网上提供转接功能的服务器,在一般情况下,我们使用网络浏览器直接去连接其他Internet站点取得网络信息时,是直接联系到目的站点服务器,然后由目的站点服务器把信息传送回来。代理服务器是介于客户端和Web服务器之间的另一台服务器,有了它之后,浏览器不是直接到Web服务器去取回网页而是向代理服务器发出请求,信号会先送到代理服务器,由代理服务器来取回浏览器所需要的信息并传送给你的浏览器。

  比如你想访问的目的网站是A,由于某种原因你不能访问到网站A或者你不想直接访问网站A(这样通过代理服务器网站A,对网站A而已可以隐藏你自己的身份,也就是不知道是谁访问的网站,而认为是代理服务器访问的),此时你就可以使用代理服务器,在实际访问网站的时候,你在浏览器的地址栏内和你以前一样输入你要访问的网站,浏览器会自动先访问代理服务器,然后代理服务器会自动给你转接到你的目标网站。

  代理服务器的作用

  提高访问速度:通常代理服务器都设置一个较大的缓冲区,当有外界的信息通过时,同时也将其保存到缓冲区中,当其他用户再访问相同的信息时,则直接由缓冲区中取出信息,传给用户,以提高访问速度。

  隐藏真实身份:上网者也可以通过代理服务器隐藏自己的真实地址信息,还可隐藏自己的IP,防止被黑客攻击。

  突破限制:有时候网络供应商会对上网用户的端口,目的网站,协议,游戏,即时通讯软件等的限制,使用代理服务器都可以突破这些限制。

  代理服务器主要类型

  HTTP代理:最简单的一种代理形式,能够代理客户机的HTTP访问,上网浏览网页使用的都是HTTP协议,通常的HTTP代理端口为80、3128或8080端口。

  SOCKS代理:SOCKS代理与HTTP等其他类型的代理不同,它只是简单地传递数据包,而并不关心是何种应用协议,既可以是HTTP协议,也可以是FTP协议,或者其他任何协议,所以SOCKS代理服务器比其他类型的代理服务器速度要快得多。SOCKS代理又分为SOCKS4和 SOCKS5,二者不同的是SOCKS4代理只支持TCP协议(即传输控制协议),而SOCKS5代理则既支持TCP协议又支持UDP协议(即用户数据包协议),还支持各种身份验证机制、服务器端远程域名解析(解决DNS污染就靠这个了)等。SOCK4能做到的SOCKS5都可得到,但SOCKS5能够做到的SOCKS则不一定能做到。目前SOCKS5是最常用的一种SOCKS代理。

  如何使用HTTP代理服务器

  HTTP代理服务器的设置方法,对于IE和FireFox设置略有不同。设置前需要先找一些可用的免费代理服务器地址。

  IE的设置是这样的,打开IE浏览器,选择菜单栏的"工具/Internet选项..."。

  这时候分两种情况,对于ADSL拨号用户来说,选择一个网络连接后,点"设置",如下图所示,选中代理服务器,填入地址和端口号。

IE代理服务器设置

  对于局域网用户来说,需要点"局域网设置",如下图所示,选中代理服务器,填入地址和端口号。

IE代理服务器设置

  FireFox的设置和IE类似,打开FireFox浏览器,选择菜单栏的"工具/选项..."。

  这时选择"高级/网络",点设置,就出现下面的界面,就可以进行代理服务器的设置了,选中"手动配置代理",然后填写代理服务器的地址和端口。

FireFox代理服务器设置 

  如何使用SOCKS代理服务器

  这里就到重点内容了,SOCKS代理是目前功能最为全面,使用最为稳定的代理服务器,我目前上网就只用SSH搭建SOCKS代理服务器上网,访问网络没有任何限制。下面我就着重讲一下如何使用SOCKS代理服务器。

  用SSH搭建SOCKS代理上网,建议使用Firefox浏览器,因为Firefox支持SOCKS代理远程域名解析,而IE只能通过类似SocksCap这样的第三方软件实现,不是很方便。

  配置Firefox浏览器

  在Firefox设置SOCKS远程域名解析,主要是为了防止DNS污染,具体设置方法是,在Firefox地址栏中,输入 about:config ,按确认,修改里面的一项数值,改成 network.proxy.socks_remote_dns=true 就可以了。

Firefox远程域名解析设置

  然后,打开FireFox浏览器,选择菜单栏的"工具/选项..."。选择"高级/网络",点设置,就出现下面的界面,就可以进行代理服务器的设置了,选中"手动配置代理",然后在SOCKS主机上,填写代理服务器的地址127.0.0.1,端口1080,SOCKS类型选择"SOCKS V5",这时Firefox就配置结束。

Firefox的SOCKS5代理设置

  设置SSH

  配置好了Firefox,就该配置SSH了,安全外壳协议(Secure Shell Protocol / SSH)是一种在不安全网络上提供安全远程登录及其它安全网络服务的协议。常用的SSH工具有开源软件PuTTY,支持SSH远程登录的主机可以实现socks5代理服务器的功能,不过在PuTTY中没有配置文件,需要手动设置才能实现,且无法保存,而PuTTY完整版自带的pLink可以实现命令行方式调用PuTTY实现SSH的加密通道。

  具体的方法是,去PuTTY官方网站下载pLink这个文件,pLink的调用参数是:plink -C -v -N -pw 密码 -D 本地端口 远程用户@IP或域名:远程希望打开的端口。

  新建一个文件,写入以下内容,另存为pLink.bat批处理文件,并放在Putty的安装目录内。

  plink -N Username@sshServer -pw Password -D 127.0.0.1:1080

  请将Username sshServer Password三处改为用户自己登陆SSH服务器的用户名、服务器地址和密码。这个SSH帐号可以通过多种方法获得,例如用户购买了某些国外主机空间或VPS就会有SSH帐号,或者在淘宝网也有SSH帐号出售,我自用的SSH帐号是用每年100美元购买虚拟主机时赠送的,通常SSH帐号的价格大约是每年几十元人民币左右,也有少量国外网站提供免费的SSH帐号。

  执行这个批处理文件,保持其窗口开启,一旦关闭窗口代理便失效。然后打开已经配置好127.0.0.1:1080的Socks5代理的Firefox浏览器,就可以使用SOCKS代理服务器上网了。

  其他设置技巧

  为了方便代理服务器的快速切换,我建议安装一个名为QuickProxy的FireFox代理服务器扩展,可以实现一键切换代理功能,QuickProxy安装后在状态栏有一个按钮,点击后可以启用、关闭Firefox浏览器的默认代理设置,可以快速在代理和非代理之间切换,很方便。界面如下图所示。

QuickProxy代理服务器扩展

  设置完成了之后,你就可以自由自在地在开放的互联网上傲游了。根据我的使用经验,基于SSH的SOCKS代理稳定、快速、功能全面,是值得推荐的代理方法,使用过程中流量需要自己把控,我个人觉得其浏览体验要远远高于其他代理软件。

  随着这次Google退出中国市场,本文可能会成为未来网民常用的上网技巧之一。

Featured Post

Windows和Ubuntu双系统完全独立的安装方法

http://www.ubuntuhome.com/windows-and-ubuntu-install.html  | Ubuntu Home Posted by Snow on 2012/06/25 安装Windows和Ubuntu双系统时,很多人喜欢先安装windows,然...