์ค์น ํ ํด์ผ ํ๋ ๋ช
๋ น์ด
- systemctl restart
- systemctl status
- 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_