- VND
- -15Đ
sếp nào rảnh viết 1 bài hướng dẫn cài lib cho sv tlbb offline cho các mem tham khảo với
nhiều lúc chạy sv mà kêu thiếu lib không biết nên cài lib nào nữa
@@
nhiều lúc chạy sv mà kêu thiếu lib không biết nên cài lib nào nữa
@@
sao toàn thấy hướng dẫn centos nhỉBước 1 : Cài đặt MySQL Server
Lệnh cài mysql:
yum install mysql*server mysql
-u root -p
GRANT ALL ON *.* TO root@'%' IDENTIFIED BY '123456';
Tiếp theo sau khi cài đặt Mysql hoàn tất ta dùng đến các lệnh tiếp theo như bên dưới !
ufw disable
chkconfig iptables off : không cho dịch vụ iptables (IPv4) khởi động cùng hệ thống
chkconfig ip6tables off :không cho dịch vụ iptables (IPv6) khởi động cùng hệ thống
Bước 2 : Sau khi cài đặt hoàn tất vào thư mục Mysql, sửa file tên my.cnf như bên dưới !
[mysqld]
datadir=/var/lib/mysql
pid*file = /var/run/mysqld/mysqld.pid
socket = /var/lib/mysql/mysql.sock
user = mysql
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
#bind*address = 127.0.0.1
key_buffer = 500M
table_cache = 4000
sort_buffer_size = 3M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
max_connections = 400
query_cache_type = 1
query_cache_limit = 5M
query_cache_size = 500M
tmp_table_size=20M
max_heap_table_size=20M
thread_cache_size = 64
# Example driver definitions
# Driver from the postgresql-odbc package
# Setup from the unixODBC package
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/psqlodbc.so
Setup = /usr/lib/libodbcpsqlS.so
Driver64 = /usr/lib64/psqlodbc.so
Setup64 = /usr/lib64/libodbcpsqlS.so
FileUsage = 1
# Driver from the mysql-connector-odbc package
# Setup from the unixODBC package
[MySQL]
Description = ODBC for MySQL
Driver = /usr/lib/libmyodbc5.so
Setup = /usr/lib/libodbcmyS.so
Driver64 = /usr/lib64/libmyodbc5.so
Setup64 = /usr/lib64/libodbcmyS.so
FileUsage = 1
Sau đó nhập lệnh
sudo service mysqld restart
Bước 3 : Cài đặt để chạy được server :
-----------------------------------
[ Lưu ý phần này quan trọng nhé !]
Centos:
yum install unixODBC unixODBC*devel libtool*ltdl libtool*ltdl*devel
yum install mysql*connector*odbc
-----------------------------------
Đổi tên thư viện libodbc
ln -s /usr/lib/libodbc.so.2.0.0 /usr/lib/libodbc.so.1
yum install -y mysql-server mysql mysql-devel.i686 httpd php php-bcmath php-soap
Bước 4 : Bước cuối cùng tìm đến file odbc.ini sửa như bên dưới !
[tlbb]
Description = ServerTLBB Database
Driver = /usr/lib/libmyodbc5.so
Server = 192.168.1.3
Database = tlbb
Port = 3306
Option = 3
User = root
Password = 123456
Socket = /var/lib/mysql/mysql.sock
]
lệnh cài lib đó còn đòi hỏi haizzzsao toàn thấy hướng dẫn centos nhỉ
mà lib của tlbb đâu phải chỉ cài mỗi mấy cái này
cài ubuntu thì thay YUM bằng apt-get install đúng ko lão yêulệnh cài lib đó còn đòi hỏi haizzz
Ubuntu là sudo (nano) còn Centos thì Yumcài ubuntu thì thay YUM bằng apt-get install đúng ko lão yêu