Last active
April 20, 2022 13:36
-
-
Save miladimos/c6c315ef3fab95979009ab285e158d3f to your computer and use it in GitHub Desktop.
centos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add user: | |
adduser user | |
password user | |
gpasswd -a user wheel | |
vi /etc/ssh/sshd_config | |
PermissionRootLogin No | |
/home/user | |
make .ssh | |
chmod 700 .ssh | |
copy public key in authorized_keys in .ssh with 600 perms | |
nginx: | |
sudo yum install epel-release | |
sudo yum install nginx | |
sudo systemctl start nginx | |
sudo systemctl enable nginx | |
sudo firewall-cmd --permanent --zone=public --add-service=http | |
sudo firewall-cmd --permanent --zone=public --add-service=https | |
sudo firewall-cmd --reload | |
postgresql: | |
sudo yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm | |
sudo yum repolist -y | |
sudo yum -y update | |
sudo systemctl reboot | |
sudo yum install -y postgresql14-server postgresql14 | |
sudo /usr/pgsql-14/bin/postgresql-14-setup initdb | |
sudo systemctl enable --now postgresql-14 | |
sudo su - postgres | |
psql | |
alter user postgres with password 'PostgresStr0ngPassw0rd#'; | |
mysql: | |
sudo yum install mariadb-server | |
sudo systemctl start mariadb | |
sudo systemctl enable mariadb | |
sudo mysql_secure_installation | |
php8: | |
sudo yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
sudo yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm | |
sudo yum -y install yum-utils | |
sudo yum-config-manager --disable 'remi-php*' | |
sudo yum-config-manager --enable remi-php80 | |
sudo yum -y install php php-{cli,fpm,mysqlnd,zip,devel,gd,mbstring,curl,xml,pear,bcmath,json,common,mailparse,opcache,yaml,uuid,imagick,bz2,imap,soap,mysql,tokenizer,mcrypt} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment