LoginSignup
7
8

More than 5 years have passed since last update.

ownCloudをUbuntuへインストールする

Posted at

ownCloudをUbuntu16.04へインストール

rootへ変更

$ sudo su -

必要なパッケージのインストール

$ apt update -y
$ apt upgrade -y
$ apt install -y apache2 mysql-server php libapache2-mod-php php-mcrypt php-mysql
$ apt install -y php7.0-mcrypt php7.0-mysql php7.0-zip php7.0-xml php7.0-mbstring php7.0-gd php7.0-curl php-smbclient

サービスの起動と有効化

Apache2

$ a2enmod rewrite
$ systemctl start apache2
$ systemctl enable apache2

MySQL

$ systemctl start mysql
$ mysql_secure_installation
$ systemctl enable mysql

ownCloud

ownCloudリポジトリのインストール

$ curl https://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/Release.key | sudo apt-key add -
$ echo 'deb http://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/ /' > /etc/apt/sources.list.d/owncloud.list

ownCloundパッケージのインストール

$ apt update -y
$ apt install owncloud-files
$ systemctl restart apache2

MySQLにデータベースを作成

$ mysql -u root -p
Enter password:
mysql> CREATE DATABASE owncloud;
mysql> CREATE USER 'owncloud'@'localhost' IDENTIFIED BY 'OKMj9ttZcChTUWcs';
mysql> GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> exit
7
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
8