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)
>>> 

大功告成~

 

转载于:https://www.cnblogs.com/foreverwith/p/6520499.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值