2015-06-05

CentOS + Apache + PHP + PDO で SQL Server へ接続

前提:httpd、phpのインストールが終わっていること
# yum install httpd php

作業:
# yum install epel-release
# vi /etc/yum.repos.d/epel.repo
[epel]

enabled=0


# yum --enablerepo=epel install php-mssql
# vi /etc/freetds.conf

[MSSQLSVR2012]
        host = 1.2.3.4
        port = 1433
        tds version = 8.0
        charset = CP932
        client charset = UTF-8

# vi /etc/selinux/config

SELINUX=disabled


# restart

sftp専用ユーザー

sftp専用ユーザーはsshでもログインできる必要があるので、ftp専用ユーザーのように、-s /sbin/nologin としない。 # useradd sftpuser # passwd sftpuser New password: Retype new passwo...