Install Owncloud and Wordpress on Ubuntu16.04

#General dependencies

sudo apt install mysql-server mysql-client apache2 php libapache2-mod-php php-gd php-json php-mysql php-curl php-intl php-mcrypt php-imagick php-zip php-xml php-mbstring phpmyadmin

#Create databases

mysql -uroot -p

create database owncloud;

create database wordpress;

exit

#Install Owncloud

#Version: 10.0.9 2018/07/17

cd ~/Downloads

wget https://download.owncloud.org/community/owncloud-10.0.9.tar.bz2

tar -xjf owncloud*.bz2

sudo mv owncloud /var/www/html

cd /var/www/html/owncloud

sudo mkdir data

sudo chown -R www-data:www-data data

sudo chown -R www-data:www-data config

sudo chown -R www-data:www-data apps

sudo a2enmod rewrite

sudo a2enmod headers

sudo service apache2 restart

#Open YOURIP/owncloud with your IE to setup your admin account and local MySQL database

http://localhost/owncloud

#Add your current LAN IP or your hostname to the hosts array otherwise it couldn't be accessed in your LAN

sudo vim /var/www/html/owncloud/config/config.php

#Install wordpress

#Version: latest

cd ~/Downloads

wget https://wordpress.org/latest.zip

unzip latest.zip

sudo mv wordpress /var/www/html/

#Problems: cannot update wordpress:

#Fix with

sudo chmod 777 -R /var/www/html/wordpress

sudo vim /var/www/html/wordpress/wp-config.php

#add the following to the end:

define('FS_METHOD', "direct");

sudo service apache2 restart

猜你喜欢

转载自blog.csdn.net/qq_28804847/article/details/82561436