文章归档

mysql和iptables备忘

这个是发布在LAMP兄弟连 里.觉的关面有两个还不错.可以做为自己的笔记吧.主要是iptables 保存吧.
1.系统root权限下修改数据库访问root口令:
/usr/local/mysql/bin/mysqladmin -u root -p password 新密码
回车后会提示输入口令,这里输入的是旧的ROOT的口令,口令正确后,回车完成,无任何错误提示口令修改成功。
2. 的总结
(1)清空旧规则
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
service iptables save –保存,以前一直不知道怎么保存,用iptables-save也不起作用,这样整个iptables处于最原始状态。
(2)按需求增加规则
我的服务器的iptabls 的配置
iptables -A INPUT -p tcp -s 192.168.0.1/24 –dports 80 -j ACCEPT
iptables -A INPUT -p tcp -m multiport –dports 22,3306  -j ACCEPT
iptables -A INPUT -m state –state RELATED,ESTABLISHED -j ACCEPT
iptalbes -A INPUT -p icmp -j ACCEPT
iptables -P INPUT DROP
service iptables save
————————————————————————
以下是显示的结果
# /sbin/service iptables status
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     tcp  –  192.168.0.0/24       0.0.0.0/0           tcp dpt:80
ACCEPT     tcp  –  192.168.1.0/24       0.0.0.0/0           tcp dpt:80
ACCEPT     icmp –  0.0.0.0/0            0.0.0.0/0
ACCEPT     tcp  –  0.0.0.0/0            0.0.0.0/0           multiport dports 22,3306
ACCEPT     all  –  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
这些规则要看你个人的需要.再去选择添加这些还有很多.所以要研究的朋友.还需要学的更多.

Share

Sylvania本本与Ubuntu很好的结合

sylvaniaSylvania’s G 笔记本提供了一个很好的保护屏幕和很多端口-你有三个U SB和一个可以接V GA口。键盘很拥挤,这是一个微小的计算机.笔记本上安装了ubuntu.你就再也不必去使用其他的版来来切换来换去的.

如果你想要了解的更多的信息那你可以移动到这里

Share

A new year, a new Linux.com

在linux.com 上面再也看不到一些新的新闻.他们写道:”For legal reasons, we can’t tell you yet about what’s coming — but we’re not joining forces with Microsoft or any other proprietary software company. As soon as we can tell you, you’ll hear it here first.”真的有些怪也…….

不过相信每个网站的发展都有他的存大的问题.

Share

FreeBSD 7.1 稳定版

FreeBSD是一份UNIX操作系统,它面向i386、IA-64、PC-98、Alpha/AXP及UltraSPARC平台。它基于加州伯克利大学的4.4 BSD-Lite发布,并带有一些4.4 BSD-Lite2增强。它还非直接地基于William Jolitz的port,这源于加州伯克利大学i386化的“Net/2”也即“386BSD”,尽管386BSD中只有非常少的代码遗留下来。FreeBSD被遍布全世界的公司、Internet服务提供商、研究人员、计算机专家、学生,以及家庭用户用于他们的工作、教学和娱乐之中。

The first big release of the new year is 7.1: “The FreeBSD Release Engineering Team is pleased to announce the availability of FreeBSD 7.1-RELEASE. This is the second release from the 7-STABLE branch which improves on the functionality of FreeBSD 7.0 and introduces some new features. Some of the highlights: The ULE scheduler is now the default in GENERIC kernels for amd64 and i386 architectures; support for using DTrace inside the kernel has been imported from OpenSolaris; a new and much-improved NFS Lock Manager (NLM) client; boot loader changes allow, among other things, booting from USB devices and booting from GPT-labeled devices; the cpuset(2) system call and cpuset(1) command have been added, providing an API for thread to CPU binding and CPU resource grouping and assignment; KDE updated to 3.5.10, GNOME updated to 2.22.3; DVD-sized media for the amd64 and i386 architectures.” See the release announcement and release notes for further details. Download (torrents): 7.1-RELEASE-i386-dvd1.iso.gz (1,808MB, MD5, torrent), 7.1-RELEASE-amd64-dvd1.iso.gz (1,806MB, MD5, torrent).

Share

Ubuntu下优化 swap 交换分区

如果你的机器很老了内存只有512MB.而且你正想这发你这老机器也安装上你的那可爱的ubuntu呢.那你要什么办.内存太小了.运行起来跟乌龟一样慢的要死.你会说这还能用吗?可以吗.当然是可以了.你可以安装ubuntu server 版本.这个是专门做服务器版本.没有那些桌面的工具之类的.那下面就讲讲拿SWAP来开切了….

在ubuntu 里面,swappiness的值的大小对如何使用swap分区是有着很大的联系的。swappiness=0的时候表示最大限度使用物理内存,然后才是 swap空间,swappiness=100的时候表示积极的使用swap分区,并且把内存上的数据及时的搬运到swap空间里面。所以从这里下手,对于 ubuntu的默认设置,这个值等于60,建议修改为10。具体这样做:
1.查看你的系统里面的swappiness
root@ptubuntu:~# cat /proc/sys/vm/swappiness
60
默认为是 60.
2.修改swappiness值为10
root@ptubuntu:~# sysctl vm.swappiness=10
vm.swappiness = 10
root@ptubuntu:~# cat /proc/sys/vm/swappiness
10
但是这只是临时性的修改,在你重启系统后会恢复默认的60,所以,还要做一步:
root@ptubuntu:~# vi /etc/sysctl.conf
在这个文档的最后加上这样一行:
vm.swappiness=10

然后保存,重启。ok,你的设置就生效了
原文地址 https://help..com/community/SwapFaq

Share

FSF 的会员卡

FSF(即自由软件基金会)的会员卡看起来和信用卡一般大小,比较有意思的是,这张卡包含一个 USB 连接口,其中预装了 gNewSense Live! 系统,并且可以引导。活脱脱一个随身携带的移动

rmsmembershipcard

上图显示该会员卡为 Richard Stallman 所有,其卡号为 0。

据悉,这批新的 FSF 会员卡将于明年 1 月正式推出。

更多信息
来自:LinuxTOY

Share