710661809 发表于 2015-8-20 13:43:02

linode空间lamp环境的搭建

  安装LAMP的命令如下,请依次执行:
  apt-get update
apt-get upgrade –show-upgraded
apt-get install apache2
a2enmod rewrite
apt-get install mysql-server
mysql_secure_installation
mysql -u root -p
apt-get install php5 php-pear php5-suhosin
apt-get install php5-mysql
/etc/init.d/apache2 start
  执行完上面的命令后,LAMP的环境应该就安装好了,而且Apache也已经启动运行,默认的网站目录是/var/www,请先放一个html文件或者php文件到该目录下,然后访问
  http://ip/xxx.html
  或
  http://ip/xxx.php
  应该就可以看到页面了。
  关于Apache的配置文件是在/etc/apache2/这个目录下面,感兴趣的自己查看研究。
  Apache的启动、重载、重启、停止命令如下:
  /etc/init.d/apache2 start
/etc/init.d/apache2 reload
/etc/init.d/apache2 restart
/etc/init.d/apache2 stop
  接下来需要更深入的学习。
页: [1]
查看完整版本: linode空间lamp环境的搭建