¼³Ä¡È¯°æ
OS : Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic x86_64)
OpenStack JUNO 2.2
±âº»¼³Á¤
1) /etc/hosts Ãß°¡
root@controller1:~# cat /etc/hosts
115.XXX.XXX.6 controller
115.XXX.XXX.7 compute1
2) /etc/hostname ¼öÁ¤
root@controller1:~# cat /etc/hostname
controller
3) apt-get Repositoy (ÀúÀå¼Ò) º¯°æ
root@controller1:~# sed -i 's/kr.archive.ubuntu.com/mirror.cloudv.kr/g' /etc/apt/sources.list
root@controller1:~# sed -i 's/security.ubuntu.com/mirror.cloudv.kr/g' /etc/apt/sources.list
4) apt-get update
root@controller1:~# apt-get -y update
root@controller1:~# apt-get -y dist-upgrade
root@controller1:~# reboot
Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-46-generic x86_64)
NTP ¼¹ö¼³Á¤
:: ¸ÖƼ ¸Ó½ÅµéÀÇ ¼ºñ½º½Ã°£À» µ¿±âÈÇϱâ À§ÇØ NTP ¼ºñ½º¸¦ ¼³Ä¡ÇÕ´Ï´Ù.
1) ntp install
root@ubuntu:~# apt-get -y install ntp
2) /etc/ntp.conf ¼öÁ¤
:: ±¹³» NTP ¼¹ö·Î ¼öÁ¤ÇÏ°í ±¸¼ºµÈ ¿ÀÇÁ½ºÅó» ³ëµå¿¡¼¸¸ Á¢±ÙÇÏ°Ô ¼³Á¤ÇÕ´Ï´Ù.
root@ubuntu:~# vim /etc/ntp.conf
#server 0.ubuntu.pool.ntp.org ### ÁÖ¼®Ã³¸®
#server 1.ubuntu.pool.ntp.org ### ÁÖ¼®Ã³¸®
#server 2.ubuntu.pool.ntp.org ### ÁÖ¼®Ã³¸®
#server 3.ubuntu.pool.ntp.org ### ÁÖ¼®Ã³¸®
server kr.pool.ntp.org iburst
server time.bora.net iburst
server time.nuri.net iburst
server time.nist.gov iburst
restrict 192.XXX.XXX.0 mask 255.255.255.0 nomodify notrap
3) µ¥¸ó½ÃÀÛ
root@ubuntu:~# service ntp restart
* Stopping NTP server ntpd [ OK ]
* Starting NTP server ntpd [ OK ]
4) È®ÀÎ
root@ubuntu:~# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
*211.233.40.78 133.100.8.2 2 u 31 64 3 1.304 -1.296 0.117
203.248.240.140 ..{... 16 u 25 64 0 0.000 0.000 0.000
211.115.194.21 202.30.200.133 4 u 29 64 3 1.766 -5.639 0.361
216.229.0.179 .ACTS. 1 u 24 64 3 187.730 14.867 0.645
91.189.94.4 192.93.2.20 2 u 26 64 3 265.846 -0.420 0.507
DATABASE(mysql) ¼³Ä¡
1) mysql install
root@ubuntu:~# apt-get -y install python-mysqldb mysql-server
mysql root password : XXXXXXXXXX
2) my.cnf ¼öÁ¤
root@controller1:~# vim /etc/mysql/my.cnf
bind-address = 115.XXX.XXX.6 ### ¾ÆÀÌÇÇÁÖ¼Ò·Î ¼öÁ¤
default-storage-engine = innodb ### Ãß°¡
collation-server = utf8_general_ci ### Ãß°¡
init-connect = 'SET NAMES utf8' ### Ãß°¡
character-set-server = utf8 ### Ãß°¡
3) µ¥¸ó½ÃÀÛ
root@controller1:~# service mysql restart
mysql stop/waiting
mysql start/running, process 10709
4) mysql ±âº»µ¥ÀÌŸ º£À̽º »ý¼º
root@controller1:~# mysql_install_db
WARNING: The host 'controller' could not be looked up with resolveip.
This probably means that your libc libraries are not 100 % compatible
with this binary MySQL version. The MySQL daemon, mysqld, should work
normally with the exception that host name resolving will not work.
This means that you should use IP addresses instead of hostnames
when specifying MySQL privileges !
Installing MySQL system tables...
150223 15:56:09 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
OK
Filling help tables...
150223 15:56:09 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
OK
To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h controller1 password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the manual for more instructions.
You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &
You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl
Please report any problems at http://bugs.mysql.com/
5) ÀÍ¸í °èÁ¤ »èÁ¦
root@controller1:~# mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS scRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none): [Æнº¿öµå ÀÔ·Â]
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
You already have a root password set, so you can safely answer 'n'.
Change the root password? [Y/n] n
... skipping.
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist
... Failed! Not critical, keep moving...
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!