部落格文章訂閱


貧窮不能等,因為時間久了,你就會貧窮習慣了;
夢想不能等,因為努力晚了,人老就無能為力了;
學習不能等,因為懂得少了,就沒本事夢想成真了;
健康不能等,因為身體垮了,人生的一切就都沒了。


自訂搜尋

找不到想要的文章嗎? 請直接再下面的搜尋框裡輸入要查詢文章內容關鍵字 ,就能夠更快速的取得想要閱讀的問題喔~~謝謝大家的支持與愛護~若有任何建議事項, 歡迎透過留言板留言給我喔!!


  • 你不能決定生命的長度,但可以控制它的寬度;
  • 你不能左右天氣,但可以改變心情;
  • 你不能改變容顏,但可以展現笑容;
  • 你不能控制他人,但可以掌握自己;
  • 你不能預知明天,但可以利用今天;
  • 你不能樣樣勝利,但可以事事盡力。

free counters

目前分類:Linux相關應用 (18)

瀏覽方式: 標題列表 簡短摘要

在Linux桌面需要輸入中文卻沒有中文輸入法的時候是很頭痛的事情

這邊分享如何安裝中文輸入法?

首先, 進入終端機模式輸入指令 就安裝完成!

sudo apt-get install ibus ibus-clutter ibus-gtk ibus-gtk3 ibus-qt4

im-config -s ibus

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

在Linux中用xl2tpd建立L2TP协议的VPN连接需要两个配置文件,一个是给xl2tpd的配置文件,一个是给pppd的配置文件(xl2tpd会调用pppd)。

    为说明方便,我们假设我们要建立的VPN连接的名字为testvpn,连到的l2tp服务器地址为xxx.xxx.xxx.xxx,用户名为someone,密码为passwordstring。那么该xl2tpd的配置文件应该如下所示:

1
2
3
文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

To configure passive mode for vsftpd you need to set some parameters in vsftpd.conf.

pasv_enable=Yes
pasv_max_port=10100
pasv_min_port=10090

This enables passive mode and restricts it to using the eleven ports for data connections. This is useful as you need to open these ports on your firewall.
iptables -I INPUT -p tcp --destination-port 10090:10100 -j ACCEPT

If after testing this all works then save the state of your firewall with

service iptables save

which will update the /etc/sysconfig/iptables file.

To do this is CentOS 7 you have to use the new firewalld, not iptables:

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

在Ubuntu 13.04系统中(其它版本的也大概是),有个管理应用程序图标的文件夹:/usr/share/applications

在这个文件夹里,包含了ubuntu自带的所有程序的图标,后缀都是.desktop.

默认的ubuntu系统桌面已经有几个应用程序的图标,如果你还想要将其它程序放到这个启动栏里,就直接从/usr/share/applications文件夹里用鼠标拖到启动栏里。

如果不是系统自带的程序呢,比如Eclipse,自己后来安装的。

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

預設的 FreeBSD 中 ls 是沒有顏色的,這樣對檔案的操作及維護都會有不小的困擾 。 



如果你是系統管理者 

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

multicast routing
By default IPv6 multicast routing is disabled, so you have to explicitly configure it in rc.conf.  

Currently there are two IPv6 multicast routing daemons available in package or ports (pim6sd = PIM-SM and pim6dd = PIM-DM), but please keep in mind that they are not installed in FreeBSD-RELEASE by default due to its licensing issue.

[Mandatory]

-------/etc/rc.conf---------
mroute6d_enable="YES"           
# Do IPv6 multicast routing.  By default it's "NO".
mroute6d_program="/usr/local/sbin/pim6sd"
# Name of IPv6 multicast routing daemon.  
# You need to install it from package or port.
----------------------------

[Optional]
You can give arguments to IPv6 multicast routing daemon.  Normally
nothing is required.

-------/etc/rc.conf--------- mroute6d_flags="-d pim" # debugging option for pim6sd ----------------------------

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()


How do I configure IPv6 networking under FreeBSD 7.x server? How do I assign IPv6 IP address using command line utility?

 

IPv6 (IP next generation) can be easily configured under FreeBSD 7.x or 6.x. You need to know:

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

I have a FreeBSD machine running on a virtual machine. I am using SUN Virtual Box. I need to set static IP address to this machine. So that I can access this machine. Is there anyway to do this ?

in /etc/rc.conf:

ifconfig_em0="inet 192.168.0.254 netmask 255.255.255.0"
defaultrouter="192.168.0.1"

192.168.0.254 -- the machine IP,

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

命令形的 wireshark,有同 tcpdump

man tshark

捕包樹狀解析

tshark -V

十六進制,ASCII 解析

