ECS day7 基于ECS和NAS搭建个人网盘
1、安装owncloud
rpm --import https://download.owncloud.org/download/repositories/10.0/CentOS_7/repodata/repomd.xml.key
wget http://download.owncloud.org/download/repositories/10.0/CentOS_7/ce:10.0.repo -O /etc/yum.repos.d/ce:10.0.repo
yum install owncloud-files
ll /var/www/html
2、安装 Apache 服务
yum install httpd –y
systemctl start httpd.service
vim /etc/httpd/conf/httpd.conf
# owncloud config
Alias /owncloud "/var/www/html/owncloud/"
<Directory /var/www/html/owncloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/html/owncloud
SetEnv HTTP_HOME /var/www/html/owncloud
</Directory>
3、安装并配置PHP
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum -y install php72w
yum -y install php72w-cli php72w-common php72w-devel php72w-mysql php72w-xml php72w-odbc php72w-gd php72w-intl php72w-mbstring
php -v
find / -name php.ini
vi /etc/httpd/conf/httpd.conf
PHPIniDir /etc/php.ini
systemctl restart httpd.service
4、配置OwnCloud
5、挂载NAS服务
sudo mount -t nfs -o vers=3,nolock,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport 3dc1149159-qlr49.cn-shanghai.nas.aliyuncs.com:/ sudo mount -t nfs -o vers=3,nolock,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport 3dc1149159-qlr49.cn-shanghai.nas.aliyuncs.com:/ /var/www/html/owncloud/data/yang
df -h | grep aliyun
更多资料参见阿里云高校计划:https://developer.aliyun.com/adc/college/