Chinaunix首页 | 论坛 | 博客
  • 博客访问: 376295
  • 博文数量: 32
  • 博客积分: 8046
  • 博客等级: 中将
  • 技术积分: 1665
  • 用 户 组: 普通用户
  • 注册时间: 2005-12-01 22:18
文章分类
文章存档

2011年(4)

2010年(13)

2009年(13)

2008年(2)

我的朋友

分类: 系统运维

2009-09-01 13:55:58

1. Install Mysql
#groupadd mysql
#adduser mysql -g mysql -s /nologin
#cd mysql-VERSION/
#./configure --prefix=/usr/local/mysql
#make && make install
#scripts/mysql_install_db
#chown -R root:mysql /usr/local/mysql
#chown -R mysql /usr/local/mysql/var
#/usr/local/mysql/bin/mysqld_safe --user=mysql
#mysql -uroot
>use mysql;
>update user set password=password('XXX') where user='root';
>flush priviledges;

2. Install Apache
#cd apache-VERSION/
#./configure --prefix=/usr/local/apache2 --enable-module=so --enable-ssl --enable-rewrite
#make && make install
==>configure httpd.conf
# vi /usr/local/apache2/conf/httpd.conf
enable ssl in httpd.conf file

3. Generate keys use Openssl
3.1 Generate rootCA private key
#openssl genrsa -des3 -out ca.key 1024

3.1.1 Generate rootCA certificate
#openssl req -new -x509 -days 365 -key ca.key -out ca.crt

3.1.2 Generate PKCS12 certificate (which can be installed in the browsers)
#openssl pkcs12 -export -in ca.crt -inkey ca.key -out ca.pfx

3.2 Generate server keys and certificate by rootCA
#openssl genrsa -des3 -out server.key
#openssl req -new -key server.key -out server.csr
#openssl x509 -req -in server.csr -out server.crt -CA ca.crt -CAkey ca.key -CAcreateserial -days 365

3.3 Generate client keys and certificate by rootCA (for mutual certifate)
#openssl req -new > client.csr
#openssl x509 -req -in client.csr -out client.crt -signkey ca.key -CA ca.crt -CAkey ca.key -CAcreateserial -days 365
#openssl pkcs12 -export -in client.crt -inkey ca.key -out client.pfx

4. Install Berkeley DB (for OpenLDAP)
#cd db_VERSION
#cd build_unix
#../dist/configure --prefix=/usr/local/bdb
#make && make install
add /usr/local/bdb/lib into /etc/ld.so.conf
#/sbin/ldconfig

5. Install OpenLDAP
#cd openldap-VERSION
#./configure --prefix=/usr/local/openldap --with-wrappers
#make depend && make &&make test && make install

6. Install PHP
#cd php-VERSION
#./configure --with-mysql=/usr/local/mysql --with-gettext --with-ldap=/usr/local/openldap --with-apxs2=/usr/local/apache2/bin/apxs --with-openssl=/usr/local/openssl
#make && make install
#cp ./php.ini-dist /usr/local/lib/php.ini
#vi /usr/local/lib/php.ini
register_globals=on
magic_quotes_gps=on
#vi /usr/local/apache2/conf/httpd.conf
AddType application /x-httpd-php .php
#/usr/local/apache2/bin/apachectl restart

阅读(546) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~