yum -y update
vi /etc/yum.repos.d/MariaDB.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
yum install -y mariadb mariadb-server
sudo systemctl start mariadb
sudo systemctl enable mariadb
mysql_secure_installation
sudo systemctl restart mariadb
https://slobell.com/blogs/38 mariadb utf8로 변경
vi /etc/my.cnf.d/client.cnf
[client]
default-character-set=utf8
vi /etc/my.cnf.d/mysql-clients.cnf
[mysql]
default-character-set=utf8
[mysqldump]
default-character-set=utf8
vi /etc/my.cnf.d/server.cnf
[mysqld]
collation-server = utf8_unicode_ci
init-connect=’SET NAMES utf8′
character-set-server = utf8
https://pagein.net/centos7-web-server-mariadb-nginx-php7-1-%EC%84%A4%EC%B9%98/
vi /etc/yum.repos.d/nginx.repo
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/7/$basearch/
gpgcheck=0
enabled=1
yum install -y nginx
sudo systemctl start nginx
sudo systemctl enable nginx
sudo systemctl restart nginx
sudo systemctl status nginx
vi /etc/nginx/conf.d/default.conf
chmod -R 755 /usr/share/nginx/html
chown -R nginx:nginx /usr/share/nginx/html
//chcon -R -t httpd_sys_content_t /home/localhost/
//cp -r /usr/share/nginx/html /home/localhost
//yum install -y firewall
systemctl start firewalld
systemctl enable firewalld
systemctl unmask firewalld
firewall-cmd –permanent –zone=public –add-service=http
firewall-cmd –permanent –zone=public –add-service=https
firewall-cmd –reload
firewall-cmd –zone=public –add-port=80/tcp –permanent
https://www.burndogfather.com/237
yum -y install epel-release
yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum -y install yum-utils
sudo yum-config-manager –enable remi-php80
yum -y install php php-cli php-fpm php-mysqlnd php-mysql php-mysqli php-devel php-zip php-gd php-curl php-xml php-json php-intl php-mbstring php-mcrypt php-posix php-shmop php-soap php-sysvmsg php-sysvsem php-sysvshm php-xmlrpc php-opcache
sudo systemctl start php-fpm
sudo systemctl enable php-fpm
sudo systemctl restart php-fpm
sudo systemctl status php-fpm
vi /etc/php-fpm.d/www.conf
nginx
listen = /var/run/php-fpm/php-fpm.sock
vi /etc/nginx/conf.d/default.conf
yum -y install unzip
wget https://files.phpmyadmin.net/phpMyAdmin/5.1.1/phpMyAdmin-5.1.1-all-languages.zip
unzip phpMyAdmin-5.1.1-all-languages.zip
mv phpMyAdmin-5.1.1-all-languages mymyadmin2
도메인 추가후 서버 재부팅 필요 = > sudo systemctl restart nginx
php.ini => session.auto_start = 0을 1로 변경
chown -R nginx:nginx /var/lib/php/session
https://linuxhostsupport.com/blog/how-to-install-lets-encrypt-on-centos-7-with-nginx/
yum -y install certbot-nginx
certbot –nginx
sudo certbot –nginx -d example.com -d www.example.com
zip naver.zip -r ./
mysqldump -u아이디 -p비번 디비명 | gzip > /경로/Mysql_$(date +”%Y%m%d”).sql.gz;
• /etc/my.cnf.d/client.cnf
[client]
default-character-set=utf8
• /etc/my.cnf.d/mysql-clients.cnf
[mysql]
default-character-set=utf8
[mysqldump]
default-character-set=utf8
• /etc/my.cnf.d/server.cnf
[mysqld]
collation-server = utf8_unicode_ci
init-connect=’SET NAMES utf8′
character-set-server = utf8
메모장에 저장해 놓은 나의 성공기 – 알아볼 사람들은 다 알아 볼 수 있지 않을까?