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 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 3 – Installing MySQL Server 5 with FreeBSD Ports Collection Phần 3 - Cài đặt MySQL Server 5 với FreeBSD Ports Bộ sưu tập
- Login to the FreeBSD system as root, or su – root to get to super user environment. Đăng nhập vào hệ thống FreeBSD như là người chủ, hoặc su - root để có được với môi trường người sử dụng siêu.
- Enter the following commands at FreeBSD command line interface (CLI) (Wait till each command to finish processing before running the next command): Nhập lệnh sau tại FreeBSD giao diện dòng lệnh (CLI) (Chờ đến khi kết thúc mỗi lệnh xử lý trước khi chạy lệnh tiếp theo):
cd /usr/ports/databases/mysql50-server cd / usr/ports/databases/mysql50-server
make install clean thực hiện cài đặt sạch
mysql_install_db --user=mysql mysql_install_db - mysql
chown -R mysql /var/db/mysql/ chown-R mysql / var / db / mysql /
chgrp -R mysql /var/db/mysql/ chgrp-R mysql / var / db / mysql /
/usr/local/bin/mysqld_safe -user=mysql & / usr / local / bin / mysqld_safe-user = mysql &Note: If you encounter Command not found error, use command rehash to update OS path environment variables. Lưu ý: Nếu bạn gặp Lệnh không được tìm thấy lỗi, hãy sử dụng lệnh rehash để cập nhật biến môi trường hệ điều hành đường dẫn.
- The port installation will put a script file mysql-server.sh in /usr/local/etc/rc.d which will has capability to start MySQL server. Việc cài đặt cổng sẽ đặt một tập tin mysql script-server.sh trong / usr / local / etc / rc.d mà sẽ có khả năng để bắt đầu máy chủ MySQL. To enable MySQL server to start automatically after every FreeBSD server reboot, enter the following command in CLI: Để kích hoạt máy chủ MySQL để tự khởi động sau mỗi lần khởi động lại máy chủ FreeBSD, nhập lệnh sau trong CLI:
echo 'mysql_enable=”YES”' >> /etc/ rc.conf echo 'mysql_enable = "YES"'>> / etc / rc.conf
- By default, MySQL default super user account – root – has no password (blank password). Theo mặc định, MySQL mặc định tài khoản người dùng siêu - gốc - không có mật khẩu (password trống). So it's important to assign the administrator account password. Vì vậy, điều quan trọng để gán mật khẩu tài khoản quản trị. To change the password to root user, enter the following command: Để thay đổi mật khẩu người dùng root, nhập vào lệnh sau đây:
mysqladmin -u root password newpassword mysqladmin-u root mật khẩu Newpassword
Replace newpassword with your own desired password. Thay thế Newpassword với mật khẩu của bạn mong muốn của riêng.
- Optionally, copy either my-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf or my-innodb-heavy-4G.cnf (depending on the usage and utilization of MySQL server) as my.cnf to /var/db/mysql which will enable you to tweak and change the configuration of server-specific MySQL server options by editing the file. Tùy chọn, hoặc là bản sao của tôi huge.cnf, my-large.cnf, my-medim.cnf, my-my-small.cnf hoặc InnoDB-nặng-4G.cnf (phụ thuộc vào cách sử dụng và sử dụng MySQL server) như của tôi . cnf vào / var / db / mysql mà sẽ cho phép bạn chỉnh và thay đổi cấu hình của máy chủ tùy chọn máy chủ MySQL cụ thể bằng cách chỉnh sửa tập tin.
- MySQL 5.0 installation done. MySQL 5,0 cài đặt hoàn tất.
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 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 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
- Reset the Root Password of MySQL Server Đặt lại mật khẩu chủ của MySQL Server
- Change and Reset MySQL root Password Thay đổi và Thiết lập lại mật khẩu root MySQL
- FreeBSD Apache HTTP Accept Filter Error FreeBSD Apache HTTP Accept Filter Error
- Checking Free Disk Space on FreeBSD Server Kiểm tra miễn phí Disk Space trên FreeBSD Server










































