웹서버-APM 설치, 운영/클라우드 저장 서비스 구축

2024. 11. 20. 20:53b정리/이것이 리눅스다-우분투-3판

728x90
반응형

https://www.youtube.com/watch?v=Wh7WdifsVCM&list=PLqTUMsvO70nnPQ42mtOKCgzlXeIy8GB0U&index=62

apt update & apt -y install lamp-server^*
dpkg -l apach2 php8.3-common mysql-server
systemctl enable --now apach2
systemctl enable mysql --now

cd /var/www/html/
vi phpinfo.php

ufw allow 80


create database wpDB;
create user wpUser@localhost identifie by '1234';
grant all on wpDB.* to wpUser@localhost;
exit
wget https://ko.wordpress.org/wordpress-6.6.1-ko_KR.tar.gz
tar xfz word*
mv wordpress /var/www/html
cd /var/www/html

chmod 707 wordpress
chown -R www-data:www-data wordpress 

cd wordpress
cp wp-config-sample.php wp-config.php

vi wp-config.php
#

vi /etc/apach2/sites-enabled

vi /etc/apach2/apache2.conf

  • systemctl restart apach2

 

 


https://www.youtube.com/watch?v=2jTA749YXnw&list=PLqTUMsvO70nnPQ42mtOKCgzlXeIy8GB0U&index=64

 

apt update
apt -y install apache2 mysql-server mysql-client
systemctl enable --now apache2
systemctl enable mysql
mysql_secure_installation # 비번 초기화

Securing the MySQL server deployment.

Connecting to MySQL using a blank password.

VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?

Press y|Y for Yes, any other key for No:

Skipping password set for root as authentication with auth_socket is used by default.
If you would like to use password authentication instead, this can be done with the "ALTER_USER" command.
See https://dev.mysql.com/doc/refman/8.0/en/alter-user.html#alter-user-password-management for more information.

By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) :

 ... skipping.


Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) :

 ... skipping.
By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.


Remove test database and access to it? (Press y|Y for Yes, any other key for No) :

 ... skipping.
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) :

 ... skipping.
All done!
mysql
create database webDB;
create user webUser@localhost identified by '1234';
grant all on webDB.* to webUser@localhost;
exit


root@ServerA:~# cd php74/
root@ServerA:~/php74# ls
debsuryorg-archive-keyring_2024.02.05+ubuntu24.04.1+deb.sury.org+1_all.deb
libapache2-mod-php7.4_1%3a7.4.33-14+ubuntu24.04.1+deb.sury.org+1_amd64.deb
libsodium23_1.0.18-1build3_amd64.deb
libzip4t64_1.7.3-1.1ubuntu2_amd64.deb
partial
php-common_2%3a94+ubuntu24.04.1+deb.sury.org+1_all.deb
php7.4-cli_1%3a7.4.33-14+ubuntu24.04.1+deb.sury.org+1_amd64.deb
php7.4-common_1%3a7.4.33-14+ubuntu24.04.1+deb.sury.org+1_amd64.deb
php7.4-curl_1%3a7.4.33-14+ubuntu24.04.1+deb.sury.org+1_amd64.deb
php7.4-gd_1%3a7.4.33-14+ubuntu24.04.1+deb.sury.org+1_amd64.deb
php7.4-intl_1%3a7.4.33-14+ubuntu24.04.1+deb.sury.org+1_amd64.deb
php7.4-json_1%3a7.4.33-14+ubuntu24.04.1+deb.sury.org+1_amd64.deb
php7.4-mbstring_1%3a7.4.33-14+ubuntu24.04.1+deb.sury.org+1_amd64.deb
php7.4-mysql_1%3a7.4.33-14+ubuntu24.04.1+deb.sury.org+1_amd64.deb
php7.4-opcache_1%3a7.4.33-14+ubuntu24.04.1+deb.sury.org+1_amd64.deb
php7.4-readline_1%3a7.4.33-14+ubuntu24.04.1+deb.sury.org+1_amd64.deb
php7.4-xml_1%3a7.4.33-14+ubuntu24.04.1+deb.sury.org+1_amd64.deb
php7.4-zip_1%3a7.4.33-14+ubuntu24.04.1+deb.sury.org+1_amd64.deb
php7.4_1%3a7.4.33-14+ubuntu24.04.1+deb.sury.org+1_all.deb
pkgcache.bin
srcpkgcache.bin
root@ServerA:~/php74# dpkg -i --force-all *.deb
root@ServerA:~# mv owncloud-10.15.0.zip /var/www/html/
root@ServerA:~# cd /var/www/html/
root@ServerA:/var/www/html# unzip -q owncloud-10.15.0.zip
root@ServerA:/var/www/html# ls
index.html  owncloud  owncloud-10.15.0.zip
root@ServerA:/var/www/html# mkdir owncloud/data
root@ServerA:/var/www/html# chown -R www-data:www-data owncloud
root@ServerA:/var/www/html# chmod -R 755 owncloud
root@ServerA:/var/www/html# ls -l
합계 70488
-rw-r--r--  1 root     root        10671 11월 20 20:14 index.html
drwxr-xr-x 13 www-data www-data     4096 11월 20 20:29 owncloud
-rw-r--r--  1 root     root     72161167 11월 20 20:28 owncloud-10.15.0.zip

  • 지금까지는 웹하드 방식으로 진행

클라우드 방식으로 사용해보기

리눅스 클라이언트

https://jamong1014.tistory.com/111

 

[Server]OwnCloud 'data 폴더' 바꾸기 (Ubuntu/Debian)

가정 현재 폴더 : /var/www/owncloud/data 새 폴더 : /mnt/owncloud/data 아파치로 웹 서버 사용 중 OwnCloud의 데이터베이스 이름은 'owncloud' 단계 설명 아파치 중지 인스턴스에 대한 유지 관리 모드 활성화 Rsync

jamong1014.tistory.com

 

반응형

'b정리 > 이것이 리눅스다-우분투-3판' 카테고리의 다른 글

sftp 서버  (0) 2024.11.22
FTP-vsftpd-sftpd  (0) 2024.11.22
하드디스크관리2  (0) 2024.11.20
하드디스크관리-RAID 개념과 종류  (2) 2024.11.16
하드디스크관리  (1) 2024.11.15