์ƒˆ์†Œ์‹

์ธ๊ธฐ ๊ฒ€์ƒ‰์–ด

๐Ÿ’ป Linux

CentOS7 ์›น ์„œ๋ฒ„ ์„ค์น˜ ๋ฐ ํ™œ์„ฑํ™”

  • -
๋ฐ˜์‘ํ˜•

์„ค์น˜ ํ›„ ํ•ด์•ผ ํ•˜๋Š” ๋ช…๋ น์–ด

  1. systemctl restart
  2. systemctl status
  3. systemctl enable

ํ…”๋„ท ์„œ๋ฒ„ ์„ค์น˜

yum -y install telnet-server

# ํ…”๋„ท ์„œ๋ฒ„ ์„ค์น˜ ์™„๋ฃŒ ํ™•์ธ
systemctl restart telnet.socket

# ํ…”๋„ท ์„œ๋ฒ„ ์ƒํƒœ ํ™•์ธ
systemctl status telnet.socket

# ํ…”๋„ท ์„œ๋ฒ„ ํ™•์ธ
systemctl enable telnet.socket

ํ…”๋„ท ์„ค์น˜

yum -y install telnetํ…”๋„ท ์„œ๋ฒ„ ์„ค์น˜ ์™„๋ฃŒ ํ™•์ธ

๋ฐฉํ™”๋ฒฝ ์„ค์ •

firewall-config 

Third์—์„œ First๋กœ ์ ‘์†

telnet 192.168.111.100

ํฌํŠธ

<aside> ๐Ÿ’ก SSH port 22 ์•”ํ˜ธ๋ฌธ / Telnet port 23 ํ‰๋ฌธ

</aside>

๋ฐฉํ™”๋ฒฝ ํ•ด์ œ

#๋ฐฉํ™”๋ฒฝ ํฌํŠธ ๋“ฑ๋ก
firewall-cmd --permanent --zone=public --add-port=8080/tcp
firewall-cmd --reload

#๋ฐฉํ™”๋ฒฝ ์„œ๋น„์Šค ํ•ด์ œ
systemctl stop firewalld

#์žฌ๋ถ€ํŒ…์‹œ ๋ฐฉํ™”๋ฒฝ ์‹คํ–‰ํ•˜์ง€ ์•Š๊ธฐ
systemctl disable firewalld

#๋ฐฉํ™”๋ฒฝ์— ๋“ฑ๋ก๋œ ํฌํŠธ ๋ฆฌ์ŠคํŠธ ๊ฐ€์ ธ์˜ค๊ธฐ
firewall-cmd --list-ports

OpenSSH ์„ค์น˜

yum -y install openssh-server
systemctl restart sshd
systemctl status sshd
systemctl enable sshd

Putty ์„ค์น˜

PuTTY

WireShark ์„ค์น˜

Wireshark · Go Deep.

์›น ์„œ๋ฒ„ ๊ตฌ์ถ•

# httpd , php , mariadb , mariadb-server , php-mysqlnd ์„ค์น˜
yum -y install httpd php mariadb mariadb-server php-mysqlnd
systemctl restart httpd
systemctl restart mariadb
systemctl status httpd
systemctl status mariadb

# ์ž๋™ ์‹คํ–‰
systemctl enable httpd
systemctl enable mariadb

# ๋ฐฉํ™”๋ฒฝ
systemctl stop firewalld
systemctl disable firewalld

# ๋ฃจํ”„ ๋ฐฑ Ip (๋‚˜ ์ž์‹ ์˜ IP)
127.0.0.1
# ๋ฃจํ”„ ๋ฐฑ Host
<http://localhost>

์›น์˜ ๊ธฐ๋ณธ ๋””๋ ‰ํ„ฐ๋ฆฌ

cd /var/www/html

# ์›น์—์„œ phpinfo ํ™•์ธํ•˜๊ธฐ
vim phpinfo.php
<?php phpinfo(); ?>

# ํŒŒ์ด์–ด ํญ์Šค ์‹คํ–‰
<http://192.168.111.100/phpinfo.php>

# index ํŒŒ์ผ ์ƒ์„ฑ
cd /var/www/html
vim index.html
<h1> chaen Home Page !! </h1>

# ๋‚ด IP๋ฅผ ์ฃผ์†Œ์ฐฝ์— ์ž‘์„ฑ ์‹œ daum์œผ๋กœ ์ด๋™
wget www.daum.net
# ํŒŒ์ผ ์ด๋ฆ„ ๋ณ€๊ฒฝ
mv index.html index.html.bak

XE ๊ฒŒ์‹œํŒ

XE ๊ณต์‹ ์ž๋ฃŒ์‹ค - XpressEngine

cd /home/centos/๋‹ค์šด๋กœ๋“œ

mv xe.zip /var/www/html

cd /var/www/html

unzip xe.zip

yum -y install php-*
yum -y --skip-broken install php-*

vim /etc/httpd/conf/httpd.conf
>> :set nu
>> 151
>> AllowOverride All

systemctl restart httpd
chmod 707 xe
cd xe

