大家好,由于学院BBS上传附件失效的关系,
金融产品创新的课件暂时可以从这里下载,等待学院BBS恢复。
tips:地址二下载速度会快很多。但因为是未经允许用的实验室的服务器,所以不保证不被发现,不保证一定有效~
ps:回复过十,爆你们助教哥哥靓照
Have fun!
第一讲:金融产品创新-第一讲课件下载 地址二
什么叫做二哥在人大。there it is!
大家好,由于学院BBS上传附件失效的关系,
金融产品创新的课件暂时可以从这里下载,等待学院BBS恢复。
tips:地址二下载速度会快很多。但因为是未经允许用的实验室的服务器,所以不保证不被发现,不保证一定有效~
ps:回复过十,爆你们助教哥哥靓照
Have fun!
第一讲:金融产品创新-第一讲课件下载 地址二
什么叫做二哥在人大。there it is!
Ubuntu下继续安装PHP开发环境,到了安装mysql这一步,由于下的是mysql的最新版本mysql-5.6.10,而mysql貌似从5.5已经不用./configure来配置了,换成了cmake。
于是只能google。最后结合几篇文章与mysql官网的配置介绍Source-Configuration Options,搞定了这个配置。
文本如下:
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
> -DDEFAULT_CHARSET=utf8 \
> -DDEFAULT_COLLATION=utf8_general_ci \
> -DMYSQL_UNIX_ADDR=/usr/local/mysql/mysql.sock \
> -DWITH_MYISAM_STORAGE_ENGINE=1 \
> -DWITH_INNOBASE_STORAGE_ENGINE=1 \
> -DWITH_ARCHIVE_STORAGE_ENGINE=1 \
> -DWITH_BLACKHOLE_STORAGE_ENGINE=1 \
> -DWITH_MEMORY_STORAGE_ENGINE=1 \
> -DWITH_READLINE=1 \
> -DENABLED_LOCAL_INFILE=1 \
> -DMYSQL_DATADIR=/db/mysql/data \
> -DMYSQL_USER=mysql \
> -DMYSQL_TCP_PORT=3306
哦对了,有可能会要sudo。
然后出现了一个问题。
Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
CMake Error at cmake/readline.cmake:83 (MESSAGE):
Curses library not found. Please install appropriate package,
remove CMakeCache.txt and rerun cmake.On Debian/Ubuntu, package name is libncurses5-dev, on Redhat and derivates it is ncurses-devel.
Call Stack (most recent call first):
cmake/readline.cmake:126 (FIND_CURSES)
cmake/readline.cmake:193 (MYSQL_USE_BUNDLED_LIBEDIT)
CMakeLists.txt:325 (MYSQL_CHECK_READLINE)
— Configuring incomplete, errors occurred!
既然少ncurses包,那就安装一下。
sudo apt-get install libncurses5-dev
然后把当前目录下这个缓存文件删除
sudo rm CMakeCache.txt
终于配置通过。
然后编译源码,需要等待一段时间。
sudo make
然后安装
sudo make install
这个就比较快了。两下搞定。
接下来就是配置了。配置了几个小时,,具体我忘了。好复杂啊~真回忆不起来具体有哪些步骤了,反正是一直网上边搜边做。sigh~
继续在ubuntu下配置PHP开发环境,做到安装Apache服务器了,执行configure的时候,报错,具体如下
configure: error: Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.
google以后,发现这是需要下载apr和apr-utils 并解压到./srclib/, 再进行编译。
解决办法:
1.1 在上面的链接或者网上下载 apr-1.4.6.tar.gz和apr-util-1.4.1.tar.gz,放到/usr/local/src/目录下,解压软件包到当前目录的apr-1.4.6/和apr-util-1.4.1/下,命令如下:
$ cd /usr/local/usr/ // 进入源码包所在目录
$ sudo tar zxvf apr-1.4.6.tar.gz // 解压缩
$ sudo tar zxvf apr-util-1.4.1.tar.gz // 解压缩
1.2 (现在我们依然在/usr/local/src/目录下)拷贝解压缩后的目录到httpd-2.4.4/srclib/apr和httpd-2.4.4/srclib/apr-util中,命令如下:
$ sudo cp -rf apr-1.4.6 httpd-2.4.4/srclib/apr
$ sudo cp -rf apr-util-1.4.1 httpd-2.4.4/srclib/apr-util
然后重新进入httpd目录,进行配置。
结果出现新的问题,如下:
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
又是一个依赖关系,,,,晕死算了。没办法,继续下吧。去http://pcre.org/下载
2.1 在上面的链接或者网上下载 pcre-8.32.tar.gz,放到/usr/local/src/目录下,解压软件包到当前目录的pcre-8.32下,并进入pcre-8.32目录,命令如下:
$ cd /usr/local/usr/ // 进入源码包所在目录
$ sudo tar zxvf pcre-8.32.tar.gz // 解压缩
$ cd pcre-8.32 // 进入目录
2.2 使用“configure”命令检查并配置安装需要的系统环境,并生成安装配置文件,命令行如下:
$ ./configure –prefix=/usr/local/pcre
选项–prefix=/usr/local/pcre作用,是在安装时将软件安装到/usr/local/pcre目录下
2.3 使用make命令编译源码文件并生成安装文件,命令如下:
$ sudo make // 编译
2.4 使用make install命令进行安装,命令如下:
$ sudo make install // 安装
如果安装成功就会在/usr/local/pcre目录下生成bin、include、lib和share四个目录。如下图
安装完pcre以后,回到httpd目录下,
在./configure的时候加上–with-pcre=/usr/local/pcre即可。
这次终于成功configure了,然后make && make install。
大功告成!
————————————-华丽丽的分割线,下面是英语版——————————————–
English Version:
Continue to install the PHP environment.
An error occured when performing configure command during installing Apache server:
configure: error: Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.
Google it, I found that we need to download the apr and apr-utils , extract them to ./srclib/ and then compile.
Solution:
1.1 Download the file apr-1.4.6.tar.gz and apr-util-1.4.1.tar.gz on the above link or the official site, put them under /usr/local/src/, and extract them separately to apr-1.4.6/ and apr-util-1.4.1/. The commands as follows:
$ cd /usr/local/usr/ // enter the directory where the source code is
$ sudo tar zxvf apr-1.4.6.tar.gz // extract the file
$ sudo tar zxvf apr-util-1.4.1.tar.gz // extract the file
1.2 (remain under the /usr/local/src/)copy the extracted files above separately to directory httpd-2.4.4/srclib/apr/ and httpd-2.4.4/srclib/apr-util/, commands as follows:
$ sudo cp -rf apr-1.4.6 httpd-2.4.4/srclib/apr
$ sudo cp -rf apr-util-1.4.1 httpd-2.4.4/srclib/apr-util
enter the httpd directory to configure.
Another new problem arised:
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
Another dependency?? oops… continue to download~~ go to the website http://pcre.org/.
2.1 Download the file pcre-8.32.tar.gz on the above link or the official site, put it under /usr/local/src/, and extract it to pcre-8.32/, and enter the current directory. The commands as follows:
$ cd /usr/local/usr/ // enter the directory where the source code is
$ sudo tar zxvf pcre-8.32.tar.gz // extract the file
$ cd pcre-8.32/ // enter the current directory
2.2 Check and configure the installation environment with “configure” command, which will generate installation configuration file. The command line as follows:
$ ./configure –prefix=/usr/local/pcre
“–prefix=/usr/local/pcre” means that the installing software will be installed under /usr/local/pcre.
2.3 use the make command to compile the source file and generate the installation file:
$sudo make // compile
2.4 use command make install to install:
$ sudi make install // install
If the installation succeeded, there would be four directories(bin/, include/, lib/, share/)generated under /usr/local/pcre, as following picture:
after installing the pcre, return to the httpd directory, and add the option –with-pcre=/usr/local/pcre behind ./configure.
It succeeded~~, and then perform make and make install.
Done!
继续安装php开发环境,当安装最新的GD库文件,执行make命令的时候,出现了没有头文件的问题。错误代码如下:
error: png.h: No such file or directory
其实就是头文件的路径不对。
解决办法:
vim gd_png.c
将
#include “png.h”
替换成:
#include “/usr/local/libpng/include/png.h”
然后再make就可以了
注:include“”双引号里包含的是libpng安装的路径里的include文件夹
继续安装php开发环境,当安装到libpng的时候,输入make命令,确发现提示错误,没有找到makefile。
我还纳闷儿了,明明有makefile.am 和 makefile.in啊,configure以后不就生成makefile了嘛,于是又执行了一遍configure,结果在最后一行发现错误,如下。
configure: error: zlib not installed
google以后,发现大家都是用的这个方法解决:
————————————-华丽丽的分割线,下面是英语版———————–
English Version:
Continue to install the PHP environment.
When install the libpng package after entering the make command, the error “cannot find the makefile” might occur.
I’m so confused~~, the makefile.am and makefile.in obviously exsit in the directory. The makefile should be generated after configuring.
So I perform the configure command again, and then find this error:
configure: error: zlib not installed
Google it, find following solution that many people are using:
1. Enter the directory where the zlib source file is, and perform the make clean command to clean up zlib.
2. Reconfigure using ./configure without –prefix parameter.
3. Perform make and make isntall
4. Enter the libpng directory, execute the command ./configure –prefix=/usr/local/libpng.
5. Perform command make and make install.
由于项目需要,得在自己的机器上搭建一套PHP开发环境。在安装libxml2-2.6.30,用make的时候出现以下问题。如下图所示。
In function ‘open’,inlined from ‘xmlNanoHTTPSave__internal_alias’ at nanohttp.c:1588:12:
/usr/include/i386-linux-gnu/bits/fcntl2.h:51:24:
error: call to ‘__open_missing_mode’ declared with attribute error: open with O_CREAT in second argument needs 3 arguments
解决办法:
打开libxml所在目录下的nanohttp.c,第1588行由
fd = open(filename, O_CREAT | O_WRONLY);更换为
fd = open(filename, O_CREAT | O_WRONLY,0777);
亲测,可行,重新make即可。
做智能喵居的时候,需要用到PHP,一直都用的是EasyPHP开发。结果当我测试本机PHP与局域网内另一台机器通过socket通信的时候,发现另外一台机器怎么也访问不了我的PHP页面。
Google以后发现是配置问题,在 “你的EasyPHP目录/conf_files/httpd.conf” 文件的第62行(我的是EasyPHP 12.1,其他版本你搜索Listen关键字定位即可),你会发现他在这里指定监听端口号的时候,把IP地址也指定成了127.0.0.1,原话如下。
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:8887
Listen 127.0.0.1:8887
简单来说就是,你可以指定Apache访问的IP地址与端口,那么当你指定了IP为127.0.0.1以后,其他的IP就无法访问了,即使你使用本机的IP替代127.0.0.1。比如我的本机局域网IP是192.168.1.27。我可以通过127.0.0.1:8887访问EasyPHP,但是192.168.1.27:8887就访问不了。更别说局域网内其他机器了。
解决方法很简单:把127.0.0.1去掉,即把“Listen 127.0.0.1:8887” 换成“ 8887”即可。只指定端口号,不指定IP。