July 9th, 2009 13:42 09 Tháng Bảy 2009 13:42
[...] http://www.mydigitallife.info/2006/04/13… [...] [...] Http://www.mydigitallife.info/2006/04/13 ... [...]
August 21st, 2008 13:06 21 Tháng Tám 2008 13:06
Hey there. Hey there. I was having trouble with the “mysql_install_db: command not found” when installing FreeBSD 7. Tôi đã gặp phải sự cố với mysql_install_db ": Lệnh không tìm thấy" khi cài đặt FreeBSD 7. I ran the rehash command and then entered mysql_install_db again and it worked fine. Tôi chạy lệnh rehash và sau đó đã nhập mysql_install_db một lần nữa và nó đã làm việc tốt.
August 2nd, 2008 07:21 02 Tháng tám 2008 07:21
On FreeBSD 7.0 you don't need to manually install the databases and set permissions, that is done in the startup script the first time it is run. Trên FreeBSD 7,0 bạn không cần phải tự cài đặt cơ sở dữ liệu và quyền thiết lập, đó là thực hiện trong các tập lệnh khởi động lần đầu tiên nó được chạy.
Just make sure you have Chỉ cần chắc chắn rằng bạn có
mysql_enable=”YES” mysql_enable = "YES"
in /etc/rc.conf before you run mysql-server. trong / rc.conf / etc trước khi bạn chạy mysql-server.
You could hence rewrite the install instructions to this: Do đó bạn có thể ghi lại các hướng dẫn để cài đặt này:
cd /usr/ports/databases/mysql50-server cd / usr/ports/databases/mysql50-server
make install clean thực hiện cài đặt sạch
echo 'mysql_enable=”YES”' >> /etc/rc.conf echo 'mysql_enable = "YES"'>> / etc / rc.conf
/usr/local/etc/rc.d/mysql-server start / usr / local / etc / rc.d / mysql-server bắt đầu
March 23rd, 2008 02:39 Ngày 23 tháng 3 năm 2008 02:39
the my-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf or my-innodb-heavy-4G.cnf are found in /usr/local/share/mysql/ việc của tôi huge.cnf, my-large.cnf, my-medim.cnf, my-my-small.cnf hoặc InnoDB-nặng-4G.cnf được tìm thấy trong / usr / local / share / mysql /
January 23rd, 2008 00:43 Ngày 23 Tháng Một 2008 00:43
Where can I find these files on a MySql 5.1 install on FreeBSD 6.2? Tôi có thể tìm những tập tin này trên một MySql 5,1 cài đặt trên FreeBSD 6,2?
my-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf or my-innodb-heavy-4G.cnf my-huge.cnf, my-large.cnf, my-medim.cnf, my-small.cnf hoặc của tôi-InnoDB-nặng-4G.cnf
January 11th, 2008 10:32 Ngày 11 tháng một năm 2008 10:32
great tutorial! hướng dẫn tuyệt vời! thanks! cảm ơn!
November 12th, 2007 16:33 Ngày 12 tháng 11 năm 2007 16:33
rehash is a command to 'refresh' the system. rehash là một lệnh để 'refresh' hệ thống. Did it work after rehash. Ý của nó làm việc sau khi rehash.
November 12th, 2007 13:32 Ngày 12 tháng 11 năm 2007 13:32
i ecountered the not found error while installing mysql, what should i do? i ecountered không tìm thấy lỗi trong khi cài đặt mysql, những gì tôi nên làm gì? and what is the command rehash actually is? và lệnh rehash là thực sự là những gì? thank you so much. cảm ơn bạn rất nhiều.
March 5th, 2007 21:25 Ngày 05 tháng 3 năm 2007 21:25
Oh; and thanks for the great article! Oh, và nhờ những bài viết tuyệt vời!
March 5th, 2007 21:24 Ngày 05 tháng 3 năm 2007 21:24
If you're getting “mysql_install_db: Command not found.” after punching in “mysql_install_db”, you should try to cd to /usr/local/bin/ and then run “mysql_install_db”. Nếu bạn nhận được "mysql_install_db: Command not found" sau khi đấm trong "mysql_install_db"., Bạn nên cố gắng để cd / usr / local / bin / và sau đó chạy "mysql_install_db".
Cheers. Chúc mừng.
January 27th, 2007 02:06 27 Tháng 1 2007 02:06
Hi, Chào,
I have installed freebsd 5.5 and now with your guideline instructions I have install mysql, php5 and apache2.2.But i do not know how to configure a website so I can test that if it works.Please help me with a link who can provide step by step instuctions or refer me some good basic book. Tôi đã cài đặt freebsd 5.5 và bây giờ với phương châm hướng dẫn của bạn tôi đã cài đặt mysql, php5 và i apache2.2.But không biết làm thế nào để cấu hình một trang web để tôi có thể thử nghiệm là nếu nó works.Please giúp tôi với một liên kết có thể cung cấp từng bước instuctions hoặc giới thiệu cho tôi một số cuốn sách tốt cơ bản.
Thanks. Cảm ơn.
September 12th, 2006 21:43 Ngày 12 Tháng Chín 2006 21:43
just delete chỉ cần xóa
August 19th, 2006 15:10 19 Tháng tám 2006 15:10
rc.conf contains rc.conf chứa
mysql_enable=”YES” mysql_enable = "YES"
apache22_enable=”YES” apache22_enable = "YES"
here is results from mysqladmin -user admin ở đây là kết quả từ mysqladmin-người dùng: admin
mysqladmin: connect to server at 'localhost' failed mysqladmin: kết nối với máy chủ tại 'localhost' thất bại
error: 'Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)' lỗi: 'Không thể kết nối với máy chủ MySQL địa phương thông qua socket' / tmp / mysql.sock '(2)'
Check that mysqld is running and that the socket: '/tmp/mysql.sock' exists! Kiểm tra xem mysqld đang chạy và rằng socket: '/ tmp / mysql.sock' tồn tại!
August 19th, 2006 11:25 19 Tháng tám 2006 11:25
Check if you can run mysqladmin or other mysql tools. Kiểm tra xem bạn có thể chạy mysqladmin mysql hoặc công cụ khác. Also make sure your “YES” in rc.conf is using proper “, as the ” in the article has been changed. Cũng đảm bảo "của bạn Có" trong rc.conf đang sử dụng đúng ", là" trong bài viết đã được thay đổi.
August 19th, 2006 10:45 19 Tháng tám 2006 10:45
Ive followed this guide but when i run “mysql-server.sh start” it returns starting mysql and does nothing else. Ive theo hướng dẫn này nhưng khi tôi chạy "mysql-server.sh bắt đầu" nó bắt đầu trả về mysql và hiện không có gì khác. i ran “mysql-server.sh status” and it returned “mysql is not running” i chạy "mysql-tình trạng server.sh" và nó trở lại "mysql không hoạt động"
mysql_enable=”YES” is in rc.conf but is not starting. mysql_enable = "Có" là trong rc.conf nhưng không được bắt đầu. any help? bất kỳ trợ giúp?
August 18th, 2006 00:57 18 Tháng tám 2006 00:57
The problem is that mysql (version 5.x) is not starting with mysql_enable=”YES” in /etc/rc.conf. Vấn đề là (mysql phiên bản 5.x) không được bắt đầu với mysql_enable = "YES" trong / etc / rc.conf.
Im using FreeBSD v6.1.x. Im sử dụng FreeBSD v6.1.x. I do not have the space problem between enable and the “=”. Tôi không có vấn đề không gian giữa kích hoạt và = "". The message I receive on bootup is “YES: notfound”. Các thông điệp mà tôi nhận được trên bootup là "YES: notfound".
Any suggestions welcome. Any suggestions welcome.
June 7th, 2006 13:14 07 Tháng Sáu Năm 2006 13:14
you're right changing it via phpmyadmin gave me the same result, so what i did was change some settings in the config.inc.php of phpmyadmin, change the auth_type = cookie and blowfish = mypassphrase and everything were fine. bạn phải thay đổi nó qua phpMyAdmin cho tôi cùng một kết quả, do đó, tôi đã làm những gì đã được thay đổi một số cài đặt trong config.inc.php của phpMyAdmin, thay đổi auth_type = cookie và blowfish = mypassphrase và tất cả mọi thứ đều tốt.
June 6th, 2006 16:56 06 Tháng Sáu Năm 2006 16:56
Did you flush privileges after changing the password? Bạn tuôn ra đặc quyền sau khi thay đổi mật khẩu? The problem may be due to hashing of MySQL password. Vấn đề có thể do băm của MySQL mật khẩu. May be you can try the following commands after resetting your root password if it cannot works: Có thể là bạn có thể thử các lệnh sau sau khi đặt lại mật khẩu chủ của bạn nếu nó không thể hoạt động:
mysql -u root mysql mysql-u root mysql
> UPDATE user SET password=password('secret') WHERE user='root'; > UPDATE user set password = mật khẩu bí mật ( '') WHERE user = 'root';
> flush privileges; > Flush privileges;
You may try phpmyadmin too, but I remembered I used to have exactly this same problem while phpMyAdmin didn't help much. Bạn có thể thử phpMyAdmin quá, nhưng tôi nhớ tôi sử dụng để có chính xác này cùng một vấn đề trong khi phpMyAdmin đã không giúp đỡ nhiều. Do let me know how you solve it. Làm cho tôi biết cách bạn giải quyết nó.
June 6th, 2006 14:32 06 Tháng Sáu Năm 2006 14:32
i've tried all the options mentioned but none of them worked, so i did a fresh install again, before creating a password for mysql root user, i logged in as root and it worked fine, i was able to get a mysql shell but when i issue the command mysqladmin to create a password for root, i got an error, i tried to log in as root and wtf i'm back with the same problem. Tôi đã thử tất cả các tùy chọn được đề cập nhưng không ai trong số họ làm việc, do đó, tôi đã làm một tươi cài đặt một lần nữa, trước khi tạo một mật khẩu cho người dùng root mysql, tôi đã đăng nhập bằng root và nó đã làm việc tốt, tôi đã có thể có được một vỏ mysql nhưng khi tôi về vấn đề này mysqladmin lệnh để tạo ra một mật khẩu cho root, tôi đã nhận lỗi, tôi đã cố gắng để đăng nhập bằng root và wtf tôi là trở lại với cùng một vấn đề. do u think i would be better off if i install phpmyadmin and change the root password from there? u nào nghĩ rằng tôi sẽ được giảm giá tốt hơn nếu tôi cài đặt phpMyAdmin và đổi password của root từ đó?
June 6th, 2006 11:49 06 Tháng Sáu Năm 2006 11:49
jan, may be you have set the password for root. Tháng một, có thể bạn đã đặt mật khẩu cho root. Try to access mysql with -u userid and -p password option. Thử truy cập vào mysql với user-u-p và mật khẩu tùy chọn. Or you can follow instruction Hoặc bạn có thể làm theo chỉ dẫn here ở đây on how to change and reset your root password. làm thế nào để thay đổi và đặt lại mật khẩu chủ của bạn.
June 6th, 2006 11:08 06 Tháng Sáu Năm 2006 11:08
i'm stucked with the mysql part of your howto, after issuing # mysqladmin -u root password newpassword, i issued # mysql -u root -p newpassword, i always get the access denied error. I'm stucked với một phần của howto mysql của bạn, sau khi phát hành mysqladmin #-mật khẩu chủ u Newpassword, i ban hành # mysql-u root Newpassword p-, tôi luôn nhận được quyền truy cập bị từ chối lỗi. what did i miss? những gì đã làm tôi bỏ qua?
thanks cảm ơn
May 21st, 2006 14:07 Ngày 21 tháng năm 2006 14:07
Thanks for pointing out, will update. Cảm ơn bạn đã chỉ ra, sẽ cập nhật.
May 21st, 2006 13:12 Ngày 21 tháng năm 2006 13:12
mysql_enable = mysql_enable =