Documentation, Manual Install, suggestions

@rdb, thanks for your responses to my topics, particularly the second one on documentation. This one is for suggestions about Installation with MySQL - Seafile Admin Manual .
Where I went wrong is at

Tip: If you have little experience with Seafile Server, we recommend that you use an installation script for deploying Seafile.

I went off and ran the script without installing mysql and the other dependencies first. I suggest you remove that line from the document, so people will install mysql and the other dependencies first. (After the prerequisites section, your document already points us to the setup script, setup-seafile-mysql.sh)

I suggest you add to this line:

Seafile prior to and including Seafile 7.0 use Python 2. More recent versions rely on Python 3.

ā€œChoose the instructions below that are relevant for your system:ā€

I suggest you add sudo at the beginning of the line

mkdir /opt/seafile

The following adduser and chown commands will also need to run as root, I think, so I suggest you add sudo at the beginning of each of them also. Experienced system administrators will know that and can add sudo where needed, but so that less experienced users of SeaFile can just copy a whole command and paste it, I think the sudo commands would help in the documentation.

When it comes to downloading the security key, the new user seafile needs to be able to use sudo, so I suggest you add, straight after the adduser command, this one:

sudo usermod -aG sudo seafile

For the command

su seafile

I suggest you change it to

su -l seafile

so the new shell running as the user seafile will be regarded as a login shell, and will pick up seafileā€™s environment, and the command line history will work proplerly.

Your line:

Download the install package from the download page on Seafileā€™s website using wget.

took me to a page where I clicked on the link Client for Linux instead of getting the Server package. (Seems Iā€™ll get things wrong if I possibly can :slight_smile: ) I think it would be helpful if your document says to scroll down to the Server section and click the link for the relevant version under Server for generic Linux. (Perhaps this page has changed since you updated your documentation page.) Downloading this file doesnā€™t need wget.

I was working through the client install instructions (incorrectly), and that did involve using wget to install the key for the software repository. (Not needed for downloading the tar file.) When I ran the command to install the debug symbols, I got two error messages:

Reading package listsā€¦ Done
Building dependency tree
Reading state informationā€¦ Done
E: Unable to locate package ccnet-dbg
E: Unable to locate package libccnet-dbg

It seems I donā€™t have the right software source listed to get these two. I have searched online but have not found what source I need to add. I have asked a question at Ask Ubuntu, and if I get an answer Iā€™ll add something here. ā€“ yes, I did get an answer, at StackExchange: " The package libccnet-dbg is not available for any release of Ubuntu". So would you like to ask the maintainer of the client-installation page to look into whether or not those two -dbg items are needed, and perhaps remove them from that page.

When I got to the point of running the correct setup script, setup-seafile-mysql.sh, it worked well till it got to accessing the database. It was not able to log in to mysql as root@localhost. In a separate terminal window I was able to log in with

sudo mysql -u root -p

and this made me think that mysql was still using the authentication method based on the Linux account of the person trying to log in, instead of with mysql_native_password. So I went back to your documentation and found the bit where you say that the the tutorials on the Digital Ocean website show how to change the authentication method to mysql_native_password. I searched there but couldnā€™t find out how to do that. I had previously worked through the tutorial for installing mysql for Ubuntu 20.04, but that contains nothing about setting the authentication method to mysql_native_password.
But I did find an answer at Stack Overflow that included the mysql commands to do that. I suggest you add these to the documentation where you talk about setting this authentication method.

sudo mysql -u root -p

and then at the mysql prompt:

ALTER USER ā€˜rootā€™@ā€˜localhostā€™ IDENTIFIED BY ā€˜passwordā€™ PASSWORD EXPIRE NEVER;
ALTER USER ā€˜rootā€™@ā€˜localhostā€™ IDENTIFIED WITH mysql_native_password BY ā€˜passwordā€™;

The reader should change password to a sensible password, of course :slight_smile:

Would it be appropriate to add the commands for creating the user seafile@localhost with mysql_native_password also?

Iā€™ll send this off now, and may have more suggestions later. Thanks for all your good work on the documentation.

2 Likes

Hi Jim,
at the very latest after the release of Seafile 9 - scheduled for the end of the year - Iā€™ll revise the manual and take your valuable comments into consideration.

Just for clarification right here:

  • This reference in the install instructions
    ā€œTip: If you have little experience with Seafile Server, we recommend that you use an installation script for deploying Seafile.ā€
    is NO pointer to the setup-seafile-mysql.sh. It links to a series of scripts that are capable of installing various versions of Seafile (including all prerequisites) on different OS platforms. Please check that.
  • You say: ā€œDownloading this file doesnā€™t need wget.ā€ My question is: Where did you install Seafile Server? When you install Seafile Server on a Linux OS without GUI, you definitely need wget. And even if you have an OS with desktop environment, it is advisable to just follow the instructions.
  • You made things way too complicated. wgetting and untarring the package is all you have to do. This said, I hear you. The corresponding section in the install instructions of Seafile Professional is more detailed. I will copy that over.

Thanks again, @rdb , I did indeed make things far too complicated for myself by reading about installing the client software, when it was the server software I needed to install.

Hi again, @rdb , some more suggestions for the documentation.

When the setup script came to making the mysql user to operate the seafile database, seafile by default, I got these errors:

Enter the name for mysql user of seafile. It would be created if not exists.
[ default ā€œseafileā€ ] seafile
Enter the password for mysql user ā€œseafileā€:
[ password for seafile ]
verifying password of user seafile ā€¦
Failed to connect to mysql server using user ā€œseafileā€ and password ā€œ***ā€: Access denied for user ā€˜seafileā€™@ā€˜localhostā€™ (using password: YES)
Enter the name for mysql user of seafile. It would be created if not exists.

It seems to me that it would be helpful for the documentation to contain an instruction for where that happens for the user to open another terminal window and do

mysql -u root -p

and at the mysql prompt enter

CREATE USER ā€˜seafileā€™@ā€˜localhostā€™ IDENTIFIED WITH mysql_native_password BY ā€˜passwordā€™;

where ā€œpasswordā€ should be replaced with a good password that the user chooses for the seafile account.

I did that, and the setup script has now moved on to the next question.

(By the way, the markdown formatter used by this forum software is very good, but it replaces straight quotes with smart quotes. So if I copy a command like the one above to the clipboard and paste it into mysql, it doesnā€™t work, because mysql is expecting straight quotes, not smart quotes. Do you know of a way of preventing the display of straight quotes as smart quotes?)

Concerning telling mysql to use mysql_native_password for the Seafile databases, I read somewhere that this can be achieved by setting a variable in a file with a name like mysql.cnf, but the writer did not say where I would find this file. (My system now has about 5 of them, from the different attempts I have made at installing SeaFile.) And, it seems to me, that setting would apply to all databases, not just the SeaFile ones, and other products might want to use the standard password authentication for Ubuntu. Do you have comments on that?

Enough for now. I may have other suggestions later.

1 Like

Another point, @rdb, you have included lots of helpful notes on how to answer the questions that the setup script asks, but I have only noticed them now!

I suggest that you put something just above

Run the script as user seafile:

perhaps something like When you run the setup script it will ask you lots of questions. I have provided notes about how you may choose to answer them in the tables below the next commands:

An example of where it is important that the user read your comments before answering each question is with passwords. You say that the password canā€™t contain ā€œ%ā€, and I found that was correct! I had set up a password that contained ā€œ%ā€ and got an exception from the python script.

Enough for now.