實驗環境
centos6.9_x64
實驗軟體
latest.rpm
owncloud-10.0.4.tar.bz2 服務端
ownCloud-2.4.2.10040-setup.exe 用戶端
軟體安裝
rpm -ivh latest.rpm
yum clean all && yum makecache -y
yum install -y httpd httpd-manual mod_ssl mod_perl mod_auth_mysql mysql mysql-server
yum -y install php56w php56w-bcmath php56w-cli php56w-common php56w-devel php56w-fpm php56w-gd php56w-imap php56w-ldap php56w-mbstring php56w-mcrypt php56w-mysql php56w-odbc php56w-pdo php56w-pear php56w-pecl-igbinary php56w-xml php56w-xmlrpc php56w-opcache php56w-intl php56w-pecl-memcache
cp -pv /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak
sed -i "s/#ServerName www.example.com:80/ServerName *:80/g" /etc/httpd/conf/httpd.conf
sed -i "s/AllowOverride None/AllowOverride ALL/g" /etc/httpd/conf/httpd.conf
sed -i "s/#AddType application/AddType application/g" /etc/httpd/conf/httpd.conf
sed -i '765 aAddType application/x-httpd-php .php' /etc/http/conf/httpd.conf 配置檔案300行插入AddType application/x-httpd-php .php
touch /var/www/html/index.html
echo 'wecome to apache server' > /var/www/html/index.html
touch /var/www/html/test.php
echo "<?php phpinfo(); ?>" > /var/www/html/test.php
curl http://localhost/index.html
wecome to apache server
service httpd restart
service mysqld restart
mysqladmin -uroot password 資料庫驗證
mysql -uroot -p資料庫驗證
mysql>
create database ownclouddb;
GRANT ALL ON ownclouddb.* TO ownclouduser@localhost IDENTIFIED BY '123456'; 123456為資料庫驗證
flush privileges;
mysql -uownclouduser -p資料庫
tar xvf owncloud-10.0.4.tar.bz2
mv owncloud /var/www/html/
chown -R apache:apache /var/www/html/owncloud/
chmod -R 777 /var/www/html/owncloud/
chkconfig --level 35 httpd on && chkconfig --level 35 mysqld on
netstat -tuplna | grep httpd
tcp 0 0 :::80 :::* LISTEN 23463/httpd
tcp 0 0 :::443 :::* LISTEN 23463/httpd
netstat -tuplna | grep mysqld
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 23623/mysqld
http://serverip/test.php

http://serverip/owncloud/
建立測試賬号