安装apache+CI
tar -xzf openssl-xxx.tar.gz
看下configure项
harryma@ubuntu:~/openssl-1.0.1j$ ./Configure --help Usage: Configure [no-<cipher> ...] [enable-<cipher> ...] [experimental-<cipher> ...] [-Dxxx] [-lxxx] [-Lxxx] [-fxxx] [-Kxxx] [no-hw-xxx|no-hw] [[no-]threads] [[no-]shared] [[no-]zlib|zlib-dynamic] [no-asm] [no-dso] [no-krb5] [sctp] [386] [--prefix=DIR] [--openssldir=OPENSSLDIR] [--with-xxx[=vvv]] [--test-sanity] os/compiler[:flags]
./config --prefix=/usr/local/ --shared
make & make install 二连
make & make install (需要root权限)
装完之后看下是否装成功
harryma@ubuntu:~/openssl-1.0.1j$ openssl version OpenSSL 1.0.1j 15 Oct 2014
当然像unbuntu直接用apt-get也ok:
sudo apt-get install openssl sudo apt-get install libssl-dev
2.安装apache
下载apache安装包,解压,进目录,执行
./configure --prefix=/usr/local --enable-so --enable-rewrite --enable-ssl --with-ssl=/usr/local/ssl --enable-module=most make make install
安装完成后,去bin目录启动apache
sudo ./apachetl -k start
打开默认地址http://localhost/,如果显示it works证明安装基本成功
3.安装ci
直接下载ci的安装包,解压缩到自己指定的目录下面,如/usr/local/ci/,配置以后再配
4.安装php5
先尝试编译安装php5,结果要先安装libxml,就先装下
sudo apt-get install libxml-dev
顺便把mod-php5也装了
sudo apt-get install libapache2-mod-php5
再进行php5的比哪一安装
./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/lib --with-mysql
copy一份配置文件到lib目录
sudo cp -p /usr/share/php5/php.ini-development /usr/local/php5/lib/php.ini
5.修改apache配置
需要将apache的目录指向ci目录,同时让apache支持php
修改httpd.conf,主要是路径、权限以及php文件:
DocumentRoot "/usr/local/ci" <Directory "/usr/local/ci"> Options -Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> DirectoryIndex index.html index.php
找到 AddType application/x-gzip .gz .tgz 在其下添加如下内容
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
httpd-vhosts.conf也加下路径
<VirtualHost *:80> ServerAdmin [email protected] DocumentRoot "/usr/local/ci" ServerName wepay.oa.com ErrorLog "logs/wepay.com-error_log" CustomLog "logs/wepay.com-access_log" common </VirtualHost>
这样设置完重启,访问配置的域名,就可以看到ci的默认页了
6.修改ci的配置
$system_path = ‘/usr/local/php_platform‘;
if(!is_dir($system_path)){
$system_path = ‘../module/system‘;
}
$application_folder = ‘../module/application‘;
vim application/config/config.php
设置$config[‘base_url‘] = ‘http://wepay.oa.com/‘;
$route[‘default_controller‘] = "welcome";
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。