惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
T
Tenable Blog
Webroot Blog
Webroot Blog
L
Lohrmann on Cybersecurity
S
Securelist
S
Schneier on Security
NISL@THU
NISL@THU
Know Your Adversary
Know Your Adversary
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
L
LINUX DO - 热门话题
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
I
Intezer
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
TaoSecurity Blog
TaoSecurity Blog
S
Secure Thoughts
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Privacy International News Feed
H
Hacker News: Front Page
N
Netflix TechBlog - Medium
M
MIT News - Artificial intelligence
博客园 - Franky
PCI Perspectives
PCI Perspectives
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Azure Blog
Microsoft Azure Blog
MongoDB | Blog
MongoDB | Blog
L
LangChain Blog
P
Proofpoint News Feed
S
Security Affairs
WordPress大学
WordPress大学
The Last Watchdog
The Last Watchdog
S
SegmentFault 最新的问题
小众软件
小众软件
F
Full Disclosure
博客园 - 叶小钗
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
T
The Blog of Author Tim Ferriss
Simon Willison's Weblog
Simon Willison's Weblog
P
Palo Alto Networks Blog
Security Latest
Security Latest
P
Proofpoint News Feed
月光博客
月光博客
T
Tailwind CSS Blog
Scott Helme
Scott Helme
Hacker News - Newest:
Hacker News - Newest: "LLM"
Google Online Security Blog
Google Online Security Blog
T
Threat Research - Cisco Blogs
Help Net Security
Help Net Security
Project Zero
Project Zero

博客园 - Vince

在ubuntu server上安装沸腾时刻环境 ubuntu中管理用户和用户组 ubuntu14.04设置静态ip ssh 返回错误 Too many authentic authentication failures for root 的时候检查 ssh 配置 ubuntu安装 laravel 过程中出现: mcrypt php extension required 的问题 | 以及composer相关问题 | Nginx安装 mongo里面根据对象字段的ID查询 db.Photo.find({'owner.$id':ObjectId('xxxx')}) , 并且使用forEach循环修改查询的数据 绝对居中对齐的好办法 blur效果,模糊效果css vitualbox 主机与虚拟机能相互访问的设置 mongo对象var_dump的时候无法显示更多数据的处理办法 mongodb lock 出毛病时解决方法 ag使用需要注意的问题 twig用法 imagick用法! symfon2 配置文件使用 + HttpRequest使用 + Global多语言解决方案 Symfony中Doctrine对应的Mongodb数据类型 data type nodejs mongodb 查询要看的文章 highcharts多个Y轴 IE=edge 让浏览器使用最新的渲染模式
ubuntu 下配置 开发环境
Vince · 2014-02-21 · via 博客园 - Vince

1. apache:

sudo apt-get install apache2

安装好输入网址测试所否成功: http://localhost

2. mongo 已经安装好了

版本:2.4.8

refer to :

http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

3. git 已经安装好了

4. 安装PHP,并让Apache支持PHP (php版本:PHP 5.3.10)

sudo apt-get install php5 libapache2-mod-php5

(当前到机器上有node所以可能默认serverip所127.0.1.1)

5. 重启apache

sudo /etc/init.d/apache2 restart

6. 给var/www文件夹授权:chmod 777 /var/www/

在该文件家中加入 phpinfo.php并且添加代码:

<?php

phpinfo();

?>

 然后访问如下网址查看php信息:

http://localhost/phpinfo.php

 7. 安装mongo php

查看官方文档,教你如何安装:

http://www.php.net/manual/zh/mongo.installation.php#mongo.installation.manual

但是会在phpize这一步卡住

首先安装:

sudo apt-get install php5-dev

然后输入如下命令:

sudo dpkg --purge --force-depends libssl1.0.0:i386
sudo dpkg --purge --force-depends libssl1.0.0:amd64
sudo dpkg --configure -a
sudo apt-get -f install

https://answers.launchpad.net/ubuntu/+source/apt/+question/231941

成功后继续按照手册用unzip去解压缩phpmongodriver

打算注意要解压在你希望的地方。

然后按照官方文档来做。

如果在./ configure这一步碰到麻烦

可以安装

sudo apt-get install gcc

sudo apt-get install make

用这个命令查看extension_dir所否指向正确的地方:

php -i | grep extension_dir

确认没有问题以后
去到php.ini所在目录相应的 conf.d中添加一个文件 mongodb.ini
里面添加 extension=mongo.so

(
或者直接在 /etc/php5/cli/php.ini 最后添加

extension=mongo.so
)

保存退出

 重启apache

sudo /etc/init.d/apache2 restart

然后查看localhost/phpinit.php

可以看到mongodb.ini以及mongo模块

 ------------------------- 安装Symfony

1. 下载一个 Composer.phar 输入命令 

php composer.phar create-project symfony/framework-standard-edition /var/www/SymfonySample/ 2.4.2

其中的路径可以替换成你希望创建项目的路径

下载Symfony成功

2. 设置Apache指向

参考: http://www.cnblogs.com/ylan2009/archive/2012/02/25/2368028.html

主要说的是修改 /etc/apache2/sites-available/default 里面的/var/www路径到正确的地址

然后重启apache

root document指向web目录以后

测试这个网址

localhost/config.pnp

若能显示Symfony页面表示安装成功,但是一般这时会看到很多的推荐修改项。

配置文件夹权限的命令:

sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs

 http://askubuntu.com/questions/146814/chmod-invalid-mode-a

如果提示找不到setfacl命令,则使用:

sudo apt-get install acl

http://www.xiaozhou.net/solution_of_the_problem_operation_not_supported_on_ubuntu-2010-06-06.html

 关于 setfacl 

http://stackoverflow.com/questions/8533788/setfacl-about-the-options

如果报错 Operation not supported

http://serverfault.com/questions/323153/setfacl-operation-not-supported

关键是:Try adding ',acl' after noatime. Then reboot or just invoke mount -o remount /.

无需重启服务器

记得开启apache的rewrite功能

sudo a2enmod rewrite

修改 /etc/apache2/sites-available/default 里面的 

AllowOverride all

http://stackoverflow.com/questions/17745310/how-to-enable-mod-rewrite-in-lamp-on-ubuntu

然后重启apache

有可能遇到权限错误:

 http://askubuntu.com/questions/48362/how-to-enable-mod-rewrite-in-apache

关闭Symfony的模板页Cache

http://stackoverflow.com/questions/7192357/symfony2-disable-cache

测试Hello是否行得通

如果服务器出现内部错误,但是看不到详细错误原因:

http://blog.const.net.cn/a/1063.htm