[Ubuntu 16.04] Tomcat 8.5.x 설치

OS/Linux 2017.11.07 11:30 Posted by 파란크리스마스

출처 : How To Install Apache Tomcat 8 on Ubuntu 16.04 | DigitalOcean

tomcat 그룹, tomcat 사용자 생성

$ sudo groupadd tomcat
$ sudo useradd -g tomcat -s /bin/bash -m tomcat

Tomcat 8.5 다운로드 및 압축해제

$ cd /usr/local
$ sudo wget http://mirror.apache-kr.org/tomcat/tomcat-8/v8.5.23/bin/apache-tomcat-8.5.23.tar.gz
$ sudo tar xvf apache-tomcat-8.5.23.tar.gz 

Tomcat 설치된 경우 tomcat 사용자로 소유자 변경

$ sudo chown -R tomcat:tomcat /usr/local/apache-tomcat-8.5.23

jdk 설치 확인

$ sudo update-java-alternatives -l
java-8-oracle                  1081       /usr/lib/jvm/java-8-oracle

서비스 파일 작성

$ sudo vi /etc/systemd/system/tomcat.service

[Unit]
Description=Apache Tomcat Web Application Container
After=network.target

[Service]
Type=forking

Environment=JAVA_HOME=/usr/lib/jvm/java-8-oracle
Environment=CATALINA_PID=/usr/local/apache-tomcat-8.5.23/temp/tomcat.pid
Environment=CATALINA_HOME=/usr/local/apache-tomcat-8.5.23
Environment=CATALINA_BASE=/usr/local/apache-tomcat-8.5.23
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'

ExecStart=/usr/local/apache-tomcat-8.5.23/bin/startup.sh
ExecStop=/usr/local/apache-tomcat-8.5.23/bin/shutdown.sh

User=tomcat
Group=tomcat
UMask=0007
RestartSec=10
Restart=always

[Install]
WantedBy=multi-user.target

Tomcat 8.5 서비스 등록

$ sudo systemctl daemon-reload
$ sudo systemctl enable tomcat      (재부팅시 자동실행)
Created symlink from /etc/systemd/system/multi-user.target.wants/tomcat.service to /etc/systemd/system/tomcat.service.

Tomcat 8.5 서비스 실행

$ sudo systemctl start tomcat

Tomcat 8.5 서비스 실행 정보 확인

$ systemctl status tomcat.service
● tomcat.service - Apache Tomcat Web Application Container
   Loaded: loaded (/etc/systemd/system/tomcat.service; disabled; vendor preset: enabled)
   Active: active (running) since 화 2017-11-07 14:08:26 KST; 13s ago
  Process: 32519 ExecStart=/usr/local/apache-tomcat-8.5.23/bin/startup.sh (code=exited, status=0/SUCCESS)
 Main PID: 32526 (java)
   CGroup: /system.slice/tomcat.service
           └─32526 /usr/lib/jvm/java-8-oracle/bin/java -Djava.util.logging.config.file=/usr/local/apache-tomcat-8.5.23/conf/l

11월 07 14:08:26 bluesanta-ubuntu systemd[1]: Starting Apache Tomcat Web Application Container...
11월 07 14:08:26 bluesanta-ubuntu startup.sh[32519]: Using CATALINA_BASE:   /usr/local/apache-tomcat-8.5.23
11월 07 14:08:26 bluesanta-ubuntu startup.sh[32519]: Using CATALINA_HOME:   /usr/local/apache-tomcat-8.5.23
11월 07 14:08:26 bluesanta-ubuntu startup.sh[32519]: Using CATALINA_TMPDIR: /usr/local/apache-tomcat-8.5.23/temp
11월 07 14:08:26 bluesanta-ubuntu startup.sh[32519]: Using JRE_HOME:        /usr/lib/jvm/java-8-oracle
11월 07 14:08:26 bluesanta-ubuntu systemd[1]: Started Apache Tomcat Web Application Container.

Tomcat 8.5 서비스 종료

$ sudo systemctl stop tomcat
저작자 표시
신고

[Ubuntu 16.04] Samba 설치

OS/Linux 2017.10.25 13:53 Posted by 파란크리스마스

출처 : 우분투 자작 NAS – 4강, Samba를 이용한 윈도우 파일 공유 - SPACE XIAN

