在 Ubuntu 8.0.4下设置静态IP和虚拟机
来源:互联网 发布:软件培训公司 编辑:程序博客网 时间:2024/05/29 09:29
1-手动修改网络配置文件:
sudo gedit /etc/network/interfaces
加入(或者修改)下列行:
auto lo eth0
iface lo inet loopback
iface eth0 inet static
address 192.168.1.6
netmask 255.255.255.0
gateway 192.168.1.1
auto eth0:0
iface eth0:0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 192.168.1.1
auto eth0:1
iface eth0:1 inet static
address 192.168.1.12
netmask 255.255.255.0
gateway 192.168.1.1
保存修改。
2.2-手动修改DNS配置文件:
sudo nano /etc/resolv.conf
加入(或者修改)下列行:
# Generated by NetworkManager
nameserver 192.168.1.1
nameserver 202.106.46.151
保存修改。
2.3- 手动重启网络服务:
sudo /etc/init.d/networking restart
返回结果如下:
*Reconfiguring network interfaces… [OK]
现在,你可以在终端里输入ifconfig命令来查看你修改的结果。如果不对,你还需要重启下。
设置apache的虚拟机
1 在workspace里添加doucument root
2 在/etc/apache2/sites-available 创建虚拟机配置文件 192.168.1.10, 内容如下:
<VirtualHost 192.168.1.10:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/edwin/Zend/workspaces/DefaultWorkspace/ZfProjects-Main/Public
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
ErrorLog /var/log/apache2/192.168.1.10.error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/192.168.1.10.access.log combined
Alias /doc/ "/usr/share/doc/"
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
<VirtualHost *:80>
3 重启apache 服务
sudo a2ensite 192.168.1.10
sudo /etc/init.d/apache2 restart
- 在 Ubuntu 8.0.4下设置静态IP和虚拟机
- 虚拟机下ubuntu静态ip设置
- 虚拟机 ubuntu设置静态IP
- 桥接模式下,虚拟机Ubuntu设置静态IP上网
- 虚拟机 ubuntu 12环境下设置静态IP
- Ubuntu下设置静态IP
- Ubuntu下 设置静态IP
- Ubuntu下设置静态ip
- Ubuntu下设置静态IP
- 虚拟机中设置ubuntu为静态ip
- Ubuntu 虚拟机设置静态IP地址
- 虚拟机中ubuntu设置静态IP
- vmware中的ubuntu 虚拟机 静态IP设置
- 为虚拟机的ubuntu设置静态ip
- 虚拟机下ubuntu配置静态IP
- Linux-虚拟机下设置静态IP
- 虚拟机Nat模式下设置静态ip
- 如何在给虚拟机设置静态IP
- 最大堆的建立和堆排序
- 无题
- C++、VC++、MFC网页自动注册、登陆、发帖、留言,QQ注册、QQ申请器源码、注册邮箱源码、自动发帖源码
- 转的帖子,放这里 有时间看看, 有时间的看下服务器编程
- 文件的一些处理
- 在 Ubuntu 8.0.4下设置静态IP和虚拟机
- 介绍 IOC
- 发布 eclipse 插件的方法
- Struts2 MVC
- PHP中exec、system等函数调用linux命令问题
- dumpbin的使用
- 共享权限与安全权限的区别
- Struts1和Struts2的区别和对比
- ArcGIS Server 9.3 中AJAX支持两种实现方式