いつもGUIからアップデートしてたんで、気になって調べてみたのでメモ。
$sudo apt-get upgrade
CentOS5のMySQLが古いんで最新のダウンロードしてインストール
既存のMySQLを削除しちゃいます。
[root@air ~]#yum erase mysql
とりあえず必要なrpmをwget使って落としてきます。
[root@air ~]#mkdir /tmp/mysql
[root@air ~]#cd /tmp/mysql
[root@air mysql]#
[root@air mysql]#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-devel-community-5.1.50-1.rhel5.i386.rpm/from/ftp://ftp.iij.ad.jp/pub/db/mysql/
[root@air mysql]#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-community-debuginfo-5.1.50-1.rhel5.i386.rpm/from/ftp://ftp.iij.ad.jp/pub/db/mysql/
[root@air mysql]#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-embedded-community-5.1.50-1.rhel5.i386.rpm/from/ftp://ftp.iij.ad.jp/pub/db/mysql/
[root@air mysql]#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-server-community-5.1.50-1.rhel5.i386.rpm/from/ftp://ftp.iij.ad.jp/pub/db/mysql/
[root@air mysql]#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-shared-community-5.1.50-1.rhel5.i386.rpm/from/ftp://ftp.iij.ad.jp/pub/db/mysql/
[root@air mysql]#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-test-community-5.1.50-1.rhel5.i386.rpm/from/ftp://ftp.iij.ad.jp/pub/db/mysql/
次に落としたrpmをテスト、インストールします。
[root@air mysql]#rpm --test -ivh MySQL-*
[root@air mysql]#rpm -ivh MySQL-*
最後に、/tmp/mysql自体を消してください。
[root@air mysql]#rm -rf /tmp/mysql
既存のMySQLを削除しちゃいます。
[root@air ~]#yum erase mysql
とりあえず必要なrpmをwget使って落としてきます。
[root@air ~]#mkdir /tmp/mysql
[root@air ~]#cd /tmp/mysql
[root@air mysql]#
[root@air mysql]#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-devel-community-5.1.50-1.rhel5.i386.rpm/from/ftp://ftp.iij.ad.jp/pub/db/mysql/
[root@air mysql]#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-community-debuginfo-5.1.50-1.rhel5.i386.rpm/from/ftp://ftp.iij.ad.jp/pub/db/mysql/
[root@air mysql]#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-embedded-community-5.1.50-1.rhel5.i386.rpm/from/ftp://ftp.iij.ad.jp/pub/db/mysql/
[root@air mysql]#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-server-community-5.1.50-1.rhel5.i386.rpm/from/ftp://ftp.iij.ad.jp/pub/db/mysql/
[root@air mysql]#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-shared-community-5.1.50-1.rhel5.i386.rpm/from/ftp://ftp.iij.ad.jp/pub/db/mysql/
[root@air mysql]#wget http://dev.mysql.com/get/Downloads/MySQL-5.1/MySQL-test-community-5.1.50-1.rhel5.i386.rpm/from/ftp://ftp.iij.ad.jp/pub/db/mysql/
次に落としたrpmをテスト、インストールします。
[root@air mysql]#rpm --test -ivh MySQL-*
[root@air mysql]#rpm -ivh MySQL-*
最後に、/tmp/mysql自体を消してください。
[root@air mysql]#rm -rf /tmp/mysql
いつもここのサイトを参考にしてます。http://centossrv.com/
綺麗にまとめられる人って素敵だなぁ。オイラニハムリダ。
[root@air certs]#yum -y install mod_ssl
[root@air certs]#cd /etc/pki/tls/certs/
[root@air certs]#sed -i s/365/3650/g Makefile
[root@air certs]# make server.crt
umask 77 ; \
/usr/bin/openssl genrsa -des3 1024 > server.key
Generating RSA private key, 1024 bit long modulus
...........................................++++++
...........++++++
e is 65537 (0x10001)
Enter pass phrase:
Verifying - Enter pass phrase:
umask 77 ; \
/usr/bin/openssl req -utf8 -new -key server.key -x509 -days 3650 -out server.crt -set_serial 0
Enter pass phrase for server.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:JP
State or Province Name (full name) [Berkshire]:TOKYO
Locality Name (eg, city) [Newbury]:Chiyodaku
Organization Name (eg, company) [My Company Ltd]:xxxxxxx.com
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:xxxxxxxx.com
Email Address []:xxxx@co.jp
[root@air certs]#openssl rsa -in server.key -out server.key
[root@air certs]#nano /etc/httpd/conf.d/ssl.conf
SSLCertificateFile /etc/pki/tls/certs/server.crt ← パスを変更
SSLCertificateKeyFile /etc/pki/tls/certs/server.key ← パスを変更
[root@air certs]#/etc/init.d/httpd restart
綺麗にまとめられる人って素敵だなぁ。オイラニハムリダ。
[root@air certs]#yum -y install mod_ssl
[root@air certs]#cd /etc/pki/tls/certs/
[root@air certs]#sed -i s/365/3650/g Makefile
[root@air certs]# make server.crt
umask 77 ; \
/usr/bin/openssl genrsa -des3 1024 > server.key
Generating RSA private key, 1024 bit long modulus
...........................................++++++
...........++++++
e is 65537 (0x10001)
Enter pass phrase:
Verifying - Enter pass phrase:
umask 77 ; \
/usr/bin/openssl req -utf8 -new -key server.key -x509 -days 3650 -out server.crt -set_serial 0
Enter pass phrase for server.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:JP
State or Province Name (full name) [Berkshire]:TOKYO
Locality Name (eg, city) [Newbury]:Chiyodaku
Organization Name (eg, company) [My Company Ltd]:xxxxxxx.com
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:xxxxxxxx.com
Email Address []:xxxx@co.jp
[root@air certs]#openssl rsa -in server.key -out server.key
[root@air certs]#nano /etc/httpd/conf.d/ssl.conf
SSLCertificateFile /etc/pki/tls/certs/server.crt ← パスを変更
SSLCertificateKeyFile /etc/pki/tls/certs/server.key ← パスを変更
[root@air certs]#/etc/init.d/httpd restart