欢迎光临
我们一直在努力

在Ubuntu系统中安装和配置PHP;Apache;MySQL

一,安装 

sudo apt-get install apache2 mysql-server phpmyadmin

二,配置

$ cd /var
$ mkdir www1
$ cd www1
$ cp -R /home/nixonli/文档/www.nixonli.com .
$ cd www.nixonli.com/
$ chown -R www-data:www-data www.nixonli.com
$ vi /etc/hosts
127.0.0.1       localhost
127.0.0.1      www.nixonli.com
127.0.1.1       nixonli-desktop
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

$ host www.nixonli.com
$ vi www.nixonli..com (root@nixonli-desktop:/etc/apache2/sites-available# vi www.nixonli.com )
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName www.nixonli.com

DocumentRoot /var/www1/www.nixonli.com
<Directory /var/www1/www.nixonli.com>
Options Indexes FollowSymLinks MultiViews
#AllowOverride None
AllowOverride FileInfo
Order allow,deny
allow from all
</Directory>
</VirtualHost>
$ root@nixonli-desktop:/etc/apache2/sites-enabled# ln -s ../sites-available/www.nixonli.com.com

配置apache重新模块

$ root@nixonli-desktop:/etc/apache2/mods-enabled# sudo ln -s ../mods-available/rewrite.load
$ /etc/init.d/apache2 restart
赞(0) 打赏
未经允许不得转载:NixonLi博客 » 在Ubuntu系统中安装和配置PHP;Apache;MySQL

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