1505112345 星期一 CentOS-6.5-x86_64-minimal-httpd-2.4.12-mysql-5.6.23-php-5.6.8

CentOS-6.5-x86_64-minimal-httpd-2.4.12-mysql-5.6.23-php-5.6.8

------------------------------ 软件准备

http://mirror.bit.edu.cn/apache/apr/apr-1.5.2.tar.gz
http://mirror.bit.edu.cn/apache/apr/apr-util-1.5.4.tar.gz
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz

http://www.memcached.org/files/memcached-1.4.24.tar.gz
http://pecl.php.net/get/memcache-3.0.8.tgz

http://mirrors.hust.edu.cn/apache/httpd/httpd-2.4.12.tar.gz
ftp://ftp.jaist.ac.jp/pub/mysql/Downloads/MySQL-5.6/mysql-5.6.23.tar.gz
http://cn2.php.net/get/php-5.6.8.tar.gz/from/this/mirror

[[email protected] ~]# ls /usr/local/src/
apr-1.5.2.tar.gz
apr-util-1.5.4.tar.gz
pcre-8.37.tar.gz
httpd-2.4.12.tar.gz
mysql-5.6.23.tar.gz
php-5.6.8.tar.gz
memcache-3.0.8.tgz // php extension
memcached-1.4.24.tar.gz

yum install gcc gcc-c++ cmake lynx autoconf bison automake zlib* fiex* libxml* ncurses-devel libmcrypt* libtool-ltdl-devel* -y

wget http://mirror.bit.edu.cn/apache/apr/apr-1.5.2.tar.gz
./configure --prefix=/usr/local/apr

wget http://mirror.bit.edu.cn/apache/apr/apr-util-1.5.4.tar.gz
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.37.tar.gz
./configure --prefix=/usr/local/pcre

------------------------------ apache install

[[email protected] httpd-2.4.12]# ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --enable-so
[[email protected] httpd-2.4.12]# make && make install
[[email protected] ~]# /usr/local/apache/bin/apachectl start
[[email protected] ~]# cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd

[[email protected] ~]# vim /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
[[email protected] ~]# services iptables restart

------------------------------ mysql install

[[email protected] mysql-5.6.23]# cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS:STRING=utf8,gbk -DWITH_INNOBASE_STORAGE_ENGINE=1 -DWITH_READLINE=1 -DENABLED_LOCAL_INFILE=1 -DMYSQL_DATADIR=/usr/local/mysql/data -DMYSQL_USER=mysql -DMYSQL_TCP_PORT=3306

[[email protected] mysql-5.6.23]# make && make install

[[email protected] ~]# groupadd mysql

[[email protected] ~]# useradd -r -g mysql mysql

[[email protected] ~]# chown -R mysql /usr/local/mysql

[[email protected] ~]# chgrp -R mysql /usr/local/mysql

[[email protected] ~]# chmod 775 /usr/local/mysql

[[email protected] ~]# /usr/local/mysql/scripts/mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data

[[email protected] ~]# chown -R root /usr/local/mysql

[[email protected] ~]# chown -R mysql /usr/local/mysql/data

[[email protected] ~]# cp /usr/local/mysql/support-files/my-default.cnf /etc/my.cnf

[[email protected] ~]# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld

[[email protected] ~]# /etc/init.d/mysqld start
Starting MySQL... SUCCESS!

[[email protected] ~]# ln -s /usr/local/mysql/bin/mysql /usr/bin
[[email protected] ~]# /usr/local/mysql/bin/mysqladmin -u root password ‘root‘

mysql> select host,user,password from user;

mysql> delete from user where password=‘‘;

mysql> grant all privileges on *.* to [email protected]‘%‘ identified by "123456";

mysql> flush privileges;

[[email protected] ~]# vim /etc/sysconfig/iptables
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
[[email protected] ~]# services iptables restart

------------------------------ php install

[[email protected] php-5.6.8]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql

[[email protected] php-5.6.8]# make && make install

修改apache配置文件 /usr/local/apache/conf/httpd.conf
LoadModule php5_module modules/libphp5.so

AddType application/x-httpd-php .php 或者

<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>

通过phpinfo(); 找到php.ini 和 extension 的目录
/usr/local/apache/htdocs/phpinfo.php
Configuration File (php.ini) Path /usr/local/php/lib
Loaded Configuration File /usr/local/php/lib/php.ini
extension_dir /usr/local/php/lib/php/extensions/no-debug-zts-20131226

[[email protected] ~]# cp /usr/local/src/php-5.6.8/php.ini-development /usr/local/php/lib/php.ini

------------------------------ 总结

[[email protected] ~]# /usr/local/apache/bin/apachectl start
[[email protected] ~]# /etc/rc.d/init.d/httpd start
[[email protected] ~]# /etc/init.d/mysqld start

配置开机启动 vim /etc/rc.d/rc.local加入
/etc/init.d/httpd start
/etc/init.d/mysqld start
svnserve -d -r /data/svn

------------------------------ php install extension

