在FreeBSD4.9上用ports安裝apache13_modssl+mysq…
2009-05-13 12:57:36来源:未知 阅读 ()
一. 安裝及設置mysql
1.1 安装mysql
# 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 //編釋參數提高效能, 加快速度
install 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 在這個目錄裏共有四個 .cnf的範例檔案, (my-small.cnf, my-medium.cnf, my-large.cnf, my-huge.cnf), 根據系統記憶體(內存)的數量和服務而設定my.cnf. 在每個範例檔案裏都有說明.
my-small.cnf //記憶體少於或等於64M只提供很少的數據庫服務 (# dmesg | grep real
real memory = 132825088 (129712K bytes) 本機只有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/mysql1.4 更改mysql 密碼
#/usr/local/bin/mysqladmin -u root -p password 'mysql_password'
Enter password: //按enter, mysql預設沒有密碼二. 安裝及設置apache13-modssl
2.1 安装Apache-modssl
#cd /usr/ports/www/apache13-modssl/
# make
. . .
Creating Dummy Certificate for Server (SnakeOil)
[use 'make certificate' to create a real one]
#make install
# make certificate //製作CA認證
===> Creating Test Certificate for Server
SSL Certificate Generation Utility (mkcert.sh)
Copyright (c) 1998-2000 Ralf S. Engelschall, All Rights Reserved.
Generating test certificate signed by Snake Oil CA [TEST]
WARNING: Do not use this for real-life/production systems
______________________________________________________________________
STEP 0: Decide the signature algorithm used for certificate
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- FreeBSD下nginx+fast-cgi+mysql+zend的实现 2009-05-13
- FAMP5.0推出,网页式管理服务器,一键安装Apache+Nginx+Mysql+ 2009-05-13
- mysql 迁移备份 2009-05-13
- Multipath support in the device mapper 2009-05-13
- 利用mytop在shell下监视mysql数据库 2009-05-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash