存档
Linux学习-NFS(V1.0)
-
NFS使用RPC(远程过程调用)来协助工作。
-
NFS和FTP等的区别,透明的访问一个进程,引用文件部分:即不需要产生文件的副本,本地客户端也不需要做任何修改。
-
NFS服务器的安装
-
启动inet, portmap, nfs和mount
-
定义要拿来共享的分区
-
客户端列表中定义客户端的参数
-
修改/etc/exports
-
重启nfs。
-
-
NFS的系统结构(注意这是服务器上的)
-
/etc/exports。主配置文件。
-
/usr/sbin/exportfs,一个命令
-
/usr/sbin/showmount,这个主要用户客户端,来查看NFS共享出来的资源。
-
-
/etc/exports的配置。将需要共享的文件系统编辑到/etc/exports中,当NFS重启的时候就会自动读取,并将文件共享,设定权限。
-
修改了exports文件之后,运行exportfs更新一下即可。
-
NFS客户端挂载,使用mount命令
-
#mount -t nfs 192.168.1.1:/home/wu /home/nfs/wu
-
将192.168.1.1上的/home/wu挂载到本地的/home/nfs/wu下。
-
-
扫描可共享的文件
-
#showmount -e 192.168.1.1
-
-
卸载,使用#umount命令。
-
还可以使用/etc/fstab来挂载。
-
#vi /etc/fstab
-
server:/usr/local/pub /pub nfs rsize=9192.,wsize=8192,timeo=14,intr
-
-
也可以使用autofs来挂载,只有文件系统被使用时才挂载。
-
首先由一个主文件/etc/auto.master,然后里面引用了分别每个挂载点的配置文件。
-
比如/etc/auto.master下写一行:/misc /etc/auto.misc
-
再编辑/etc/auto.misc,添加:wu –rw,soft 192.168.1.1:/project。就是把192.168.1.1下的project挂载到了/misc/wu下。
-
需要重启autofs生效。
-
MySQL的安装
Mysql的安装还是比较简单的。
首先去下载源码包,注意选择Source。
一路编译,安装。
参考:
http://dev.mysql.com/doc/refman/5.1/zh/installing.html#quick-install
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
我编译用的是这个参数:
./configure --prefix=/usr/local/mysql --with-comment=Source --with-server-suffix=-Nau_MySQL --with-mysqld-user=mysql --without-debug --with-big-tables --with-charset=gbk --with-collation=gbk_chinese_ci --with-extra-charsets=all --with-pthread --enable-static --enable-thread-safe-client --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --enable-assembler --without-isam --without-innodb --without-ndb-debug
安装好之后,记得给MySQL设置一个密码
mysqladmin uroot -password123456
或者
shell> mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
http://dev.mysql.com/doc/refman/5.1/zh/installing.html#default-privileges
BBS设置-宠物岛
升级到3.0。
备份数据:
使用phpMy备份所有cdb_wx开头的数据。
下载地址:
http://download.9938.cn
卸载戒指:
物品设置--寻找物品--卸载。
Upload File
Done!
通过网络安装Windows Server 2003
如果遇到光驱坏了,系统不支持USB,想安装Win2003,怎么办?
可以使用RIS,也就是微软的远程安装服务。
首先需要一台主服务器,并且运行了DNS,AD,以及DHCP服务。AD是比较讨厌的,通过虚拟机来实现吧。安装可以简单的通过“管理我的服务器”中的“第一台设备”进行,他会自动把这三样装上。
然后添加删除程序里面添加远程安装服务,然后运行之,输入你的镜像地址,复制即可。
稍后启动新服务器,会自动从PXE进入TFTP,按F12即可进入下一步。
注意因为用到了TFTP以及DHCP,保证设备在同一网段。另外头疼的是,没法分区了...
虚拟机测试通过。
参考:
http://publish.it168.com/2006/0729/20060729001401.shtml
如何注册一个.edu域名
.edu domain name registration is limited to fully accredited postsecondary institutions of higher learning, such as four-year colleges. .edu domain registration is for the most part limited to schools located in the United States. .edu domain name registration is handled exclusively by EDUCAUSE, a nonprofit organization working to promote the intelligent use of information technology in education. Their FAQ provides complete eligibility information.
也就是说.edu域名只对美国的大学开放的。不过看到一个韩国的学校也在用.edu域名?奇怪...
Wordpress的Rewrite/永久链接(permalinks )设置
wp的rewrite机制和之前遇到的DZ等不同,稍费了点功夫。
- 首先Apache必须要支持Rewrite,加载好mod_rewrite。
- 其次,WP处理的规则是通过wp目录下的.htaccess文件,如果请求的不是文件或者目录,就交由index.php处理。而非通过Rewrite将连接进行静态化。所有需要将这个.htaccess设置为可写属性。
- Apache要使用这个.htaccess,需要在Directory目录添加“AllowOverride FileInfo, AllowOverride All”。同时还要“FollowSymLinks option”。
参考文章:
分析WordPress的Rewrite机制
http://www.black-xstar.com/blog/article.asp?id=546
WP官网文章
http://codex.wordpress.org/Using_Permalinks#Creating_and_editing_.28.htaccess.29
另外,Wordpress的.htaccsee内容如下:
1 2 3 4 5 6 7 | <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> |