Samba 서버 설치

$ sudo apt-get install samba

리눅스 사용자 Samba 암호 설정

이미 리눅스 사용자 중에서 Samba용 암호 생성

$ sudo smbpasswd -a bluesanta
New SMB password:
Retype new SMB password:
Added user bluexmas.

Samba 환경 설정 - 공유 폴더 추가

$ sudo vi /etc/samba/smb.conf

[bluesanta]
comment = Cloud Root
path = /bluesanta/samba_root
writeable = yes
browseable = no
valid users = bluesanta

Samba 다시 시작

$ sudo service smbd restart
$ sudo service nmbd restart
저작자 표시
신고

[CentOS] JDK 1.8 설치

OS/Linux 2017.10.25 13:29 Posted by 파란크리스마스

출처 : CentOS JDK 설치 - 제타위키

설치 가능한 JDK 버전 확인

# yum list java*jdk-devel
......
Available Packages
java-1.6.0-openjdk-devel.x86_64        1:1.6.0.41-1.13.13.1.el6_8        base   
java-1.7.0-openjdk-devel.x86_64        1:1.7.0.151-2.6.11.0.el6_9        updates
java-1.8.0-openjdk-devel.x86_64        1:1.8.0.151-1.b12.el6_9  

JDK 1.8 설치

# yum install java-1.8.0-openjdk-devel.x86_64

설치한 JDK 버전 확인

# java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)

JAVA_HOME 환경 변수 추가

# vi /etc/profile

JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.151-1.b12.el6_9.x86_64
저작자 표시
신고

[CentOS] Apache 웹서버 설치

OS/Linux 2017.10.25 10:09 Posted by 파란크리스마스

출처 : CentOS 아파치 설치 - 제타위키

현재 설치된 Apache 웹서버 버전 확인

# httpd -v
Server version: Apache/2.2.3
Server built:   Apr  3 2014 19:51:47

설치 가능한 Apache 웹서버 버전 확인

# yum list httpd
......
base                                                     | 3.7 kB     00:00     
extras                                                   | 3.4 kB     00:00     
updates                                                  | 3.4 kB     00:00     
Available Packages
httpd.x86_64                   2.2.15-60.el6.centos.6                    updates

Apache 웹서버 설치

# yum install httpd
Loaded plugins: fastestmirror, security
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirror.navercorp.com
 * extras: mirror.navercorp.com
 * updates: ftp.kaist.ac.kr
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.2.15-60.el6.centos.6 will be installed
--> Processing Dependency: httpd-tools = 2.2.15-60.el6.centos.6 for package: httpd-2.2.15-60.el6.centos.6.x86_64
--> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-60.el6.centos.6.x86_64
--> Running transaction check
---> Package apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package httpd-tools.x86_64 0:2.2.15-60.el6.centos.6 will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
 Package            Arch        Version                      Repository    Size
================================================================================
Installing:
 httpd              x86_64      2.2.15-60.el6.centos.6       updates      836 k
Installing for dependencies:
 apr-util-ldap      x86_64      1.3.9-3.el6_0.1              base          15 k
 httpd-tools        x86_64      2.2.15-60.el6.centos.6       updates       80 k
 
Transaction Summary
================================================================================
Install       3 Package(s)
 
Total download size: 932 k
Installed size: 3.2 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm          |  15 kB     00:00     
(2/3): httpd-2.2.15-60.el6.centos.6.x86_64.rpm           | 836 kB     00:00     
(3/3): httpd-tools-2.2.15-60.el6.centos.6.x86_64.rpm     |  80 kB     00:00     
--------------------------------------------------------------------------------
Total                                           2.8 MB/s | 932 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : apr-util-ldap-1.3.9-3.el6_0.1.x86_64                         1/3 
  Installing : httpd-tools-2.2.15-60.el6.centos.6.x86_64                    2/3 
  Installing : httpd-2.2.15-60.el6.centos.6.x86_64                          3/3 
  Verifying  : httpd-2.2.15-60.el6.centos.6.x86_64                          1/3 
  Verifying  : httpd-tools-2.2.15-60.el6.centos.6.x86_64                    2/3 
  Verifying  : apr-util-ldap-1.3.9-3.el6_0.1.x86_64                         3/3 
 
Installed:
  httpd.x86_64 0:2.2.15-60.el6.centos.6                                         
 