[[email protected] ~]# wget http://pecl.php.net/get/memcache-3.0.8.tgz
[[email protected] ~]# tar zxf memcache-3.0.8.tgz
[[email protected] memcache-3.0.8]# /usr/local/php/bin/phpize --with-php-config=/usr/local/php/bin/php-config
[[email protected] memcache-3.0.8]# ./configure --with-php-config=/usr/local/php/bin/php-config
[[email protected] memcache-3.0.8]# make && make install
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-zts-20131226/
[[email protected] memcache-3.0.8]# vim /usr/local/php/lib/php.ini
extension=/usr/local/php/lib/php/extensions/no-debug-zts-20131226/memcache.so

时间: 2024-10-06 03:46:16

1505112345 星期一 CentOS-6.5-x86_64-minimal-httpd-2.4.12-mysql-5.6.23-php-5.6.8的相关文章

Centos 6.6 x86_64 Basic Server 快速安装httpd

RT,在不方便配置yum的时候,如何给Centos 6.6 x86_64 Basic Server 快速安装httpd. 拷贝光盘中以下rpm包到Centos6.6中: apr-1.3.9-5.el6_2.x86_64.rpm apr-util-1.3.9-3.el6_0.1.x86_64.rpm apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm httpd-tools-2.2.15-39.el6.centos.x86_64.rpm httpd-2.2.15-39

Centos 6.6 x86_64 平台上yum的使用

友情提醒:本文的实验平台vmware 10 + Centos 6.6 X86_64,所述内容中的命令请谨慎使用. -------------------------------------楔子-------------------------------------------------- 胖子法师上次在小酒馆中,关于<grep与正则表达式使用>的阐述为其赢得了几个粉丝.今日在魔法塔中喜滋滋翻看着粉丝来信,一封信中提到在Gnu/Linux os平台上安装程序包的种种不顺,这又勾起了胖子好为人

install zabbix-2.2.5 on CentOS 6.5 x86_64

install zabbix_server: # yum install mysql-server httpd php # yum install mysql-devel gcc net-snmp-devel curl-devel perl-DBI php-gd php-mysql php-bcmath php-mbstring php-xml downloads zabbix-2.2.5.tar.gz # tar -zxvf zabbix-2.2.5.tar.gz # groupadd  za

centos/7/isos/x86_64 下载

为了节约有限的可用带宽. 不从mirror.centos.org下载iso映像 以下镜子应该可用的ISO映像: http://mirrors.aliyun.com/centos/7/isos/x86_64/ http://mirrors.sina.cn/centos/7/isos/x86_64/ Index of /centos/7/isos/x86_64/ ../ 0_README.txt 01-Apr-2015 08:30 2685 CentOS-7-x86_64-DVD-1503-01.i

SalkStack安装 CentOS 6.6 x86_64

一.Master端安装配置 1.系统版本 [[email protected] ~]# cat /etc/redhat-releaseCentOS release 6.6 (Final)[[email protected] ~]# uname -aLinux salt-master 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux 2.安装epel源 [[email p

Centos 6.4 x86_64 最小化安装后的优化

Centos 6.4 x86_64 最小化安装后的优化 购买了服务器以后要做的第一件事就是安装操作系统了,这里推荐安装 Centos 6.4 x86_64,安装系统时要选择最小化安装(不需要图形),在使用服务器时要记住一个原则,系统安装的应用程序包越少,服务器就会越稳定.至于服务器单机性能调优,应本着稳定安全的原则,尽量不要改动系统原有的配置(Cetnos系统自身的文件和内存机制就很优秀),以下配置优化部分也适合Amazon Linux系统,大家可以对比参考. 系统的基础优化 1.更新yum官方

zabbix 2.2.2在centos 6.3 x86_64上的安装

zabbix 2.2.2在centos 6.3 x86_64上的安装 更新五月 03, 2014   # 依赖环境 yum install -y php-mbstring mysql-devel libcurl-devel net-snmp-devel php-xml libiconv php-gd* php-bcmath php-mysql   # 下载并解压缩zabbix server 2.2.2 #下载地址 http://www.zabbix.com/download.php tar xz

CentOS 6.3(x86_64)下安装Oracle 10g R2

目 录 一.硬件要求二.软件三.系统安装注意四.安装Oracle前的系统准备工作五.安装Oracle,并进行相关设置六.升级Oracle到patchset 10.2.0.4七.使用rlwrap调用sqlplus中历史命令 一.硬件要求 1.内存 & swap Minimum: 1 GB of RAMRecommended: 2 GB of RAM or more 检查内存情况 # grep MemTotal /proc/meminfo # grep SwapTotal /proc/meminfo

Centos 7.0 编译安装LAMP(Linxu+apache+mysql+php)之源码安装Mysql (二)

mysql 简介: MySQL是一个关系型数据库管理系统,关系数据库将数据保存在不同的表中,这样就增加了速度并提高了灵活性.目前其属于 Oracle 旗下产品.MySQL 是最流行的关系型数据库管理系统之一,在 WEB 应用方面,MySQL是最好的 RDBMS (Relational Database Management System,关系数据库管理系统) 应用软件.MySQL所使用的 SQL 语言是用于访问数据库的最常用标准化语言. 安装环境: 系统: centos 7.0 最小化安装 软件