1.0 mysql安装
阿铭linux资源下载地址:r.aminglinux.com
Myslq 5.1 免编译包
第一步 :源码包安装到 /usr/local/src/
cd /usr/local/src/ yum install -y wget
32位 试验机32位
wget http://mirrors.sohu.com/mysql/MySQL-5.1/mysql-5.1.73-linux-i686-glibc23.tar.gz
64位
Wget http://mirrors.sohu.com/mysql/MySQL-5.1/mysql-5.1.73-linux-x86_64-glibc23.tar.gz
下载完成
解压:tar zxvf mysql-5.1.73-linux-i686-glibc23.tar.gz
第二步 : 创建mysql用户
useradd -s /sbin/nologin -M mysql
移动重命名
mv mysql-5.1.73-linux-i686-glibc23 /usr/local/mysql
第三步 :创建文件目录,修改权限
cd /usr/local/mysql
mkdir -p /data/mysql ; chown -R mysql:mysql /data/mysql
初始化 : mysql
简介:mysql_install_db 脚本的目的是生成新的MySQL授权表。它不覆盖已有的MySQL授权表,并且它不影响任何其它数据。
./scripts/mysql_install_db --user=mysql --datadir=/data/mysql
./scripts/mysql_install_db 目录 --user=mysql 指定用户 --datadir=/data/mysql 指定/datadir
第四步 :拷贝修改文件
cd support-files/
cp my-medium.cnf /etc/my.cnf
cp mysql.server /etc/init.d/mysqld
[图片]
vi /etc/init.d/msqld
编辑:
basedir=/usr/local/mysql
datadir=/data/mysql
第五步 :添加服务,开启服务,开启start。
chkcofig --add mysqld chkconfig mysqld on /etc/init.d/mysqld start
[图片]
1.1 apache安装
apache2.2编译包
第一步 :源码包安装到 /usr/local/src/
32位
wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.2.31.tar.gz
第二步 :解压
tar zxvf httpd-2.2.31.tar.gz
第三步 :编译
cd httpd-2.2.31
./configure --prefix=/usr/local/apache2 安装路径
--enable-mods-shared=most 共享模式加载
--enable-so 支持后期模块安装
./configure --prefix=/usr/local/apache2 --enable-mods-shared=most --enable-so
检测编译是否成功 :‘echo $?’
make && make install
第四步 :启动apache
/usr/local/apache2/bin/apachectl start/stop
第五步 :实操
/usr/local/apache2/bin/httpd
-t 检测配置文件是否有错
-l 静态加载
-M 列出所有加载模块
第六步 :查看编译选项
cat /usr/local/apache2/bin/config.nice
1.2 PHP安装
PHP 5.3编译包
第一步 :源码包安装到 /usr/local/src/
32位
wget http://cn2.php.net/distributions/php-5.3.28.tar.gz
第二步 :解压
tar zxf php-5.3.28.tar.gz
cd php-5.3.28
第三步 :编译
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif --disable-ipv6
编译错误出现 :yum install -y libjpeg-devel
[图片]
错误 2 : yum install -y epel-release ; yum install -y libmcrypt-devel
[图片]
编译常见错误 :
http://www.apelearn.com/study_v2/chapter17.html
make && make install
php可执行文件 : /usr/local/php/bin/php
-m 列出
-i 查看参数
图就不贴了,老规矩已经上传博客。
汇总传送门 : http://blog.sina.com.cn/s/blog_164c310f90102wirn.html
阿铭linux资源下载地址:r.aminglinux.com
Myslq 5.1 免编译包
第一步 :源码包安装到 /usr/local/src/
cd /usr/local/src/ yum install -y wget
32位 试验机32位
wget http://mirrors.sohu.com/mysql/MySQL-5.1/mysql-5.1.73-linux-i686-glibc23.tar.gz
64位
Wget http://mirrors.sohu.com/mysql/MySQL-5.1/mysql-5.1.73-linux-x86_64-glibc23.tar.gz
下载完成
解压:tar zxvf mysql-5.1.73-linux-i686-glibc23.tar.gz
第二步 : 创建mysql用户
useradd -s /sbin/nologin -M mysql
移动重命名
mv mysql-5.1.73-linux-i686-glibc23 /usr/local/mysql
第三步 :创建文件目录,修改权限
cd /usr/local/mysql
mkdir -p /data/mysql ; chown -R mysql:mysql /data/mysql
初始化 : mysql
简介:mysql_install_db 脚本的目的是生成新的MySQL授权表。它不覆盖已有的MySQL授权表,并且它不影响任何其它数据。
./scripts/mysql_install_db --user=mysql --datadir=/data/mysql
./scripts/mysql_install_db 目录 --user=mysql 指定用户 --datadir=/data/mysql 指定/datadir
第四步 :拷贝修改文件
cd support-files/
cp my-medium.cnf /etc/my.cnf
cp mysql.server /etc/init.d/mysqld
[图片]
vi /etc/init.d/msqld
编辑:
basedir=/usr/local/mysql
datadir=/data/mysql
第五步 :添加服务,开启服务,开启start。
chkcofig --add mysqld chkconfig mysqld on /etc/init.d/mysqld start
[图片]
1.1 apache安装
apache2.2编译包
第一步 :源码包安装到 /usr/local/src/
32位
wget http://mirrors.cnnic.cn/apache/httpd/httpd-2.2.31.tar.gz
第二步 :解压
tar zxvf httpd-2.2.31.tar.gz
第三步 :编译
cd httpd-2.2.31
./configure --prefix=/usr/local/apache2 安装路径
--enable-mods-shared=most 共享模式加载
--enable-so 支持后期模块安装
./configure --prefix=/usr/local/apache2 --enable-mods-shared=most --enable-so
检测编译是否成功 :‘echo $?’
make && make install
第四步 :启动apache
/usr/local/apache2/bin/apachectl start/stop
第五步 :实操
/usr/local/apache2/bin/httpd
-t 检测配置文件是否有错
-l 静态加载
-M 列出所有加载模块
第六步 :查看编译选项
cat /usr/local/apache2/bin/config.nice
1.2 PHP安装
PHP 5.3编译包
第一步 :源码包安装到 /usr/local/src/
32位
wget http://cn2.php.net/distributions/php-5.3.28.tar.gz
第二步 :解压
tar zxf php-5.3.28.tar.gz
cd php-5.3.28
第三步 :编译
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif --disable-ipv6
编译错误出现 :yum install -y libjpeg-devel
[图片]
错误 2 : yum install -y epel-release ; yum install -y libmcrypt-devel
[图片]
编译常见错误 :
http://www.apelearn.com/study_v2/chapter17.html
make && make install
php可执行文件 : /usr/local/php/bin/php
-m 列出
-i 查看参数
图就不贴了,老规矩已经上传博客。
汇总传送门 : http://blog.sina.com.cn/s/blog_164c310f90102wirn.html
编辑回复