Dependency Installed:
  apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1                                        
  httpd-tools.x86_64 0:2.2.15-60.el6.centos.6                                   
 
Complete!

mod_ssl 설치

# yum -y insltall mod_ssl

Apache 웹서버 서비스 실행

# service httpd start
저작자 표시
신고

[Ubuntu 16.04] OwnCloud 설치

OS/Linux 2017.10.24 01:28 Posted by 파란크리스마스

출처 : 우분투 자작 NAS 설치하기 - (7) OwnCloud - 살만한 세상 만들기 - Tistory
우분투 리눅스 서버 16.04 LTS에서 APM설치(PHP5 설치가 안될때) - 따뜻한 커피한잔

Apache2 설치

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install apache2

PHP 설치

$ sudo apt-get install php

Apache2 와 PHP 연동 모듈 설치

$ sudo apt-get install libapache2-mod-php

MySQL - PHP 연동 모듈 설치

$ sudo apt-get install php-mysql 

PHP 확장 모듈 설치

$ sudo apt-get install php-gd php-json php-curl php-intl php-mcrypt php-imagick
$ sudo apt-get install php-zip php-dom php-mbstring

MySQL에 OwnCloud DB와 사용자 생성

$ cd /usr/local/mysql
$ bin/mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.20-log
 
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
 
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
 
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql> CREATE DATABASE owncloud;
Query OK, 1 row affected (0.00 sec)
 
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
mysql> create user 'owncloud'@'localhost' identified by '***';
Query OK, 0 rows affected (0.00 sec)
 
mysql> GRANT ALL privileges ON owncloud.* TO 'owncloud'@'localhost' identified by '***'; 
Query OK, 0 rows affected, 1 warning (0.00 sec)
 
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
 
mysql> exit
Bye
$ 

OwnCloud 설치

$ wget https://download.owncloud.org/community/owncloud-10.0.3.tar.bz2
$ tar jxvf owncloud-10.0.3.tar.bz2
$ sudo mv owncloud /var/www
$ sudo chown -R www-data:www-data /var/www/owncloud

Apache2에 경로 추가

$ sudo vi /etc/apache2/apache2.conf

Alias /cloud "/var/www/owncloud"

# ownCloud
<Directory /var/www/owncloud>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

PHP환경파일(php.ini) - MySQL 정보 설정

Message: mysqli::real_connect(): (HY000/2002): No such file or directory 오류 발생시 적용

$ sudo vi /etc/php/7.0/apache2/php.ini

pdo_mysql.default_socket=/usr/local/mysql/mysql.sock

Apache2 재시작

$ sudo service apache2 restart







---------------------------------------------------------------------------------------

가상경로로 사용하는 경우 (참고용)

---------------------------------------------------------------------------------------

OwnCloud 설치

$ cd /etc/apache2/sites-available
$ sudo cp 000-default.conf owncloud.conf

owncloud.conf 수정

$ sudo vi /etc/apache2/sites-available/owncloud.conf

DocumentRoot /var/www/owncloud

a2dissite

$ sudo a2ensite owncloud.conf 
Enabling site owncloud.
To activate the new configuration, you need to run:
  service apache2 reload

a2dissite

$ sudo a2dissite owncloud.conf
Site owncloud disabled.
To activate the new configuration, you need to run:
  service apache2 reload
저작자 표시
신고

[Ubuntu 16.04] 디스크 추가 (파티션 추가, 수정, 삭제)

OS/Linux 2017.10.22 11:58 Posted by 파란크리스마스

출처 : Ubuntu 14.04에 새로운 하드디스크 추가 및 포맷후 자동 마운트 설정

디스크 확인

$ sudo fdisk -l
Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 9AE56DAA-6072-4BF2-B94C-7CDEA00F4BD6
 
Device         Start       End   Sectors   Size Type
/dev/sda1       2048   1050623   1048576   512M EFI System
/dev/sda2    1050624 233578495 232527872 110.9G Linux filesystem
/dev/sda3  233578496 250068991  16490496   7.9G Linux swap
 
 
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x9d6a04a1
 
Device     Boot   Start        End    Sectors  Size Id Type
/dev/sdb1          2048    4982527    4980480  2.4G fd Linux raid autodetect
/dev/sdb2       4982528    9176831    4194304    2G fd Linux raid autodetect
/dev/sdb3       9437184 3906824351 3897387168  1.8T fd Linux raid autodetect

