Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions programs/install/Install.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,12 +495,12 @@ int mainEntryClickHouseInstall(int argc, char ** argv)
{
std::string data_file = config_d / "data-paths.xml";
WriteBufferFromFile out(data_file);
out << "<clickhouse>\n"
out << "<yandex>\n"
" <path>" << data_path.string() << "</path>\n"
" <tmp_path>" << (data_path / "tmp").string() << "</tmp_path>\n"
" <user_files_path>" << (data_path / "user_files").string() << "</user_files_path>\n"
" <format_schema_path>" << (data_path / "format_schemas").string() << "</format_schema_path>\n"
"</clickhouse>\n";
"</yandex>\n";
out.sync();
out.finalize();
fmt::print("Data path configuration override is saved to file {}.\n", data_file);
Expand All @@ -510,12 +510,12 @@ int mainEntryClickHouseInstall(int argc, char ** argv)
{
std::string logger_file = config_d / "logger.xml";
WriteBufferFromFile out(logger_file);
out << "<clickhouse>\n"
out << "<yandex>\n"
" <logger>\n"
" <log>" << (log_path / "clickhouse-server.log").string() << "</log>\n"
" <errorlog>" << (log_path / "clickhouse-server.err.log").string() << "</errorlog>\n"
" </logger>\n"
"</clickhouse>\n";
"</yandex>\n";
out.sync();
out.finalize();
fmt::print("Log path configuration override is saved to file {}.\n", logger_file);
Expand All @@ -525,13 +525,13 @@ int mainEntryClickHouseInstall(int argc, char ** argv)
{
std::string user_directories_file = config_d / "user-directories.xml";
WriteBufferFromFile out(user_directories_file);
out << "<clickhouse>\n"
out << "<yandex>\n"
" <user_directories>\n"
" <local_directory>\n"
" <path>" << (data_path / "access").string() << "</path>\n"
" </local_directory>\n"
" </user_directories>\n"
"</clickhouse>\n";
"</yandex>\n";
out.sync();
out.finalize();
fmt::print("User directory path configuration override is saved to file {}.\n", user_directories_file);
Expand All @@ -541,15 +541,15 @@ int mainEntryClickHouseInstall(int argc, char ** argv)
{
std::string openssl_file = config_d / "openssl.xml";
WriteBufferFromFile out(openssl_file);
out << "<clickhouse>\n"
out << "<yandex>\n"
" <openSSL>\n"
" <server>\n"
" <certificateFile>" << (config_dir / "server.crt").string() << "</certificateFile>\n"
" <privateKeyFile>" << (config_dir / "server.key").string() << "</privateKeyFile>\n"
" <dhParamsFile>" << (config_dir / "dhparam.pem").string() << "</dhParamsFile>\n"
" </server>\n"
" </openSSL>\n"
"</clickhouse>\n";
"</yandex>\n";
out.sync();
out.finalize();
fmt::print("OpenSSL path configuration override is saved to file {}.\n", openssl_file);
Expand Down Expand Up @@ -716,25 +716,25 @@ int mainEntryClickHouseInstall(int argc, char ** argv)
hash_hex.resize(64);
for (size_t i = 0; i < 32; ++i)
writeHexByteLowercase(hash[i], &hash_hex[2 * i]);
out << "<clickhouse>\n"
out << "<yandex>\n"
" <users>\n"
" <default>\n"
" <password remove='1' />\n"
" <password_sha256_hex>" << hash_hex << "</password_sha256_hex>\n"
" </default>\n"
" </users>\n"
"</clickhouse>\n";
"</yandex>\n";
out.sync();
out.finalize();
fmt::print(HILITE "Password for default user is saved in file {}." END_HILITE "\n", password_file);
#else
out << "<clickhouse>\n"
out << "<yandex>\n"
" <users>\n"
" <default>\n"
" <password><![CDATA[" << password << "]]></password>\n"
" </default>\n"
" </users>\n"
"</clickhouse>\n";
"</yandex>\n";
out.sync();
out.finalize();
fmt::print(HILITE "Password for default user is saved in plaintext in file {}." END_HILITE "\n", password_file);
Expand Down Expand Up @@ -778,9 +778,9 @@ int mainEntryClickHouseInstall(int argc, char ** argv)
{
std::string listen_file = config_d / "listen.xml";
WriteBufferFromFile out(listen_file);
out << "<clickhouse>\n"
out << "<yandex>\n"
" <listen_host>::</listen_host>\n"
"</clickhouse>\n";
"</yandex>\n";
out.sync();
out.finalize();
fmt::print("The choice is saved in file {}.\n", listen_file);
Expand Down