|
root@GlonHo:~# grep -q sse4_2 /proc/cpuinfo && echo "SSE 4.2 supported" || echo "SSE 4.2 not supported" SSE 4.2 supported
root@GlonHo:/etc/apt/sources.list.d# vim clickhouse.list
deb http://repo.yandex.ru/clickhouse/trusty stable main
root@GlonHo:~# apt-key adv --keyserver keyserver.ubuntu.com --recv E0C56BD4
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.IoJhY8ePkd --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv E0C56BD4
gpg: requesting key E0C56BD4 from hkp server keyserver.ubuntu.com
gpg: key E0C56BD4: public key "ClickHouse Repository Key <milovidov@yandex-team.ru>" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
root@GlonHo:~# apt-get update
Hit http://security.ubuntu.com trusty-security InRelease
Ign http://archive.ubuntu.com trusty InRelease
...
Reading package lists... Done
root@GlonHo:~#
root@GlonHo:~# apt-get install clickhouse-client clickhouse-server-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
acl at-spi2-core colord dconf-gsettings-backend dconf-service fontconfig
fontconfig-config fonts-dejavu-core hicolor-icon-theme libasound2
libasound2-data libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0
libavahi-client3 libavahi-common-data libavahi-common3 libcairo-gobject2
libcairo2 libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra0 libcolord1
libcolorhug1 libcups2 libdatrie1 libdconf1 libdrm-intel1 libdrm-nouveau2
libdrm-radeon1 libexif12 libfontconfig1 libfontenc1 libgd3
libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx
libglapi-mesa libgphoto2-6 libgphoto2-l10n libgphoto2-port10 libgraphite2-3
libgtk-3-0 libgtk-3-bin libgtk-3-common libgudev-1.0-0 libgusb2
libharfbuzz0b libice6 libieee1284-3 libjasper1 libjbig0 libjpeg-turbo8
libjpeg8 liblcms2-2 libllvm3.4 libltdl7 libnotify-bin libnotify4 libogg0
libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpciaccess0
libpixman-1-0 libsane libsane-common libsm6 libtdb1 libthai-data libthai0
libtiff5 libtxc-dxtn-s2tc0 libv4l-0 libv4lconvert0 libvorbis0a
libvorbisfile3 libvpx1 libwayland-client0 libwayland-cursor0 libx11-xcb1
libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
libxcb-render0 libxcb-shm0 libxcb-sync1 libxcomposite1 libxcursor1
libxdamage1 libxfixes3 libxfont1 libxi6 libxinerama1 libxkbcommon0
libxkbfile1 libxmu6 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxt6
libxtst6 libxxf86vm1 notification-daemon sound-theme-freedesktop x11-common
x11-xkb-utils xfonts-base xfonts-encodings xfonts-utils xserver-common
xserver-xorg-core
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
clickhouse-server-base
The following NEW packages will be installed:
clickhouse-client clickhouse-server-base clickhouse-server-common
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 198 MB of archives.
After this operation, 632 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://repo.yandex.ru/clickhouse/trusty/ stable/main clickhouse-server-base amd64 1.1.54198 [198 MB]
Get:2 http://repo.yandex.ru/clickhouse/trusty/ stable/main clickhouse-client amd64 1.1.54198 [2,674 B]
Get:3 http://repo.yandex.ru/clickhouse/trusty/ stable/main clickhouse-server-common amd64 1.1.54198 [7,578 B]
Fetched 198 MB in 18min 7s (182 kB/s)
Selecting previously unselected package clickhouse-server-base.
(Reading database ... 62852 files and directories currently installed.)
Preparing to unpack .../clickhouse-server-base_1.1.54198_amd64.deb ...
Unpacking clickhouse-server-base (1.1.54198) ...
Selecting previously unselected package clickhouse-client.
Preparing to unpack .../clickhouse-client_1.1.54198_amd64.deb ...
Unpacking clickhouse-client (1.1.54198) ...
Selecting previously unselected package clickhouse-server-common.
Preparing to unpack .../clickhouse-server-common_1.1.54198_amd64.deb ...
Unpacking clickhouse-server-common (1.1.54198) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up clickhouse-server-base (1.1.54198) ...
Processing triggers for ureadahead (0.100.0-16) ...
Setting up clickhouse-client (1.1.54198) ...
Setting up clickhouse-server-common (1.1.54198) ...
root@GlonHo:~#
root@GlonHo:~# top
Tasks: 90 total, 2 running, 88 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.0 us, 0.2 sy, 0.0 ni, 99.8> KiB Mem: 2049856 total, 1147260 used, 902596 free, 16004 buffers
KiB Swap: 0 total, 0 used, 0 free. 960556 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1262 root 20 0 112712 34552 1112 S 0.0 1.7 0:00.00 ruby
1196 root 20 0 182364 34428 2728 S 0.0 1.7 0:00.77 puppet
**2368 clickho+ 20 0 241336 12524 3504 S 0.0 0.6 0:00.04 clickhouse-serv**
1973 root 20 0 107720 4216 3220 S 0.0 0.2 0:00.02 sshd
root@GlonHo:~# ls /var/log/clickhouse-server/
clickhouse-server.err.log clickhouse-server.log stderr stdout
root@GlonHo:~# cat /var/log/clickhouse-server/clickhouse-server.err.log
2017.04.24 09:30:03.783101 [ 1 ] <Warning> ConfigProcessor: Include not found: networks
2017.04.24 09:30:03.783125 [ 1 ] <Warning> ConfigProcessor: Include not found: networks
2017.04.24 09:30:05.803298 [ 2 ] <Warning> ConfigProcessor: Include not found: clickhouse_remote_servers
2017.04.24 09:30:05.803353 [ 2 ] <Warning> ConfigProcessor: Include not found: clickhouse_compression
root@GlonHo:~#
root@GlonHo:~# cat /var/log/clickhouse-server/clickhouse-server.log
2017.04.24 09:30:03.708578 [ 1 ] <Information> : Starting daemon with revision 54198
2017.04.24 09:30:03.781176 [ 1 ] <Information> Application: starting up
2017.04.24 09:30:03.781650 [ 1 ] <Debug> Application: rlimit on number of file descriptors is 262144
2017.04.24 09:30:03.781664 [ 1 ] <Debug> Application: Initializing DateLUT.
2017.04.24 09:30:03.781670 [ 1 ] <Trace> Application: Initialized DateLUT with time zone `UTC'.
2017.04.24 09:30:03.782226 [ 1 ] <Debug> Application: Configuration parameter 'interserver_http_host' doesn't exist or exists and empty. Will use 'ubuntu' as replica host.
2017.04.24 09:30:03.782338 [ 1 ] <Debug> ConfigReloader: Loading config `/etc/clickhouse-server/users.xml'
2017.04.24 09:30:03.783093 [ 1 ] <Warning> ConfigProcessor: Include not found: networks
2017.04.24 09:30:03.783121 [ 1 ] <Warning> ConfigProcessor: Include not found: networks
2017.04.24 09:30:03.783472 [ 1 ] <Information> Application: Loading metadata.
2017.04.24 09:30:03.783610 [ 1 ] <Information> DatabaseOrdinary (default): Total 0 tables.
2017.04.24 09:30:03.783734 [ 1 ] <Debug> Application: Loaded metadata.
2017.04.24 09:30:03.783848 [ 1 ] <Information> DatabaseOrdinary (system): Total 0 tables.
2017.04.24 09:30:03.784376 [ 1 ] <Information> Application: Listening http://[::1]:8123
2017.04.24 09:30:03.784420 [ 1 ] <Information> Application: Listening tcp: [::1]:9000
2017.04.24 09:30:03.784448 [ 1 ] <Information> Application: Listening interserver: [::1]:9009
2017.04.24 09:30:03.784473 [ 1 ] <Information> Application: Listening http://127.0.0.1:8123
2017.04.24 09:30:03.784491 [ 1 ] <Information> Application: Listening tcp: 127.0.0.1:9000
2017.04.24 09:30:03.784507 [ 1 ] <Information> Application: Listening interserver: 127.0.0.1:9009
2017.04.24 09:30:03.784621 [ 1 ] <Information> Application: Ready for connections.
2017.04.24 09:30:05.801608 [ 2 ] <Debug> ConfigReloader: Loading config `/etc/clickhouse-server/config.xml'
2017.04.24 09:30:05.803274 [ 2 ] <Warning> ConfigProcessor: Include not found: clickhouse_remote_servers
2017.04.24 09:30:05.803348 [ 2 ] <Warning> ConfigProcessor: Include not found: clickhouse_compression
root@GlonHo:~# cat /var/log/clickhouse-server/stderr
Should logs to /var/log/clickhouse-server/clickhouse-server.log
Should error logs to /var/log/clickhouse-server/clickhouse-server.err.log
root@GlonHo:~# clickhouse-client
ClickHouse client version 1.1.54198.
Connecting to localhost:9000.
Connected to ClickHouse server version 1.1.54198.
:)
:) select 1
SELECT 1
┌─1─┐
│ 1 │
└───┘
1 rows in set. Elapsed: 0.023 sec.
:)
:) select now()
SELECT now()
┌───────────────now()─┐
│ 2017-04-24 09:37:31 │
└─────────────────────┘
1 rows in set. Elapsed: 0.005 sec.
:)
:) Bye. (CTRL + d 退出客户端)
root@GlonHo:~# service clickhouse-server stop
Stop clickhouse-server service: DONE |
|
|