Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 5 Cài đặt Web Server trong FreeBSD 6,0 với 2,2 Apache, MySQL 5.0 và PHP 5 - Phần 5
Installing Apache 2.2, MySQL 5 and PHP 5 in FreeBSD 6.0 for a Reliable Web Server Cài đặt Apache 2.2, MySQL 5 và PHP 5 in FreeBSD 6,0 cho một máy chủ web đáng tin cậy
Part 5 – Installing PHP Hypertext Preprocessor Scripting Language 5 and PHP 5 Extensions Phần 5 - Cài đặt PHP Hypertext Preprocessor Scripting Ngôn ngữ 5 và PHP 5 Extensions
- Install by enter the following commands on FreeBSD OS command line, wait for previous command to finish before running the next command: Cài đặt bằng cách nhập vào các lệnh sau trên FreeBSD dòng lệnh điều hành, chờ lệnh trước đó để kết thúc trước khi chạy lệnh sau:
cd /usr/ports/lang/php5 cd / usr/ports/lang/php5
make install clean thực hiện cài đặt sạch - If you're prompted, select “use Apache 2.x instead”. Nếu bạn được nhắc, chọn "sử dụng Apache 2.x thay vì".
- Continue with the following commands to install PHP5 extensions and modules to enable the support of the modules in Apache: Tiếp tục với các lệnh sau để cài đặt phần mở rộng PHP5 và mô-đun để kích hoạt sự hỗ trợ của các module trong Apache:
cd /usr/ports/lang/php5-extensions cd / usr/ports/lang/php5-extensions
make config làm cho config - At Options for php5-extension 1.0 menu, select all PHP extensions and modules that you may use with Apache webserver. Tại Options for php5-mở rộng 1,0 menu, chọn tất cả các phần mở rộng PHP và các module mà bạn có thể sử dụng với máy chủ web Apache. This is a part of the configuration for PHP, where you need to enable features of PHP that come in modules, such as ability to manage user sessions, interface with databases and many others. Đây là một phần của cấu hình cho PHP, khi bạn cần phải kích hoạt tính năng của PHP có sẵn trong mô-đun, chẳng hạn như khả năng quản lý phiên người sử dụng, giao diện với cơ sở dữ liệu và nhiều người khác. Default extensions such as ctype functions support, HASH Message Digest Framework support, session support and etc have been selected. Mặc định phần mở rộng như hỗ trợ chức năng ctype, HASH Message Digest Framework hỗ trợ, hỗ trợ phiên làm việc và vv đã được chọn. Other popular extensions that you most likely to be in used are MySQL database support and GD library support. Các phần mở rộng phổ biến nhất mà bạn có khả năng được sử dụng trong cơ sở dữ liệu MySQL được hỗ trợ và hỗ trợ thư viện GD. Use space bar to select or unselect the extensions and press Enter when done. Sử dụng không gian thanh để chọn hoặc bỏ chọn các phần mở rộng và nhấn Enter khi thực hiện xong.
- Continue the installation of php5-extensions with the following commands: Tiếp tục cài đặt của php5-phần mở rộng với các lệnh sau đây:
make install clean thực hiện cài đặt sạch
- If there are any message the pops up and prompts you to select some options or configurations, you can just accept the default settings by pressing Enter. Nếu có bất kỳ thông báo bật lên và sẽ nhắc bạn lựa chọn một số tùy chọn hoặc cấu hình, bạn chỉ có thể chấp nhận các thiết lập mặc định bằng cách nhấn Enter. Some modules that may prompt you for action include php5-gd, php5-mbstring and php5-sqlite. Một số module có thể nhắc bạn cho hành động bao gồm php5-gd, php5-mbstring và php5-SQLite.
- Edit the Apache configuration file in order to enable Apache web server to load the PHP modules when initialization: Chỉnh sửa file cấu hình Apache để kích hoạt máy chủ web Apache để nạp module PHP khi khởi tạo:
- Go to Apache configuration file location by cd /usr/local/etc/apache2/ Go to Apache vị trí tập tin cấu hình của cd / usr/local/etc/apache2 /
- Edit Apache configuration file by vi httpd.conf Apache sửa file cấu hình bằng vi httpd.conf
- Search for LoadModule lines, after the last LoadModule line, but within the same section, add the following 2 lines: Tìm dòng LoadModule, sau khi dòng LoadModule cuối, nhưng trong phần đó, thêm 2 dòng sau:
AddType application/x-httpd-php .php AddType application / x-httpd-php. Php
AddType application/x-httpd-php-source .phps AddType application / x-httpd-php-source. Phps
- Optionally, copy /usr/local/etc/php.ini-recommended or /usr/local/etc/php.ini-dist to /usr/local/etc/php.ini (in same directory), which will enable you to tune and change the default settings of behaviours of PHP. Tùy chọn, sao chép thư mục / usr / local / etc / php.ini-recommended hoặc / usr / local / etc / php.ini-dist vào / usr / local / etc / php.ini (trong cùng thư mục), mà sẽ cho phép bạn điều chỉnh và thay đổi các thiết lập mặc định của hành vi của PHP.
- Start the Apache HTTP web server by using apachectl start (or restart Apache HTTP web server by using apachectl restart). Bắt đầu máy chủ web Apache HTTP bằng cách sử dụng bắt đầu apachectl (hoặc khởi động lại máy chủ web Apache HTTP bằng cách sử dụng apachectl khởi động lại). apachectl is located in /usr/local/sbin, if you encounter Command not found problem, try to change directory to its location. apachectl nằm trong / usr / local / sbin, nếu bạn gặp Lệnh không được tìm thấy vấn đề, hãy thử thay đổi thư mục đến vị trí của nó.
- PHP5 installation done. PHP5 cài đặt hoàn tất.
A web server has been setup with the FreeBSD with Apache, MySQL and PHP. Một máy chủ web đã được thiết lập với FreeBSD với Apache, MySQL và PHP. The document root of the web server (where you should put your HTML and PHP files is at /usr/local/www/apache22/data/ and you will need a SecureFTP (SFTP) client such as WinSCP to upload your files to web server securely. Các tài liệu gốc của máy chủ web (nơi bạn nên đặt HTML và PHP tập tin của bạn là lúc / usr/local/www/apache22/data / và bạn sẽ cần một SecureFTP (SFTP) khách hàng như WinSCP để tải lên tập tin của bạn lên web server cách an toàn.
IMPORTANT : The page is machine translated and provided "as is" without warranty. Quan trọng: Sửa là máy dịch và cung cấp "như là" không có bảo hành. Machine translation may be difficult to understand. Máy dịch thuật có thể khó hiểu. Please refer to Vui lòng tham khảo original English article bản gốc tiếng Anh bài viết whenever possible. bất cứ khi nào có thể.
Related Articles Bài viết liên quan
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 3 Cài đặt Web Server trong FreeBSD 6,0 với 2,2 Apache, MySQL 5.0 và PHP 5 - Phần 3
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 4 Cài đặt Web Server trong FreeBSD 6,0 với 2,2 Apache, MySQL 5.0 và PHP 5 - Phần 4
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 2 Cài đặt Web Server trong FreeBSD 6,0 với 2,2 Apache, MySQL 5.0 và PHP 5 - Phần 2
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 1 Cài đặt Web Server trong FreeBSD 6,0 với 2,2 Apache, MySQL 5.0 và PHP 5 - Phần 1
- Installing and Configuring DHCP Server (DHCPd) on FreeBSD Cài đặt và cấu hình DHCP Server (dhcpd) trên FreeBSD
- Install phpBB 2 in Windows XP running on Apache 2, PHP 5 and MySQL 4 Cài đặt phpBB 2 trong Windows XP chạy trên Apache 2, PHP 5 và MySQL 4
- FreeBSD Apache HTTP Accept Filter Error FreeBSD Apache HTTP Accept Filter Error
- Request URL /server-status or 404 Page Not Found Apache Error Yêu cầu URL / server-status hoặc 404 Không tìm thấy trang Apache Error
- Reset the Root Password of MySQL Server Đặt lại mật khẩu chủ của MySQL Server
- Apache Status (whm-server-status) in cPanel WebHost Manager Returns Blank Page Tình trạng Apache (WHM-server-status) trong cPanel WebHost Returns đốc Blank Trang










































May 13th, 2009 08:18 Ngày 13 Tháng Năm 2009 08:18
This php setup doesn't support mysql element. Điều này thiết lập php không hỗ trợ phần tử mysql. Drupal can't detect that mysql is running… I hope this could be modified and be of help to others. Drupal không thể phát hiện ra rằng mysql đang chạy ... Tôi hy vọng điều này có thể được sửa đổi và được giúp đỡ cho người khác.
November 25th, 2008 10:40 Ngày 25 tháng 11 2008 10:40
This is a fine series of articles! Đây là một loạt điều tốt đẹp!
The only real change I would suggest is executing portsnap or cvsup after the base installation, before installing apache, mysql and php. Các chỉ thực sự thay đổi tôi sẽ đề nghị được thực hiện portsnap hoặc cvsup sau khi cài đặt cơ bản, trước khi cài đặt apache, mysql và php.