파티션 삭제

bluesanta@bluesanta-ubuntu:~$ sudo fdisk /dev/sdb
 
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
 
 
Command (m for help): p
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x9d6a04a1
 
Device     Boot   Start        End    Sectors  Size Id Type
/dev/sdb1          2048    4982527    4980480  2.4G fd Linux raid autodetect
/dev/sdb2       4982528    9176831    4194304    2G fd Linux raid autodetect
/dev/sdb3       9437184 3906824351 3897387168  1.8T fd Linux raid autodetect
 
Command (m for help): d
Partition number (1-3, default 3): 3
 
Partition 3 has been deleted.
 
Command (m for help): p
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x9d6a04a1
 
Device     Boot   Start     End Sectors  Size Id Type
/dev/sdb1          2048 4982527 4980480  2.4G fd Linux raid autodetect
/dev/sdb2       4982528 9176831 4194304    2G fd Linux raid autodetect
 
Command (m for help): d
Partition number (1,2, default 2): 2
 
Partition 2 has been deleted.
 
Command (m for help): p
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x9d6a04a1
 
Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1        2048 4982527 4980480  2.4G fd Linux raid autodetect
 
Command (m for help): d
Selected partition 1
Partition 1 has been deleted.
 
Command (m for help): p
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x9d6a04a1
 
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
 
bluesanta@bluesanta-ubuntu:~$

파티션 생성

bluesanta@bluesanta-ubuntu:~$ sudo fdisk /dev/sdb
 
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
 
 
Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-3907029167, default 2048): 
Last sector, +sectors or +size{K,M,G,T,P} (2048-3907029167, default 3907029167): 

Created a new partition 1 of type 'Linux' and of size 1.8 TiB.

Command (m for help): p
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x9d6a04a1

Device     Boot Start        End    Sectors  Size Id Type
/dev/sdb1        2048 3907029167 3907027120  1.8T 83 Linux

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

bluesanta@bluesanta-ubuntu:~$

파티션 포맷

$ sudo mkfs.ext4 /dev/sdb1
mke2fs 1.42.13 (17-May-2015)
/dev/sdb1 contains a ext4 file system labelled '1.42.6-15047'
        last mounted on /tmpRoot on Sun Oct 22 04:57:39 2017
Proceed anyway? (y,n) y
Creating filesystem with 488378390 4k blocks and 122101760 inodes
Filesystem UUID: 453664ac-c02b-455c-9ba1-3d35bd897f7a
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
        102400000, 214990848
 
Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information:            
done

마운트

UUID 확인

$ sudo blkid
/dev/sdb1: UUID="453664ac-c02b-455c-9ba1-3d35bd897f7a" TYPE="ext4" PARTUUID="9d6a04a1-01"
/dev/sda1: UUID="D45D-43C1" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="25020812-a594-49f0-8f24-99da4af239dd"
/dev/sda2: UUID="53ea17c4-0915-40b0-8bbb-8bb001c978ba" TYPE="ext4" PARTUUID="dea676bf-ea7f-449c-b483-e9d624cc549a"
/dev/sda3: UUID="872f5a18-1582-4dcd-a5ba-3d3f80b06571" TYPE="swap" PARTUUID="af10b5bd-2801-4178-b182-d68a297951d7"

fstab 파일에 파티션 추가

$ sudo vi /etc/fstab

# 파티션 추가
UUID=453664ac-c02b-455c-9ba1-3d35bd897f7a /bluesanta      ext4    defaults 0       0

마운트 및 확인

$ sudo mkdir /bluesanta
$ sudo mount -a
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
....
/dev/sdb1       1.8T   68M  1.7T   1% /bluesanta
저작자 표시
신고

[Ubuntu 16.04] 원격 데스크탑(xrdp) 설치

OS/Linux 2017.10.22 11:25 Posted by 파란크리스마스

출처 : ubuntu 16.04 원격 데스크탑 :: Hyub's Tistory
XRDP – How to install XRDP on Ubuntu 16.04 – Easy Way – Griffon's IT Library

XRDP Package 설치

$ sudo apt-get install xrdp

Mate-desktop 설치 설치

$ sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon

