# : root 계정, $ : 사용자계정
<yum update 오류시>
#echo "https://vault.centos.org/6.10/os/x86_64/" > /var/cache/yum/x86_64/6/base/mirrorlist.txt
#echo "http://vault.centos.org/6.10/extras/x86_64/" > /var/cache/yum/x86_64/6/extras/mirrorlist.txt
#echo "http://vault.centos.org/6.10/updates/x86_64/" > /var/cache/yum/x86_64/6/updates/mirrorlist.txt
#yum update
<htop 설치>
#yum -y install epel-release
#yum -y install htop
<mariadb 최신버전 설치>
=================================================================================================
https://downloads.mariadb.org/mariadb/repositories/#mirror=yongbok 사이트에서 yum repo 확인
=================================================================================================
#vi /etc/yum.repos.d/MariaDB.repo 아래 작성
# MariaDB 10.3 CentOS repository list - created 2021-04-09 05:23 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
#cat /etc/yum.repos.d/MariaDB.repo 확인
=================================================================================================
#yum update
#yum install MariaDB-server MariaDB-client
=================================================================================================
#vi /etc/sysconfig/iptables 아래 내용 추가
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
=================================================================================================
#service iptables reload
#chkconfig mysql on
#service mysql start
#mysql_secure_installation (root 패스워드 생성)
=================================================================================================
#mysql -uroot -p'패스워드'
create database 데이터베이스명 default character set utf8;
create user '계정'@'localhost' identified by '패스워드';
grant all privileges on 테이터베이스명.* to '계정명'@'localhost';
grant super on *.* to 'erpsw'@'localhost';
create user 'erpsw'@'%' identified by 'erpsw!';
grant all privileges on erpsw.* to 'erpsw'@'%';
grant super on *.* to 'erpsw'@'%';
grant create, alter routine on erpsw.* to 'erpsw'@'%';
grant create, alter routine on erpsw.* to 'erpsw'@'localhost';
grant create, alter routine on *.* to 'erpsw'@'%';
grant create, alter routine on *.* to 'erpsw'@'localhost';
grant all privileges on *.* to 'erpsw'@'localhost';
grant all privileges on *.* to 'erpsw'@'%';
flush privileges;
jdk 버전 교체
rpm -qa|grep java
yum remove java-1.6.0-openjdk-1.6.0.41-1.13.13.1.el6_8.x86_64
yum list installed *jdk-devel
yum list java*jdk-devel
yum install java-1.8.0-openjdk-devel.x86_64
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk.x86_64
export JRE_HOME=/usr/lib/jvm/jre-1.8.0-openjdk.x86_64
방화벽
vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPTh
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3690 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 9090 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Generated by iptables-save v1.4.7 on Fri Apr 9 18:26:14 2021
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [38:3158]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 3690 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 9090 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
# Completed on Fri Apr 9 18:26:14 2021
# Generated by iptables-save v1.4.7 on Fri Apr 9 18:26:14 2021
*nat
:PREROUTING ACCEPT [3:234]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A PREROUTING -d 210.105.40.201/32 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
-A OUTPUT -d 127.0.0.1/32 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
-A OUTPUT -d 127.0.0.1/32 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
COMMIT
# Completed on Fri Apr 9 18:26:14 2021
~
iptables -t nat -A OUTPUT -d localhost -p tcp --dport 80 -j REDIRECT --to-ports 8080
iptables -t nat -A PREROUTING -d 210.105.40.201 -p tcp --dport 80 -j REDIRECT --to-ports 8080
# service iptables save
# service iptables restart
service iptables restart
젠킨스
wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
yum install jenkins
vi /etc/sysconfig/jenkins
jenkins_port "8080" -> "9090" 으로 변경
service jenkins start