tshark -x

指定界面,保留檔名

tshark -i <界面> -w <檔名>

指定界面,保留檔名,指定重覆保留最大檔數量,停止捕包大小(有 -b 就有 -a?)

Frank 發表在 痞客邦 留言(0) 人氣()

You probably know the situation: You love FreeBSD, you love ZFS as a filesystem (maybe even as the root filesystem?), but when it comes to virtualisation, FreeBSD users don't have a lot of choice.

That said, VirtualBox, which runs on quite a few platforms and is free, does perform rather well and offers many features, which most people aren't aware of: iSCSI support, Teleporting (aka live migration, even cross-platform), Virtio Net support, Ballooning, built-in solid VNC support (better than Xen's!), highly configurable device support (from disk controller types over chipsets and NICs).

Getting it to run on a FreeBSD 9.0 amd64 server (without any GUI) was less complicated than I thought. However, there are some minor things, which can easily be missed in therelevant chapter of the FreeBSD Handbook and the FreeBSD Wiki, and neither of them actually tells you how to start your first VM, which is anything but intuitive. (That can be automated later, though.)

Let me walk you through the required steps from installation to getting your first VM on the way.

If you'd like to comment, please do it on my related blog post. Thank you!
文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

Q. Can you example how can I install telnet service or server under Linux or FreeBSD operating system?

A. TELNET (TELetype NETwork) is a network protocol used on the Internet or local area network LAN connections.

The telnetd program (telnet server) is a server which supports the DARPA telnet interactive communication protocol. Telnetd is normally invoked by the internet server inetd or xinetd for requests to connect to the telnet port as indicated by the /etc/services file. Usaually telnet listen on port TCP port 23.

Telnet in is insecure protocol and it is recommended that you use ssh server. But some time you really need telnet then first install telnet server as according to version of Linux distribution.

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

Q. How do I telnet as the root user?

A. This is really a bad idea as telnet is insecure, because passwords are sent as clear text format. Instead, you should use SSH for connections. I suggest that you use SSH to connect to a system instead of Telnet for security purposes. By default, for security purposes, the root user can not telnet. However, here is method in case you need root access via telnet:

Edit /etc/pam.d/login and /etc/pam.d/remote files using a text editor such as vi. Find the line that read as follows:

auth       required     pam_securetty.so

Comment it out by prefixing # symbol:

#auth       required     pam_securetty.so

Save and close the file. Now, you should be able to telnet to your system as the root user.

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

This assumes that you have grabbed a copy of the ubuntu hardy server
cd from the ubuntu.com website.

1. Install all dependent packages for CPAN
sudo  apt-get install build-essential

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

一直想搞一台git server做個版本控制,趁著今天颱風天,就把git server架在家裡的Synology NAS上吧!

1. 取得 Bootstrap

查表 http://forum.synology.com/wiki/index.php/What_kind_of_CPU_does_my_NAS_have 根據你的Synology NAS型號查詢

CPU型號以下載並安裝Bootstrap.

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

Small fix if You have an error when You try to turn on startup programs.

for example:

# chkconfig -s ssh on
/sbin/insserv: No such file or directory

Fix is simple, just to add symlink:

Frank 發表在 痞客邦 留言(0) 人氣()

怎么把一个目录排除在htaccess规则之外

比如 所有子目录的文件全部做伪静态
而管理目录不需要~ 把它排除~ 
RewriteRule ([a-zA-Z0-9]*)/([a-zA-Z0-9]*)\.html $1/$2\.php

Frank 發表在 痞客邦 留言(1) 人氣()

rsync stands for remote sync.

rsync is used to perform the backup operation in UNIX / Linux.

rsync utility is used to synchronize the files and directories from one location to another in an effective way. Backup location could be on local server or on remote server.

Important features of rsync

  • Speed: First time, rsync replicates the whole content between the source and destination directories. Next time, rsync transfers only the changed blocks or bytes to the destination location, which makes the transfer really fast.
  • Security: rsync allows encryption of data using ssh protocol during transfer.
  • Less Bandwidth: rsync uses compression and decompression of data block by block at the sending and receiving end respectively. So the bandwidth used by rsync will be always less compared to other file transfer protocols.
  • Privileges: No special privileges are required to install and execute rsync

Syntax

$ rsync options source destination

Source and destination could be either local or remote. In case of remote, specify the login name, remote server name and location.

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

Q:

How do I make Vi-Vim never use tabs (converting spaces to tabs, bad!), makes the tab key == 4 spaces, and automatically indent code after curly brace blocks like emacs does?

Also, how do I save these settings so I never have to input them again.

I've seen other questions related to this but it always seems to be a little off from what I want.

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()