데스크탑 환경을 xRDP 사용하도록 설정

$ sudo sed -i.bak '/fi/a #xrdp multiple users configuration \n mate-session \n' /etc/xrdp/startwm.sh
저작자 표시
신고
TAG xrdp

Ubuntu 디스크 mount 하기

OS/Linux 2017.04.19 14:03 Posted by 파란크리스마스

Ubuntu 디스크 mount 하기

출처 : Mint & Latte_. :: 리눅스에서 하드디스크 mount 하기

추가된 디스트 Volume 확인

$ sudo fdisk -l
 
Disk /dev/vda: 42.9 GB, 42949672960 bytes
16 heads, 63 sectors/track, 83220 cylinders, total 83886080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000648d6
 
   Device Boot      Start         End      Blocks   Id  System
/dev/vda1            2048     3905535     1951744   82  Linux swap / Solaris
/dev/vda2   *     3905536    83885759    39990112   83  Linux
 
Disk /dev/vdb: 214.7 GB, 214748364800 bytes
16 heads, 63 sectors/track, 416101 cylinders, total 419430400 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/vdb doesn't contain a valid partition table

파일시스템 생성

$ sudo mkfs.ext4 /dev/vdb
mke2fs 1.42.9 (4-Feb-2014)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
13107200 inodes, 52428800 blocks
2621440 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
1600 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624, 11239424, 20480000, 23887872
 
Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

mount 받을 디렉토리 생성

$ sudo mkdir /bluexmas_db

mount 하기

$ sudo mount /dev/vdb /bluexmas_db

mount 확인

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            2.0G   12K  2.0G   1% /dev
tmpfs           396M  364K  395M   1% /run
/dev/vda2        38G  1.6G   35G   5% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none            2.0G     0  2.0G   0% /run/shm
none            100M     0  100M   0% /run/user
/dev/vdb        197G   60M  187G   1% /bluexmas_db

unmount 하기

$ sudo umount /bluexmas_db

unmount 확인

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            2.0G   12K  2.0G   1% /dev
tmpfs           396M  372K  395M   1% /run
/dev/vda2        38G  9.2G   27G  26% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
none            5.0M     0  5.0M   0% /run/lock
none            2.0G     0  2.0G   0% /run/shm
none            100M     0  100M   0% /run/user

자동 mount

출처 : Ubuntu 14.04에 새로운 하드디스크 추가 및 포맷후 자동 마운트 설정

UUID 확인

$ sudo blkid
/dev/vda1: UUID="4874a47d-f878-440c-95d0-297e6733abea" TYPE="swap" 
/dev/vda2: UUID="20c996fb-8c20-4e7f-958e-84b7581af70f" TYPE="ext4" 
/dev/vdb: UUID="6e0b7ac6-d17d-4829-839f-80662339cf6b" TYPE="ext4" 
저작자 표시
신고

iptable

OS/Linux 2016.11.21 16:36 Posted by 파란크리스마스

iptable 조회

$ sudo iptables -nL
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         


저작자 표시
신고

[Ubuntu 14.04] torrent daemon 설치

OS/Linux 2015.02.21 15:17 Posted by 파란크리스마스

설치 확인

$ dpkg -l | grep transmission
ii  transmission-common                                   2.82-1.1ubuntu3.1                                   all          lightweight BitTorrent client (common files)
ii  transmission-gtk                                      2.82-1.1ubuntu3.1                                   amd64        lightweight BitTorrent client (GTK+ interface)

설치

$ sudo apt-get install transmission-daemon

환경 설정 (/etc/transmission-daemon/settings.json)

mycom - sudo vi /etc/transmission-daemon/settings.json

서비스가 종료된 경우만 수정 가능

IP filter 설정

"blocklist-enabled": true,
"blocklist-url": "http://list.iblocklist.com/?list=bt_level1&fileformat=p2p&archiveformat=gz"

외부 웹 접속 설정

"rpc-authentication-required": true, 
"rpc-url": "/transmission/", 
"rpc-username": "admin",
"rpc-enabled": true, 
"rpc-password": "admin12", 
"rpc-port": 9091, 
"rpc-whitelist": "127.0.0.1", 
"rpc-whitelist-enabled": false, 

최대 다운로드, 최대 업로드 관련 설정

