阿里云云服务器上安装Apache

云服务器操作系统:CentOS 6.2 64位

客户端操作环境:Mac OSX Teminal

操作步骤:

1. 运行 Terminal,输入命令 ssh username@ip,然后输入密码。

2. 安装 Apache 软件:yum install httpd

3. 设置 Apache 在服务器启动时运行:chkconfig --levels 235 httpd on

4. 在 Apache 配置文件中配置域名:vi /etc/httpd/conf/httpd.conf,找到 ServerName ,添加“域名:80”,保存并退出。

5. 重启 Apache:service httpd restart

6. 浏览器中访问第4步配置的域名,如果出现“Apache 2 Test Page powered by CentOS”的页面,说明配置成功。

 

 

 

 

posted @ 2012-12-07 23:41  dudu  阅读(14654)  评论(3编辑  收藏  举报