Building a PHP environment for FreeBSD notebook

Source: Internet
Author: User

Install mysql55, the dependent package is: mysql-5.5.10.tar.gz and cmake-2.8.4.tar.gz, will be automatically downloaded, if you have it, you can also put your own/usr/ports/distfiles/directory, save it need to download.

  1. CD/usr/ports/database/mysql55-server/
  2. Make install clean # Make with_charset = GBK with_xcharset = All with_proc_scope_pth = Yes build_optimized = Yes build_static = Yes skip_dns_check = Yes
  3. EE/etc/rc. conf, add a line at the end of mysql_enable = "yes"
  4. CP/usr/local/share/MySQL/my-large.cnf/usr/local/etc/My. CNF # MySQL optimization parameters can also be manually modified
    CP/usr/local/share/MySQL/my-small.cnf/etc/My. CNF location ????
  5. /Usr/local/bin/mysql_install_db
  6. /Usr/local/etc/rc. d/MySQL-Server start
  7. /Usr/local/bin/mysqladmin-u Root Password 'yournewpassword'
  8. Rehash
  9. Mysql-u root-P

In this way, you can access MySQL, but you 'd better change the password, not the same as mine.

 

Install nginx, dependent packages: nginx-0.8.54.tar.gz and pcre-8.12.tar.bz2

  1. CD/usr/ports/www/nginx/
  2. Make install clean
  3. EE/etc/rc. conf, add a line nginx_enable = "yes"
  4. /Usr/local/etc/rc. d/nginx start

Now, you can test whether the Web Service is normal. If the webpage returns: Welcome to nginx! It indicates that it is normal.

 

Install PHP, dependent packages: php-5.3.6.tar.bz2, autoconf-2.68.tar.bz2,suhosin-patch-5.3.6-0.9.10.patch.gz, perl-5.10.1.tar.bz2, BSDPAN-5.12.1_20100713.tar.bz2, m4-1.4.16.tar.bz2, gettext-0.18.1.1.tar.gz, libtool-2.4.tar.gz, small

  1. CD/usr/ports/lang/PhP5/
  2. Make install clean
  3. EE/etc/rc. conf, add php_fpm_enable = "yes" to the last line"
  4. /Usr/local/etc/rc. d/PHP-FPM start

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.