1、在VMware虚拟机软件中,安装RadHat Linux 企业版 操作系统(as4.0以上版本)
2、在linux虚拟机中安装apache、mysql、php程序
答案:
操作系统:centos 4.3
软件列表:httpd-2.2.4.tar.gz, mysql-5.0.18.tar.gz, php-5.2.1.tar.gz
一.linux下安装mysql
小弟最近搞mysql源码安装,安装过程如下:
安装步骤:
1.groupadd mysql
2.useradd -g mysql mysql
3.tar zxvf myql-5.0.18.tar.gz
4.cd mysql-5.0.18.tar.gz
5../configure= prefix=/usr/local/mysql
6.make
7.make install
8.cp support-files/my-medium.cnf /etc/my.cnf
9.cd /usr/local/mysql
10.bin/mysql_install_db –user=mysql
11.chown -R root .
12.chown -R mysql var
13.chgrp -R mysql .
14.bin/mysqld-safe –user=mysql &
检查日志:more var/localhost.err:
070129 15:05:58 mysqld started
070129 15:05:58 InnoDB: Started; log sequence number 0 43655
070129 15:05:58 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: ‘5.0.18-log’ socket: ‘/tmp/mysql.sock’ port: 3306 Source distribution
查看进程:ps -aux
root 17286 0.0 0.4 5144 1096 pts/2 S 15:05 0:00 /bin/sh bin/mysqld_safe –user=mysql
mysql 17310 0.0 6.0 125272 15104 pts/2 Sl 15:05 0:00 /usr/local/myql/libexec/mysqld –basedir=/usr/local/myql –datadir=/u
root 17546 0.0 0.8 9280 2200 ? SNs 15:20 0:00 cupsd
root 17612 0.0 0.3 3876 748 pts/2 R+ 15:21 0:00 ps -aux
关闭mysql:
bin/mysqladmin shutdown
STOPPING server from pid file /usr/local/myql/var/localhost.pid
070129 15:22:28 mysqld ended
[1]+ Done bin/mysqld_safe –user=mysql
[root@localhost myql]# mysql
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 2 to server version: 5.0.18-log
Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the buffer.
如果不行的话killall mysqld,在重新启动就OK了
二.linux下安装apache
1.tar -zxvf httpd-2.2.4.tar.gz
2.cd httpd-2.2.4
3. ./configure –prefix=/www –enable-so
4.make clean
5.make
6.make install
三.linux下安装php
1.tar -zxvf php-5.2.1.tar.gz
2.cd php-5.2.1
3. ./configure –prefix=/usr/local/php –with-mysql=/usr/local/mysql –with-apxs2=/www/bin/apxs
4.make clean
5.make
6.make install
apache中加载php模块
7 Setup your php.ini
cp php.ini-dist /usr/local/lib/php.ini
8.. Edit your httpd.conf to load the PHP module.
For PHP 4:
LoadModule php4_module modules/libphp4.so
For PHP 5:
LoadModule php5_module modules/libphp5.so
9. Tell Apache to parse certain extensions as PHP.
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps(T002)
3、明白LDAP含义,可以在linux系统中安装ldap服务
LDAP是轻量目录访问协议,英文全称是Lightweight Directory Access Protocol,一般都简称为LDAP。它是基于X.500标准的,但是简单多了并且可以根据需要定制。与X.500不同,LDAP支持TCP/IP,这对访问Internet是必须的。
berkeley-DB的源代码(http://www.sleepycat.com/) ,我的是4.1.25,openldap需要这东西,这个不好配置,所以我就把它装到/usr下去了。
# tar zxvf db-4.1.25.tar.gz
# cd db-4.1.25
# cd dist
# ./configure –prefix=/usr
# make
# make install
然后就可以开始安装openldap了,我用的是2.1.22,原码是从http://www.openldap.org/上下载的。
# tar zxvf openldap-2.1.22.tgz
# cd openldap-2.1.22
# ./configure –prefix=/usr/local/openldap
# make depend
# make
# make test
# make install
安装完以后到/usr/local/openldap/libexec目录下用./slapd启动服务
如果在客户端访问出错,则可能是防火墙的问题。要开启防火墙,或者开启389端口
临时关闭防火墙:
service iptables start
service iptables stop
设置IP:
ifconfig eth0 down
ifconfig eth0 ip netmask 255.255.255.0 up
linux访问windows共享文件夹
smbclient //ip/共享文件夹名 -U windows系统用户名
再输入密码
4、架设linux下的LVS服务,实现两台web服务器的负载均衡。
5、windows下架设AD域服务器。