Freebsd development environment, starting from scratch-> Nginx + php + mysql + fastcgi + memcache + imagick + svn

Source: Internet
Author: User

# Ports quick query http://www.freebsd.org/cgi/ports.cgi

# Ports User Manual

Http://www.freebsdchina.org/forum/viewtopic.php? T = 14435 & sid = e4de615cc037d1274faf3dd4fbcfb5ef

# Refer to installation 1

Http://hi.baidu.com/lssbing/blog/item/bba6053d8a7b9108bba16775.html

# Reference Install 2 http://dn365.javaeye.com/blog/747216

Note: check which files are installed by default in ports.
# Cd/var/db/pkg
# Pkg_info-L spawn-fcgi-1.6.3

A New Environment

1. Configure sh

// Freebsd uses csh by default, including language, user prompt, and file color.

# Cd

# Vim. cshrc

 

2. Install vim

// If vim does not use x, useVim-litePackage, we use port to install

# Cd/usr/ports/editors/vim-lite/

# Make install clean

// Vim is configured later

 

3. Install MySQL

# Cd/usr/ports/database/mysql55-server

# Make install clean

// Start the instance, and add the following content in/etc/rc. conf.

# MySQL
Mysql_enable = "yes"

 

# Mysql_install_db -- user = MySQL # initialize MySQL
#/Usr/local/bin/mysqld_safe & # Start MySQL

#/Usr/local/bin/mysqladmin stop # disable MySQL

#/Usr/local/bin/mysqladmin-u Root Password 'newpass'
# Change the root password. newpass is the password you need to change.

Http://blog.csdn.net/yjj1s/archive/2010/08/31/5853377.aspx for more information

4. php

# Cd/usr/ports/lang/PhP52

# Make install clean

// After installation is complete

# Cd/usr/local/etc # cp php. ini-dist php. ini // copy the php. ini configuration file.

 

5. nginx

# Cd/usr/ports/www/nginx-devel # latest installation version
# Make install clean # Install it by default

// Start the instance, and add the following content in/etc/rc. conf.

# Nginx
Nginx_enable = "yes"

#/Usr/local/etc/rc. d/nginx start # Start MySQL

#/Usr/local/etc/rc. d/nginx stop # disable MySQL

 

Nginx Configuration:

Refer to my own, in my configuration file,Marked in red, required

Http://blog.csdn.net/yjj1s/archive/2010/09/01/5855738.aspx

More references

Nginx theme http://wiki.nginx.org/NginxChs for wike

Nginx Chinese home http://www.nginx.com.cn/

 

 

6. FastCGI uses spawn-fcgi and manages PHP processes.
# Cd/usr/ports/www/spawn-fcgi
# Make install clean

 

//Download the PHP script for fastcgi startup. Reference: http://bash.cyberciti.biz/web-server/fastcgi-php-server-start-stop-script/

 
# Fetch http://bash.cyberciti.biz/dl/251.sh.zip
# Unzip 251.sh.zip
# Mv 251.sh/usr/local/etc/rc. d/fastcgi. php
# Chmod + x/usr/local/etc/rc. d/fastcgi. php

 

7. memcache --- memcached

# Cd/usr/ports/databases/memcached

# Make install clean

// The default value is

// Start the instance at startup, and add [] in/etc/rc. conf.

# Memcached
Memcached_enable = "YES"

]

 

Install php memcached Extension
<Pre>
# Cd/usr/ports/databases/pecl-memcache
# Make install clean
</Pre>

 

8. imagick

# Cd/usr/ports/graphics/pecl-imagick/

 

9. Install SVN [subversion]

# Cd/usr/ports/devel/subversion

# Make install clean

========================================================== ======

Embellishment entertainment

========================================================== ======

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.