周六 30 九 2006
与人相处并不简单
Posted by Jansfer under 随笔
No Comments
其实早早就明白这个理了,只是没太多去想。如果处事跟写代码一样就好了,不懂的,就多想一下总能解决。但其实不然,有时候你善意的解释,但人家并不以为!所以,与人相处一定要注意,不要伤人他人,更不要伤了自己。No because he is your friend, classmate, or Colleagues!
周六 30 九 2006
Posted by Jansfer under 随笔
No Comments
其实早早就明白这个理了,只是没太多去想。如果处事跟写代码一样就好了,不懂的,就多想一下总能解决。但其实不然,有时候你善意的解释,但人家并不以为!所以,与人相处一定要注意,不要伤人他人,更不要伤了自己。No because he is your friend, classmate, or Colleagues!
周六 30 九 2006
Posted by Jansfer under 随笔
No Comments
其实早早就明白这个理了,只是没太多去想。如果处事跟写代码一样就好了,不懂的,就多想一下总能解决。但其实不然,有时候你善意的解释,但人家并不以为!所以,与人相处一定要注意,不要伤人他人,更不要伤了自己。No because he is your friend, classmate, or Colleagues!
周二 26 九 2006
Posted by Jansfer under 随笔
No Comments
rh下面的防火墙设置是保存在/etc/sysconfig/iptables文件中的,这样每次重启都会恢复防火墙设置。
debian木有这个文件,但是他提供了更加灵活的方式。
http://www.debian.org/doc/manuals/securing-debian-howto/ch-sec-services.en.html#s-firewall-setup
看了下,似乎比较简单的就是设置interfaces文件了。
5.14.3.3 Configuring firewall rules through ifup
You can use also the network configuration in /etc/network/interfaces to setup your firewall rules. For this you will need to:
Create your firewalling ruleset for when the interface is active.
Save your ruleset with iptables-save to a file in /etc, for example /etc/iptables.up.rules
Configure etc/network/interfaces to use the configured ruleset:
iface eth0 inet static
address x.x.x.x
[.. interface configuration ..]
pre-up iptables-restore < /etc/iptables.up.rules
You can optionally also setup a set of rules to be applied when the network interface is down creating a set of rules, saving it in /etc/iptables.down.rules and adding this directive to the interface configuration:
post-down iptables-restore < /etc/iptables.down.rules
For more advanced firewall configuration scripts through ifupdown you can use the hooks available to each interface as in the *.d/ directories called with run-parts (see run-parts(8)).
可以去http://easyfwgen.morizot.net/gen/在线生成一个防火墙脚本,然后pre-up指定一下。
周二 26 九 2006
Posted by Jansfer under 随笔
No Comments
rh下面的防火墙设置是保存在/etc/sysconfig/iptables文件中的,这样每次重启都会恢复防火墙设置。
\r\ndebian木有这个文件,但是他提供了更加灵活的方式。
http://www.debian.org/doc/manuals/securing-debian-howto/ch-sec-services.en.html#s-firewall-setup
看了下,似乎比较简单的就是设置interfaces文件了。
\r\n5.14.3.3 Configuring firewall rules through ifup
You can use also the network configuration in /etc/network/interfaces to setup your firewall rules. For this you will need to:
Create your firewalling ruleset for when the interface is active.
Save your ruleset with iptables-save to a file in /etc, for example /etc/iptables.up.rules
Configure etc/network/interfaces to use the configured ruleset:
iface eth0 inet static
address x.x.x.x
[.. interface configuration ..]
pre-up iptables-restore < /etc/iptables.up.rules
You can optionally also setup a set of rules to be applied when the network interface is down creating a set of rules, saving it in /etc/iptables.down.rules and adding this directive to the interface configuration:
post-down iptables-restore < /etc/iptables.down.rules
For more advanced firewall configuration scripts through ifupdown you can use the hooks available to each interface as in the *.d/ directories called with run-parts (see run-parts(8)).
可以去http://easyfwgen.morizot.net/gen/ 在线生成一个防火墙脚本,然后pre-up指定一下。
周二 26 九 2006
Posted by Jansfer under 随笔
No Comments
在debian上创建rc.local文件。
创建文件:
sudo touch /etc/init.d/rc.local
设置可执行:
sudo chmod +x /etc/init.d/rc.local
用update-rc.d设置启动级别:
sudo update-rc.d rc.local start 20 2 3 4 5 . stop 20 0 1 6 .
为了编辑方便,创建一个链接:
sudo ln -s /etc/init.d/rc.local /etc/rc.local
cat /etc/rc.local
# start apache
/home/apache/bin/apachectl start
重启一下,没有问题。
后记:Debian 下没有 rc.local,不过有一个替代品,就是 /etc/init.d/bootmisc.sh 文件(可以将/etc/rc.local 链接过去)
大家有什么需要启动后运行的,尽管往里面塞
类似的:也是使用update-rc.d 将相应服务设置成启动就可以了。
最近新安装了一台服务器,操作系统使用debian 必须熟练使用的几个命令:
apt-get install [packagename]
apt-cache search [string]
以后升级使用:
apt-get update
apt-get dist-upgrade
apt-get upgrade
就可以了
目前安装的包:
apt-get install kernel-image-2.6.8-2-686 (2.4.x 缺省不支持1G内存 )
apt-get install libgdbm-dev
apt-get install zlib1g-dev
apt-get install libcurl3-dev
apt-get install php4-domxml
apt-get install libxml2-dev