728x90 프로그래밍13 MySQL create a database and a user and grant all privileges/read only Login MySQL with root account $ mysql -u root -p Enter password: Create a database mysql> CREATE DATABASE sample; Query OK, 1 row affected (0.00 sec) Create users // For all IPs, use '%' mysql> CREATE USER 'sample_writer'@'%' identified by 'sample_password'; Query OK, 0 rows affected (0.01 sec) // For only localhost, use 'localhost' or '127.0.0.1' mysql> CREATE USER 'sample_writer'@'localhost' i.. 2023. 2. 17. Create Swap Memory on Amazon Linux Size of swap memory Amount of RAM installed in system Recommended swap space Recommended swap space with hibernation ≤ 2GB 2X RAM 3X RAM 2GB – 8GB = RAM 2X RAM 8GB – 64GB 4G to 0.5X RAM 1.5X RAM >64GB Minimum 4GB Hibernation not recommended Table 1: Recommended system swap space in Fedora 28's documentation. Create swap file and apply it dd command can take long times. $ sudo dd if=/dev/zero of=.. 2023. 1. 26. Generate crt and key on Amazon Linux $ openssl req -newkey rsa:4096 -x509 -sha256 -days 3650 -nodes -out server.crt -keyout server.key Generating a 4096 bit RSA private key ...................................................................................................................................................................++ ...................++ writing new private key to 'server.key' ----- You are about to be asked to.. 2023. 1. 26. Deploy HTTPS Web services on Amazon Linux 2 https://antlala.tistory.com/71 Running Golang Service on Amazon Linux 2 Download source code and build $ mkdir go $ cd go $ mkdir src $ cd src $ mkdir yourid $ cd yourid $ git clone https://github.com/yourid/sample-service.git $ cd sample-service $ go mod tidy $ go build Make a service file $ sudo vi /lib/systemd/system/new-se antlala.tistory.com Install Nginx $ sudo amazon-linux-extras install .. 2023. 1. 26. 이전 1 2 3 4 다음 728x90