# db ์ ‘์†
mysql

# user ์ƒ์„ฑ
GRANT ALL PRIVILEGES ON xeDB.* TO xeUser0@localhost IDENTIFIEDBY '1234';
exit

# db user๋กœ ์žฌ ์ ‘์†
mysql -u xeUser0 -p1234

CREATE DATABASE xeDB ;
SHOW DATABASES ;

<http://192.168.111.100/xe/index.php?l=ko>

์˜จ ํด๋ผ์šฐ๋“œ(owncloud) ์„ค์น˜

cd /etc/yum.respo.d/
wget <https://download.opensuse.org/repositories/isv:ownCloud:server:10/CentOS_7/isv:ownCloud:server:10.repo>
yum install owncloud-complete-filesls

# php ๋ฒ„์ „ ์•ˆ ๋งž๋Š” ์˜ค๋ฅ˜
# php7.3 Remi ๋ ˆํฌ์ง€ํ† ๋ฆฌ ์ถ”๊ฐ€
sudo yum -y install <http://rpms.remirepo.net/enterprise/remi-release-7.rpm>
sudo yum -y install epel-release yum-utils

# php5.4 ๋น„ํ™œ์„ฑํ™”
sudo yum-config-manager --disable remi-php54  
sudo yum-config-manager --enable remi-php73

# php7.3 ์„ค์น˜
sudo yum -y install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json

wp ์›Œ๋“œํ”„๋ ˆ์Šค ๊ตฌ์ถ•

# MariaDB, Aphache ์›น ์„œ๋น„์Šค ์‹œ์ž‘ ๋ฐ ์ž๋™ ์‹œ์ž‘ ๋“ฑ๋ก
systemctl start mariadb
systemctl start httpd
systemctl enable mariadb
systemctl enable httpd

# MaridDB ๋ณด์•ˆ ์„ค์ • ( ์˜ต์…˜ )
mysql_secure_installation # ์—”ํ„ฐ - n - ์—”ํ„ฐ ์—”ํ„ฐ ์—”ํ„ฐ .. thanks for using MariaDB!๊ฐ€ ๋‚˜์˜ค๋ฉด ์„ค์ • ์™„๋ฃŒ

# mysql ์ ‘์†
mysql
CREATE DATABASE wordpress;
GRANT ALL PRIVILEGES ON wordpress.* TO aaa@localhost IDENTIFIED BY '1234';
GRANT ALL PRIVILEGES ON wordpress.* TO 'aaa'@'%' IDENTIFIED BY '1234';
FLUSH PRIVILEGES;

# ERROR 1936(HY000) ์—๋Ÿฌ
drop user 'xeUser0'@'localhost';
flush privileges; # ํ›„์— ๋‹ค์‹œ ๊ณ„์ • ์žฌ์ƒ์„ฑ

# ์›Œ๋“œํ”„๋ ˆ์Šค ์ตœ์‹ ๋ฒ„์ „ ๋‹ค์šด๋กœ๋“œ ๋ฐ ์••์ถ•ํ’€๊ธฐ
curl <https://wordpress.org/latest.tar.gz> --output wordpress.tar.gz
tar xf wordpress.tar.gz

# /var/www/html/ ๊ฒฝ๋กœ์— ์••์ถ•์„ ํ‘ผ wordpress ๋ณต์‚ฌ
cp -r wordpress /var/www/html

# ๊ถŒํ•œ ๋ฐ ์†Œ์œ ๊ถŒ ๋ณ€๊ฒฝ
chown -R apache:apache /var/www/html/wordpress
chcon -t httpd_sys_rw_content_t /var/www/html/wordpress -R # ์˜ค๋ฅ˜๋– ์„œ ๊ฑด๋„ˆ๋›ฐ๊ธฐ ํ•จ

# ๋‹ค๋ฅธ ๊ณ„์ •์œผ๋กœ ๋ณ€๊ฒฝ
su chaen

# ์œ„์—์„œ ๋งŒ๋“  DB๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ๋กœ๊ทธ์ธ
Database name : wordpress
Username : ์œ„์—์„œ ๋งŒ๋“  aaa
Password : ์œ„์—์„œ ๋งŒ๋“  1234
Database host : localhost
Table Prefix : wp_

๋ฐ˜์‘ํ˜•

'๐Ÿ’ป Linux' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

CentOS7 HTTPS ๋ณด์•ˆ  (0) 2022.04.20
CentOS7 python,tomcat ์›น ๊ตฌ์ถ•  (0) 2022.04.20
CentOS7 , Ubuntu Bridge ์„ค์ •  (0) 2022.04.20
CentOS7 Digest,Basic ์•”ํ˜ธํ™”  (0) 2022.04.20
CentOS7 RAID  (0) 2022.04.15
Contents

ํฌ์ŠคํŒ… ์ฃผ์†Œ๋ฅผ ๋ณต์‚ฌํ–ˆ์Šต๋‹ˆ๋‹ค

์ด ๊ธ€์ด ๋„์›€์ด ๋˜์—ˆ๋‹ค๋ฉด ๊ณต๊ฐ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.