BMS-HOSxP Community
HOSxP => MySQL => ข้อความที่เริ่มโดย: ismailsa ที่ มิถุนายน 29, 2009, 10:15:07 AM
-
ผมติดตั้ง freebsd7 เรียบร้องแล้ว ตอนติดตั้งเลือก package Distribuiton ดังนี้ครับ
- developer
- kern-developer
- user
- custom เลือก package เพิ่มดังนี้ -base -kernal -dist -doc -man -src -port
หลังจากที่โหลด mysql5.1.34 เป็นที่เรียบร้อยแล้ว
ใช้คำสั่ง แตกไฟล์ gzip -cd mysql5.1.34.tar.gz
cd Folder myql5.1.34 แล้วใช้คำสั่ง ./configure --with-charset=tis620 --with-xcharset=all --with-collation=tis620_thai_ci
เตรียมไฟล์ เพื่อ compile แต่โปรแกรมบอกว่า
./configure not command แต่เวลาเข้าไปดูใน Folder myql5.1.34 ที่แตกมาก้อไม่มีไฟล์ configure
หรือต้องทำวิธีไหนครับ ผู้รู้ช่วยแนะด้วยนะครับ
-
ก่อนจะใช้ mysql-5.1.34 ลองดูปัญหาที่จะเกิดตามมาก่อนครับ
สำหรับที่แนะนำกันให้ใช้ mysql-5.1.30 ครับ
ผมกำหนด hdd slide ดังนี้ครับ
/ 2G
swap 2G
/tmp 2G
/var 4G
/usr ที่เหลือ
# adduser mysql
# cd /tmp สมมติว่า เอาไฟล์ mysql-5.1.34.tar.gz ไว้ที่ /tmp นะครับ
# gzip -cd mysql-5.1.34.tar.gz | tar xvf –
# cd mysql-5.1.34
# ./configure --with-charset=tis620 --with-extra-charsets=all --with-collation=tis620_thai_ci \
--with-plugins=archive,federated,innobase,myisam
# make WITH_CHARSET=tis620 WITH_EXTRA_CHARSETS=all WITH_COLLATION=tis620_thai_ci \
BUILD_OPTIMIZED=yes WITH_ARCHIVE=yes WITH_FEDERATED=yes WITH_NDB=yes install clean
# cp /usr/local/share/mysql/my-huge.cnf /etc/my.cnf --------> RAM 1-2G
# cp /usr/local/share/mysql/my-innodb-heavy-4G.cnf /etc/my.cnf --------> RAM 4G
ขั้นตอนกำหนด my.cnf ก็ copy จากข้างนอกที่ได้มาไปไว้ใน /etc ก็ง่ายดีครับ
# chown root:sys /etc/my.cnf
# chmod 644 /etc/my.cnf
# rehash
# pico /etc/my.cnf ใช้ editor ที่ถนัดครับ หรือถ้า copy มาแล้วก็ไม่ต้องแก้ไขครับ
# /usr/local/bin/mysql_install_db
ดูผลครับ ถ้าขึ้นประมาณนี้ ก็ OK
-----------------------------------------------------
Installing MySQL system tables...
OK
Filling help tables...
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/local/bin/mysqladmin -u root password 'new-password'
/usr/local/bin/mysqladmin -u root -h hostname password 'new-password'
/usr/local/bin/mysqladmin -u root -h IP-host password 'new-password'
Alternatively you can run:
/usr/local/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr/local ; /usr/local/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/mysql-test ; perl mysql-test-run.pl
Please report any problems with the /usr/local/bin/mysqlbug script!
The latest information about MySQL is available at http://www.mysql.com/
Support MySQL by buying support/licenses from http://shop.mysql.com/
-----------------------------------------------------
# chown -R mysql:mysql /usr/local/var
# echo ‘/usr/local/share/mysql/mysql.server start’ >> /etc/rc.local ---> กำหนดให้ mysql start ตอน boot
# /usr/local/share/mysql/mysql.server start
Start MySQL ............SUCCESS!
ทดลองดูครับ โชคดีครับ ;D
-
ผมมีไฟล์ที่เคยทดลองหลายครั้ง และทำจริง ๆ ด้วยหลายครั้ง
คงเป็นแนวทางสำหรับการติดตั้งได้บ้าง
ปัจจุบันผมก็ใช้อยู่ ;D
มีรายละเอียดเกี่ยวกับ
- Update port tree
- Build World with new Kernel
- การติดตั้ง Perl
- การติดตั้ง OpenSSL
- การติดตั้ง Apache
- การติดตั้ง MySQL
- การติดตั้ง PHP
- ไม่มีรูปการติดตั้ง FreeBSD ;D ;D
คำพูดอาจจะมีติงต๊องบ้าง เนื่องจากทดลองหลาย ๆครั้ง แล้วเอาออกไม่หมดก็ขออภัยด้วย ;D
-
ขอบคุณครับ กำลังจะทำ freebsb เป็น web พอดี คงขอคำปรึกษา ด้วยนะครับ ทอสอบหลายที่แล้ว ยังติดๆขัดอยู่ :D
-
ขอบคุณครับ แต่รู้สึกจะโหลด ไม่ได้ แหะ ;D :D ;D
-
เดี่ยวส่ง ทาง M ครับ ท่านกิจ
-
ขอบคุณครับ
-
ขอบคุณครับ แต่รู้สึกจะโหลด ไม่ได้ แหะ ;D :D ;D
ผมโหลดได้อยู่นะครับ อ.กิจ ;D ;D ;D
-
แนะนำ FreeBSD 7.2 และ mysql 5.1.37 source