And for what? Nothing :)
So I write this article as subject for sharing. Hope this help everybody.
What is owncloud? Do you know it? I think I do not must wait to answer from you. You are here and you know what you need.
Let's do it.
In this article, I use CentOS 6.5, owncloud version 8, php version >=5.4.0
Owncloud will be installed Apache as a dependencies. Therefore you can manually install:
#yum install httpd
#chkconfig --levels 235 httpd on
#/etc/init.d/httpd start
Also you need to allow http and https in SELINUX. From my point, you can disable SELINUX. Please remember, I do not recommend you do as me.
#vi /etc/selinux/config
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
#SELINUXTYPE=targeted
SELINUXTYPE=disabled
Next step, you need to install MySQL, it will be stored owncloud's database.
#yum install mysql-server
#chkconfig --levels 235 mysqld on
#/etc/init.d/mysqld start
You must configure firstly as follows:
#mysql secure installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
Set root password? [Y/n] <-- ENTER
New password: <-- yourrootsqlpassword
Re-enter new password: <-- yourrootsqlpassword
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] <-- ENTER
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] <-- ENTER
... Success!
By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] <-- ENTER
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] <-- ENTER
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
#mysql -u root -p
Put mysql's password here and create an database for owncloud.
CREATE DATABASE owncloud;
GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud_user'@'localhost' IDENTIFIED BY 'owncloud_user_pasword';
FLUSH PRIVILEGES;
exit
And ... now you download the source of owncloud
#wget https://download.owncloud.org/community/owncloud-8.0.0.tar.bz2
#tar -xjf owncloud-8.0.0.tar.bz2
#mv owncloud /var/www/html/owncloud/
#chown -R apache.apache /var/www/html/owncloud/
In Apache configuration, I recommend that you enable .htaccess to get a enhanced security features, by default .htaccess is disable in Apache configuration. To enable it, open your virtual host file, and make sure AllowOverride is set to All as follows:
#vi /etc/httpd/conf.d/owncloud.conf
<IfModule mod_alias.c>
Alias /owncloud /var/www/html/owncloud
</IfModule>
<Directory “/var/www/html/owncloud”>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
#/etc/init.d/httpd restart
Now, how you feel? It is right but it is not enough. To complete, you need to install php environment for owncloud.
Owncloud requires php>= 5.4.0 , therefore, you need to install php>=5.4.0.
#rpm -Uhv http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
#yum --enablerepo=remi install owncloud
Above command, php version 5.4 will automatically install.
Now you go to open web browser, type the address as http://your_ipaddress/owncloud , you will see a page that looks like this:
Click on Storage & database to select your database which was create above section. If you do not see your mysql database available that you should be restarted mysqld.
Click Finish setup. Login with your owncloud account, this account is a administrator. You can create an user as a member, group ...
What the fuck? Thailand have just won Indonesia. Thailand is a great team. They are professional teams.
Let's go home. I need to take a bath :D
Thank you for your coming here!
Thank you for reading this article, please a comment if you are interested.
Tiến Phan - R0039
Knowledge is Endless
Sharing for Success
0 nhận xét:
Post a Comment