作者: forever steel(zhoun)
原发: http://guo9310.blog.163.com/
1. mysql 的配置
因为安装的时候选择的是全部安装, 这么都已经在了, 只是还需要配置一下.
mysql和apache的启动文件在/etc/rc.d下面, rc.mysqld和rc.httpd, 因为这两个文件没有执行权限, 所以开机没有运行.
1)用mysql用户安装mysql数据表, mysql用户已经有了
# sudo -u mysql -c 'mysql_install_db'
2)mysql的配置文件是放在/etc下面, 有四个文件,my-huge.cnf, my-large.cnf,my-medium.cnf,my-small.cnf,
把其中的一个复制成/etc/my.cnf, 就行了, 用哪个配置文件要看个人需要, 可以参考每个文件开头的说明.
# cp /etc/my-medium.cnf /etc/my.cnf
huge 内存1-2G
large 内存=512M
medium 内存<=128M
small 内存<=64M
3)启动mysql
# sh /etc/rc.d/rc.mysqld start
4)修改mysql root密码
# mysqladmin -uroot password 'xxxxx'
5)mysql开机启动
# chmod a+x /etc/rc.d/rc.mysqld
2. php apache的配置
1) apache和php的配置文件是放在/etc/httpd目录
包括apache的httpd.conf和php.ini
修改httpd.conf, 修改其中两行
#Include /etc/httpd/mod_php.conf
把注释去掉, 改成
Include /etc/httpd/mod_php.conf
DirectoryIndex index.html
目录缺省索引文件, 修改一下, 加两个文件名
DirectoryIndex index.php index.htm index.html
2)启动apache
# sh /etc/rc.d/rc.httpd start
3)开机启动apache
# chmod a+x /etc/rc.d/rc.httpd
4)网页目录是在/srv/httpd/htdocs, 在下面写一个文件info.php:
phpinfo ();
?>
<!---->
浏览器访问http://localhost/info.php , 就可以看到php的相关信息了, 可以看到很多模块都直接编译进php了
3. 移动硬盘速度问题
用移动硬盘的时候, 发现速度非常慢, 测试了一下, 才几百K的速度, USB2.0, 不可能是这个速度.
搜了一下, 有这篇文章: http://www.linuxsir.org/bbs/thread282961.html
在/etc/hal/fdi/policy目录, 建了一个文件: 95-usb-nosync.fdi
false
这个文件应该是所有usb接口的硬盘, 不用sync同步模式, 这样速度就快多了.
试了一下, 刚才复制需要十几分钟的文件, 现在只要十几秒就好了.
4. virtualbox
开源虚拟机 , 可以虚拟各种操作系统, windows作为Host用过, 感觉不错
到官方主页下载VirtualBox_1.5.2_Linux_x86.run
for 所有发行版的
1)
# chmod u+x VirtualBox_1.5.2_Linux_x86.run
2)
# ./VirtualBox_1.5.2_Linux_x86.run
3)默认安装到/opt下面
把/opt/VirtualBox-1.5.2下面的VirtualBox.desktop文件复制到桌面, 就可以用了
$ cp /opt/VirtualBox-1.5.2/VirtualBox.desktop ~/Desktop
我想直接用原来windows下面的安装的vbox虚拟机, 试了一下, 好像不行, 启动黑屏,
难道是windows和linux的guest不能共享?
还是又重新装了一个xp sp2, 用无缝窗口, 感觉好像直接用windows一样, 呵呵
有些必须在windows下面用的软件, 比如网银, 项目用的.Net框架, 还是需要用这个虚拟机