When generate some pdf files using Inksape, sometimes it ends up a large file. However, you can follow some steps to reduce the size:
1. gs -r300 -dEPSCrop -dTextAlphaBits=4 -sDEVICE=png16m -sOutputFile=fig-reduce.pdf -dBATCH -dNOPAUSE fig.eps
2. convert fig-reduce.pdf fig-new.eps
3. import the fig-new.eps to Inkscape again, and save as fig-new.pdf.
The final file will be much smaller than the original one.
2012年2月16日 星期四
2010年8月11日 星期三
Add node to cluster
The operation system is CentOS.
1. Disable/turn off linux firewall on the headnode before installation
#/etc/init.d/iptables save
#/etc/init.d/iptables stop
Turn on Linux firewall on the headnode after installation
#/etc/init.d/iptables start
#bash ./iprules ;define iptables rules.
2. PXE boot
default root password: PASSWORD
3. check files:
/etc/resolv.conf
search headnode
nameserver xx.xx.xx.xx
/etc/sysconfig/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
DHCPCLASS=
HWADDR=XX:XX:XX:XX:XX:XX
ONBOOT=yes
/etc/hosts
/etc/fstab ; add the following line
XX.XX.XX.XX:/home /home nfs rw,sync 0 0
3. install NIS(YP) service
yum install ypserv
4. disable SELinux
/etc/selinux/config ;change "enforcing" into "disabled"
SELINUX=disabled
5. add/change lines in files:
/etc/nsswitch.conf
passwd: files nis nisplus
shadow: files nis nisplus
group: files nis nisplus
hosts: files nis dns
/etc/password ;add the following line at the end of this file
+======
6. restart node
7. modify the following files:
/etc/rc.d/rc.local ;add the following line to the end of the file
/bin/nisdomainname DOMAIN
/etc/yp.conf ; add the following line to the end of the file
ypserver headnode
/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=host
NIDDOMAIN=DOMAIN
/etc/sysconfig/authconfig
USENIS =no -> USENIS=yes
/etc/pam.d/system-auth
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok ->
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok nis
8. Activate NIS
#/etc/init.d/portmap start
#chkconfig --level 35 portmap on
#/etc/rc.d/ypbind start ; if some error, check /etc/yp.conf, and rerun "/etc/init.d/portmap start"
#chkconfig --level 35 ypbind on
#ypcat passwd
9. Install software:
#yum groupinstall "Development Tools"
#yum groupinstall "X Window System" "GNOME Desktop Environment"
1. Disable/turn off linux firewall on the headnode before installation
#/etc/init.d/iptables save
#/etc/init.d/iptables stop
Turn on Linux firewall on the headnode after installation
#/etc/init.d/iptables start
#bash ./iprules ;define iptables rules.
2. PXE boot
default root password: PASSWORD
3. check files:
/etc/resolv.conf
search headnode
nameserver xx.xx.xx.xx
/etc/sysconfig/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
DHCPCLASS=
HWADDR=XX:XX:XX:XX:XX:XX
ONBOOT=yes
/etc/hosts
/etc/fstab ; add the following line
XX.XX.XX.XX:/home /home nfs rw,sync 0 0
3. install NIS(YP) service
yum install ypserv
4. disable SELinux
/etc/selinux/config ;change "enforcing" into "disabled"
SELINUX=disabled
5. add/change lines in files:
/etc/nsswitch.conf
passwd: files nis nisplus
shadow: files nis nisplus
group: files nis nisplus
hosts: files nis dns
/etc/password ;add the following line at the end of this file
+======
6. restart node
7. modify the following files:
/etc/rc.d/rc.local ;add the following line to the end of the file
/bin/nisdomainname DOMAIN
/etc/yp.conf ; add the following line to the end of the file
ypserver headnode
/etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=host
NIDDOMAIN=DOMAIN
/etc/sysconfig/authconfig
USENIS =no -> USENIS=yes
/etc/pam.d/system-auth
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok ->
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok nis
8. Activate NIS
#/etc/init.d/portmap start
#chkconfig --level 35 portmap on
#/etc/rc.d/ypbind start ; if some error, check /etc/yp.conf, and rerun "/etc/init.d/portmap start"
#chkconfig --level 35 ypbind on
#ypcat passwd
9. Install software:
#yum groupinstall "Development Tools"
#yum groupinstall "X Window System" "GNOME Desktop Environment"
Labels:
Linux
2010年7月14日 星期三
Activate partition under Windows 7
DISKPART
LIST DISK
SELECT DISK # (for Windows 7 disk)
LIST PARTITION
select partition # (for Windows 7 partition)
active
exit
LIST DISK
SELECT DISK # (for Windows 7 disk)
LIST PARTITION
select partition # (for Windows 7 partition)
active
exit
Labels:
Windows
2009年10月14日 星期三
CentOS PXE server setup.
Here we use FTP server.
1. Install DHCP server
yum install dhcp
vi /etc/dhcpd.conf
We can use /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample as an example or check my last post.
2. Install TFTP server
yum install tftp-server
vi /etc/xinetd.d/tftp
change the line to be: disable = no
3.Create Network installation source
yum install vsftpd
5. Setup tftp boot files
1. Install DHCP server
yum install dhcp
vi /etc/dhcpd.conf
We can use /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample as an example or check my last post.
2. Install TFTP server
yum install tftp-server
vi /etc/xinetd.d/tftp
change the line to be: disable = no
3.Create Network installation source
yum install vsftpd
mkdir –p /var/ftp/install/centos/x86_64/5.3/
mount –t iso9660 -o loop CentOS-5.3-x86_64-bin-DVD.iso /media/cdrom/cp –avr /media/cdrom/* /var/ftp/install/centos/x86_64/5.3/
4.start the DHCP,TFTP, VSFTP servers
/etc/init.d/dhcpd restart
/etc/init.d/xinetd restart
/etc/init.d/vsftpd restart5. Setup tftp boot files
cp /usr/lib/syslinux/pxelinux.0 /tftpboot
mkdir –p /tftpboot/images/centos/x86_64/5.3/
cp /var/ftp/install/centos/x86_64/5.3/images/pxeboot/vmlinuz images/centos/x86_64/5.3/ cp /var/ftp/install/centos/x86_64/5.3/images/pxeboot/initrd images/centos/x86_64/5.3/
6.Create PXE menu
cp /usr/lib/syslinux/menu.c32 /tftpboot
mkdir /tftpboot/pxelinux.cfg
touch /tftpboot/pxelinux.cfg/default
vi /tftpboot/pxelinux.cfg/default
This is a concise version. More details can be found through here.
Labels:
Linux
Ubuntu PXE boot server setup.
Here I use HTTP server for the PXE boot.
1. Install Ubuntu 9.04 server.
2. Install DHCP server and modify the configure file.
apt-get install dhcp3-server
vi /etc/dhcp3/dhcpd.conf
The new dhcpd.conf should look like:
vi /etc/default/tftpd-hpa
1. Install Ubuntu 9.04 server.
2. Install DHCP server and modify the configure file.
apt-get install dhcp3-server
vi /etc/dhcp3/dhcpd.conf
The new dhcpd.conf should look like:
option domain-name-servers 145.253.2.75, 193.174.32.18;apt-get install tftpd-hpa
default-lease-time 86400;
max-lease-time 604800;
authoritative;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.10 192.168.0.49;
next-server 192.168.0.1;
filename "pxelinux.0";
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
}
2. Install TFTP server
vi /etc/default/tftpd-hpa
change the line to be: RUN_DAEMON=”yes”
mount -t iso9660 -o loop Ubuntu-install.iso /media/cdrom/
cp -r /media/cdrom/netboot/* /var/lib/tftpboot/
vi /var/lib/tftpboot/pxelinux.cfg/default
3.Install APACHE2 server:
apt-get install apache2
mkdir -p /var/www/install/ubuntu/9.04/
cp -r /media/cdrom/* /var/www/install/ubuntu/9.04/
4. Start all the servers
/etc/init.d/dhcpd restart
/etc/init.d/tftpd-hpa restart
/etc/init.d/apache2 restart
Now, we can install the ubuntu 9.04 through 192.168.0.1.
Notice: when the installation comes to select a mirror, go to the first line and input the server information for 192.168.0.1.
Labels:
Linux
2009年9月12日 星期六
Ubuntu 8.04下ppstream的安装
早就听说ppstream出了linux版本,一直没有尝试。今天终于有空试一下,这里的Linux版本是Ubuntu 8.04(Hardy Heron),现在虽然9.04已经出来了,不过觉得这个版本还是用得比较舒服,也就懒得升级。
闲话少说,最开始是在ppstream官网上下载了安装包,的确能用,但是没有给playlist,就那么几个片子,很是无聊。于是google了一下,ubuntu论坛上讨论了安装Totem插件的形式,可以参考这个连接http://forum.ubuntu.org.cn/viewtopic.php?f=74&t=223582&start=0。实际上可以到:http://people.freedesktop.org/~jinghua/distfiles/gst-plugins-pps-0.0.15.12.tar.gz下载打包好的几个Deb安装文件。可惜的是,在湛卢的机器上安装后,又由Totem自动搜索安装了ffmpeg等软件包,还是不能播放rmvb格式的url。
后来想到6park上有人贴过比较详细的安装笔记,赶紧上去看看,找到了链接:http://pop.6park.com/know1/messages/32181.html。按照此文的方法,本想安装Totem插件,于是先安装了git,再
#git clone git://anongit.freedesktop.org/~jinghua/gst-plugins-pps,
可惜运行到
#./autogen.sh
的时候出错了,原来缺少好几个包,automake, libtool, gstreamer开发程序包,于是逐一apt-get install。最后都安装好了,于是
#./configure --prefix=/usr
#make
#sudo make install
可惜的是运行的时候还是说没有RealMedia的codecs。于是又google了一下,似乎大家都说要安装w32codecs,可惜现在这个包已经是找不到了。
还好,http://pop.6park.com/know1/messages/32181.html上面还介绍了mplayer下面的安装,这里不再详细叙述,就是下载http://ppshell.googlecode.com/files/pps-mplayer_install.tar.gz,然后解压、安装。
为了更方便可以下载http://ppshell.googlecode.com/files/ppshell.py,然后chmod +x ppshell.py 然后在命令行运行 ./ppshell.py,
使用方法:
进入菜单后,
1. 输入数字进入对应选项的子菜单,或者选择某个视频并显示其tvod地址(并添加到playlist.txt中)
2. b 返回上一级菜单
3. r 刷新当前级菜单的临时缓存
4. p 调用pps播放playlist.txt列表中的视频
5. a 将当前菜单中的所有视频添加到播放列表(在分类菜单中无效)
6. s 搜索视频,格式为 "s 搜索字符串",支持正则表达式
这样就可以在命令行下面使用ppstream。
闲话少说,最开始是在ppstream官网上下载了安装包,的确能用,但是没有给playlist,就那么几个片子,很是无聊。于是google了一下,ubuntu论坛上讨论了安装Totem插件的形式,可以参考这个连接http://forum.ubuntu.org.cn/viewtopic.php?f=74&t=223582&start=0。实际上可以到:http://people.freedesktop.org/~jinghua/distfiles/gst-plugins-pps-0.0.15.12.tar.gz下载打包好的几个Deb安装文件。可惜的是,在湛卢的机器上安装后,又由Totem自动搜索安装了ffmpeg等软件包,还是不能播放rmvb格式的url。
后来想到6park上有人贴过比较详细的安装笔记,赶紧上去看看,找到了链接:http://pop.6park.com/know1/messages/32181.html。按照此文的方法,本想安装Totem插件,于是先安装了git,再
#git clone git://anongit.freedesktop.org/~jinghua/gst-plugins-pps,
可惜运行到
#./autogen.sh
的时候出错了,原来缺少好几个包,automake, libtool, gstreamer开发程序包,于是逐一apt-get install。最后都安装好了,于是
#./configure --prefix=/usr
#make
#sudo make install
可惜的是运行的时候还是说没有RealMedia的codecs。于是又google了一下,似乎大家都说要安装w32codecs,可惜现在这个包已经是找不到了。
还好,http://pop.6park.com/know1/messages/32181.html上面还介绍了mplayer下面的安装,这里不再详细叙述,就是下载http://ppshell.googlecode.com/files/pps-mplayer_install.tar.gz,然后解压、安装。
为了更方便可以下载http://ppshell.googlecode.com/files/ppshell.py,然后chmod +x ppshell.py 然后在命令行运行 ./ppshell.py,
使用方法:
进入菜单后,
1. 输入数字进入对应选项的子菜单,或者选择某个视频并显示其tvod地址(并添加到playlist.txt中)
2. b 返回上一级菜单
3. r 刷新当前级菜单的临时缓存
4. p 调用pps播放playlist.txt列表中的视频
5. a 将当前菜单中的所有视频添加到播放列表(在分类菜单中无效)
6. s 搜索视频,格式为 "s 搜索字符串",支持正则表达式
这样就可以在命令行下面使用ppstream。
2009年8月26日 星期三
MSN under Windows XP 64bit.
1) Download the full installer from Microsoft:
http://download.live.com/?sku=messenger
It should be named "wlsetup-all.exe" (not the web version "wlsetup-web.exe), try several times then you will get it.
2) Use this patcher at your own risk :-) I tried it and works..
http://oss.netfarm.it/wlm.php
3) Launch the patched installer
4) Enjoy...
Source(s):
http://www.techspot.com/blog/129/how-to-run-windows-live-messenger-on-windows-xp-x64/
http://oss.netfarm.it/wlm.php
http://download.live.com/?sku=messenger
It should be named "wlsetup-all.exe" (not the web version "wlsetup-web.exe), try several times then you will get it.
2) Use this patcher at your own risk :-) I tried it and works..
http://oss.netfarm.it/wlm.php
3) Launch the patched installer
4) Enjoy...
Source(s):
http://www.techspot.com/blog/129/how-to-run-windows-live-messenger-on-windows-xp-x64/
http://oss.netfarm.it/wlm.php
Labels:
software
订阅:
帖子 (Atom)