NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we’ll need the current password for the root user. If you’ve just installed MariaDB, 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 MariaDB root user without the proper authorisation. Set root password? [Y/n] y #是否设置密码,当然是 New password: PassW0rd #数据库管理密码 Re-enter new password: PassW0rd #确认密码 Password updated successfully! Reloading privilege tables.. … Success! By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB 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] y … 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] y … Success! By default, MariaDB 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] y
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] y … Success! Cleaning up… All done! If you’ve completed all of the above steps, your MariaDB installation should now be secure.
Thanks for using MariaDB! [root@snipeit ~]##登陆数据库,登陆成功则表示安装完成 [root@snipeit ~]# mysql -u root -p Enter password: MariaDB [(none)]> exit Bye
This script will guide you to setup your seafile server using MySQL. Make sure you have read seafile server manual at https://download.seafile.com/published/seafile-manual/home.md
Press ENTER to continue #回车开始安装
What is the name of the server? It will be displayed on the client. 3 – 15 letters or digits [ server name ] seahub #服务器名,随便输也可以 What is the ip or domain of the server? For example: www.mycompany.com, 192.168.1.101 [ This server’s ip or domain ] 192.168.1.3 #IP地址或域名 Which port do you want to use for the seafile fileserver?
[ default “8082” ] #端口默认即可
Please choose a way to initialize seafile databases:
[1] Create new ccnet/seafile/seahub databases [2] Use existing ccnet/seafile/seahub databases [ 1 or 2 ] 1 #选择1 What is the host of mysql server? [ default “localhost” ] #数据库地址,无特殊需求,默认 What is the port of mysql server? [ default “3306” ] #数据库端口,无特殊需求默认 What is the password of the mysql root user? [ root password ]PassW0rd #上面设置的数据库管理密码 verifying password of user root … done Enter the name for mysql user of seafile. It would be created if not exists. [ default “seafile” ] #默认,直接回车 Enter the password for mysql user “seafile”: [ password for seafile ] #默认,直接回车 Enter the database name for ccnet-server: [ default “ccnet-db” ] #默认,直接回车 Enter the database name for seafile-server: [ default “seafile-db” ] #默认,直接回车 Enter the database name for seahub:
[ default “seahub-db” ] #默认,直接回车
This is your configuration
server name: seahub
server ip/domain: 192.168.1.3
seafile data dir: /opt/seafile/seafile-data
fileserver port: 8082
database: create new
ccnet database: ccnet-db
seafile database: seafile-db
seahub database: seahub-db
database user: seafile
Press ENTER to continue, or Ctrl-C to abort #确认上述信息无误,直接回车
If you are behind a firewall, remember to allow input/output of these tcp ports:
port of seafile fileserver: 8082 port of seahub: 8000 When problems occur, Refer to https://download.seafile.com/published/seafile-manual/home.md for information.
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;