1: 下载并解压软件包
2: 上传软件包
将edusohu文件夹上传到html目录中
3: 确保软件包内部相关的文件以及目录可写
在运行edusoho之前,为了保证程序的安装运行正常,请确保以下文件以及目录处于可写状态。
app/config/parameters.yml
app/data/udisk
app/data/private_files
web/files
web/install
app/cache
app/logs
注: 修改文件以及目录为可写状态的操作为: chmod -R a+wr yourDirectory
4:配置安装LNMP环境
编译php的时候,要加上
#./configure --prefix=/usr/local/php --with-pdo-mysql=/usr/local/mysql
useradd -s /sbin/nologin apache
chown apache:apache /usr/local/nginx/html/edusoho -Rf
5.新建数据库(用户名为:esuser,密码为edusoho)
mysql -uroot -p
#输入:
CREATE DATABASE edusoho DEFAULT CHARACTER SET utf8 ;
GRANT ALL PRIVILEGES ON edusoho
.* TO 'esuser'@'192.168.66.9' IDENTIFIED BY 'edusoho';
quit;
6:修改php.ini
post_max_size = 1024M memory_limit = 1024M upload_max_filesize = 1024M 7.修改配置文件 vi /etc/nginx/nginx.conf
在http{}配置中加入:
client_max_body_size 1024M;
vi /etc/nginx/conf.d/edusoho.conf
加入以下配置:
server {
listen 80;
server_name 192.168.66.9;
root /usr/local/nginx/html/edusoho/web;
access_log /var/log/nginx/edusoho.access.log;
error_log /var/log/nginx/edusoho.error.log;
location / {
index app.php;
try_files $uri @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}
location ~ ^/udisk {
internal;
root //usr/local/nginx/html/edusoho/app/data/;
}
location ~ ^/(app|app_dev).php(/|$) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
fastcgi_param HTTP_X-Sendfile-Type X-Accel-Redirect;
fastcgi_param HTTP_X-Accel-Mapping /udisk=/usr/share/nginx/edusoho/app/data/udisk;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;
}
location ~* .(jpg|jpeg|gif|png|ico|swf)$ {
expires 3y;
access_log off;
gzip off;
}
location ~* .(css|js)$ {
access_log off;
expires 3y;
}
location ~ ^/files/.*.(php|php5)$ {
deny all;
}
location ~ .php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
include fastcgi_params;
}
}
7:最后安装
在浏览器中输入:域名/install/install.php,然后按照提示安装配置即可。