首页 »Unix/FreeBsd » phpmyadminmysql:用ports安裝apache13_modssl+mysql+php+phpmyadmin »正文
phpmyadminmysql:用ports安裝apache13_modssl+mysql+php+phpmyadmin
来源: 发布时间:星期一, 2009年1月12日 浏览:13次 评论:0
# cd /usr/ports/databases/mysql41-server # make\ WITH_CHARSET=big5\ //支援繁體中文(簡體中文是gbk)及以繁體中文為預設編碼 WITH_XCHARSET=all\ //支援其它編碼 WITH_OPENSSL=yes\ //使用安全連接 DB_DIR=/usr/local/mysql\ //指定數據庫位置 WITH_LINUXTHREADS=yes\ //使用linux線程 SKIP_DNS_CHECK=yes\ //安裝mysql時略過檢查主機名對應ip BUILD_OPTIMIZED=yes //編釋參數提高效能, 加快速度 clean更加快編釋要加BUILD_STATIC=yes 但不能同時使用openssl, 同時編釋會出現以下錯誤信息 You can't use the BUILD_STATIC option when using OpenSSL. 對於各個選項, 詳細請看/usr/ports/databases/mysql41-server裏Makefile ...... For more information, and contact details about the security status of this software, see the following webpage: http://www.mysql.com/ => Cleaning for mysql-client-4.1.1 => Cleaning for p5-DBD-mysql41-2.9003 => Cleaning for p5-DBI-137-1.37 => Cleaning for libtool-1.3.5_1 => Cleaning for linuxthreads-2.2.3_13 => Cleaning for openssl-0.9.7c => Cleaning for mysql-server-4.1.1 # 至此 mysql-server 和 mysql-client 已經安裝完成 1.2 設置mysql 在 /usr/local/share/mysql 在這個目錄裏共有 4個 .cnf範例檔案, (my-small.cnf, my-medium.cnf, my-large.cnf, my-huge.cnf), 根據系統記憶體(內存)數量和服務而設定my.cnf. 在每個範例檔案裏都有說明. my-small.cnf //記憶體少於或等於64M只提供很少數據庫服務 (< =64M) my-medium.cnf //記憶體在32M到64M的間而且和其他服務起使用如web my-large.cnf //記憶體有512M主要是提供數據庫服務 my-huge.cnf //記憶體有1G到2G主要是提供數據庫服務 我们查看下机器内存: # dmesg | grep real real memory = 132825088 (129712K s) 本機只有128M 記憶體及只是供web使用, 所是用my-medium.cnf 這個範例檔 # cp /usr/local/share/mysql/my-medium.cnf /etc/my.cnf # ls -l /usr/local ... drwx------ 4 mysql mysql 512 Feb 21 20:57 mysql ... mysql已經是屬於mysql 用戶和群組. 1.3 啓動mysql 利用启动脚本去启动mysql #/usr/local/etc/rc.d/mysql-server.sh start # ps -aux | grep mysql mysql 53989 0.0 13.3 66404 16868 p0 IN 10:17PM 0:00.62 /usr/local/libexec/mysql mysql 53990 0.0 13.3 66404 16868 p0 SN 10:17PM 0:00.00 /usr/local/libexec/mysql mysql 53991 0.0 13.3 66404 16868 p0 IN 10:17PM 0:00.00 /usr/local/libexec/mysql 1.4 更改mysql 密碼 #/usr/local/bin/mysqladmin -u root -p password 'mysql_password' Enter password: //按enter, mysql預設沒有密碼 2. 安裝及設置apache13-modssl 2.1 安装Apache-modssl #cd /usr/ports/www/apache13-modssl/ # make . . . <= src => Creating Dummy Certicate for Server (SnakeOil) [use 'make certicate' to create a real _disibledevent=13526
相关文章
读者评论
发表评论
|
|