1、挂载ISO镜像
在根目录下新建一个mount-point文件夹,将CD挂给该文件夹:
<pre name="code" class="html">#mount /dev/cdrom /mount-point
#ls
2、更改YUM源
yum源文件的位置在/etc/yum.repos.d/xxx.repo,编辑该文件,并且将如下内容添加到该文件中:
[oel-5.7]
name=OL5.7 x86_64 dvd - server(名字是Linux镜像的名称)
baseurl=file:///mount-point/Server
enabled=1
ggkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
[oel-5.7-cluster]
name=OL5.7 x86_64 dvd -cluster
baseurl=file:///mount-point/Cluster
enabled=1
ggkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
[oel-5.7-ClusterStorage ]
name=OL5.7 x86_64 dvd - clusterstorage
baseurl=file:///mount-point/ClusterStorage
enabled=1
ggkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
[oel-5.7-vt]
name=OL5.7 x86_64 dvd - vt
baseurl=file:///mount-point/VT
enabled=1
ggkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
保存文件并退出。
3、安装HTTPD服务
运行#yum install httpd
按照屏幕出现的提示,安装缺少的RPM包
4、检测是否安装成功
服务器的web地址栏里面输入http://127.0.0.1如果出现下面的图片,就说明成功了。
5、启停服务
启动——service httpd start停止——service httpd stop
状态——service httpd status
6、设置httpd自启动
#chkconfig --list | grep httpd (查看httpd的状态)
#chkconfig --level 3 httpd on (将httpd服务设置为开机启动)