6、对MySQL的初始化操作
[root@localhost ~]# /usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql --datadir=/database --user=mysql
2013-10-28 04:13:57 13176 [Note] InnoDB: FTS optimize thread exiting.
2013-10-28 04:13:57 13176 [Note] InnoDB: Starting shutdown...
2013-10-28 04:13:58 13176 [Note] InnoDB: Shutdown completed; log sequence number 1625977
OK
Filling help tables...2013-10-28 04:13:58 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-10-28 04:13:58 7f78a8ba0720 InnoDB: !!!!!!!! UNIV_DEBUG switched on !!!!!!!!!
2013-10-28 04:13:58 7f78a8ba0720 InnoDB: !!!!!!!! UNIV_SYNC_DEBUG switched on !!!!!!!!!
2013-10-28 04:13:58 13199 [Note] InnoDB: The InnoDB memory heap is disabled
…………………………
2013-10-28 04:14:00 13199 [Note] InnoDB: Starting shutdown...
2013-10-28 04:14:01 13199 [Note] InnoDB: Shutdown completed; log sequence number 1625987
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
两个OK表示成功
7、修改mysql的几个配置文件
[root@localhost ~]# cd /usr/local/mysql/
[root@localhost etc]# chown -R mysql.mysql /usr/local/mysql
[root@localhost mysql]# mkdir etc
[root@localhost mysql]# cd etc/
[root@localhost etc]# vi my.cnf -----------主配置文件的修改
[root@localhost etc]# cat my.cnf | grep -v ^# | grep -v ^$
[mysqld]
log_bin=myql-bin
log-bin-index=mysql-bin.index
log-error=/var/log/mysqld/error.log
general_log=1
general_log_file=/var/log/mysqld/mysql.log
basedir = /usr/local/mysql
datadir = /database
port = 3306
socket = /var/run/mysqld/mysql5.socket
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[root@localhost etc]# cp /usr/local/mysql/support-files/mysql.server /etc/rc.d/init.d/mysql5
开始尝试启动mysql
[root@localhost mysqld]# /etc/init.d/mysql5 restart
MySQL server PID file could not be found! [FAILED]
Starting MySQL.. [ OK ]
mysql 到此安装完成
##############################################################
第三部分 php的安装
1、下载软件并安装
yum install libxml2 libxml2-devel -y libcurl libcurl-devel openssl openssl-devel
[root@localhost php-5.3.27]# ./configure --with-apxs2=/usr/local/apache2/bin/apxs --disable-ipv6 --with-libxml-dir=/usr --with-openssl=/usr --with-zlib=/usr --with-bz2=/usr --with-curl=/usr --enable-ftp --with-mysql=/usr/local/mysql --with-mysql-sock=/var/run/mysqld/mysql5.socket --with-mysqli=/usr/local/mysql/bin/mysql_config
这里报了一个错误
checking for X509_free in -lcrypto... yes
checking for pkg-config... /usr/bin/pkg-config
configure: error: Cannot find OpenSSL's libraries
解决方法:
安装opensslyum install openssl openssl-devel (如果没有安装的话)
建立软链接
ln -s /usr/lib64/libssl.so /usr/lib/
2、make && make install
3、测试php是否安装成功
[root@localhost www]# vi index.php
<?php
phpinfo();
?>
页面访问http://127.0.0.1/index.php

##############################################
第四部分 owncloud的安装
1、下载并解压
[root@localhost softs]# tar xf owncloud-5.0.0.tar.bz2 -C /var/www/
[root@localhost conf]# chown -R daemon.daemon /var/www/
2、接下来页面访问http://192.168.254.153/owncloud/index.php

可以看到返回的错误就是php少了三个模块功能的扩展(zip,mb,GD)