"speed-limit-down-enabled": true 일 경우에만 speed-limit-down 가 적용
"speed-limit-up-enabled": true 일 경우에만 speed-limit-up 가 적용

"speed-limit-down": 100, 
"speed-limit-down-enabled": false, 
"speed-limit-up": 100, 
"speed-limit-up-enabled": false, 

다운로드 경로 설정

"download-dir": "/bluesanta/torrent/torrent.download", 
"incomplete-dir": "/bluesanta/torrent/torrent.temp", 
"incomplete-dir-enabled": true, 

자동 불러오기

"trash-original-torrent-files": true,
"watch-dir": "/bluesanta/torrent/torrent.auto", 
"watch-dir-enabled": true

서비스 시작

$ sudo service transmission-daemon start
transmission-daemon start/running, process 6479

서비스 종료

$ sudo service transmission-daemon stop
transmission-daemon stop/waiting


저작자 표시
신고

[Ubuntu 14.04] SVN 설치

OS/Linux 2015.02.15 10:54 Posted by 파란크리스마스

출처 : 우분투에서 Subversion 설치 및 설정
Ubuntu – How to install SVN (Subversion)
리눅스 svn서버 설치 및 설정
SVN 권한 설정
[Centos] Subversion 설치하기
CentOS에 Subversion 설치후 설정하기

svn 설치

# apt-get install -y subversion

svn 환경파일(/conf/svnserve.conf) 수정

# vi /bluesanta/Repositories/conf/svnserve.conf

[general]
#인증되지않은(즉 계정이 없는) 사용자에 대해 접근을 거부한다.
anon-access = none
#인증된 사용자에 대해 쓰기 권한을 준다.
auth-access = write
#인증된 사용자에 대한 계정 정보(아이디/패스) 정보가 기록된 파일명을 의미한다.(기본값 passwd) 
password-db = passwd
#인증된 사용자에 대해 저장소에 대한 권한 설정이 기록된 파일명(기본값)
#authz-db = authz
#현재 파일에 해당되는 저장소의 영역에 대해 설정
#realm = bluesanta_proj

사용자 관리(/conf/passwd) 파일

# vi passwd

[users]
bluesanta = {password}

사용자 관리(/conf/authz) 파일

# vi authz

[/android_library]
bluesanta = rw

svn 시작

# svnserve -d -r /bluesanta/Repositories

svn 종료

# killall svnserve

svn 포트 개발(3690)

# firewall-cmd --permanent --zone=public --add-port=3690/tcp
# firewall-cmd --reload

svn editor 설정

# SVN_EDITOR=/usr/bin/vim
# export SVN_EDITOR

svn 기본 디렉토리 만들기

$ svn mkdir svn://localhost/work2

svn 데몬 자동실행

$ sudo vi /etc/rc.local

# Subversion
svnserve -d -r /bluesanta/Repositories




$ vi /bluesanta/Repositories/conf/svnserve.conf

# authz-db = authz    -> 주석제거

서비스 목록 확인
$ service --status-all

권한 파일 수정
$ sudo vi authz

내용 추가

[/android_library]

bluesanta = rw


[/delphi.vcl]

bluesanta = rw


[/work2]

bluesanta = rw

서비스 다시 시작
$ sudo killall svnserve
$ sudo svnserve -d -r /bluesanta/Repositories



저작자 표시
신고
TAG Linux, svn, ubuntu

sshd install

OS/Linux 2015.02.14 21:25 Posted by 파란크리스마스

출처 : Ubuntu 14.04 LTS 내게 맞게 설정하기

SSHD 설치

$ sudo apt-get install openssh-server

RDP 설치

출처 : Ubuntu 14.04 원격 접속(xrdp) 설정

$ sudo apt-get install xrdp
$ sudo apt-get install xfce4

XRDP 시작

$ sudo vi /etc/xrdp/startwm.sh

#!/bin/sh

if [ -r /etc/default/locale ]; then
  . /etc/default/locale
  export LANG LANGUAGE
fi

#. /etc/X11/Xsession
. /usr/bin/startxfce4

XRDP 시작

$ sudo /etc/init.d/xrdp start
 * Starting Remote Desktop Protocol server 
   ...done.

우분투 소프트웨어 센터 Root 권한으로 실행하기

$ sudo software-center


-

저작자 표시
신고


 

티스토리 툴바