linux下配置php开发环境.doc_第1页
linux下配置php开发环境.doc_第2页
linux下配置php开发环境.doc_第3页
linux下配置php开发环境.doc_第4页
linux下配置php开发环境.doc_第5页
已阅读5页,还剩5页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

linux php”apache1. httpd-2.4.7.tar.gz2. /usr/local/softwares/php-dev-softwares/apache/apache-httpdhttpd-2.4.7.tar.gz3. sudo ./configure -prefix=/usr/local/softwares/php-dev-softwares/apache/apache-httpd”checking for APR. noconfigure: error: APR not found. Please read the documentation.apache-aprapache-apr-util1apr-1.5.0.tar.gzapr-util-1.5.3.tar.gz2tar -zxvf apr-1.5.0.tar.gzcd apr-1.5.0./configuremakemake installaprtar -zxvf apr-util-1.5.3.tar.gzcd apr-util-1.5.3./configure -prefix=/usr/local/apr-util -with-apr=/usr/local/aprmakemake installapr-util 3httpdsudo ./configure -with-apr=/usr/local/apr -with-apr-util=/usr/local/apr-util -prefix=/usr/local/softwares/php-dev-softwares/apache/apache-httpd”configure: error: pcre-config for libpcre not found. PCRE is required and available4PCREpcre-8.34.tar.bz2sudo tar -vxjf pcre-8.34.tar.bz2cd pcre-8.34/sudo ./configure -prefix=/usr/local/pcre”configure: error: You need a C+ compiler for C+ support.:sudo apt-get install build-essentialUbuntuC/CUbuntuc/c+cd pcre-8.34/sudo ./configure -prefix=/usr/local/pcresudo makesudo make installpcre5httpdcd /usr/local/softwares/php-dev-softwares/apache/apache-httpd/httpd-2.4.7sudo ./configure -with-apr=/usr/local/apr -with-apr-util=/usr/local/apr-util -with-pcre=/usr/local/pcre -prefix=/usr/local/softwares/php-dev-softwares/apache/apache-httpdsudo makesudo make installhttpdhttpdbin./apachectl -k start”AH00558: httpd: Could not reliably determine the servers fully qualified domain name, using . Set the ServerName directive globally to suppress this messagehttpd: Could not reliably determine the servers fully qualified domain name, using for ServerName”conf/httpd.conf#ServerName :80”ServerName localhost:80”(13)Permission denied: AH00072: make_sock: could not bind to address :80(13)Permission denied: AH00072: make_sock: could not bind to address :80sudo ./apachectl -k startsudo ./apachectl -k stop“http:/localhostIt works.apachemysql1. ”mysql,groupadd mysql2. mysql”mkdir /home/mysqluseradd -g mysql -d /home/mysql mysqlmysql”mysqlsudo passwd mysql ”adduser username”3. mysqlmkdir /usr/local/softwares/php-dev-softwarescd /usr/local/softwares/php-dev-softwaresmysql-5.6.13-linux-glibc2.5-x86_64.tar.gzsudo tar -xzvf mysql-5.6.13-linux-glibc2.5-x86_64.tar.gzsudo mv mysql-5.6.13-linux-glibc2.5-x86_64 mysql”mysql”cd /usr/local/softwares/php-dev-softwares/mysqlsudo chown -R mysql .sudo chgrp -R mysql .4. mysql sudo scripts/mysql_install_db -user=mysql”Installing MySQL system tables./bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory”libaio“sudo apt-get install libaio-devmysqlTo start mysqld at boot time you have to copysupport-files/mysql.server to the right place for your systemPLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !To do so, start the server, then issue the following commands:/usr/local/softwares/php-dev-softwares/mysql/bin/mysqladmin -u root password new-password/usr/local/softwares/php-dev-softwares/mysql/bin/mysqladmin -u root -h ubuntu password new-passwordAlternatively you can run:/usr/local/softwares/php-dev-softwares/mysql/bin/mysql_secure_installationwhich will also give you the option of removing the testdatabases and anonymous user created by default. This isstrongly recommended for production servers.See the manual for more instructions.You can start the MySQL daemon with:cd . ; /usr/local/softwares/php-dev-softwares/mysql/bin/mysqld_safe &You can test the MySQL daemon with mysql-test-run.plcd mysql-test ; perl mysql-test-run.plPlease report any problems with the ./bin/mysqlbug script!The latest information about MySQL is available on the web atSupport MySQL by buying support/licenses at New default config file was created as /usr/local/softwares/php-dev-softwares/mysql/f andwill be used by default by the server when you start it.You may edit this file to change server settings5. ”rootdatamysqlsudo chown -R root .sudo chown -R mysql data5.1. ”mysql-5.6”my-mediummy-default”fbasedirdatadir#”sudo vi f# These are commonly set, remove the # and set as required.basedir = /usr/local/softwares/php-dev-softwares/mysqldatadir = /usr/local/softwares/php-dev-softwares/mysql/data#sudo cp support-files/f /etc/f6. mysql6.1. sudo bin/mysqld_safe -user=mysql &1 10812fenghunubuntu:/usr/local/softwares/php-dev-softwares/mysql$ 140113 14:55:04 mysqld_safe Logging to /usr/local/softwares/php-dev-softwares/mysql-5.6.13-linux-glibc2.5-x86_64/data/ubuntu.err.140113 14:55:04 mysqld_safe Starting mysqld daemon with databases from /usr/local/softwares/php-dev-softwares/mysql-5.6.13-linux-glibc2.5-x86_64/data6.2. bin/mysqladmin versionbin/mysqladmin Ver 8.42 Distrib 5.6.13, for linux-glibc2.5 on x86_64Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Server version5.6.13Protocol version10ConnectionLocalhost via UNIX socketUNIX socket/tmp/mysql.sockUptime:19 secThreads: 1 Questions: 2 Slow queries: 0 Opens: 67 Flush tables: 1 Open tables: 60 Queries per second avg: 0.1056.3. mysqladmin variables. .| ssl_crlpath | | ssl_key | | storage_engine | InnoDB. .mysql”root”bin/mysqladmin -u root password root7. mysql7.1. /usr/local/softwares/php-dev-softwares/mysql/support-files/mysql.server/etc/init.dsudo cp support-files/mysql.server /etc/init.d/mysql.servermysqlsudo service mysql.server status* MySQL running (5353)sudo service mysql.server status|start|stop mysql |“7.2 sudo service mysql.server stop mysqlShutting down MySQL. *7.3 sudo bin/mysqladmin versionbin/mysqladmin: connect to server at localhost failederror: Cant connect to local MySQL server through socket /tmp/mysql.sock (2)Check that mysqld is running and that the socket: /tmp/mysql.sock exists!8. “8.1 mysqlsudo service mysql.server start8.2 “sudo bin/mysql -u root -pmysql show databases;+-+| Database |+-+| information_schema | mysql | performance_schema | test |+-+4 rows in set (0.00 sec)mysql“”9. ”mysql”mysql“mysql“php1. php-5.5.8.tar.gz2. php-5.5.8.tar.gz/usr/local/softwares/php-dev-softwares/php/php-src3. cd /usr/local/softwares/php-dev-softwares/php/php-src/php-5.5.8sudo ./configure -prefix=/usr/local/softwares/php-dev-softwares/php/php-5.5.8 -with-apxs2=/usr/local/softwares/php-dev-softwares/apache/apache-httpd/bin/apxs -with-mysql=/usr/local/softwares/php-dev-softwares/mysql”configure: error: xml2-config not found. Please check your libxml2 installation.sudo apt-get install libxml2sudo apt-get install libxml2-devphpGenerating filesconfigure: creating ./config.statuscreating main/internal_functions.ccreating main/internal_functions_cli.c+-+| License: | This software is subject to the PHP License, available in this | distribution in the file LICENSE. By continuing this installation | process, you are bound by the terms of this license agreement. | If you do not agree with the terms of this license, you must abort | the installation process at this point. |+-+Thank you for using PHP.phpsudo makesudo make testsudo make install4. apachephpapachehttpd.confapachephpLoadModule LoadModule php5_module modules/libphp5.so # ”AddType applocation/x-httpd-php .php .phtml# ”5. php.ini-developmentphp”php.inisudo cp /usr/local/softwares/php-dev-softwares/php/php-src/php-5.5.8/php.ini-development /usr/local/softwares/php-dev-softwares/php/php-5.5.8/lib/php.ini6. ”php.ini; php“;extension_dir=”7. apachehtdocstest.phptest.php8. “http:/localhost/test.phpphpphpapachephpdateWarning: phpinfo(): It is not safe to rely on the systems timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone UTC for now, but please set date.timezone to select your timezone. in /usr/local/softwares/php-dev-softwares/apache/apache-httpd/htdocs/test.php on line 2sudo vi /usr/local/softwares/php-dev-softwares/php/php-5.5.8/lib/php.inidate.timezone =; ”phpinfo()date.timezone = Asia/Shanghai9. PHPphp9.1. mysqli,phpextmysqlicd /usr/local/softwares/php-dev-softwares/php_src/php-5.5.8/ext/mysqlisudo /usr/local/softwares/php-dev-softwares/php/bin/phpize/usr/local/softwares/php-dev-softwares/php/bin/phpize# ”#Configuring for:PHP Api Version: 20121113Zend Module Api No: 20121212Zend Extension Api No: 220121212Cannot find autoconf. Please check your autoconf installation and the$PHP_AUTOCONF environment variable. Then, rerun this script.#1) /gnu/m4/m4-1.4.9.tar.gzsudo tar -xzvf m4-1.4.9.tar.gzcd m4-1.4.9.tar.gzsudo ./configuresudo makesudo make install2) /gnu/autoconf/autoconf-2.62.tar.gzsudo tar -xzvf autoconf-2.62.tar.gzcd autoconf-2.62.tar.gzsudo ./configuresudo makesudo make install9.2 sudo /usr/local/softwares/php-dev-softwares/php/bin/phpizesudo ./configure -with-php-config=/usr/local/softwares/php-dev-softwares/php/bin/php-config -with-mysqli=/usr/local/softwares/php-dev-softwares/mysql/bin/mysql_configsudo makesudo make testsudo make install9.3 php.ini”/usr/local/softwares/php-dev-softwares/php/lib/php/extensions/no-debug-zts-20121212/mysqli.sophp.inisudo vi php.ini#”#; phpmysqli;extension=php_mysqli.dll ;windowsextension=/usr/local/softwares/php-dev-softwares/php/lib/php/extensions/no-debug-zts-20121212/mysqli.so#9.4 phpphp9.5 phppdocd /usr/local/softwares/php-dev-softwares/php_src/php-5.5.8/ext/pdosudo /usr/local/softwares/php-dev-softwares/php/bin/phpizesudo ./configure -with-php-config=/usr/local/softwares/php-dev-softwares/php/bin/php-configsudo makesudo make testsudo make install9.6 phppdocd /usr/local/softwares/php-dev-softwares/php_src/php-5.5.8/ext/pdo_mysqlsudo /usr/local/softwares/php-dev-softwares/php/bin/phpizesudo ./configure -with-php-config=/usr/local/softwares/php-dev-softwares/php/bin/php-config -with-pdo-mysql=/usr/local/softwares/php-dev-softwares/mysqlsudo makesudo make test”ERROR: cannot open directory: /usr/local/softwares/php-dev-softwares/php_src/php-5.5.8/ext/pdo_mysql/ext/pdo/testssudo make installphpphp.ini# phppdoextension=/usr/local/softwares/php-dev-softwares/php/lib/php/extensions/no-debug-zts-20121212/pdo.so# phppdo_mysqlextension=/usr/local/softwares/php-dev-softwares/php/lib/php/extensions/no-debug-zts-20121212/pdo_mysql.so.phpMyAdmin1. phpMyAdmin/project/

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论