Fix: Server setting
This commit is contained in:
@@ -0,0 +1,128 @@
|
||||
# 서버 접속
|
||||
ssh root@106.10.53.153
|
||||
|
||||
# 암호 변경
|
||||
passwd
|
||||
|
||||
# 사용자 추가, 암호 변경
|
||||
adduser jisangs
|
||||
passwd jisangs
|
||||
|
||||
# root ssh 로그인 막기
|
||||
vi /etc/ssh/sshd_config
|
||||
...
|
||||
PermitRootLogin no
|
||||
...
|
||||
...
|
||||
|
||||
|
||||
|
||||
#1 Apache, mariadb, php7.1 설치
|
||||
https://www.dazzii.com/centos7-apache-mariadb-php-webserver/
|
||||
|
||||
# MariaDB 설치 확인
|
||||
systemctl start mysql
|
||||
mysql --version
|
||||
|
||||
|
||||
# MariaDB 설정
|
||||
http://oerun.tistory.com/2
|
||||
|
||||
vi /etc/my.cnf
|
||||
----------------------------------------
|
||||
[client]
|
||||
default-character-set = utf8
|
||||
[mysqld]
|
||||
character-set-client-handshake = FALSE
|
||||
init_connect = "SET collation_connection = utf8_general_ci"
|
||||
init_connect = "SET NAMES utf8"
|
||||
character-set-server = utf8
|
||||
collation-server = utf8_general_ci
|
||||
[mysqldump]
|
||||
default-character-set = utf8
|
||||
[mysql]
|
||||
default-character-set = utf8
|
||||
----------------------------------------
|
||||
|
||||
# php용 remi repository 추가만
|
||||
https://blog.asamaru.net/2018/02/14/install-php-7-2-on-centos-with-remi-rpm-repository/
|
||||
|
||||
# phpMyAdmin 설치
|
||||
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
|
||||
yum --enablerepo=remi,remi-test install -y phpMyAdmin
|
||||
cp -a /etc/httpd/conf.d/phpMyAdmin.conf /etc/httpd/conf.d/phpMyAdmin.conf.original
|
||||
sed -i '15,17s/Require local/Require all granted/' /etc/httpd/conf.d/phpMyAdmin.conf
|
||||
systemctl restart httpd
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--- 위까지 해서 성공 ---
|
||||
|
||||
|
||||
# (취소) php-fpm 설치
|
||||
https://blog.bypass.sh/280
|
||||
|
||||
yum install -y epel-release
|
||||
rpm -ivh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
|
||||
yum --enablerepo=remi update remi-release
|
||||
yum --enablerepo=remi-php70 install -y php php-fpm php-mysql
|
||||
|
||||
# php7.2 설치
|
||||
https://blog.asamaru.net/2018/02/14/install-php-7-2-on-centos-with-remi-rpm-repository/
|
||||
|
||||
# phpinfo.php
|
||||
<?php phpinfo(); ?>
|
||||
|
||||
# phpMyAdmin 설치
|
||||
http://luckyyowu.tistory.com/287
|
||||
yum install -y phpMyAdmin
|
||||
|
||||
vi /etc/httpd/conf.d/phpMyAdmin.conf
|
||||
<Directory /usr/share/phpMyAdmin/>
|
||||
AddDefaultCharset UTF-8
|
||||
Order Allow,Deny
|
||||
Allow from All
|
||||
</Directory>
|
||||
|
||||
|
||||
vi /etc/httpd/conf/httpd.conf
|
||||
<Directory />
|
||||
AllowOverride none
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
|
||||
|
||||
#2 php 설치 확인
|
||||
yum list installed | cut -d " " -f 1 | grep php
|
||||
php -v
|
||||
|
||||
# php7.2 설치
|
||||
http://ellordnet.tistory.com/166
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
----
|
||||
|
||||
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
|
||||
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
|
||||
|
||||
php설치
|
||||
yum install -y php70w
|
||||
|
||||
자주쓰는 관련 PHP 설치
|
||||
yum install -y php70w-mysql php70w-pdo php70w-pgsql php70w-odbc php70w-mbstring php70w-mcrypt php70w-gd
|
||||
yum install -y php70w-pear php70w-pdo_dblib php70w-pecl-imagick php70w-pecl-imagick-devel php70w-xml php70w-xmlrpc
|
||||
|
||||
php 설치가능패키지확인
|
||||
yum search php70w
|
||||
Reference in New Issue
Block a user