5、重啟電腦,檢測服務能否自啟動;本機訪問
瀏覽器輸 http:[之前配置的ip地址] 回車之后看到
配置基于http的包更新源
1、在終端窗口中輸入\”sudo vi /etc/apache2/apache2.conf\” ,回車,找到\”<Directory /var/www/>\”的位置,更改\”/var/www/\”為新的根目錄就可以了
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
2,在終端窗口中輸入\”sudo vi /etc/apache2/sites-available/000-default.conf\”–>回車–>找到\”DocumentRoot /var/www/html\”的位置–>更改\”/var/www/html\”為新的根目錄就可以了,這里我把它更改為\”/var/www/\” 或者也可以自己新建一個repo_server.conf,里面配置如下:
<VirtualHost :28000>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/repo
<Directory \’/var/www/repo\’>
Options Includes FollowSymLinks MultiViews
AllowOverride None
Require all granted
</Directory>
ErrorLog /var/log/apache2/repo_server-error.log
CustomLog /var/log/apache2/repo_server.log common
</VirtualHost>
注:repo下要拷貝iso上的dists目錄過來
3、配置端口
在/etc/apache2/ports.conf
輸入Listen :28000
保存退出
第六步:重啟Apache:
在終端窗口中輸入\”sudo /etc/init.d/apache2 restart\” 回車,輸入root用戶密碼,回車,重啟成功
客戶端配置
1、找到/etc/apt/sources.list
2、輸入deb [arch=amd64] http://11.11.177.72:28000 (dists)ngiam main
3、保存退出即可
到此,相信大家對“ubuntu14.04.1怎么配置apache與yum”有了更深的了解,不妨來實際操作一番吧!
更多關于云服務器,域名注冊,虛擬主機的問題,請訪問三五互聯官網:m.shinetop.cn