apache+mysql5.0

安装apache
[[email protected] ctyun]# tar zxf httpd-2.2.17.tar.gz
[[email protected] ctyun]# cd httpd-2.2.17
[[email protected] httpd-2.2.17]# ./configure --prefix=/application/apache2.2.17 --enable-deflate --enable-expires --enable-headers --enable-modules=most --enable-so --with-mpm=worker --enable-rewrite
[[email protected] httpd-2.2.17]# make && make install
[[email protected] httpd-2.2.17]# ln -s /application/apache2.2.17/ /application/apache
[[email protected] httpd-2.2.17]#  groupadd apache
[[email protected] httpd-2.2.17]#  useradd -s /sbin/nologin -g apache -M apache
[[email protected] httpd-2.2.17]# cd /application/apache/conf/
[[email protected] conf]# cp httpd.conf httpd.conf.ori
[[email protected] conf]# cp extra/httpd-vhosts.conf extra/httpd-vhosts.conf.ori
[[email protected] conf]# vi httpd.conf
修改用户
User apache
Group apache
更改监听端口
#Listen 12.34.56.78:80
Listen 81
优化启动提示
#ServerName www.example.com:80
ServerName 127.0.0.1:80
开启扩展配置文件
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
给目录添加权限    #指定 网站根目录这是针对三个站点网站赋权限!这就不再需要修改站点目录,一次性 全做出来
<Directory /data/www>
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Allow from all
</Directory>

修改扩展配置文件

[[email protected] conf]#  vi extra/httpd-vhosts.conf
NameVirtualHost *:81

<VirtualHost *:81>
    ServerAdmin [email protected]
    DocumentRoot "/data/www/www"
    ServerName  123123123.com
    ErrorLog "logs/www-error_log"
    CustomLog "logs/www-access_log" common
</VirtualHost>

<VirtualHost *:81>
    ServerAdmin [email protected]
    DocumentRoot "/data/www/bbs"
    ServerName  123123123.com
    ErrorLog "logs/bbs-error_log"
    CustomLog "logs/bbs-access_log" common
</VirtualHost>

[[email protected] conf]# mkdir /data/www/{www,bbs,blog} -p
[[email protected] conf]# echo "http://blog.etiantian.org" >/data/www/blog/index.html
[[email protected] conf]# echo "http://bbs.etiantian.org" >/data/www/bbs/index.html
检查语法
[[email protected] conf]# /application/apache/bin/apachectl -t
Syntax OK
启动apache
[[email protected] conf]# /application/apache/bin/apachectl start
查看端口
[[email protected] conf]# netstat -lntp |grep 81
tcp        0      0 :::81                       :::*                        LISTEN      2733/httpd

安装mysql
[[email protected] bin]# groupadd mysql
[[email protected] bin]# useradd -g mysql mysql
[[email protected] ctyun]# tar zxf mysql-5.0.40.tar.gz
[[email protected] ctyun]# cd mysql-5.0.40
[[email protected] mysql-5.0.40]#  ./configure --prefix=/application/mysql-5.0.40 --sysconfdir=/etc --localstatedir=/var/lib/mysql --with--charset=gbk --enable-thread-safe-client --with-extra-charsets="gbk gb2312 big5 utf8"
[[email protected] mysql-5.0.40]# make && make install
初始化

[[email protected] bin]# /application/mysql/bin/mysql_install_db
[[email protected] bin]# chmod 777 /var/lib/mysql
[[email protected] support-files]# cd /ctyun/mysql-5.0.40/support-files/
[[email protected] support-files]#  cp mysql.server /etc/init.d/mysqld
[[email protected] support-files]# chmod +x /etc/init.d/mysqld
[[email protected] support-files]# /etc/init.d/mysqld start
Starting MySQL                                             [  OK  ]

[[email protected] support-files]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.0.40 Source distribution

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

mysql> quit
Bye

安装PHP

报错
(一)configure: error: libpng.(a|so) not found.

[[email protected] php-5.2.17]# cp -frp /usr/lib64/libpng* /usr/lib/

(二)

[[email protected] php-5.2.17]# yum install libjpeg libpng -y

开始安装
[[email protected] ctyun]# tar zxf php-5.2.17.tar.gz
[[email protected] ctyun]# cd php-5.2.17
[[email protected] php-5.2.17]# ./configure --prefix=/application/php-5.2.17 --with-apxs2=/application/apache/bin/apxs --with-mysql=/application/mysql --with-xmlrpc --with-openssl --with-zlib --with-freetype-dir --with-gd --with-png-dir --with-iconv=/usr/local/libiconv --enable-short-tags --enable-sockets --enable-zend-multibyte --enable-soap --enable-mbstring --enable-static --enable-gd-native-ttf --with-curl --with-xsl --enable-ftp --with-libxml-dir --with-iconv

[[email protected] php-5.2.17]# make && make install
[[email protected] php-5.2.17]# ln -s /application/php-5.2.17/ /application/php
[[email protected] php-5.2.17]# /bin/cp php.ini-recommended /application/php/lib/php.ini

