글

라벨이 linux인 게시물 표시

Show free space of storage on Linux

$ df Filesystem     1K-blocks     Used Available Use% Mounted on udev               998984       0     998984   0% /dev tmpfs             203840     8408     195432   5% /run /dev/xvda1       49563892 3523424   43499720   8% / tmpfs             1019184       0   1019184   0% /dev/shm tmpfs               5120       0       5120   0% /run/lock tmpfs             1019184       0   1019184   0% /sys/fs/cgroup tmpfs             203944       0     203944   0% /run/user/1000 tmpfs             203944       0     203944 ...

Install Nginx on Linux

http://nginx.org/en/linux_packages.html#mainline For Debian/Ubuntu, in order to authenticate the nginx repository signature and to eliminate warnings about missing PGP key during installation of the nginx package, it is necessary to add the key used to sign the nginx packages and repository to the  apt  program keyring. Please download  this key  from our web site, and add it to the  apt  program keyring with the following command: sudo apt-key add nginx_signing.key For Ubuntu replace  codename  with Ubuntu distribution  codename , and append the following to the end of the  /etc/apt/sources.list  file: codename Ubuntu: Version Codename Supported Platforms 14.04 trusty x86_64, i386, aarch64/arm64 16.04 xenial x86_64, i386, ppc64el, aarch64/arm64 17.10 artful x86_64, i386 18.04 bionic x86_64 deb http://nginx.org/packages/ubuntu/ codename nginx deb-src http://nginx.org/packages/ubuntu/ codename nginx For De...

Install MongoDB on Linux

Install guide https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/#install-mongodb-community-edition Start MongoDB sudo service mongod start ~ $ mongo MongoDB shell version v4.0.4 connecting to: mongodb://127.0.0.1:27017 Implicit session: session { "id" : UUID("9d29ae49-0a6b-4b7a-b6b2-2b4b569362d6") } MongoDB server version: 4.0.4 Server has startup warnings:   2018-11-18T22:44:34.298+0900 I STORAGE   [initandlisten]   2018-11-18T22:44:34.298+0900 I STORAGE   [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine 2018-11-18T22:44:34.298+0900 I STORAGE   [initandlisten] **           See http://dochub.mongodb.org/core/prodnotes-filesystem 2018-11-18T22:44:35.355+0900 I CONTROL   [initandlisten]   2018-11-18T22:44:35.355+0900 I CONTROL   [initandlisten] ** WARNING: Access control is not enabled for the datab...

Add a user into sudo on Linux

Create a new user root@server:~# adduser username Adding user `username' ... Adding new group `username' (1001) ... Adding new user `username' (1001) with group `username' ... Creating home directory `/home/username' ... Copying files from `/etc/skel' ... New password:   Retype new password:   passwd: password updated successfully Changing the user information for  username Enter the new value, or press ENTER for the default Full Name []:     Room Number []:   Work Phone []:   Home Phone []:   Other []:   Is the information correct? [Y/n] y Add the user into the sudo group root@mserver:~# adduser username sudo Adding user `username' to group `sudo' ... Adding user username to group sudo Done. Switch to the new user account  root@mal-eum:~# su - username To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details...

Change password on Linux (Unix system)

change password # passwd New password: Retype new password: passwd: password updated successfully