쿠분투(우분투) 10.04 / MySQL 5.5 컴파일/설치/데몬

OS/Linux 2010.07.11 11:56 Posted by 파란크리스마스

필요한 라이브러리 설치

sudo apt-get install gcc g++ libncurses5-dev libxml2-dev openssl libssl-dev curl libcurl4-openssl-dev libjpeg-dev libpng-dev libfreetype6-dev libsasl2-dev autoconf libncurses5-dev

다운로드

wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.3-m3.tar.gz/from/http://mysql.he.net/

MySQL 계정 만들기

sudo groupadd mysql
sudo useradd -g mysql mysql
sudo passwd mysql
sudo mkdir /home/mysql
sudo chown mysql:mysql /home/mysql
tar zxvf mysql-5.5.3-m3.tar.gz
cd mysql-5.5.3-m3/

cmake 설치

$ sudo apt-get install cmake

MySQL 소스 컴파일

./configure --prefix=/usr/local/mysql --localstatedir=/data/mysql/data --enable-assembler --enable-static --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-unix-socket-path=/usr/local/mysql/tmp/mysql.sock --without-innodb --without-isam --without-ndb-debug --without-debug --with-big-tables --with-extra-charsers=gbk,gb2312,utf8 --with-pthread --with-plugins=partition,innobase,myisammrg --with-charset=utf8 --with-readline

sudo make
sudo make install

디렉토리 생성

sudo mkdir -p /data/mysql/data/
sudo mkdir -p /data/mysql/log/
sudo mkdir /var/log/mysql
sudo chown mysql:mysql /var/log/mysql
sudo chmod 750 /var/log/mysql

my.cof 복사

참조 :
http://blog.naver.com/iamfreeman/50006780132
http://blog.dasom.pe.kr/35

sudo cp /usr/local/mysql/share/mysql/my-medium.cnf /data/mysql/my.cnf

디렉토리 권한 변경

sudo chown -R mysql:mysql /usr/local/mysql
sudo chown -R mysql:mysql /data/mysql/

MySQL Database 생성 
 
user1@ubuntu:~/mysql-5.5.3-m3$ sudo /usr/local/mysql/bin/mysql_install_db --basedir=/usr/local/mysql --datadir=/data/mysql/data --user=mysql
Installing MySQL system tables...
OK
Filling help tables...
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/local/mysql/bin/mysqladmin -u root password 'new-password'
/usr/local/mysql/bin/mysqladmin -u root -h ubuntu password 'new-password'

Alternatively you can run:
/usr/local/mysql/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/local/mysql ; /usr/local/mysql/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/local/mysql/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/local/mysql/scripts/mysqlbug script!

user1@ubuntu:~/mysql-5.5.3-m3$

부팅시 자동 시작 설정

sudo cp /usr/local/mysql/share/mysql/mysql.server /etc/init.d/mysqld
sudo ln -s /etc/init.d/mysqld /etc/rc2.d/S99mysql
sudo ln -s /etc/init.d/mysqld /etc/rc2.d/K99mysql
sudo ln -s /etc/init.d/mysqld /etc/rc3.d/S99mysql
sudo ln -s /etc/init.d/mysqld /etc/rc3.d/K99mysql

mysqld 수정

sudo vi /etc/init.d/mysqld

1. parse_server_arguments 주석 처리 한다.
=> #parse_server_arguments

2. $bindir/mysqld_safe 수정

      #$bindir/mysqld_safe --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null 2>&1 &

기존 내용은 주석으로 하고 아래와 같이 추가 한다.

      $bindir/mysqld_safe --defaults-file=/data/mysql/my.cnf 2>&1 > /dev/null &

재부팅

sudo sync
sudo sync
sudo init 6

실행확인

user1@ubuntu:~$ ps -ef | grep mysql
root      2506     1  0 12:09 pts/1    00:00:00 /bin/sh /usr/local/mysql/bin/mysqld_safe --defaults-file=/data/mysql/my.cnf
mysql     2738  2506  0 12:09 pts/1    00:00:00 /usr/local/mysql/libexec/mysqld --defaults-file=/data/mysql/my.cnf --basedir=/usr/local/mysql --datadir=/data/mysql/data --plugin-dir=/usr/local/mysql/lib/mysql/plugin --user=mysql --log-error=/data/mysql/data/ubuntu.err --pid-file=/data/mysql/data/ubuntu.pid --socket=/usr/local/mysql/tmp/mysql.sock --port=3306
user1     2751  2104  0 12:09 pts/1    00:00:00 grep --color=auto mysql

user1@ubuntu:~$

root 암호 설정

/usr/local/mysql/bin/mysqladmin -u root password 'root!@' -S /usr/local/mysql/tmp/mysql.sock

MySQL 외부에서 접속하기

user1@ubuntu:~$ /usr/local/mysql/bin/mysql -u root -p -S /usr/local/mysql/tmp/mysql.sock
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.3-m3-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>  grant all privileges on *.* to root@'%';
Query OK, 0 rows affected (0.00 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql>

ssh 데몬 설치

sudo apt-get install openssh-server
sudo init 6 (재부팅)

MySQL - SQLGate로 SSH 터널링을 통해 연결하기

신고

쿠분투 10.04 / Xmanager 접속

OS/Linux 2010.07.08 00:15 Posted by 파란크리스마스

참조
http://www.netsarang.co.kr/bbs/detail.html?id=xmanager&num=9770&page=9&s_select=&s_text=

Kubuntu (kdm 사용)의 경우

vi /etc/kde4/kdm/Xaccess 파일에서 다음 줄에 코멘트 기호(#)를 삭제합니다.
#* #any host can get a login window ==>
* #any host can get a login window

vi /etc/kde4/kdm/kdmrc 파일에서 XDMCP 섹션에
Enable=true로 설정한 후

kdm을 재구동하거나 혹은 init 3; init 5 명령을 내리면 됩니다.

윈도우 방화병 설정 6000-6010 해제


신고

우분투 - VMWare Tool 설치

OS/Linux 2010.07.06 00:13 Posted by 파란크리스마스

출처
http://duronmaniac.blogspot.com/2010_06_01_archive.html

▶ root로 로그인 하기

user1@ubuntu:~$ sudo su - root

VMWare Tool 복사

root@ubuntu:~# cp /media/VMware\ Tools/VMwareTools-8.4.2-261024.tar.gz /root

압축풀기

root@ubuntu:~# tar xzf VMwareTools-8.4.2-261024.tar.gz

설치된 패키지 업그래이드

root@ubuntu:~# apt-get update && apt-get install build-essential linux-headers-generic

VMware Tool 설치

root@ubuntu:~# vmware-tools-distrib/vmware-install.pl

재부팅

root@ubuntu:~# init 6

신고

우분투 root 계정으로 로그인 하기

OS/Linux 2010.07.06 00:00 Posted by 파란크리스마스
참조
http://mycom.kr/1216
http://www.ubuntu.or.kr/viewtopic.php?p=32212

우분투 root 계정으로 로그인 하기

user1@ubuntu:~$ sudo passwd root
[sudo] password for user1: [user1 암호입력]
새 UNIX 암호 입력: [root암호입력]
새 UNIX 암호 재입력: [root암호입력]
passwd: password updated successfully
user1@ubuntu:~$ su
암호: [root암호입력]
root@ubuntu:/home/user1#

계정 다시 막기

sudo passwd -l root
신고


 

티스토리 툴바