"/etc/profile.env", line 1: Invalid token '' (not '=')
于是上网搜了一下,说是profile.env文件的问题,于是将这个文件删掉( rm /etc/profile.env )
然后 env-update, 然后又报错
!!! Error loading '/var/cache/edb/mtimedb': 'utf-8' codec can't decode byte 0x80 in position 2: invalid start byte
然后果断再删掉 /var/cache/edb/mtimedb
然后再 env-update, 成功
然后就简单了
emerge apache // 安装apache
/etc/init.d/apache2 start // 启动apache
rc-update add apache2 default // 将apache加入到开机自动启动
然后在浏览器输入网址(如果是本机就输入127.0.0.1)进行验证。
如果需要修改Apache文件目录,可以修改配置文件 /etc/apache2/vhosts.d/default_vhost.include
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
# If you change this to something that isn't under /var/www then suexec
# will no longer work.
DocumentRoot "/home/share/Apache/"
# This should be changed to whatever you set DocumentRoot to.
<Directory "/home/share/Apache">