ubuntu server 10.04 使用笔记
## 对服务器用户 ##
系统初装:
1.更新apt:
sudo apt-get update
2.安装phpmyadmin:
sudo apt-get install phpmyadmin
3.更改/var/www权限:
chmod 777 [-R] /var/www
4.重启apache2:
sudo /etc/init.d/apache2 restart
5.重启mysql:
sudo /etc/init.d/mysql restart
6.启用ll命令:
vi /home/[yourusename/].bashrc
取消以下行的注释即可
# some more ls aliases alias ll='ls -l' alias la='ls -A' alias l='ls -CF'
bash显示最后个目录:
vi /home/[yourusename/].bashrc
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
把里面的w改成大写的W
7.开启root账户
sudo passwd root
8.运行CGI
修改apache的配置文件httpd.conf:
<Directory "D:/Apache Group/Apache2/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
#AddHandler cgi-script .cgi
改为:
<Directory "D:/Apache Group/Apache2/cgi-bin">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
AddHandler cgi-script .cgi .pl
配置文件:
1.apache2: /etc/apache2/apache2.conf
基本操作:
1.关机: sudo shutdown -h now
## END of 对服务器用户 ##
#### To be continued... ####
## 对桌面用户 ##
顺便也想说一说作为一个ubuntu桌面用户的体验者的感受。ubuntu在界面的设计上的确是花了不少精力,也很吸引我眼球,它的多桌面系统让工作安排起来更有条理,想起曾经用过的3D桌面,真的是很不错,顺便上两张图片:
Desktop one:
硬件的支持相当不错,很多win7下不支持的硬件直接就能使用,非常方便,本人的本本在win7下需要自己一个一个打驱动,ubuntu下只少了个指纹识别,对比相当明显。
下面来说说它的缺点,和Mac OS一样没有IE,所以无法用网银,对QQ的支持非常不好经常断线,对游戏的加速效果不是很理想,若设置不好你1W大洋的电脑跑起来画面还不如人家win下1K的电脑。
好了,对ubuntu的介绍结束了,仍然还是有很多需要改进的地方,让我们一起加油吧。
## END of 对桌面用户 ##
---------------------分界线----------------------
配置文件: /etc/network/interfaces
打开后里面可设置DHCP或手动设置静态ip。前面auto eth0,让网卡开机自动挂载.
1. DHCP配置网卡
sudo vi /etc/network/interfaces
并用下面的行来替换有关eth0的行:
# The primary network interface - use DHCP to find our address
auto eth0
iface eth0 inet dhcp
重启网络设置:
sudo /etc/init.d/networking restart
或者启用DHCP:
sudo dhclient eth0
2. 静态IP地址
sudo vi /etc/network/interfaces
并用下面的行来替换有关eth0的行:# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.23
gateway 192.168.1.1
netmask 255.255.255.0
重启网络设置:
sudo /etc/init.d/networking restart
3. 设定第二个IP地址(虚拟IP地址)
sudo vi /etc/network/interfaces
添加如下的行:
auto eth0:1
iface eth0:1 inet static
address 192.168.1.60
netmask 255.255.255.0
network x.x.x.x
broadcast x.x.x.x
gateway x.x.x.x
重启网络设置:
sudo /etc/init.d/networking restart
4. 设置主机名称(hostname)
查看当前主机的主机名称:
sudo /bin/hostname
设置当前主机的主机名称:
sudo /bin/hostname newname
系统启动时,会从/etc/hostname来读取主机的名称.
5. 配置DNS
首先,你可以在/etc/hosts中加入一些主机名称和这些主机名称对应的IP地址,这是简单使用本机的静态查询.
要访问DNS 服务器来进行查询,需要设置/etc/resolv.conf文件.
假设DNS服务器的IP地址是192.168.3.2, 那么/etc/resolv.conf文件的内容应为:
search test.com
nameserver 192.168.3.2
----------------------分界线-----------------------
CPAN FAQ:
1.How to install CPAN module?
perl Makefile.PL
make
make test
2.Error:
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
Solution:
sudo apt-get update
sudo apt-get install libc6-dev
浙公网安备 33010602011771号