LAMP搭建

Apache的安装依赖
/usr/local/apache2 这种一般是自己源码编译安装的。
用系统包管理器安装软件可以参考自带工具,ubuntu/debian 用 dpkg,redhat/centos 用 rpm 查询软件包内文件列表。
比如你的,可以使用:# dpkg -s apache2
会显示在 /etc/apache2 下,这里目录自己看下。


作者:smallfish
链接:https://www.zhihu.com/question/27455017/answer/36716671
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
-------------------------------------------------------------------------------------------------------------------
我是用
sudo apt-get install apache2
安装的Apache
接下来安装MySQL以及各种依赖
以下来自http://blog.csdn.net/jspang/article/details/51523727
sudo easy_install mysql-python  

sudo apt-get install python-setuptools libapache2-mod-wsgi  

sudo service apache2 restart 

sudo apt-get install mysql-server  

mysql -u root -p  

sudo apt-get install libapache2-mod-auth-mysql

sudo service apache2 restart 

sudo apt-get install python-setuptools  
  
sudo apt-get install libmysqld-dev  
  
sudo apt-get install libmysqlclient-dev  
  
sudo apt-get install python-dev  
  
sudo easy_install mysql-python 

测试一下

>>> import MySQLdb
/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1224: UserWarning: /home/zwq/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).
  warnings.warn(msg, UserWarning)
>>> 

大功告成~

 
posted @ 2017-03-08 17:35  foreverwith  阅读(119)  评论(0编辑  收藏  举报