■
yum update中にctrl+cでupdateを中断したために、二回目のyum updateでパッケージの競合がおきた。
○こんな感じ
file /usr/sbin/avcstat from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/sbin/getenforce from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/sbin/getsebool from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/sbin/matchpathcon from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/sbin/selinuxenabled from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/sbin/setenforce from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/sbin/togglesebool from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/avcstat.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/booleans.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/getenforce.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/getsebool.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/matchpathcon.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/selinux.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/selinuxenabled.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/setenforce.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
file /usr/share/man/man8/togglesebool.8.gz from install of libselinux-utils-1.33.4-5.5.el5 conflicts with file from package libselinux-1.33.4-5.el5
Error Summary
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
解消するために、重複するパッケージを除去した。
package-cleanupをつかうためにyum-utilsをインストール
[root@localhost ~]# yum install yum-utils
ダブったパッケージの除去
[root@localhost ~]# package-cleanup --cleandupes
このあとのyum updateでエラー解消を確認できた。
■
MySQLのサーバにクライアントからリモートアクセスする方法。
1.クライアントとサーバ両方にMySQLをインストールします。
2.サーバ側で、二つのユーザを作成します。
・ローカル向け
grant all privileges on DB名.* to ユーザ名@localhost identified by 'パスワード' with grant option;
・リモートホスト向け
grant all privileges on DB名.* to ユーザ名@'%' identified by 'パスワード' with grant option;
ところが、どうやってもクライアントからサーバにつなげることができず、どはまりしました。
【確認したこと】
1・MySQLのポートは開いているか
# netstat -tlpn|grep mysql
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 14306/mysqld
クライアント、サーバ両方で実行したけどポートは開いていた。
ローカル以外のホストからも受け入れられるようになっている。
2・ファイアーウォールでフィルタされていないか。
# iptables -vnL
このコマンドを実行したら、サーバ側で3306のポートが開いていなかった。。。。
ルールを変更して無事開通!
■
1.postgresにログイン
$ psql postgres-db
Welcome to psql 8.0.4, the PostgreSQL interactive terminal. ← ここでも大概が分かる
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
2.SQL実行
postgres-db=# SELECT version(); ←これを実行
version
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
PostgreSQL 8.0.4 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.0 20050519 (Red Hat 4.0.0-8)
(1 row)