# useradd -g mysql mysql
# cd /usr/local
# gunzip < ~/server/mysql-standard-4.0.20-pc-Linux-i686.tar.gz | tar xvf -
# ln -s mysql-standard-4.0.20-pc-Linux-i686 mysql
# cd mysql
# scripts/mysql_install_db --user=mysql
# chown -R root .
# chown -R mysql data
# chgrp -R mysql .
# bin/mysqld_safe --user=mysql &
# ./mysqladmin -u root password ‘password’ #使用mysqladmin修
改root的口令为 'password’
系统启动时自动运行:
# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
# chkconfig --add mysqld
用ntsysv设置使mysql每次启动都能自动运行。
至此mysql安装完毕,你可以这样起动你的mysql服务
# /etc/rc.d/init.d/mysqld start
2、安装openssl
cd ~/server
# tar -zxvf openssl-0.9.7d.tar.gz
# cd openssl-0.9.7d
# ./configure --prefix=/usr/local/openssl #设置安装路径
# make
# make install
3、配置Apache
# cd /usr/local/
# tar -zxvf ~sea/server/httpd-2.0.50.tar.gz
# ./configure --enable-so --enable-ssl --with-ssl=/usr/local/openssl --enable-rewrite
# make
# make install
生成 Apache 启动文件
# cd /etc/rc.d/init.d
# sed 's/sbin/atd/local/servers/apache/bin/httpd/g' atd > httpd
# sed 's/atd/httpd/g' httpd > /tmp/txt
# sed 's/at daemon/httpd daemon/g' /tmp/txt > httpd
# rm /tmp/txt
# chmod 755 httpd
# chkconfig --level 345 httpd on
# chkconfig --level 0126 httpd off
启动并测试Apache服务器
# /etc/rc.d/init.d/httpd start
如果出现:
Starting httpd daemon: [ OK ]
则证明 httpd 已经正确的安装并已经在后台运行,如果出现其它的提示,请检查您的安装步骤是否正确。
输入或,可以看到apache的欢迎页面。