mysql> create database username;
mysql> grant all privileges on *.* to [email protected] identified by ‘password‘;

时间: 2024-10-09 07:03:18

apache+mysql5.0的相关文章

linux+php5.1.6+mysql5.0.2+apache2.0.55安装配置说明(转)

linux+php5.1.6+mysql5.0.2+apache2.0.55安装配置说明:一.mysql5.0.2的安装配置过程及说明:1. #tar -zvxf mysql-5.0.2-alpha.tar.gz2. cd mysql5.0.23. ./configure --prefix=/usr/local/mysql --sysconfdir=/etc --localstatedir=/var/lib/mysql --with-charset=gbk  #--prefix=/usr/loc

烂泥:mysql5.0数据库源码编译安装

本文首发于烂泥行天下. 本次实验的mysql.OS相关信息如下: Mysql:5.0.96 OS:centos 32 bit 最近公司要上新的业务,指明数据库使用的是mysql5.0版本.如果是使用rpm包安装的话,那就很简单了.直接使用yum安装即可,命令如下: yum –y install mysql mysql-server Yum方式安装完毕后,直接启动mysql数据库服务即可.如下图: 这样基本上就可以了. 但是这样安装mysql数据库,没有进行定制.比如mysql数据库的数据文件存储

一、Ubuntu下编译安装Mysql5.0.45

一.编译安装Mysql5.0.45 在Ubuntu下搭建LNMP环境.编译安装mysql,nginx,php.最后在LNMP前提下安装composer,并且安装laravel框架.首先,第一步开始编译安装Mysql. 步骤: cd /usr/local/src,进入到文件夹中,这个文件夹用来保存所需使用的软件安装包. 接着键入"sudo wgethttp://downloads.mysql.com/archives/mysql-5.0/mysql-5.0.45.tar.gz"回车,如果

how to build apache log4cxx 0.10 by Visual Studio 201*

Chapter 1 Official Steps  We are going to follow the steps here, http://logging.apache.org/log4cxx/building/vstudio.html. However, we must make changes to adapt to Visual Studio 201*. 1. download later version of log4cxx which is apache log4cxx 0.10 

开源的许可证GPL、LGPL、BSD、Apache 2.0的通俗解释

你对开源有多少了解呢?如果你是软件开发者,要开源软件,不单单是开放源代码就可以了,选择一种许可证很重要,一个许可证之于软件就相当于价值观之于普通人,代表了这个软件的基本品性.一个错误的许可证选择可能会直接导致整个项目的失 败,XFree86就是一个好例子. 各种开源的许可证主要的限制还是在redistribution(发布),所以个人/商业公司开发的软件包含了GPL的代码,只要你不发布,是可以任意使用的.下面是几个开源许可证的区别: GPL这里不想再解释长篇的GPL译文和更长的FAQ. 简单说,

MySQL5.0版本的安装图解教程

MySQL5.0版本的安装图解教程是给新手学习的,当前mysql5.0.96是最新的稳定版本. mysql 下载地址 http://www.jb51.net/softs/2193.html 下面的是MySQL安装的图解,用的可执行文件安装的,详细说明了一下!打开下载的mysql安装文件mysql-5.0.27-win32.zip,双击解压缩,运行“setup.exe”,出现如下界面 mysql安装图文教程1 mysql安装向导启动,按“Next”继续 mysql图文安装教程2 选择安装类型,有“

Windows+Atlassian-Jira-6.0.4+MySql5.0安装破解汉化

 Windows+Atlassian-Jira-6.0.4+MySql5.0安装破解汉化 一:整理的安装程序 例如以下图: 文件太大.上传不到csdn上.有须要的联系. 新增的百度云盘下载:链接: http://pan.baidu.com/s/1nSbPs password: 388v. 认为实用的.留下个足迹.也是对我的一种鼓舞   :) 二:MySql安装 MySql5.0安装图解 三:Jira安装破解 Jira安装破解汉化 四:补充 自己最后的LICENSE 文件: Descripti

Ascii逐字解码法注入,mysql5.0一下版本手工注入

/*By:珍惜少年时*/ 逐字解码法,不一定非要猜字段内容.库名,表名,字段,data,都能猜.环境过滤了union(mysql5.0以下的版本就不支持union所以也可以用此方法),你可以用这方法.exists只是其中一种,还有别的方法也能猜. 注入思路: 先把表跟字段猜解出来,猜解出来了.这个算是一个半猜解查询吧 00x1判断表是否存在 and exists (select * from admin) //猜解是否含有admin这个表 00x2判断字段是否存在 and exists (sel

linux小白 mysql5.0源码安装配置

安装mysql-5.0.45.tar.gz(该软件包下载地址:http://www.filewatcher.com/m/mysql-5.0.45.tar.gz.24433261-0.html) # groupadd mysql              #添加mysql组 # useradd -g mysql mysql      #添加mysql用户,且加入mysql组 --------------------编译过程---------------------------------- # t